mirror of
https://github.com/Kitware/CMake.git
synced 2026-01-06 13:51:33 -06:00
Since commit 2ae72ef74b (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
16 lines
474 B
CMake
16 lines
474 B
CMake
enable_language(C)
|
|
|
|
set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON)
|
|
|
|
file(TOUCH ${CMAKE_BINARY_DIR}/empty.cmake)
|
|
include(${CMAKE_BINARY_DIR}/empty.cmake)
|
|
|
|
add_subdirectory(SimpleSubdir)
|
|
|
|
add_library(simplestatic STATIC simplelib.c)
|
|
|
|
include(${CMAKE_CURRENT_LIST_DIR}/Common.cmake)
|
|
generate_output_files(simpleexe simpleexe2 simpleshared simplestatic simpleobj)
|
|
|
|
file(APPEND "${CMAKE_BINARY_DIR}/target_files.cmake" "set(GENERATED_FILES [==[${CMAKE_BINARY_DIR}/empty.cmake]==])\n")
|