cmake: don't overwrite profiling option

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@39000 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Peter Kümmel 2011-06-11 08:54:27 +00:00
parent cd861f10c5
commit 0a051ef369

View File

@ -354,9 +354,12 @@ set(LYX_MOC_FILES moc_*.cpp)
include(ProjectSourceGroup)
if(LYX_PROFILE)
if(NOT MSVC)
set(CMAKE_BUILD_TYPE Profile CACHE TYPE STRING FORCE)
set(CMAKE_CXX_FLAGS_PROFILE "${CMAKE_CXX_FLAGS_RELEASE} -pg" CACHE TYPE STRING FORCE)
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -pg" CACHE TYPE STRING FORCE)
else()
set(LYX_PROFILE OFF)
endif()
@ -364,9 +367,14 @@ if(LYX_NO_OPTIMIZE)
set(CMAKE_BUILD_TYPE None)
set(LYX_DEBUG OFF)
set(LYX_RELEASE OFF)
set(LYX_PROFILE OFF)
elseif(LYX_RELEASE)
set(CMAKE_BUILD_TYPE Release)
set(LYX_DEBUG OFF)
set(LYX_PROFILE OFF)
elseif(LYX_PROFILE)
set(CMAKE_BUILD_TYPE Profile)
set(LYX_DEBUG OFF)
else()
set(CMAKE_BUILD_TYPE Debug)
set(LYX_DEBUG ON)
@ -399,7 +407,6 @@ if(NOT MSVC)
else()
set(CMAKE_CXX_FLAGS_RELEASE "${LYX_CXX_FLAGS} -O3 -DNDEBUG" CACHE TYPE STRING FORCE)
endif()
set(CMAKE_CXX_FLAGS_PROFILE "${CMAKE_CXX_FLAGS_RELEASE} -pg" CACHE TYPE STRING FORCE)
endif()