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 @@ -54,6 +54,10 @@ include(CheckSymbolExists)
54
54
# This is primarily to support building smaller or faster project files.
55
55
#
56
56
57
+ option (SWIFT_APPEND_VC_REV
58
+ "Embed the version control system revision in Swift"
59
+ TRUE )
60
+
57
61
option (SWIFT_INCLUDE_TOOLS
58
62
"Generate build targets for swift tools"
59
63
TRUE )
Original file line number Diff line number Diff line change @@ -12,7 +12,11 @@ else()
12
12
endif ()
13
13
14
14
function (generate_revision_inc revision_inc_var name dir )
15
- find_first_existing_vc_file ("${dir} " ${name} _vc )
15
+ if (SWIFT_APPEND_VC_REV )
16
+ # generate_vcs_version_script generates header with only `undef`s
17
+ # inside when source directory doesn't exist.
18
+ find_first_existing_vc_file ("${dir} " ${name} _vc )
19
+ endif ()
16
20
17
21
# Create custom target to generate the VC revision include.
18
22
set (version_inc "${CMAKE_CURRENT_BINARY_DIR} /${name} Revision.inc" )
You can’t perform that action at this time.
0 commit comments