aboutsummaryrefslogtreecommitdiffstats
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorJoão Valverde <j@v6e.pt>2021-11-15 14:27:42 +0000
committerWireshark GitLab Utility <gerald+gitlab-utility@wireshark.org>2021-11-15 16:36:17 +0000
commit14c52913e216561ca44f57a453a4d3e5eede11eb (patch)
treef6605ecfed2597d6ae49fbdbd659a4f757103b0d /CMakeLists.txt
parentaa1515b32bf43f267c28d6d273e76a94e42bc2a3 (diff)
CMake: Improve a status message and add a comment
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt16
1 files changed, 7 insertions, 9 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 9da7057ebe..183a343188 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -65,6 +65,12 @@ set(CMAKE_CXX_EXTENSIONS OFF)
message(STATUS "Generating build using CMake ${CMAKE_VERSION}")
+# Avoid an empty build type. If this is already set it does nothing.
+set(CMAKE_BUILD_TYPE "RelWithDebInfo" CACHE STRING
+ "Choose the build configuration (one of Debug, MinSizeRel, RelWithDebInfo, Release)")
+# Build type is ignored by multi-config generators.
+message(STATUS "Using ${CMAKE_GENERATOR} generator and build type ${CMAKE_BUILD_TYPE}")
+
#Where to find local cmake scripts
set(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake/modules)
@@ -144,7 +150,7 @@ if(WIN32)
endif()
endif()
message(STATUS
- "Building for ${WIRESHARK_TARGET_PLATFORM} using \"${CMAKE_GENERATOR}\" \
+ "Building for ${WIRESHARK_TARGET_PLATFORM} \
and CPU target ${WIRESHARK_TARGET_PROCESSOR_ARCHITECTURE}"
)
@@ -188,14 +194,6 @@ endif(WIN32)
include(UseCustomIncludes)
ADD_CUSTOM_CMAKE_INCLUDE()
-# 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 "CMake build type: ${CMAKE_BUILD_TYPE}")
-
# Ensure that all executables and libraries end up in the same directory. Actual
# files might end up in a configuration subdirectory, e.g. run/Debug or
# run/Release. We try to set DATAFILE_DIR to actual location below.