From 143dfdc9d3e86c9415a4ec23d8471efc4e31ac01 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Peter=20K=C3=BCmmel?= Date: Sat, 20 Oct 2007 09:32:35 +0000 Subject: [PATCH] cmake: fix broken pch support git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21077 a592a061-630c-0410-9148-cb99ea01b6c8 --- development/cmake/CMakeLists.txt | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/development/cmake/CMakeLists.txt b/development/cmake/CMakeLists.txt index 00e354b98f..7b8dae8955 100644 --- a/development/cmake/CMakeLists.txt +++ b/development/cmake/CMakeLists.txt @@ -56,7 +56,6 @@ if(merge OR merge_rebuild) message(STATUS "") message(STATUS "All *.cpp files of a project are merged into two files, disable with -Dmerge=0") message(STATUS "") - set(disable-pch 1) else() set(merge 0 CACHE TYPE STRING FORCE) set(MERGE_FILES 0 CACHE TYPE STRING FORCE) @@ -171,7 +170,10 @@ endif() add_definitions(-DBOOST_USER_CONFIG="") -if(MSVC AND NOT disable-pch) +if(MSVC AND NOT disable-pch AND NOT MERGE_FILES) + message("-----") + message("----- using precompiled headers, disable with -Ddisable-pch=1") + message("-----") configure_file(${CMAKE_SOURCE_DIR}/pcheaders.h ${CMAKE_BINARY_DIR}/pcheaders.h) configure_file(${CMAKE_SOURCE_DIR}/config.cpp.cmake @@ -192,6 +194,11 @@ if(MSVC AND NOT disable-pch) set(CMAKE_CXX_FLAGS_MINSIZEREL "${CMAKE_CXX_FLAGS_MINSIZEREL} /DLYX_PCH_STL /DLYX_PCH_BOOST") else() + if(MSVC) + message("-----") + message("----- precompiled headers disabled, enable with -Ddisable-pch=0") + message("-----") + endif() set(disable-pch TRUE CACHE TYPE STRING) macro(lyx_add_msvc_pch) endmacro(lyx_add_msvc_pch)