diff options
author | Simon Rettberg | 2022-06-23 11:19:06 +0200 |
---|---|---|
committer | Simon Rettberg | 2022-06-23 11:19:06 +0200 |
commit | 2a6155f1107a5f1dec3c41b2d843e521756b5bb0 (patch) | |
tree | 7e49ee2f8c1cf60bdfc89caa9b0ed488f6a997fd | |
parent | Add --console mode, to be used remotely (diff) | |
download | speedcheck-2a6155f1107a5f1dec3c41b2d843e521756b5bb0.tar.gz speedcheck-2a6155f1107a5f1dec3c41b2d843e521756b5bb0.tar.xz speedcheck-2a6155f1107a5f1dec3c41b2d843e521756b5bb0.zip |
cmake bullshit
build type was not honored before because we always set it to Debug. Now
it is, although if you don't pass it and it defaults to Debug, the
setting will still be empty in ccmake. Also, in ccmake, the CXX_FLAGS_*
will show their default values, even though the values we set in
CMakeLists.txt get used. Go figure.
-rw-r--r-- | CMakeLists.txt | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 90caaa3..7e1f2af 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -3,9 +3,14 @@ cmake_minimum_required(VERSION 2.8.12 FATAL_ERROR) # cmake -G"Eclipse CDT4 - Unix Makefiles" -D CMAKE_BUILD_TYPE=Debug .. # project name -project(speedcheck) +project(speedcheck LANGUAGES CXX) + +# set compilation in debug mode as default configuration +if(NOT CMAKE_BUILD_TYPE) + set(CMAKE_BUILD_TYPE Debug) + message(STATUS "Build type is not set. Defaulting to ${CMAKE_BUILD_TYPE} build!") +endif(NOT CMAKE_BUILD_TYPE) -set(CMAKE_BUILD_TYPE Debug) set(CMAKE_CXX_FLAGS_DEBUG "-O0 -g -Wall -Wextra -pedantic -Werror -Wno-multichar") set(CMAKE_CXX_FLAGS_RELEASE "-O2 -Wno-multichar") |