From a847c4e14a6045b7a61f07ea49b93aa6dd73d581 Mon Sep 17 00:00:00 2001 From: Daniel Frampton Date: Thu, 21 May 2020 11:03:24 +0100 Subject: [PATCH] Use configure depends to trigger reconfiguration when LLVMBuild files change Summary: The existing logic has a workaround where configure_file is used to write a single dummy file output many times. CMake has a feature to more directly add the dependency and avoid the dummy file (it is available in the minimum version specified). Reviewers: theraven Reviewed By: theraven Subscribers: theraven, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D80218 --- utils/llvm-build/llvmbuild/main.py | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/utils/llvm-build/llvmbuild/main.py b/utils/llvm-build/llvmbuild/main.py index 99b82ad5e20..4f64c52608f 100644 --- a/utils/llvm-build/llvmbuild/main.py +++ b/utils/llvm-build/llvmbuild/main.py @@ -563,19 +563,10 @@ subdirectories = %s f.write(""" # LLVMBuild CMake fragment dependencies. # -# CMake has no builtin way to declare that the configuration depends on -# a particular file. However, a side effect of configure_file is to add -# said input file to CMake's internal dependency list. So, we use that -# and a dummy output file to communicate the dependency information to -# CMake. -# -# FIXME: File a CMake RFE to get a properly supported version of this -# feature. """) for dep in dependencies: f.write("""\ -configure_file(\"%s\" - ${CMAKE_CURRENT_BINARY_DIR}/DummyConfigureOutput)\n""" % ( +set_property(DIRECTORY APPEND PROPERTY CMAKE_CONFIGURE_DEPENDS \"%s\")\n""" % ( cmake_quote_path(dep),)) # Write the properties we use to encode the required library dependency