diff options
author | Maik Nijhuis <maik.nijhuis@triopsys.nl> | 2022-08-04 14:09:20 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2022-08-09 12:27:11 (GMT) |
commit | 81fd0d6e265985213ec3d0c1db4b8a6f314481ea (patch) | |
tree | 7f6d7b2e759e4e40729a9e3404d4996db9097dce /Tests/RunCMake/ExternalProject | |
parent | d9e88721ad22f47196dfcdd1e05d153d28536bc9 (diff) | |
download | CMake-81fd0d6e265985213ec3d0c1db4b8a6f314481ea.zip CMake-81fd0d6e265985213ec3d0c1db4b8a6f314481ea.tar.gz CMake-81fd0d6e265985213ec3d0c1db4b8a6f314481ea.tar.bz2 |
ExternalProject: Fix install on BUILD_ALWAYS+BUILD_BYPRODUCTS with Ninja
The `BUILD_BYPRODUCTS` option causes the ExternalProject's `build` step
in `build.ninja` to have `restat = 1`, so its "always out-of-date"
status caused by `BUILD_ALWAYS` does not propagate to the `install`
step. Mark the latter step as explicitly always out-of-date too.
Fixes: #23820
Diffstat (limited to 'Tests/RunCMake/ExternalProject')
-rw-r--r-- | Tests/RunCMake/ExternalProject/BUILD_ALWAYS.cmake | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/Tests/RunCMake/ExternalProject/BUILD_ALWAYS.cmake b/Tests/RunCMake/ExternalProject/BUILD_ALWAYS.cmake index fdd3ad9..2e5fc6f 100644 --- a/Tests/RunCMake/ExternalProject/BUILD_ALWAYS.cmake +++ b/Tests/RunCMake/ExternalProject/BUILD_ALWAYS.cmake @@ -12,6 +12,9 @@ ExternalProject_Add(always DOWNLOAD_COMMAND "" CONFIGURE_COMMAND "${CMAKE_COMMAND}" -P ${CMAKE_CURRENT_BINARY_DIR}/always-configure.cmake BUILD_COMMAND "${CMAKE_COMMAND}" -P ${CMAKE_CURRENT_BINARY_DIR}/always-build.cmake + COMMAND "${CMAKE_COMMAND}" -E copy_if_different ${CMAKE_CURRENT_LIST_FILE} + "${CMAKE_CURRENT_BINARY_DIR}/byproduct.txt" + BUILD_BYPRODUCTS "${CMAKE_CURRENT_BINARY_DIR}/byproduct.txt" BUILD_ALWAYS 1 INSTALL_COMMAND "${CMAKE_COMMAND}" -P ${CMAKE_CURRENT_BINARY_DIR}/always-install.cmake ) |