mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-06-02 20:28:37 +08:00
Modify build for XCode 8
This commit is contained in:
committed by
Lorenz Meier
parent
398d9642cb
commit
edf0057cee
@@ -88,7 +88,7 @@ set(config_module_list
|
|||||||
#modules/mavlink/mavlink_tests #TODO: fix mavlink_tests
|
#modules/mavlink/mavlink_tests #TODO: fix mavlink_tests
|
||||||
modules/unit_test
|
modules/unit_test
|
||||||
modules/uORB/uORB_tests
|
modules/uORB/uORB_tests
|
||||||
systemcmds/tests
|
#systemcmds/tests
|
||||||
|
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -190,20 +190,22 @@ if(UNIX AND APPLE)
|
|||||||
-D__PX4_POSIX
|
-D__PX4_POSIX
|
||||||
-D__PX4_DARWIN
|
-D__PX4_DARWIN
|
||||||
-D__DF_DARWIN
|
-D__DF_DARWIN
|
||||||
-DCLOCK_MONOTONIC=1
|
|
||||||
-Dnoreturn_function=__attribute__\(\(noreturn\)\)
|
-Dnoreturn_function=__attribute__\(\(noreturn\)\)
|
||||||
-include ${PX4_INCLUDE_DIR}visibility.h
|
-include ${PX4_INCLUDE_DIR}visibility.h
|
||||||
)
|
)
|
||||||
|
|
||||||
set(added_cxx_flags)
|
set(added_cxx_flags)
|
||||||
|
|
||||||
|
if (CMAKE_CXX_COMPILER_VERSION VERSION_LESS 8.0)
|
||||||
|
message(FATAL_ERROR "PX4 Firmware requires XCode 8 or newer on Mac OS. Version installed on this system: ${CMAKE_CXX_COMPILER_VERSION}")
|
||||||
|
endif()
|
||||||
|
|
||||||
else()
|
else()
|
||||||
|
|
||||||
set(added_definitions
|
set(added_definitions
|
||||||
-D__PX4_POSIX
|
-D__PX4_POSIX
|
||||||
-D__PX4_LINUX
|
-D__PX4_LINUX
|
||||||
-D__DF_LINUX
|
-D__DF_LINUX
|
||||||
-DCLOCK_MONOTONIC=1
|
|
||||||
-Dnoreturn_function=__attribute__\(\(noreturn\)\)
|
-Dnoreturn_function=__attribute__\(\(noreturn\)\)
|
||||||
-include ${PX4_INCLUDE_DIR}visibility.h
|
-include ${PX4_INCLUDE_DIR}visibility.h
|
||||||
)
|
)
|
||||||
|
|||||||
Reference in New Issue
Block a user