1
0
mirror of https://github.com/Kitware/CMake.git synced 2025-10-21 23:00:50 +08:00

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.
This commit is contained in:
Brad King
2022-09-30 13:05:54 -04:00
parent dc2358fe84
commit 12c6fec6b4

View File

@@ -2393,8 +2393,13 @@ void cmGlobalXCodeGenerator::CreateBuildSettings(cmGeneratorTarget* gtgt,
// Add preprocessor definitions for this target and configuration. // Add preprocessor definitions for this target and configuration.
BuildObjectListOrString ppDefs(this, true); BuildObjectListOrString ppDefs(this, true);
this->AppendDefines( if (languages.count("Swift")) {
ppDefs, "CMAKE_INTDIR=\"$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)\""); // 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()) { if (const std::string* exportMacro = gtgt->GetExportMacro()) {
// Add the export symbol definition for shared library objects. // Add the export symbol definition for shared library objects.
this->AppendDefines(ppDefs, exportMacro->c_str()); this->AppendDefines(ppDefs, exportMacro->c_str());