mirror of
https://github.com/Kitware/CMake.git
synced 2026-01-02 20:00:38 -06:00
Tests: use BYPRODUCTS in the CustomCommandWorkingDirectory test
This was inadvertently testing the assumed sources behavior in Ninja (no other test seems to exercise it). There is now a test explicitly testing it in `RunCMake.Ninja`, so fix this test to work properly regardless of the assumed sources behavior.
This commit is contained in:
8
Help/release/dev/ninja-loosen-object-deps.rst
Normal file
8
Help/release/dev/ninja-loosen-object-deps.rst
Normal file
@@ -0,0 +1,8 @@
|
||||
ninja-loosen-object-deps
|
||||
------------------------
|
||||
|
||||
* The :generator:`Ninja` generator has loosened dependencies on object
|
||||
compilation to depend on the custom targets and commands of dependent
|
||||
libraries instead of the libraries themselves. This helps projects with deep
|
||||
dependency graphs to be blocked only on their link steps at the deeper
|
||||
levels rather than also blocking object compilation on dependent link steps.
|
||||
@@ -19,6 +19,7 @@ add_executable(working "${TestWorkingDir_BINARY_DIR}/working.c"
|
||||
add_custom_target(
|
||||
Custom ALL
|
||||
COMMAND "${CMAKE_COMMAND}" -E copy_if_different ./customTarget.c "${TestWorkingDir_BINARY_DIR}/customTarget.c"
|
||||
BYPRODUCTS "${TestWorkingDir_BINARY_DIR}/customTarget.c"
|
||||
WORKING_DIRECTORY "${TestWorkingDir_SOURCE_DIR}"
|
||||
)
|
||||
|
||||
@@ -36,6 +37,7 @@ add_executable(working2 working2.c ${TestWorkingDir_BINARY_DIR}/customTarget2.c)
|
||||
add_custom_target(
|
||||
Custom2 ALL
|
||||
COMMAND "${CMAKE_COMMAND}" -E copy_if_different ${TestWorkingDir_SOURCE_DIR}/customTarget.c ../customTarget2.c
|
||||
BYPRODUCTS "${TestWorkingDir_BINARY_DIR}/customTarget2.c"
|
||||
WORKING_DIRECTORY work/ # Relative to build tree, trailing slash
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user