summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Source/cmGlobalNinjaGenerator.cxx3
-rw-r--r--Tests/RunCMake/NinjaMultiConfig/CustomCommandGenerator-debug-in-release-graph-build-check.cmake3
-rw-r--r--Tests/RunCMake/NinjaMultiConfig/CustomCommandGenerator-debug-in-release-graph-clean-ninja-check.cmake3
-rw-r--r--Tests/RunCMake/NinjaMultiConfig/CustomCommandGenerator-release-in-debug-graph-ninja-check.cmake3
4 files changed, 5 insertions, 7 deletions
diff --git a/Source/cmGlobalNinjaGenerator.cxx b/Source/cmGlobalNinjaGenerator.cxx
index 5243c36..4826a06 100644
--- a/Source/cmGlobalNinjaGenerator.cxx
+++ b/Source/cmGlobalNinjaGenerator.cxx
@@ -1178,7 +1178,8 @@ void cmGlobalNinjaGenerator::AppendTargetDependsClosure(
cmNinjaOuts this_outs; // this will be the new cache entry
for (auto const& dep_target : this->GetTargetDirectDepends(target)) {
- if (dep_target->GetType() == cmStateEnums::INTERFACE_LIBRARY) {
+ if (dep_target->GetType() == cmStateEnums::INTERFACE_LIBRARY ||
+ (this->EnableCrossConfigBuild() && !dep_target.IsCross())) {
continue;
}
diff --git a/Tests/RunCMake/NinjaMultiConfig/CustomCommandGenerator-debug-in-release-graph-build-check.cmake b/Tests/RunCMake/NinjaMultiConfig/CustomCommandGenerator-debug-in-release-graph-build-check.cmake
index f534319..167f5b9 100644
--- a/Tests/RunCMake/NinjaMultiConfig/CustomCommandGenerator-debug-in-release-graph-build-check.cmake
+++ b/Tests/RunCMake/NinjaMultiConfig/CustomCommandGenerator-debug-in-release-graph-build-check.cmake
@@ -23,12 +23,11 @@ check_files("${RunCMake_TEST_BINARY_DIR}"
${TARGET_OBJECT_FILES_generatorobj_Release}
- ${TARGET_OBJECT_FILES_emptyobj_Release}
-
EXCLUDE
${TARGET_OBJECT_FILES_generator_Debug}
${TARGET_OBJECT_FILES_generated_Release}
+ ${TARGET_OBJECT_FILES_emptyobj_Release}
${TARGET_OBJECT_FILES_generator_MinSizeRel}
${TARGET_OBJECT_FILES_generated_MinSizeRel}
diff --git a/Tests/RunCMake/NinjaMultiConfig/CustomCommandGenerator-debug-in-release-graph-clean-ninja-check.cmake b/Tests/RunCMake/NinjaMultiConfig/CustomCommandGenerator-debug-in-release-graph-clean-ninja-check.cmake
index 5e30bfe..1e4cbe1 100644
--- a/Tests/RunCMake/NinjaMultiConfig/CustomCommandGenerator-debug-in-release-graph-clean-ninja-check.cmake
+++ b/Tests/RunCMake/NinjaMultiConfig/CustomCommandGenerator-debug-in-release-graph-clean-ninja-check.cmake
@@ -11,8 +11,6 @@ check_files("${RunCMake_TEST_BINARY_DIR}"
${TARGET_OBJECT_FILES_generatorobj_Release}
- ${TARGET_OBJECT_FILES_emptyobj_Release}
-
EXCLUDE
${TARGET_OBJECT_FILES_generator_Debug}
${TARGET_OBJECT_FILES_generated_Debug}
@@ -21,6 +19,7 @@ check_files("${RunCMake_TEST_BINARY_DIR}"
${TARGET_OBJECT_FILES_emptyobj_Debug}
${TARGET_OBJECT_FILES_generated_Release}
+ ${TARGET_OBJECT_FILES_emptyobj_Release}
${TARGET_OBJECT_FILES_generator_MinSizeRel}
${TARGET_OBJECT_FILES_generated_MinSizeRel}
diff --git a/Tests/RunCMake/NinjaMultiConfig/CustomCommandGenerator-release-in-debug-graph-ninja-check.cmake b/Tests/RunCMake/NinjaMultiConfig/CustomCommandGenerator-release-in-debug-graph-ninja-check.cmake
index 9500cda..faf392e 100644
--- a/Tests/RunCMake/NinjaMultiConfig/CustomCommandGenerator-release-in-debug-graph-ninja-check.cmake
+++ b/Tests/RunCMake/NinjaMultiConfig/CustomCommandGenerator-release-in-debug-graph-ninja-check.cmake
@@ -12,8 +12,6 @@ check_files("${RunCMake_TEST_BINARY_DIR}"
${TARGET_OBJECT_FILES_generatorobj_Debug}
- ${TARGET_OBJECT_FILES_emptyobj_Debug}
-
${TARGET_FILE_generator_Release}
${TARGET_OBJECT_FILES_generator_Release}
@@ -30,6 +28,7 @@ check_files("${RunCMake_TEST_BINARY_DIR}"
EXCLUDE
${TARGET_OBJECT_FILES_generated_Debug}
+ ${TARGET_OBJECT_FILES_emptyobj_Debug}
${TARGET_OBJECT_FILES_generator_MinSizeRel}
${TARGET_OBJECT_FILES_generated_MinSizeRel}