From 2e9a853fa2d51329e1142bff3354847e8e7e7d45 Mon Sep 17 00:00:00 2001 From: Nico Weber Date: Wed, 10 Dec 2014 00:03:37 +0000 Subject: [PATCH] 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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@223861 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Basic/CMakeLists.txt | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/Basic/CMakeLists.txt b/lib/Basic/CMakeLists.txt index 3481809c60..d15fc23429 100644 --- a/lib/Basic/CMakeLists.txt +++ b/lib/Basic/CMakeLists.txt @@ -28,17 +28,19 @@ find_first_existing_vc_file(clang_vc "${CLANG_SOURCE_DIR}") # 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}" -- 2.40.0