mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-25 19:07:45 +00:00
cmake: don't write options changed because of dependencies into the cache, this way it is possible to switch on/off options with all it dependencies.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@37296 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
2e516e9204
commit
d8e5e13690
@ -36,25 +36,9 @@ include(LyXMacros)
|
||||
|
||||
LYX_OPTION_INIT()
|
||||
|
||||
LYX_OPTION(CPACK "Use the CPack management (Implies LYX_INSTALL option)" OFF ALL)
|
||||
if(LYX_CPACK)
|
||||
set(LYX_INSTALL ON CACHE BOOL "INSTALL option" FORCE)
|
||||
endif()
|
||||
|
||||
LYX_OPTION(INSTALL "Build install projects/rules (implies a bunch of other options)" OFF ALL)
|
||||
if(LYX_INSTALL)
|
||||
set(LYX_NLS ON CACHE BOOL "Nls option" FORCE)
|
||||
set(LYX_ASPELL ON CACHE BOOL "Aspell option" FORCE)
|
||||
if (WIN32)
|
||||
set(LYX_HUNSPELL ON CACHE BOOL "Hunspell option" FORCE)
|
||||
endif()
|
||||
set(LYX_CONSOLE OFF CACHE BOOL "No console option" FORCE)
|
||||
set(LYX_PACKAGE_SUFFIX ON CACHE BOOL "Package suffix option" FORCE)
|
||||
set(LYX_RELEASE ON CACHE BOOL "Release option" FORCE)
|
||||
set(LYX_PROFILE OFF CACHE BOOL "Profile option" FORCE)
|
||||
endif()
|
||||
|
||||
# Options for all compilers/systems
|
||||
LYX_OPTION(CPACK "Use the CPack management (Implies LYX_INSTALL option)" OFF ALL)
|
||||
LYX_OPTION(INSTALL "Build install projects/rules (implies a bunch of other options)" OFF ALL)
|
||||
LYX_OPTION(NLS "Use nls" OFF ALL)
|
||||
LYX_OPTION(ASPELL "Require aspell" OFF ALL)
|
||||
LYX_OPTION(ENCHANT "Require Enchant" OFF ALL)
|
||||
@ -85,6 +69,31 @@ LYX_OPTION(WALL "Enable all warnings" OFF MSVC)
|
||||
LYX_OPTION(LYX_CONFIGURE_CHECKS "Also run configure checks for MSVC" OFF MSVC)
|
||||
|
||||
|
||||
# Check option dependencies
|
||||
if(LYX_CPACK)
|
||||
set(LYX_INSTALL ON)
|
||||
endif()
|
||||
|
||||
if(LYX_INSTALL)
|
||||
set(LYX_NLS ON)
|
||||
set(LYX_ASPELL ON)
|
||||
if (WIN32)
|
||||
set(LYX_HUNSPELL ON)
|
||||
endif()
|
||||
set(LYX_CONSOLE OFF)
|
||||
set(LYX_PACKAGE_SUFFIX ON)
|
||||
set(LYX_RELEASE ON)
|
||||
set(LYX_PROFILE OFF)
|
||||
endif()
|
||||
|
||||
if(LYX_MERGE_FILES)
|
||||
set(LYX_PCH OFF)
|
||||
else()
|
||||
set(LYX_MERGE_REBUILD OFF)
|
||||
endif()
|
||||
|
||||
|
||||
|
||||
message(STATUS)
|
||||
|
||||
set(EXECUTABLE_OUTPUT_PATH ${CMAKE_BINARY_DIR}/bin)
|
||||
@ -343,12 +352,6 @@ endforeach(_v)
|
||||
message(STATUS "")
|
||||
|
||||
|
||||
if(LYX_MERGE_FILES)
|
||||
set(LYX_PCH OFF)
|
||||
else()
|
||||
set(LYX_MERGE_REBUILD OFF)
|
||||
endif()
|
||||
|
||||
if(LYX_PCH)
|
||||
# PCHs not supported by cmake: http://www.cmake.org/Bug/view.php?id=1260
|
||||
# Not sure if it works for all non-msvc compilers
|
||||
@ -380,7 +383,6 @@ if(LYX_PCH)
|
||||
endmacro()
|
||||
endif()
|
||||
else()
|
||||
set(LYX_PCH OFF CACHE STRING "Disable precompiled headers")
|
||||
macro(lyx_add_msvc_pch)
|
||||
endmacro(lyx_add_msvc_pch)
|
||||
macro(lyx_add_gcc_pch name_)
|
||||
|
Loading…
Reference in New Issue
Block a user