diff options
author | Fraser Cormack <fraser@codeplay.com> | 2024-03-28 20:29:25 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-03-28 20:29:25 +0000 |
commit | 688d71ea8817ace88955671c1af7c80fbfba2c7f (patch) | |
tree | 41f0594f2247babb16f1c53ac4755eefd51dac15 /libclc/cmake | |
parent | 44af53b22aaa1fe382b22329bbc7e4610ecbacc8 (diff) | |
download | llvm-688d71ea8817ace88955671c1af7c80fbfba2c7f.zip llvm-688d71ea8817ace88955671c1af7c80fbfba2c7f.tar.gz llvm-688d71ea8817ace88955671c1af7c80fbfba2c7f.tar.bz2 |
[libclc] Track dependencies through dependency files (#86965)
This commit fixes the problem of missing build dependencies between
libclc source files and their various includes (namely headers and .inc
files).
We would like to do this with compiler-generated dependency files
because then the dependencies are accurate and there are no false
positives, leading to unnecessary rebuilds. This is how regular C/C++
dependencies are usually tracked by CMake.
Note that this variable is an internal API so is not guaranteed to work,
but then again *all* of CMake's support for new languages (which we use
for CLC/LL languages) is an internal API. On balance this change is
probably worth it due to how minimally invasive it is. It should work
with all supported compilers and CMake generators.
Diffstat (limited to 'libclc/cmake')
-rw-r--r-- | libclc/cmake/CMakeCLCInformation.cmake | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/libclc/cmake/CMakeCLCInformation.cmake b/libclc/cmake/CMakeCLCInformation.cmake index 6eecf4e..95327e4 100644 --- a/libclc/cmake/CMakeCLCInformation.cmake +++ b/libclc/cmake/CMakeCLCInformation.cmake @@ -9,3 +9,4 @@ if(NOT CMAKE_CLC_CREATE_STATIC_LIBRARY) endif() set(CMAKE_INCLUDE_FLAG_CLC "-I") +set(CMAKE_DEPFILE_FLAGS_CLC "-MD -MT <DEP_TARGET> -MF <DEP_FILE>") |