diff --git a/Makefile b/Makefile index 4477a1c8f4..d4eb5672eb 100755 --- a/Makefile +++ b/Makefile @@ -122,7 +122,7 @@ endif define cmake-build +@$(eval BUILD_DIR = $(SRC_DIR)/build_$@$(BUILD_DIR_SUFFIX)) +@if [ $(PX4_CMAKE_GENERATOR) = "Ninja" ] && [ -e $(BUILD_DIR)/Makefile ]; then rm -rf $(BUILD_DIR); fi -+@if [ ! -e $(BUILD_DIR)/CMakeCache.txt ]; then mkdir -p $(BUILD_DIR) && $(call PX4_RUN, cd $(BUILD_DIR); cmake $(2) -G$(PX4_CMAKE_GENERATOR) -DCONFIG=$(1) $(CMAKE_ARGS)) || (rm -rf $(BUILD_DIR)); fi ++@if [ ! -e $(BUILD_DIR)/CMakeCache.txt ]; then mkdir -p $(BUILD_DIR) && $(call PX4_RUN, cd $(BUILD_DIR); cmake $(2) -G"$(PX4_CMAKE_GENERATOR)" -DCONFIG=$(1) $(CMAKE_ARGS)) || (rm -rf $(BUILD_DIR)); fi +@echo "PX4 CONFIG: $(BUILD_DIR)" +@$(call PX4_RUN,$(PX4_MAKE) -C "$(BUILD_DIR)" $(PX4_MAKE_ARGS) $(ARGS)) endef diff --git a/src/firmware/posix/CMakeLists.txt b/src/firmware/posix/CMakeLists.txt index 56faefcfd5..ffa3468f64 100644 --- a/src/firmware/posix/CMakeLists.txt +++ b/src/firmware/posix/CMakeLists.txt @@ -162,8 +162,16 @@ set(tests_exclude uart_break uart_console uart_loopback + uart_send ) +if (${CMAKE_SYSTEM_NAME} MATCHES "Darwin") + list(APPEND tests_exclude + hysteresis + mixer + ) +endif() + foreach(test_name ${test_src_files}) string(REPLACE "test_" "" test_name ${test_name}) string(REPLACE ".cpp" "" test_name ${test_name}) @@ -175,7 +183,7 @@ foreach(test_name ${test_src_files}) add_test(NAME ${test_name} COMMAND ${PX4_SOURCE_DIR}/Tools/sitl_run.sh $ - posix-configs/SITL/init/test/ + posix-configs/SITL/init/test none none ${test_name}_generated