diff options
author | Brad King <brad.king@kitware.com> | 2022-09-30 17:05:54 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2022-09-30 17:08:05 (GMT) |
commit | 12c6fec6b46f8a55ab96404532fca1ff81ef029a (patch) | |
tree | 0fce41e800eb120d3cf4fd194bb89a569c74cf24 /Source/cmGlobalXCodeGenerator.cxx | |
parent | dc2358fe843d29ae813ffb4fabb45cbfbf5999bd (diff) | |
download | CMake-12c6fec6b46f8a55ab96404532fca1ff81ef029a.zip CMake-12c6fec6b46f8a55ab96404532fca1ff81ef029a.tar.gz CMake-12c6fec6b46f8a55ab96404532fca1ff81ef029a.tar.bz2 |
Xcode: Drop CMAKE_INTDIR= definition in Swift targets
Xcode 14.0 warns that Swift doesn't support definition values.
Therefore `CMAKE_INTDIR` is not useful to Swift sources. Drop it.
Diffstat (limited to 'Source/cmGlobalXCodeGenerator.cxx')
-rw-r--r-- | Source/cmGlobalXCodeGenerator.cxx | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/Source/cmGlobalXCodeGenerator.cxx b/Source/cmGlobalXCodeGenerator.cxx index 433edaf..23c365a 100644 --- a/Source/cmGlobalXCodeGenerator.cxx +++ b/Source/cmGlobalXCodeGenerator.cxx @@ -2393,8 +2393,13 @@ void cmGlobalXCodeGenerator::CreateBuildSettings(cmGeneratorTarget* gtgt, // Add preprocessor definitions for this target and configuration. BuildObjectListOrString ppDefs(this, true); - this->AppendDefines( - ppDefs, "CMAKE_INTDIR=\"$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)\""); + if (languages.count("Swift")) { + // FIXME: Xcode warns that Swift does not support definition values. + // C/CXX sources mixed in Swift targets will not see CMAKE_INTDIR. + } else { + this->AppendDefines( + ppDefs, "CMAKE_INTDIR=\"$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)\""); + } if (const std::string* exportMacro = gtgt->GetExportMacro()) { // Add the export symbol definition for shared library objects. this->AppendDefines(ppDefs, exportMacro->c_str()); |