Fix usage of CMAKE_BUILD_TYPE setting
authorGabor Buella <gbuella@gmail.com>
Fri, 19 May 2017 13:33:08 +0000 (15:33 +0200)
committerGabor Buella <gbuella@gmail.com>
Fri, 19 May 2017 13:33:08 +0000 (15:33 +0200)
The build type was set to Release in the top level cmake file.
This was a rather confusing behaviour, as one would expect to
be able to easily debug the code after using `cmake -DCMAKE_BUILD_TYPE=Debug`.

CMakeLists.txt

index 701e5f02ecd0083c399c7af05d464443060c05e3..858e12a66b9c4523f4fbedb317fdf43a1881d626 100644 (file)
@@ -3,7 +3,9 @@
 cmake_minimum_required(VERSION 2.8.7)
 
 project(bcc)
-set(CMAKE_BUILD_TYPE Release)
+if(NOT CMAKE_BUILD_TYPE)
+  set(CMAKE_BUILD_TYPE Release)
+endif()
 
 enable_testing()