mirror of
https://github.com/eclipse/upm.git
synced 2025-03-24 01:10:22 +03:00
c11: enable C11 standards conformance unconditionally
Signed-off-by: Jon Trulson <jtrulson@ics.com>
This commit is contained in:
parent
f101db2af1
commit
1ae4119925
@ -143,6 +143,21 @@ if (CMAKE_VERSION VERSION_LESS "3.1")
|
|||||||
else()
|
else()
|
||||||
# 3.1+ uses this generic method to enable c++11
|
# 3.1+ uses this generic method to enable c++11
|
||||||
set (CMAKE_CXX_STANDARD 11)
|
set (CMAKE_CXX_STANDARD 11)
|
||||||
|
set (CXX_STANDARD_REQUIRED ON)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
include(CheckCCompilerFlag)
|
||||||
|
if (CMAKE_VERSION VERSION_LESS "3.1")
|
||||||
|
CHECK_C_COMPILER_FLAG("-std=c11" COMPILER_SUPPORTS_C11)
|
||||||
|
if (COMPILER_SUPPORTS_C11)
|
||||||
|
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=c11")
|
||||||
|
else()
|
||||||
|
message(FATAL_ERROR "A C11 compliant C compiler is required to build UPM.")
|
||||||
|
endif()
|
||||||
|
else()
|
||||||
|
# 3.1+ uses this generic method to enable c11
|
||||||
|
set (CMAKE_C_STANDARD 11)
|
||||||
|
set (C_STANDARD_REQUIRED ON)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
# The doc target depends on each sensor target
|
# The doc target depends on each sensor target
|
||||||
|
Loading…
x
Reference in New Issue
Block a user