Fixed pch support on linux

This commit is contained in:
Andrey Kamaev 2011-07-26 07:07:38 +00:00
parent b5cfe6be32
commit 3b59a51347

View File

@ -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}"
)