diff --git a/OpenCVPCHSupport.cmake b/OpenCVPCHSupport.cmake index bd47ec8b6..0955255da 100644 --- a/OpenCVPCHSupport.cmake +++ b/OpenCVPCHSupport.cmake @@ -72,7 +72,7 @@ MACRO(_PCH_WRITE_PCHDEP_CXX _targetName _include_file _dephelp) ADD_CUSTOM_COMMAND( OUTPUT "${${_dephelp}}" COMMAND ${CMAKE_COMMAND} -E echo "#include \\\"${_include_file}\\\"" > "${${_dephelp}}" - COMMAND ${CMAKE_COMMAND} -E echo "int testfunction()" >> "${${_dephelp}}" + COMMAND ${CMAKE_COMMAND} -E echo "int testfunction()" >> "${${_dephelp}}" COMMAND ${CMAKE_COMMAND} -E echo "{" >> "${${_dephelp}}" COMMAND ${CMAKE_COMMAND} -E echo " return 0;" >> "${${_dephelp}}" COMMAND ${CMAKE_COMMAND} -E echo "}" >> "${${_dephelp}}" @@ -81,10 +81,10 @@ MACRO(_PCH_WRITE_PCHDEP_CXX _targetName _include_file _dephelp) else() ADD_CUSTOM_COMMAND( OUTPUT "${${_dephelp}}" - COMMAND ${CMAKE_COMMAND} -E echo "#include \\\"${_include_file}\\\"" > "${${_dephelp}}" + COMMAND ${CMAKE_COMMAND} -E echo "\\#include \\\"${_include_file}\\\"" > "${${_dephelp}}" COMMAND ${CMAKE_COMMAND} -E echo "int testfunction\\(\\)" >> "${${_dephelp}}" COMMAND ${CMAKE_COMMAND} -E echo "{" >> "${${_dephelp}}" - COMMAND ${CMAKE_COMMAND} -E echo " return 0;" >> "${${_dephelp}}" + COMMAND ${CMAKE_COMMAND} -E echo " \\return 0\\;" >> "${${_dephelp}}" COMMAND ${CMAKE_COMMAND} -E echo "}" >> "${${_dephelp}}" DEPENDS "${_include_file}" )