summaryrefslogtreecommitdiffstats
path: root/Source/cmGlobalVisualStudio6Generator.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2002-12-20 17:59:18 (GMT)
committerBrad King <brad.king@kitware.com>2002-12-20 17:59:18 (GMT)
commit4e6ad941e981e81b53876508d17d1c3ef06938f2 (patch)
tree01940cd7e170d0db1c808a9dc381c866d83a03fa /Source/cmGlobalVisualStudio6Generator.cxx
parent309748ff79d827e191e93f8c28f42768dd5d3966 (diff)
downloadCMake-4e6ad941e981e81b53876508d17d1c3ef06938f2.zip
CMake-4e6ad941e981e81b53876508d17d1c3ef06938f2.tar.gz
CMake-4e6ad941e981e81b53876508d17d1c3ef06938f2.tar.bz2
ENH: Visual Studio 6 and 7 generators now set CMAKE_CONFIGURATION_TYPES to be a semicolon-separated list of configurations that will be built.
Diffstat (limited to 'Source/cmGlobalVisualStudio6Generator.cxx')
-rw-r--r--Source/cmGlobalVisualStudio6Generator.cxx31
1 files changed, 31 insertions, 0 deletions
diff --git a/Source/cmGlobalVisualStudio6Generator.cxx b/Source/cmGlobalVisualStudio6Generator.cxx
index c19ba04..111a0a2 100644
--- a/Source/cmGlobalVisualStudio6Generator.cxx
+++ b/Source/cmGlobalVisualStudio6Generator.cxx
@@ -30,9 +30,40 @@ void cmGlobalVisualStudio6Generator::EnableLanguage(const char* lang,
mf->AddDefinition("CMAKE_CFG_INTDIR","$(IntDir)");
mf->AddDefinition("CMAKE_GENERATOR_CC", "cl");
mf->AddDefinition("CMAKE_GENERATOR_CXX", "cl");
+ this->GenerateConfigurations(mf);
this->cmGlobalGenerator::EnableLanguage(lang, mf);
}
+void cmGlobalVisualStudio6Generator::GenerateConfigurations(cmMakefile* mf)
+{
+ std::string fname= mf->GetDefinition("CMAKE_ROOT");
+ const char* def= mf->GetDefinition( "MSPROJECT_TEMPLATE_DIRECTORY");
+ if(def)
+ {
+ fname = def;
+ }
+ else
+ {
+ fname += "/Templates";
+ }
+ fname += "/CMakeVisualStudio6Configurations.cmake";
+ if(!mf->ReadListFile(mf->GetCurrentListFile(), fname.c_str()))
+ {
+ cmSystemTools::Error("Cannot open ", fname.c_str(),
+ ". Please copy this file from the main "
+ "CMake/Templates directory and edit it for "
+ "your build configurations.");
+ }
+ else if(!mf->GetDefinition("CMAKE_CONFIGURATION_TYPES"))
+ {
+ cmSystemTools::Error("CMAKE_CONFIGURATION_TYPES not set by ",
+ fname.c_str(),
+ ". Please copy this file from the main "
+ "CMake/Templates directory and edit it for "
+ "your build configurations.");
+ }
+}
+
int cmGlobalVisualStudio6Generator::TryCompile(const char *,
const char *bindir,
const char *projectName,