From 056d087280b9be563b70ba00409ede78db7544ef Mon Sep 17 00:00:00 2001 From: kervala Date: Tue, 28 Sep 2010 09:25:39 +0200 Subject: [PATCH] Fixed: PCH problem with GCC --- code/CMakeModules/PCHSupport.cmake | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/code/CMakeModules/PCHSupport.cmake b/code/CMakeModules/PCHSupport.cmake index 5cebe1005..46a556900 100644 --- a/code/CMakeModules/PCHSupport.cmake +++ b/code/CMakeModules/PCHSupport.cmake @@ -116,15 +116,13 @@ MACRO(ADD_PRECOMPILED_HEADER_TO_TARGET _targetName _input _pch_output_to_use ) IF(CMAKE_COMPILER_IS_GNUCXX) # to do: test whether compiler flags match between target _targetName # and _pch_output_to_use - GET_FILENAME_COMPONENT(_name ${_input} NAME) - FILE(TO_NATIVE_PATH ${_pch_output_to_use} _native_pch_path) # for use with distcc and gcc >4.0.1 if preprocessed files are accessible # on all remote machines set # PCH_ADDITIONAL_COMPILER_FLAGS to -fpch-preprocess - SET(_target_cflags "${PCH_ADDITIONAL_COMPILER_FLAGS} -include ${CMAKE_CURRENT_BINARY_DIR}/${_input} -Winvalid-pch") - ELSE(MSVCCMAKE_COMPILER_IS_GNUCXX) + SET(_target_cflags "${PCH_ADDITIONAL_COMPILER_FLAGS}-include ${_input} -Winvalid-pch") + ELSE(CMAKE_COMPILER_IS_GNUCXX) IF(MSVC) GET_TARGET_PROPERTY(oldProps ${_targetName} COMPILE_FLAGS) IF(${oldProps} MATCHES NOTFOUND)