This matches autoconf's ability to put clang revisions in the clang --version spew.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@257827
91177308-0d34-0410-b5e6-
96231b3b80d8
include(AddLLVM)
include(TableGen)
include(HandleLLVMOptions)
+ include(VersionFromVCS)
set(PACKAGE_VERSION "${LLVM_PACKAGE_VERSION}")
add_definitions(-DCLANG_REPOSITORY_STRING="${CLANG_REPOSITORY_STRING}")
endif()
+option(CLANG_APPEND_VC_REV
+ "Append the version control system revision id to clang version spew" OFF)
+
+if(NOT SVN_REVISION)
+ # This macro will set SVN_REVISION in the parent scope
+ add_version_info_from_vcs(VERSION_VAR)
+endif()
+
+if(SVN_REVISION)
+ add_definitions(-DSVN_REVISION="${SVN_REVISION}")
+endif()
+
set(CLANG_VENDOR_UTI "org.llvm.clang" CACHE STRING
"Vendor-specific uti.")