Skip to content

Commit

Permalink
cmake: repair GCC PCH
Browse files Browse the repository at this point in the history
  • Loading branch information
alalek committed Sep 30, 2016
1 parent 6328076 commit a3f74aa
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions cmake/OpenCVPCHSupport.cmake
Expand Up @@ -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)


Expand Down

0 comments on commit a3f74aa

Please sign in to comment.