introduced std check

This commit is contained in:
Robin Müller 2021-05-27 11:56:52 +02:00
parent 5d2c62e75d
commit 2bf5a972e1
No known key found for this signature in database
GPG Key ID: 71B58F8A3CDFA9AC
1 changed files with 7 additions and 0 deletions

View File

@ -18,6 +18,13 @@ add_library(${LIB_FSFW_NAME})
set_property(CACHE OS_FSFW PROPERTY STRINGS host linux rtems freertos)
if(NOT CMAKE_CXX_STANDARD)
set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_STANDARD_REQUIRED True)
elseif(${CMAKE_CXX_STANDARD} LESS 11)
message(FATAL_ERROR "Compiling the FSFW requires a minimum of C++11 support")
endif()
if(NOT OS_FSFW)
message(STATUS "No OS for FSFW via OS_FSFW set. Assuming host OS")
# Assume host OS and autodetermine from OS_FSFW