| summaryrefslogtreecommitdiff |
diff options
| author | Nathanael Sensfelder <SpamShield0@MultiAgentSystems.org> | 2017-06-16 18:04:15 +0200 |
|---|---|---|
| committer | Nathanael Sensfelder <SpamShield0@MultiAgentSystems.org> | 2017-06-16 18:04:15 +0200 |
| commit | 7cffb5df19cefd6169da43864737551d393abd91 (patch) | |
| tree | f198de72c02577bf146625f839e67732e9e0f25d | |
| parent | ae1ddc45b17a80e2243320cf490c0d43317a3772 (diff) | |
$CFLAGS handling
| -rw-r--r-- | CMakeLists.txt | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 6c10b92..7ee5c95 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -8,12 +8,14 @@ add_subdirectory(src) add_definitions(-D_POSIX_SOURCE) add_definitions(-D_POSIX_C_SOURCE=200809L) +set(CMAKE_C_FLAGS $ENV{CFLAGS}) if(CMAKE_COMPILER_IS_GNUCC) - set(CMAKE_C_FLAGS "-g -Wall -Wpedantic -Wconversion") + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -g -Wall -Wpedantic -Wconversion") message(STATUS "GNUCC detected. Adding '-O3' parameter.") - set(CMAKE_C_FLAGS "-O3") + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -O3") #set(CMAKE_C_FLAGS " -g") endif() +message(STATUS "CFLAGS=${CMAKE_C_FLAGS}") # ${SRC_FILES} is recursively defined in the subdirectories. # Each subdirectory only adds the source files that are present at its level. |


