Commit f54ff68 1 parent 13d3522 commit f54ff68 Copy full SHA for f54ff68
File tree 1 file changed +8
-4
lines changed
1 file changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -219,10 +219,14 @@ function(setup_git target files_ includes_)
219
219
# generate compile-time git version configuration
220
220
file (WRITE ${root} /git_version.cmake "
221
221
execute_process(COMMAND
222
- ${GIT_EXECUTABLE} describe --dirty --tags --long
223
- WORKING_DIRECTORY \" ${root_dir} \"
224
- OUTPUT_VARIABLE GIT_VERSION
225
- OUTPUT_STRIP_TRAILING_WHITESPACE)
222
+ ${GIT_EXECUTABLE} describe --dirty --tags --long
223
+ WORKING_DIRECTORY \" ${root_dir} \"
224
+ OUTPUT_VARIABLE GIT_VERSION
225
+ RESULT_VARIABLE retcode
226
+ OUTPUT_STRIP_TRAILING_WHITESPACE)
227
+ if(NOT \" $\{ retcode}\" STREQUAL \" 0\" )
228
+ message(FATAL_ERROR \" ${GIT_EXECUTABLE} describe --dirty --tags --long: returned $\{ retcode}\" )
229
+ endif()
226
230
configure_file(\"\$ {SRC}\" \"\$ {DST}\" @ONLY)
227
231
" )
228
232
You can’t perform that action at this time.
0 commit comments