consider the file content as a string to avoid semicolon to be removed

This commit is contained in:
Sébastien Loriot
2018-01-03 10:21:44 +01:00
parent d5320636c3
commit df15f0ece5
@@ -69,18 +69,18 @@ foreach(pkg ${files})
get_filename_component(fext ${fname} EXT)
if ("${fext}" STREQUAL ".h" OR "${fext}" STREQUAL ".hpp")
file(READ "${pkg_dir}/${f}" file_content)
string(REPLACE "$URL$" "$URL: ${GITHUB_PREFIX}/${pkg}/${f} $" file_content ${file_content})
string(REPLACE "$URL$" "$URL: ${GITHUB_PREFIX}/${pkg}/${f} $" file_content "${file_content}")
if(EXISTS ${CMAKE_BINARY_DIR}/.git)
execute_process(
COMMAND git --git-dir=${CMAKE_BINARY_DIR}/.git --work-tree=${CMAKE_BINARY_DIR} log -n1 "--format=format:%h %aI %an"
RESULT_VARIABLE RESULT_VAR
OUTPUT_VARIABLE OUT_VAR
)
string(REPLACE "$Id$" "$Id: ${fname} ${OUT_VAR}" file_content ${file_content})
string(REPLACE "$Id$" "$Id: ${fname} ${OUT_VAR}" file_content "${file_content}")
else()
string(REPLACE "$Id$" "This file is from the release ${CGAL_VERSION} of CGAL" file_content ${file_content})
string(REPLACE "$Id$" "This file is from the release ${CGAL_VERSION} of CGAL" file_content "${file_content}")
endif()
file(WRITE ${release_dir}/${afile_dir}/${fname} ${file_content})
file(WRITE ${release_dir}/${afile_dir}/${fname} "${file_content}")
else()
file(COPY ${afile} DESTINATION ${release_dir}/${afile_dir})
endif()