summaryrefslogtreecommitdiffstats
path: root/Source/cmGlobalXCodeGenerator.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2021-06-29 18:18:54 (GMT)
committerBrad King <brad.king@kitware.com>2021-06-30 14:55:40 (GMT)
commit03bd9c4c10741073e9f39dee6c5ee6000a2b1da2 (patch)
tree77c287ed62693469ba135125d53b1a6cbaed30d0 /Source/cmGlobalXCodeGenerator.cxx
parent88fade3914629666b28260f2197c8f11c6737857 (diff)
downloadCMake-03bd9c4c10741073e9f39dee6c5ee6000a2b1da2.zip
CMake-03bd9c4c10741073e9f39dee6c5ee6000a2b1da2.tar.gz
CMake-03bd9c4c10741073e9f39dee6c5ee6000a2b1da2.tar.bz2
cmMakefile: Add helper to initialize CMAKE_CONFIGURATION_TYPES
Factor out duplicate code from the Ninja Multi-Config, Visual Studio, and Xcode generators.
Diffstat (limited to 'Source/cmGlobalXCodeGenerator.cxx')
-rw-r--r--Source/cmGlobalXCodeGenerator.cxx9
1 files changed, 1 insertions, 8 deletions
diff --git a/Source/cmGlobalXCodeGenerator.cxx b/Source/cmGlobalXCodeGenerator.cxx
index 693a11c..f513942 100644
--- a/Source/cmGlobalXCodeGenerator.cxx
+++ b/Source/cmGlobalXCodeGenerator.cxx
@@ -431,14 +431,7 @@ void cmGlobalXCodeGenerator::EnableLanguage(
{
mf->AddDefinition("XCODE", "1");
mf->AddDefinition("XCODE_VERSION", this->VersionString);
- if (!mf->GetDefinition("CMAKE_CONFIGURATION_TYPES")) {
- mf->AddCacheDefinition(
- "CMAKE_CONFIGURATION_TYPES", "Debug;Release;MinSizeRel;RelWithDebInfo",
- "Semicolon separated list of supported configuration types, "
- "only supports Debug, Release, MinSizeRel, and RelWithDebInfo, "
- "anything else will be ignored.",
- cmStateEnums::STRING);
- }
+ mf->InitCMAKE_CONFIGURATION_TYPES("Debug;Release;MinSizeRel;RelWithDebInfo");
mf->AddDefinition("CMAKE_GENERATOR_NO_COMPILER_ENV", "1");
this->cmGlobalGenerator::EnableLanguage(lang, mf, optional);
this->ComputeArchitectures(mf);