aboutsummaryrefslogtreecommitdiffstats
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorJörg Mayer <jmayer@loplof.de>2013-11-04 20:29:29 +0000
committerJörg Mayer <jmayer@loplof.de>2013-11-04 20:29:29 +0000
commitde057472f3246eb6b1fe288b32aaf6f0d9fc994a (patch)
treef9291436c6aca02f198e049ff42d4a788fafdcd1 /CMakeLists.txt
parent629aa84ea13b6cc2afde881b82d51f2db52c60c8 (diff)
- Reenable /LARGEADDRESSAWARE on Windows platform
- Add a CMAKE_BUILD_TYPE default of RelWithDebInfo (Release with debug info), print the choice. This will pick up the previously used flags LINK_FLAGS and CMAKE_C_FLAGS and CMAKE_CXX_FLAGS but also pick up the variables postfixed by _<build-type> - Remove Optimization (-O2) and debug (-g) flags from list of default flags as they are now automagically set by CMAKE_C_FLAGS_RELWITHDEBINFO etc. NOTE: This also needs to be done for the Windows flags, I just don't have a Win system to test on right now. svn path=/trunk/; revision=53083
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt20
1 files changed, 14 insertions, 6 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 61013f0087..9173aa9378 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -33,6 +33,15 @@ if(COMMAND cmake_policy)
# cmake_policy(SET CMP0015 NEW)
endif(COMMAND cmake_policy)
+# This cannot be implemented via option(...)
+if( NOT CMAKE_BUILD_TYPE )
+ set( CMAKE_BUILD_TYPE RelWithDebInfo CACHE STRING
+ "Choose the type of build, options are: None Debug Release RelWithDebInfo MinSizeRel."
+ FORCE)
+endif()
+message(STATUS "Configuration types: ${CMAKE_CONFIGURATION_TYPES}")
+message(STATUS "${CMAKE_BUILD_TYPE}: ${CMAKE_C_FLAGS_RELWITHDEBINFO}")
+
# set(PROJECT_MAJOR_VERSION 1)
# set(PROJECT_MINOR_VERSION 9)
# set(PROJECT_PATCH_VERSION 0)
@@ -146,8 +155,7 @@ if( CMAKE_C_COMPILER_ID MATCHES "MSVC")
)
else()
set(WIRESHARK_C_FLAGS
- -O2
- -g
+ # -O<X> and -g get set by the CMAKE_BUILD_TYPE
-Wall
-W
-Wextra
@@ -288,10 +296,10 @@ endif()
if( CMAKE_C_COMPILER_ID MATCHES "MSVC")
- # Set in Makefile.nmake but doesn't seem to have any effect
- # set(WIRESHARK_LD_FLAGS
- # /LARGEADDRESSAWARE
- # )
+ # Set in Makefile.nmake
+ set(WIRESHARK_LD_FLAGS
+ /LARGEADDRESSAWARE
+ )
else()
set(WIRESHARK_LD_FLAGS
-Wl,--as-needed