diff options
author | Joerg Mayer <jmayer@loplof.de> | 2015-01-05 20:35:25 +0100 |
---|---|---|
committer | Jörg Mayer <jmayer@loplof.de> | 2015-01-05 19:37:17 +0000 |
commit | 15a238a28d0dbfffe908a6451e411a64a34da678 (patch) | |
tree | e747e83af4b5d5c652404e11900cb517f4f53a01 /CMakeLists.txt | |
parent | 13dbf52ce382d9c5d1fc9de3c3830896c8c545ef (diff) | |
download | wireshark-15a238a28d0dbfffe908a6451e411a64a34da678.tar.gz |
Override optimization and other flags for make based generators.
Before this patch it was not possible to override e.g. the optimization
or debug flags in case the build type was set.
Change-Id: I53bfddd27f87ad5482227f786af8c4728c5774fc
Reviewed-on: https://code.wireshark.org/review/6327
Reviewed-by: Jörg Mayer <jmayer@loplof.de>
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 125d3008fa..4c3952382a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -45,6 +45,13 @@ if( NOT CMAKE_BUILD_TYPE ) FORCE) endif() message(STATUS "Configuration types: ${CMAKE_CONFIGURATION_TYPES}") + +# Override optimization and other flags for make based generators +foreach (_BT DEBUG RELEASE RELWITHDEBINFO SIZEREL) + set( CMAKE_C_FLAGS_${_BT} "${CMAKE_C_FLAGS_${_BT}} ${CMAKE_C_FLAGS}" ) + set( CMAKE_CXX_FLAGS_${_BT} "${CMAKE_C_FLAGS_${_BT}} ${CMAKE_C_FLAGS}" ) +endforeach() + message(STATUS "${CMAKE_BUILD_TYPE}: ${CMAKE_C_FLAGS_RELWITHDEBINFO}") #Where to put executables and libraries in the build tree if(NOT ARCHIVE_OUTPUT_PATH) |