mirror of
https://github.com/Kitware/CMake.git
synced 2026-01-01 19:30:13 -06:00
This was broken by commitdf08c37a42(cmGlobalGenerator: Add unity/pch sources after computing compile features, 2024-02-02, v3.28.3~1^2~1^2), and 3.28.2's commit76b5383123(cmGlobalGenerator: add unity sources after computing target compile features, 2024-01-01, v3.28.2~17^2~1). The problem is very similar to that fixed by commit4e8f24e977(PCH: Clear link interface cache when adding PCH object to it, 2022-01-24, v3.23.0-rc1~44^2~9). Generalize that fix. Fixes: #25696
17 lines
470 B
CMake
17 lines
470 B
CMake
include(RunCMake)
|
|
|
|
run_cmake(NoTarget)
|
|
run_cmake(NotObjlibTarget)
|
|
|
|
if(RunCMake_GENERATOR STREQUAL "Xcode" AND "$ENV{CMAKE_OSX_ARCHITECTURES}" MATCHES "[;$]")
|
|
run_cmake(XcodeVariableNoGenexExpansion)
|
|
endif()
|
|
|
|
function(run_cmake_and_build case)
|
|
set(RunCMake_TEST_BINARY_DIR ${RunCMake_BINARY_DIR}/${case}-build)
|
|
run_cmake(${case})
|
|
set(RunCMake_TEST_NO_CLEAN 1)
|
|
run_cmake_command(${case}-build ${CMAKE_COMMAND} --build .)
|
|
endfunction()
|
|
run_cmake_and_build(Unity)
|