From b0c31196c349c94b37d66345a412c549309e52d3 Mon Sep 17 00:00:00 2001 From: PBerger Date: Mon, 17 Sep 2012 18:55:24 +0200 Subject: [PATCH] Edited CMakeLists.txt, added a checkbox to disable/enable debug symbols with GCC --- CMakeLists.txt | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 76df18c29..10f1833fc 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -8,12 +8,15 @@ set (MRMC_CPP_VERSION_MINOR 0) #Configurations for GCC if(CMAKE_COMPILER_IS_GNUCC) - + set(MRMC_GCC_NO_DEBUG_SYMBOLS OFF CACHE BOOL "Whether debug symbols should be included in MRMC with GCC, set ON for better performance") #Using C++11 set (CMAKE_CXX_FLAGS "-std=c++0x") #Debug symbols - set (CMAKE_CXX_FLAGS_DEBUG "-g") + if (NOT MRMC_GCC_NO_DEBUG_SYMBOLS) + set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g") + message(STATUS "Using Debug Symbols for GCC") + endif() endif() # configure a header file to pass some of the CMake settings