Commit 87ae2d98 authored by EYRAUD-DUBOIS Lionel's avatar EYRAUD-DUBOIS Lionel

Include DEBUG option to CMake

parent 164699cb
......@@ -3,7 +3,6 @@ cmake_minimum_required(VERSION 3.0.2)
project(pmtool)
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${PROJECT_SOURCE_DIR})
add_definitions("--std=c++11")
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g")
include_directories("include")
option(PROFILING "Include profiling information" OFF)
......@@ -15,6 +14,14 @@ if(PROFILING)
SET(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -pg")
endif()
option(DEBUG "Include debug information" ON)
if(DEBUG)
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g")
else()
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O3")
endif()
find_package(LibRec REQUIRED)
include_directories(${LIBREC_INCLUDE_DIRS})
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment