Skip to content

Commit

Permalink
more escape for CMake "also "quotes""
Browse files Browse the repository at this point in the history
  • Loading branch information
ibaned committed Jan 18, 2018
1 parent 3a8e492 commit aa33d89
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ IF (GIT_FOUND AND IS_GIT_PROJECT)
COMMAND ${GIT_EXECUTABLE} log -1 --format=%ad >> ${GITREV_TMP}
COMMAND ${CMAKE_COMMAND} -E echo >> ${GITREV_TMP}
COMMAND ${CMAKE_COMMAND} -E echo_append "#define GIT_COMMIT_SUBJECT_RAW \"" >> ${GITREV_TMP}
COMMAND ${GIT_EXECUTABLE} log -1 --format=%s | sed -E "s/\"/\\\"/g" | tr -d '\\n' >> ${GITREV_TMP}
COMMAND ${GIT_EXECUTABLE} log -1 --format=%s | sed -E "s/\"/\\\\\"/g" | tr -d '\\n' >> ${GITREV_TMP}
COMMAND ${CMAKE_COMMAND} -E echo_append "\"" >> ${GITREV_TMP}
COMMAND ${CMAKE_COMMAND} -E copy_if_different ${GITREV_TMP} ${GITREV_FILE}
COMMAND ${CMAKE_COMMAND} -E remove ${GITREV_TMP}
Expand Down

0 comments on commit aa33d89

Please sign in to comment.