Added option for C99 builds.

This commit is contained in:
Markus Makela
2015-06-29 16:01:56 +03:00
parent c6f43c0058
commit 2c3c856ea1
2 changed files with 10 additions and 1 deletions

View File

@ -114,7 +114,13 @@ if(PROFILE)
set(FLAGS "${FLAGS} -pg " CACHE STRING "Compilation flags" FORCE)
endif()
set(CMAKE_C_FLAGS "${FLAGS}")
if(USE_C99)
message(STATUS "Using C99 standard")
set(CMAKE_C_FLAGS "-std=c99 -D_GNU_SOURCE=1 ${FLAGS}")
else()
set(CMAKE_C_FLAGS "${FLAGS}")
endif()
set(CMAKE_C_FLAGS_DEBUG "${DEBUG_FLAGS} -DSS_DEBUG -DLOG_ASSERT")
set(CMAKE_C_FLAGS_RELEASE "")
set(CMAKE_C_FLAGS_RELWITHDEBINFO "-ggdb")

View File

@ -20,6 +20,9 @@ endmacro()
macro(set_variables)
# Use C99
set(USE_C99 FALSE CACHE BOOL "Use C99 standard")
# hostname or IP address of MaxScale's host
set(TEST_HOST "127.0.0.1" CACHE STRING "hostname or IP address of MaxScale's host")