diff options
author | Marc Chevrier <marc.chevrier@gmail.com> | 2021-01-16 16:37:23 (GMT) |
---|---|---|
committer | Marc Chevrier <marc.chevrier@gmail.com> | 2021-01-19 12:17:14 (GMT) |
commit | b5c2163293c08e8e53203d86a069713e06874886 (patch) | |
tree | f3d6d249054fee14b6e0122bc021be958c59b3dd /Tests/RunCMake/BuildDepends | |
parent | 5b9f7a5f285d648698068abe8eb238cd4dda7161 (diff) | |
download | CMake-b5c2163293c08e8e53203d86a069713e06874886.zip CMake-b5c2163293c08e8e53203d86a069713e06874886.tar.gz CMake-b5c2163293c08e8e53203d86a069713e06874886.tar.bz2 |
Ninja: add_custom_command(DEPFILE): Ensure dependencies consistency
Fixes: #21694
Diffstat (limited to 'Tests/RunCMake/BuildDepends')
-rw-r--r-- | Tests/RunCMake/BuildDepends/CMakeLists.txt | 2 | ||||
-rw-r--r-- | Tests/RunCMake/BuildDepends/CustomCommandDepfile.cmake | 2 | ||||
-rw-r--r-- | Tests/RunCMake/BuildDepends/DepfileSubdir/CMakeLists.txt | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/Tests/RunCMake/BuildDepends/CMakeLists.txt b/Tests/RunCMake/BuildDepends/CMakeLists.txt index 74b3ff8..99f238b 100644 --- a/Tests/RunCMake/BuildDepends/CMakeLists.txt +++ b/Tests/RunCMake/BuildDepends/CMakeLists.txt @@ -1,3 +1,3 @@ cmake_minimum_required(VERSION 3.3) project(${RunCMake_TEST} NONE) -include(${RunCMake_TEST}.cmake) +include(${RunCMake_TEST}.cmake NO_POLICY_SCOPE) diff --git a/Tests/RunCMake/BuildDepends/CustomCommandDepfile.cmake b/Tests/RunCMake/BuildDepends/CustomCommandDepfile.cmake index 6ac1291..01eac91 100644 --- a/Tests/RunCMake/BuildDepends/CustomCommandDepfile.cmake +++ b/Tests/RunCMake/BuildDepends/CustomCommandDepfile.cmake @@ -4,7 +4,7 @@ enable_language(C) add_custom_command( OUTPUT topcc.c DEPFILE topcc.c.d - COMMAND ${CMAKE_COMMAND} -DOUTFILE=topcc.c -DINFILE=topccdep.txt -DDEPFILE=topcc.c.d -P "${CMAKE_CURRENT_LIST_DIR}/WriteDepfile.cmake" + COMMAND ${CMAKE_COMMAND} -DOUTFILE=${CMAKE_CURRENT_BINARY_DIR}/topcc.c -DINFILE=topccdep.txt -DDEPFILE=topcc.c.d -P "${CMAKE_CURRENT_LIST_DIR}/WriteDepfile.cmake" ) add_custom_target(topcc ALL DEPENDS topcc.c) diff --git a/Tests/RunCMake/BuildDepends/DepfileSubdir/CMakeLists.txt b/Tests/RunCMake/BuildDepends/DepfileSubdir/CMakeLists.txt index 06db47c..f131751 100644 --- a/Tests/RunCMake/BuildDepends/DepfileSubdir/CMakeLists.txt +++ b/Tests/RunCMake/BuildDepends/DepfileSubdir/CMakeLists.txt @@ -3,7 +3,7 @@ cmake_policy(SET CMP0116 NEW) add_custom_command( OUTPUT subcc.c DEPFILE subcc.c.d - COMMAND ${CMAKE_COMMAND} -DOUTFILE=subcc.c -DINFILE=subccdep.txt -DDEPFILE=subcc.c.d -P "${CMAKE_CURRENT_LIST_DIR}/../WriteDepfile.cmake" + COMMAND ${CMAKE_COMMAND} -DOUTFILE=${CMAKE_CURRENT_BINARY_DIR}/subcc.c -DINFILE=subccdep.txt -DDEPFILE=subcc.c.d -P "${CMAKE_CURRENT_LIST_DIR}/../WriteDepfile.cmake" ) add_custom_target(subcc ALL DEPENDS subcc.c) |