Ninja Multi-Config: Restore TARGET_OBJECTS support in cross-configs
Since commit 2ae72ef7 (Xcode: Enable multi-arch TARGET_OBJECTS genex in [INTERFACE_]LINK_LIBRARIES, 2021-05-26, v3.21.0-rc1~126^2) the TARGET_OBJECTS genex, when referenced for linking, is now evaluated with EvaluateForBuildsystem enabled. This causes the object file paths to be computed with a buildsystem-specific placeholder for the configuration. This is normally fine because the placeholder will be evaluated by the native buildsystem tool using the proper configuration. However, the Ninja Multi-Config generator's `${CONFIGURATION}` placeholder may not have the correct value for cross-config object files. Switch back to using the per-config location of each object file for this generator. Fixes: #22436
Showing
- Source/cmGeneratorExpressionNode.cxx 1 addition, 1 deletionSource/cmGeneratorExpressionNode.cxx
- Tests/RunCMake/NinjaMultiConfig/RunCMakeTest.cmake 2 additions, 0 deletionsTests/RunCMake/NinjaMultiConfig/RunCMakeTest.cmake
- Tests/RunCMake/NinjaMultiConfig/Simple-debug-in-release-graph-target-ninja-check.cmake 37 additions, 0 deletions...ig/Simple-debug-in-release-graph-target-ninja-check.cmake
- Tests/RunCMake/NinjaMultiConfig/Simple.cmake 1 addition, 1 deletionTests/RunCMake/NinjaMultiConfig/Simple.cmake
- Tests/RunCMake/NinjaMultiConfig/SimpleSubdir/CMakeLists.txt 7 additions, 2 deletionsTests/RunCMake/NinjaMultiConfig/SimpleSubdir/CMakeLists.txt
- Tests/RunCMake/NinjaMultiConfig/empty_dbg.c 0 additions, 0 deletionsTests/RunCMake/NinjaMultiConfig/empty_dbg.c
- Tests/RunCMake/NinjaMultiConfig/empty_rel.c 0 additions, 0 deletionsTests/RunCMake/NinjaMultiConfig/empty_rel.c
- Tests/RunCMake/ObjectLibrary/OwnSources-stderr.txt 2 additions, 14 deletionsTests/RunCMake/ObjectLibrary/OwnSources-stderr.txt
Loading