diff options
author | Brad King <brad.king@kitware.com> | 2013-05-13 15:01:17 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2013-05-13 15:07:46 (GMT) |
commit | 42bb42d19723323e6e48346b1437e04a251addfa (patch) | |
tree | 9e4f39a2a1f3f3344c0b93c65a90ca5db2795e60 /Source/cmGlobalVisualStudio7Generator.cxx | |
parent | a3f106dedfa4cf913301ea13ad143583af3d20c0 (diff) | |
download | CMake-42bb42d19723323e6e48346b1437e04a251addfa.zip CMake-42bb42d19723323e6e48346b1437e04a251addfa.tar.gz CMake-42bb42d19723323e6e48346b1437e04a251addfa.tar.bz2 |
VS: Always initialize CMAKE_CONFIGURATION_TYPES in IDE generators
Initialize the CMAKE_CONFIGURATION_TYPES cache entry early during
EnableLanguage like the Xcode generator does. Avoid depending on
the MSVC compiler information module to do it. Otherwise code like
project(MyProj NONE)
sets CMAKE_CONFIGURATION_TYPES late (in GenerateConfigurations), and
to only "Debug" and "Release" instead of the standard set of 4.
Reported-by: Paul Smith <paul@mad-scientist.net>
Diffstat (limited to 'Source/cmGlobalVisualStudio7Generator.cxx')
-rw-r--r-- | Source/cmGlobalVisualStudio7Generator.cxx | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/Source/cmGlobalVisualStudio7Generator.cxx b/Source/cmGlobalVisualStudio7Generator.cxx index 63cbdb8..ef2f77d 100644 --- a/Source/cmGlobalVisualStudio7Generator.cxx +++ b/Source/cmGlobalVisualStudio7Generator.cxx @@ -31,6 +31,16 @@ void cmGlobalVisualStudio7Generator mf->AddDefinition("CMAKE_GENERATOR_NO_COMPILER_ENV", "1"); mf->AddDefinition("CMAKE_GENERATOR_FC", "ifort"); this->AddPlatformDefinitions(mf); + 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.", + cmCacheManager::STRING); + } // Create list of configurations requested by user's cache, if any. this->cmGlobalGenerator::EnableLanguage(lang, mf, optional); |