Commit 5ff8f9d6 authored by Millian Poquet's avatar Millian Poquet

The compile flag -std=c11 is now disabled (caused compile-time errors when...

The compile flag -std=c11 is now disabled (caused compile-time errors when using SMPI on my machine)
parent 2d484922
......@@ -7,17 +7,17 @@ project("Batsim")
set(CMAKE_BUILD_TYPE Debug)
# Enable C11 or at least C99
include(CheckCCompilerFlag)
CHECK_C_COMPILER_FLAG("-std=c11" COMPILER_SUPPORTS_C11)
CHECK_C_COMPILER_FLAG("-std=c99" COMPILER_SUPPORTS_C99)
if(COMPILER_SUPPORTS_C11)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=c11")
elseif(COMPILER_SUPPORTS_C99)
message(STATUS "The compiler ${CMAKE_C_COMPILER} has no C11 support. Using C99 instead.")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=c99")
else()
message(STATUS "The compiler ${CMAKE_C_COMPILER} has no C11 nor C99 support. Please update your C compiler.")
endif()
#include(CheckCCompilerFlag)
#CHECK_C_COMPILER_FLAG("-std=c11" COMPILER_SUPPORTS_C11)
#CHECK_C_COMPILER_FLAG("-std=c99" COMPILER_SUPPORTS_C99)
#if(COMPILER_SUPPORTS_C11)
# set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=c11")
#elseif(COMPILER_SUPPORTS_C99)
# message(STATUS "The compiler ${CMAKE_C_COMPILER} has no C11 support. Using C99 instead.")
# set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=c99")
#else()
# message(STATUS "The compiler ${CMAKE_C_COMPILER} has no C11 nor C99 support. Please update your C compiler.")
#endif()
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wextra")
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment