diff options
author | Brad King <brad.king@kitware.com> | 2024-05-13 18:28:05 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2024-05-13 18:41:00 (GMT) |
commit | 0a3caf087804b054984e6db845df9f4ff968057d (patch) | |
tree | ac3e2cc128676a8acfbef1dafa3185347207117d /Modules | |
parent | 9f7ec4c297b80079d0f39de48e55453cdcc987e4 (diff) | |
download | CMake-0a3caf087804b054984e6db845df9f4ff968057d.zip CMake-0a3caf087804b054984e6db845df9f4ff968057d.tar.gz CMake-0a3caf087804b054984e6db845df9f4ff968057d.tar.bz2 |
ExternalProject: Restore support for Xcode with an effective platform
Revert commit cabad8a37f (ExternalProject: Always use $<CONFIG> for
source files, 2023-02-02, v3.27.0-rc1~550^2~3) and restore
Xcode-specific behavior intentionally preserved by commit c111d440ce
(ExternalProject: Express per-config step stamp file paths using CONFIG
genex, 2022-06-08, v3.24.0-rc1~15^2). Unfortunately we still do not
have a test case, so leave a comment to avoid reverting this.
Issue: #23645
Issue: #23652
Diffstat (limited to 'Modules')
-rw-r--r-- | Modules/ExternalProject.cmake | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/Modules/ExternalProject.cmake b/Modules/ExternalProject.cmake index a5dceaa..a6cd8df 100644 --- a/Modules/ExternalProject.cmake +++ b/Modules/ExternalProject.cmake @@ -2187,7 +2187,16 @@ function(_ep_get_configuration_subdir_genex suffix_var) set(suffix "") get_property(_isMultiConfig GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG) if(_isMultiConfig) - set(suffix "/$<CONFIG>") + if(CMAKE_GENERATOR STREQUAL "Xcode") + # The Xcode generator does not support per-config sources, + # so use the underlying build system's placeholder instead. + # FIXME(#23652): We have no test for the use case requiring + # CMAKE_CFG_INTDIR for XCODE_EMIT_EFFECTIVE_PLATFORM_NAME, + # but $<CONFIG> does not work. + set(suffix "/${CMAKE_CFG_INTDIR}") + else() + set(suffix "/$<CONFIG>") + endif() endif() set(${suffix_var} "${suffix}" PARENT_SCOPE) endfunction() |