r223861 - cmake: Make SVNVersion.inc step depend on GetSVN.cmake.

Nico Weber nicolasweber at gmx.de
Tue Dec 9 16:03:38 PST 2014


Author: nico
Date: Tue Dec  9 18:03:37 2014
New Revision: 223861

URL: http://llvm.org/viewvc/llvm-project?rev=223861&view=rev
Log:
cmake: Make SVNVersion.inc step depend on GetSVN.cmake.

This way, the step generating SVNVersion.inc gets rerun every time someone
changes GetSVN.cmake (which is the file that decides how the contents of
SVNVersion.inc look). This makes hacking on GetSVN.cmake a bit easier.

Modified:
    cfe/trunk/lib/Basic/CMakeLists.txt

Modified: cfe/trunk/lib/Basic/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Basic/CMakeLists.txt?rev=223861&r1=223860&r2=223861&view=diff
==============================================================================
--- cfe/trunk/lib/Basic/CMakeLists.txt (original)
+++ cfe/trunk/lib/Basic/CMakeLists.txt Tue Dec  9 18:03:37 2014
@@ -28,17 +28,19 @@ find_first_existing_vc_file(clang_vc "${
 # The VC revision include that we want to generate.
 set(version_inc "${CMAKE_CURRENT_BINARY_DIR}/SVNVersion.inc")
 
+set(get_svn_script "${LLVM_MAIN_SRC_DIR}/cmake/modules/GetSVN.cmake")
+
 if(DEFINED llvm_vc AND DEFINED clang_vc)
   # Create custom target to generate the VC revision include.
   add_custom_command(OUTPUT "${version_inc}"
-    DEPENDS "${llvm_vc}" "${clang_vc}"
+    DEPENDS "${llvm_vc}" "${clang_vc}" "${get_svn_script}"
     COMMAND
     ${CMAKE_COMMAND} "-DFIRST_SOURCE_DIR=${LLVM_MAIN_SRC_DIR}"
                      "-DFIRST_NAME=LLVM"
                      "-DSECOND_SOURCE_DIR=${CLANG_SOURCE_DIR}"
                      "-DSECOND_NAME=CLANG"
                      "-DHEADER_FILE=${version_inc}"
-                     -P "${LLVM_MAIN_SRC_DIR}/cmake/modules/GetSVN.cmake")
+                     -P "${get_svn_script}")
 
   # Mark the generated header as being generated.
   set_source_files_properties("${version_inc}"





More information about the cfe-commits mailing list