summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--CMakeLists.txt9
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")