diff options
-rw-r--r-- | Help/release/dev/ninja-loosen-object-deps.rst | 8 | ||||
-rw-r--r-- | Tests/CustomCommandWorkingDirectory/CMakeLists.txt | 2 |
2 files changed, 10 insertions, 0 deletions
diff --git a/Help/release/dev/ninja-loosen-object-deps.rst b/Help/release/dev/ninja-loosen-object-deps.rst new file mode 100644 index 0000000..c47fb93 --- /dev/null +++ b/Help/release/dev/ninja-loosen-object-deps.rst @@ -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. diff --git a/Tests/CustomCommandWorkingDirectory/CMakeLists.txt b/Tests/CustomCommandWorkingDirectory/CMakeLists.txt index f917cd7..4975feb 100644 --- a/Tests/CustomCommandWorkingDirectory/CMakeLists.txt +++ b/Tests/CustomCommandWorkingDirectory/CMakeLists.txt @@ -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 ) |