Require C11 (#101)

* Made CMake enforce the C11 standard during build.
This commit is contained in:
Hunter Allen 2016-12-23 10:34:17 -06:00 committed by Dirk Thomas
parent 88888fb672
commit 5f74a081e1

View file

@ -46,6 +46,7 @@ call_for_each_rmw_implementation(targets GENERATE_DEFAULT)
if(BUILD_TESTING) if(BUILD_TESTING)
if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang") if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang")
set(CMAKE_C_FLAGS ${CMAKE_C_FLAGS} "-std=c11")
set(CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS} "-std=c++14") set(CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS} "-std=c++14")
add_compile_options(-Wall -Wextra -Wpedantic) add_compile_options(-Wall -Wextra -Wpedantic)
endif() endif()