From 8ef5b6d30224625369956d230a6ab2c53c03000a Mon Sep 17 00:00:00 2001 From: Florent Castelli Date: Wed, 25 Jan 2017 23:32:13 +0100 Subject: [PATCH] cmake: Removes check against CMAKE_BUILD_TYPE for multi-configuration generators --- CMakeLists.txt | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 8b695c3d1e..a30acd42e5 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -336,17 +336,13 @@ if(NOT CMAKE_BUILD_TYPE) "Build type (Release/Debug/RelWithDebInfo/MinSizeRel)" FORCE) endif() - -if(CMAKE_BUILD_TYPE STREQUAL "Debug") - - option(ENABLE_GPROF "Enable gprof profiling (must be using Debug build)" OFF) - if(ENABLE_GPROF) - check_and_add_flag(HAVE_PG -pg) - if(NOT FLAG_C_HAVE_PG) - message(FATAL_ERROR "Compiler option -pg is not supported") - endif() - set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -pg") +option(ENABLE_GPROF "Enable gprof profiling (must be using Debug build)" OFF) +if(ENABLE_GPROF) + check_and_add_flag(HAVE_PG -pg) + if(NOT FLAG_C_HAVE_PG) + message(FATAL_ERROR "Compiler option -pg is not supported") endif() + set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -pg") endif() if(FASTLOG)