[CMake] Supported configurations with Visual Studio builds
Sylvain Benner
benner at virtools.com
Fri Oct 5 11:02:29 EDT 2007
> Is this a bug or a feature, does anyone know? If I rip out the checks in cmGlobalVisualStudio7Generator:: GenerateConfigurations is anything going to break?
>
>
If you rip out this I think you'll have an error with TRY_COMPILE. (be
aware to delete your CMakeLists.txt cache each time you test your
changes to be sure that the TRY_COMPILE is able to work correctly).
Well here I made a big hack like this in GenerateConfigurations method ^_^
if (this->CMakeInstance->GetCacheDefinition("MP_CONFIGURATIONS_MODE"))
{
std::string sConfigurations =
this->GetCMakeInstance()->GetCacheDefinition("CMAKE_CONFIGURATION_TYPES");
this->Configurations.clear();
cmsys::SystemTools::Split(sConfigurations.c_str(),
this->Configurations, ';');
}
else
{
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);
cmGlobalVisualStudio7Generator::GenerateConfigurations(mf);
}
--Sylvain
More information about the CMake
mailing list