[cfe-dev] [PATCH] Handle LLVM_APPEND_VC_REV with LLVM cmake module

Robinson, Paul Paul_Robinson at playstation.sony.com
Tue May 13 12:17:21 PDT 2014


Clang (cfe) patches should go to the cfe-commits list, not cfe-dev.
--paulr

> -----Original Message-----
> From: cfe-dev-bounces at cs.uiuc.edu [mailto:cfe-dev-bounces at cs.uiuc.edu]
> On Behalf Of Adam Strzelecki
> Sent: Tuesday, May 13, 2014 10:17 AM
> To: cfe-dev at cs.uiuc.edu
> Subject: [cfe-dev] [PATCH] Handle LLVM_APPEND_VC_REV with LLVM cmake
> module
> 
> LLVM uses own CMake module VersionFromVCS.cmake to lookup repository and
> revision when LLVM_APPEND_VC_REV is ON, and it supports additionally
> getting
> information from Git SVN and Git mirrors.
> ---
>  lib/Basic/CMakeLists.txt | 10 ++++++++++
>  1 file changed, 10 insertions(+)
> 
> diff --git a/lib/Basic/CMakeLists.txt b/lib/Basic/CMakeLists.txt
> index 0df82b3..7c0372a 100644
> --- a/lib/Basic/CMakeLists.txt
> +++ b/lib/Basic/CMakeLists.txt
> @@ -52,4 +52,14 @@ if (Subversion_FOUND AND EXISTS
> "${CLANG_SOURCE_DIR}/.svn")
>    set_source_files_properties(Version.cpp
>      PROPERTIES COMPILE_DEFINITIONS "HAVE_SVN_VERSION_INC")
> 
> +elseif (LLVM_APPEND_VC_REV)
> +  set(LLVM_REVISION ${SVN_REVISION})
> +  set(LLVM_REPOSITORY ${SVN_REPOSITORY})
> +  add_version_info_from_vcs(CLANG_REVISION ${CLANG_SOURCE_DIR})
> +  message(STATUS "Clang revision: ${CLANG_REVISION}")
> +  set(VERSION_DEFINITIONS
> +    LLVM_REVISION=\"${LLVM_REVISION}\"
> LLVM_REPOSITORY=\"${LLVM_REPOSITORY}\"
> +    SVN_REVISION=\"${SVN_REVISION}\"
> SVN_REPOSITORY=\"${SVN_REPOSITORY}\")
> +  set_source_files_properties(Version.cpp
> +    PROPERTIES COMPILE_DEFINITIONS "${VERSION_DEFINITIONS}")
>  endif()
> --
> 1.8.5.2 (Apple Git-48)
> 
> _______________________________________________
> cfe-dev mailing list
> cfe-dev at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev





More information about the cfe-dev mailing list