summaryrefslogtreecommitdiffstats
path: root/Source/cmGlobalVisualStudio7Generator.cxx
diff options
context:
space:
mode:
authorAndy Cedilnik <andy.cedilnik@kitware.com>2002-12-11 17:09:52 (GMT)
committerAndy Cedilnik <andy.cedilnik@kitware.com>2002-12-11 17:09:52 (GMT)
commit682e2c7b8b614b595dcff32ffe24d67a5e26ff54 (patch)
treecc2ce29a23a8d8ba81a25a02a4a8686578b70c9e /Source/cmGlobalVisualStudio7Generator.cxx
parentd6f98c2a82c693f9f96bd7c515fa4946a375f3ca (diff)
downloadCMake-682e2c7b8b614b595dcff32ffe24d67a5e26ff54.zip
CMake-682e2c7b8b614b595dcff32ffe24d67a5e26ff54.tar.gz
CMake-682e2c7b8b614b595dcff32ffe24d67a5e26ff54.tar.bz2
Add check so that java projects build without C++
Diffstat (limited to 'Source/cmGlobalVisualStudio7Generator.cxx')
-rw-r--r--Source/cmGlobalVisualStudio7Generator.cxx67
1 files changed, 36 insertions, 31 deletions
diff --git a/Source/cmGlobalVisualStudio7Generator.cxx b/Source/cmGlobalVisualStudio7Generator.cxx
index a583a0e..7e62e21 100644
--- a/Source/cmGlobalVisualStudio7Generator.cxx
+++ b/Source/cmGlobalVisualStudio7Generator.cxx
@@ -153,42 +153,47 @@ void cmGlobalVisualStudio7Generator::SetupTests()
void cmGlobalVisualStudio7Generator::GenerateConfigurations()
{
// process the configurations
- std::string configTypes =
- m_CMakeInstance->GetCacheDefinition("CMAKE_CONFIGURATION_TYPES");
- std::string::size_type start = 0;
- std::string::size_type endpos = 0;
- while(endpos != std::string::npos)
+ const char* ct
+ = m_CMakeInstance->GetCacheDefinition("CMAKE_CONFIGURATION_TYPES");
+ if ( ct )
{
- endpos = configTypes.find(' ', start);
- std::string config;
- std::string::size_type len;
- if(endpos != std::string::npos)
- {
- len = endpos - start;
- }
- else
- {
- len = configTypes.size() - start;
- }
- config = configTypes.substr(start, len);
- if(config == "Debug" || config == "Release" ||
- config == "MinSizeRel" || config == "RelWithDebInfo")
+ std::string configTypes = ct;
+
+ std::string::size_type start = 0;
+ std::string::size_type endpos = 0;
+ while(endpos != std::string::npos)
{
- // only add unique configurations
- if(std::find(m_Configurations.begin(),
- m_Configurations.end(), config) == m_Configurations.end())
+ endpos = configTypes.find(' ', start);
+ std::string config;
+ std::string::size_type len;
+ if(endpos != std::string::npos)
{
- m_Configurations.push_back(config);
+ len = endpos - start;
}
+ else
+ {
+ len = configTypes.size() - start;
+ }
+ config = configTypes.substr(start, len);
+ if(config == "Debug" || config == "Release" ||
+ config == "MinSizeRel" || config == "RelWithDebInfo")
+ {
+ // only add unique configurations
+ if(std::find(m_Configurations.begin(),
+ m_Configurations.end(), config) == m_Configurations.end())
+ {
+ m_Configurations.push_back(config);
+ }
+ }
+ else
+ {
+ cmSystemTools::Error(
+ "Invalid configuration type in CMAKE_CONFIGURATION_TYPES: ",
+ config.c_str(),
+ " (Valid types are Debug,Release,MinSizeRel,RelWithDebInfo)");
+ }
+ start = endpos+1;
}
- else
- {
- cmSystemTools::Error(
- "Invalid configuration type in CMAKE_CONFIGURATION_TYPES: ",
- config.c_str(),
- " (Valid types are Debug,Release,MinSizeRel,RelWithDebInfo)");
- }
- start = endpos+1;
}
if(m_Configurations.size() == 0)
{