[CMake] Supported configurations with Visual Studio builds

Josef Karthauser joe.karthauser at geomerics.com
Fri Oct 5 11:38:40 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).
> 

There doesn't appear to be a problem with that.  It works fine with this
patch,
Joe

Index: cmGlobalVisualStudio7Generator.cxx
===================================================================
--- cmGlobalVisualStudio7Generator.cxx  (revision 2619)
+++ cmGlobalVisualStudio7Generator.cxx  (working copy)
@@ -169,9 +169,7 @@
         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(this->Configurations.begin(),
                      this->Configurations.end(),
@@ -179,14 +177,7 @@
           {
           this->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;
       }
     }


More information about the CMake mailing list