mirror of
https://github.com/opencv/opencv.git
synced 2025-08-06 06:26:29 +08:00
Merge pull request #7376 from alalek:fix_gcc_pch
This commit is contained in:
commit
b741ec2dc1
@ -291,6 +291,14 @@ MACRO(ADD_PRECOMPILED_HEADER _targetName _input)
|
||||
|
||||
ADD_PRECOMPILED_HEADER_TO_TARGET(${_targetName} ${_input} ${_output} ${_dowarn})
|
||||
|
||||
|
||||
GET_TARGET_PROPERTY(oldProps ${_targetName} COMPILE_FLAGS)
|
||||
if (oldProps MATCHES NOTFOUND)
|
||||
SET(oldProps "")
|
||||
endif()
|
||||
SET(newProperties "${oldProps} -include \"${CMAKE_CURRENT_BINARY_DIR}/${_name}\"")
|
||||
SET_TARGET_PROPERTIES(${_targetName} PROPERTIES COMPILE_FLAGS "${newProperties}")
|
||||
|
||||
ENDMACRO(ADD_PRECOMPILED_HEADER)
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user