File tree Expand file tree Collapse file tree 2 files changed +9
-1
lines changed Expand file tree Collapse file tree 2 files changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -2104,6 +2104,13 @@ function(setup_dependency_debugging name)
2104
2104
set_target_properties (${name} PROPERTIES RULE_LAUNCH_COMPILE ${sandbox_command} )
2105
2105
endfunction ()
2106
2106
2107
+ # If the sources at the given `path` are under version control, set `out_var`
2108
+ # to the the path of a file which will be modified when the VCS revision
2109
+ # changes, attempting to create that file if it does not exist; if no such
2110
+ # file exists and one cannot be created, instead set `out_var` to the
2111
+ # empty string.
2112
+ #
2113
+ # If the sources are not under version control, do not define `out_var`.
2107
2114
function (find_first_existing_vc_file path out_var )
2108
2115
if (NOT EXISTS "${path} " )
2109
2116
return ()
@@ -2125,6 +2132,7 @@ function(find_first_existing_vc_file path out_var)
2125
2132
RESULT_VARIABLE touch_head_result
2126
2133
ERROR_QUIET )
2127
2134
if (NOT touch_head_result EQUAL 0 )
2135
+ set (${out_var} "" PARENT_SCOPE )
2128
2136
return ()
2129
2137
endif ()
2130
2138
endif ()
Original file line number Diff line number Diff line change @@ -11,7 +11,7 @@ if(LLVM_APPEND_VC_REV)
11
11
# A fake version file and is not expected to exist. It is being used to
12
12
# force regeneration of VCSRevision.h for source directory with no write
13
13
# permission available.
14
- if (NOT llvm_vc )
14
+ if (llvm_vc STREQUAL "" )
15
15
set (fake_version_inc "${CMAKE_CURRENT_BINARY_DIR} /__FakeVCSRevision.h" )
16
16
endif ()
17
17
endif ()
You can’t perform that action at this time.
0 commit comments