summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Rondeau2012-03-31 18:13:07 -0400
committerTom Rondeau2012-03-31 18:13:07 -0400
commitfd52df0f706195d937e287189024f8aa6fbeaf60 (patch)
treef5fee4dbbd93da67efa625851419266dfb2612b6
parent5d3d5cf4315e14be805d8b87c00d0110c4a79797 (diff)
downloadgnuradio-fd52df0f706195d937e287189024f8aa6fbeaf60.tar.gz
gnuradio-fd52df0f706195d937e287189024f8aa6fbeaf60.tar.bz2
gnuradio-fd52df0f706195d937e287189024f8aa6fbeaf60.zip
build: use -O2 with cmake in Debug build.
-rw-r--r--CMakeLists.txt4
1 files changed, 4 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 4979e3498..a9cbe055a 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -40,6 +40,10 @@ list(APPEND CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake/Modules)
include(GrVersion) #setup version info
+# Append -O2 optimization flag for Debug builds
+SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -O2")
+SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -O2")
+
########################################################################
# Import executables from a native build (for cross compiling)
# http://www.vtk.org/Wiki/CMake_Cross_Compiling#Using_executables_in_the_build_created_during_the_build