]> git.lyx.org Git - lyx.git/commitdiff
cmake: now having the options output at the end we could make some dependency checkin...
authorPeter Kümmel <syntheticpp@gmx.net>
Sat, 22 Jan 2011 11:23:27 +0000 (11:23 +0000)
committerPeter Kümmel <syntheticpp@gmx.net>
Sat, 22 Jan 2011 11:23:27 +0000 (11:23 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@37294 a592a061-630c-0410-9148-cb99ea01b6c8

development/cmake/CMakeLists.txt

index 74241664e9eceb7455d5060e9c58c66fda1ec6de..40e15d0777f9e9d4c37eb1a5fd26ae145ead5fe5 100644 (file)
@@ -77,6 +77,7 @@ LYX_OPTION(DEBUG_GLIBC_PEDANTIC "Enable libstdc++pedantic debug mode" OFF GCC)
 LYX_OPTION(STDLIB_DEBUG "Use debug stdlib" OFF GCC)
 LYX_OPTION(CONCEPT_CHECKS "Enable concept-checks" OFF GCC)
 LYX_OPTION(QUIET "Don't generate verbose makefiles" OFF ALL)
+LYX_OPTION(LYX_CONFIGURE_CHECKS "Also run configure checks for MSVC" OFF MSVC)
 
 
 message(STATUS)
@@ -337,16 +338,21 @@ endforeach(_v)
 message(STATUS "")
 
 
-# PCHs not supported by cmake: http://www.cmake.org/Bug/view.php?id=1260
-# Not sure if it works for all non-msvc compilers
-include(PCHSupport_26)
+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
+       include(PCHSupport_26)
        configure_file(${CMAKE_SOURCE_DIR}/pcheaders.h ${CMAKE_BINARY_DIR}/pcheaders.h)
        configure_file(${CMAKE_SOURCE_DIR}/config.cpp.cmake ${CMAKE_BINARY_DIR}/config_pch.cpp)
        add_definitions(-DLYX_ENABLE_PCH)
 
-       if(MSVC AND NOT MERGE_FILES)
+       if(MSVC)
                macro(lyx_add_msvc_pch name_)
                        set_source_files_properties(${${name_}_sources} PROPERTIES
                                COMPILE_FLAGS "/Yuconfig.h /Fp\$(IntDir)/config.pch")
@@ -369,7 +375,7 @@ if(LYX_PCH)
                endmacro()
        endif()
 else()
-       set(LYX_PCH OFF CACHE STRING "Disaböe pre-compiled headers")
+       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_)
@@ -384,7 +390,6 @@ if(MSVC)
                include(${LYX_VLD_PATH}/tools/cmake/vld.cmake)
        endif()
 
-       # TODO options
        if(LYX_WALL)
                # Use the highest warning level
                set(CMAKE_CXX_WARNING_LEVEL 4 CACHE TYPE STRING FORCE)
@@ -443,7 +448,7 @@ if(LYX_DEBUG_GLIBC_PEDANTIC)
 endif()
 
 # compiler tests, config.h generation
-if(MSVC AND NOT CONFIGURECHECKS)
+if(MSVC AND NOT LYX_CONFIGURE_CHECKS)
        configure_file(configCompiler.h.msvc ${CMAKE_BINARY_DIR}/configCompiler.h)
 else()
        include(ConfigureChecks.cmake)