mirror of
https://port.numenaute.org/aleajactaest/khanat-opennel-code.git
synced 2024-12-29 20:30:54 +00:00
Fixed: PCH problem with GCC
This commit is contained in:
parent
1e4deb92ce
commit
b9d24855ec
1 changed files with 2 additions and 4 deletions
|
@ -116,15 +116,13 @@ MACRO(ADD_PRECOMPILED_HEADER_TO_TARGET _targetName _input _pch_output_to_use )
|
||||||
IF(CMAKE_COMPILER_IS_GNUCXX)
|
IF(CMAKE_COMPILER_IS_GNUCXX)
|
||||||
# to do: test whether compiler flags match between target _targetName
|
# to do: test whether compiler flags match between target _targetName
|
||||||
# and _pch_output_to_use
|
# and _pch_output_to_use
|
||||||
GET_FILENAME_COMPONENT(_name ${_input} NAME)
|
|
||||||
|
|
||||||
FILE(TO_NATIVE_PATH ${_pch_output_to_use} _native_pch_path)
|
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
|
# for use with distcc and gcc >4.0.1 if preprocessed files are accessible
|
||||||
# on all remote machines set
|
# on all remote machines set
|
||||||
# PCH_ADDITIONAL_COMPILER_FLAGS to -fpch-preprocess
|
# PCH_ADDITIONAL_COMPILER_FLAGS to -fpch-preprocess
|
||||||
SET(_target_cflags "${PCH_ADDITIONAL_COMPILER_FLAGS} -include ${CMAKE_CURRENT_BINARY_DIR}/${_input} -Winvalid-pch")
|
SET(_target_cflags "${PCH_ADDITIONAL_COMPILER_FLAGS}-include ${_input} -Winvalid-pch")
|
||||||
ELSE(MSVCCMAKE_COMPILER_IS_GNUCXX)
|
ELSE(CMAKE_COMPILER_IS_GNUCXX)
|
||||||
IF(MSVC)
|
IF(MSVC)
|
||||||
GET_TARGET_PROPERTY(oldProps ${_targetName} COMPILE_FLAGS)
|
GET_TARGET_PROPERTY(oldProps ${_targetName} COMPILE_FLAGS)
|
||||||
IF(${oldProps} MATCHES NOTFOUND)
|
IF(${oldProps} MATCHES NOTFOUND)
|
||||||
|
|
Loading…
Reference in a new issue