Skip to content
This repository was archived by the owner on Mar 30, 2021. It is now read-only.
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 23 additions & 3 deletions lib/Basic/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,31 @@ else()
# Not producing a VC revision include.
set(version_inc)

# Being able to force-set the SVN revision in cases where it isn't available
# Being able to force-set the clang and llvm revision in cases where it isn't available
# is useful for performance tracking, and matches compatibility from autoconf.
if(SVN_REVISION)
set_source_files_properties(Version.cpp
PROPERTIES COMPILE_DEFINITIONS "SVN_REVISION=\"${SVN_REVISION}\"")
set_property(
SOURCE Version.cpp
APPEND
PROPERTY COMPILE_DEFINITIONS "SVN_REVISION=\"${SVN_REVISION}\"")
endif()
if(SVN_REPOSITORY)
set_property(
SOURCE Version.cpp
APPEND
PROPERTY COMPILE_DEFINITIONS "SVN_REPOSITORY=\"${SVN_REPOSITORY}\"")
endif()
if(LLVM_REVISION)
set_property(
SOURCE Version.cpp
APPEND
PROPERTY COMPILE_DEFINITIONS "LLVM_REVISION=\"${LLVM_REVISION}\"")
endif()
if(LLVM_REPOSITORY)
set_property(
SOURCE Version.cpp
APPEND
PROPERTY COMPILE_DEFINITIONS "LLVM_REPOSITORY=\"${LLVM_REPOSITORY}\"")
endif()
endif()

Expand Down