mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-22 01:59:02 +00:00
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:
parent
cd861f10c5
commit
0a051ef369
@ -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_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -pg" 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()
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user