diff --git a/CMakeLists.txt b/CMakeLists.txt index 70daa80a4f..96fde08c77 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -9,6 +9,11 @@ project(uavcan C CXX) #============================================================================= # build options # + +if(${CMAKE_SYSTEM_NAME} STREQUAL "Linux") + set(DEFAULT_UAVCAN_PLATFORM "linux") +endif() + # options are listed in a table format below set(opts # name: type: default value: string options list : description @@ -66,12 +71,12 @@ install(DIRECTORY dsdl DESTINATION share/uavcan) add_subdirectory(libuavcan) # drivers -add_subdirectory(libuavcan_drivers/posix) - if (${UAVCAN_PLATFORM} STREQUAL "linux") message(STATUS "Adding Linux support library") + add_subdirectory(libuavcan_drivers/posix) add_subdirectory(libuavcan_drivers/linux) elseif(${UAVCAN_PLATFORM} STREQUAL "stm32") + add_subdirectory(libuavcan_drivers/posix) add_subdirectory(libuavcan_drivers/stm32/driver) endif() diff --git a/libuavcan/CMakeLists.txt b/libuavcan/CMakeLists.txt index 0298b4b7ea..7f16ab35e0 100644 --- a/libuavcan/CMakeLists.txt +++ b/libuavcan/CMakeLists.txt @@ -47,7 +47,7 @@ if (COMPILER_IS_GCC_COMPATIBLE) message(STATUS "Using C++03") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++03 -Wno-variadic-macros -Wno-long-long") else () - message(STATUS "Using C++11 (pass USE_CPP03=1 to override)") + message(STATUS "Using C++11 (pass UAVCAN_USE_CPP03=1 to override)") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11") endif () endif ()