Makefile: wipe incomplete ninja build generation

This commit is contained in:
Daniel Agar 2021-03-10 10:41:04 -05:00 committed by Lorenz Meier
parent 6914ebef4e
commit 3ad0da51c4
1 changed files with 2 additions and 0 deletions

View File

@ -174,6 +174,8 @@ define cmake-build
@$(call cmake-cache-check)
@# make sure to start from scratch when switching from GNU Make to Ninja
@if [ $(PX4_CMAKE_GENERATOR) = "Ninja" ] && [ -e $(BUILD_DIR)/Makefile ]; then rm -rf $(BUILD_DIR); fi
@# make sure to start from scratch if ninja build file is missing
@if [ $(PX4_CMAKE_GENERATOR) = "Ninja" ] && [ ! -f $(BUILD_DIR)/build.ninja ]; then rm -rf $(BUILD_DIR); fi
@# only excplicitly configure the first build, if cache file already exists the makefile will rerun cmake automatically if necessary
@if [ ! -e $(BUILD_DIR)/CMakeCache.txt ] || [ $(CMAKE_CACHE_CHECK) ]; then \
mkdir -p $(BUILD_DIR) \