[Cmake-commits] [cmake-commits] king committed cmLocalVisualStudio6Generator.cxx 1.154 1.155 cmLocalVisualStudio7Generator.cxx 1.242 1.243

cmake-commits at cmake.org cmake-commits at cmake.org
Fri Jul 3 10:33:38 EDT 2009


Update of /cvsroot/CMake/CMake/Source
In directory public:/mounts/ram/cvs-serv22914/Source

Modified Files:
	cmLocalVisualStudio6Generator.cxx 
	cmLocalVisualStudio7Generator.cxx 
Log Message:
STYLE: Replace large if() with named boolean

In cmLocalVisualStudio{6,7}Generator this replaces a large if() test
with a re-usable result stored in a boolean variable named accordingly.


Index: cmLocalVisualStudio7Generator.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmLocalVisualStudio7Generator.cxx,v
retrieving revision 1.242
retrieving revision 1.243
diff -C 2 -d -r1.242 -r1.243
*** cmLocalVisualStudio7Generator.cxx	16 Jun 2009 15:44:19 -0000	1.242
--- cmLocalVisualStudio7Generator.cxx	3 Jul 2009 14:33:34 -0000	1.243
***************
*** 628,631 ****
--- 628,632 ----
    const char* configType = "10";
    const char* projectType = 0;
+   bool targetBuilds = true;
    switch(target.GetType())
      {
***************
*** 646,649 ****
--- 647,651 ----
        configType = "10";
      default:
+       targetBuilds = false;
        break;
      }
***************
*** 802,809 ****
    fout << "\t\t\t\tAssemblerListingLocation=\"" << configName << "\"\n";
    fout << "\t\t\t\tObjectFile=\"$(IntDir)\\\"\n";
!   if(target.GetType() == cmTarget::EXECUTABLE ||
!      target.GetType() == cmTarget::STATIC_LIBRARY ||
!      target.GetType() == cmTarget::SHARED_LIBRARY ||
!      target.GetType() == cmTarget::MODULE_LIBRARY)
      {
      // We need to specify a program database file name even for
--- 804,808 ----
    fout << "\t\t\t\tAssemblerListingLocation=\"" << configName << "\"\n";
    fout << "\t\t\t\tObjectFile=\"$(IntDir)\\\"\n";
!   if(targetBuilds)
      {
      // We need to specify a program database file name even for

Index: cmLocalVisualStudio6Generator.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmLocalVisualStudio6Generator.cxx,v
retrieving revision 1.154
retrieving revision 1.155
diff -C 2 -d -r1.154 -r1.155
*** cmLocalVisualStudio6Generator.cxx	16 Jun 2009 15:57:23 -0000	1.154
--- cmLocalVisualStudio6Generator.cxx	3 Jul 2009 14:33:34 -0000	1.155
***************
*** 886,889 ****
--- 886,891 ----
    std::string outPath = target.GetDirectory();
  
+   bool targetBuilds = (target.GetType() >= cmTarget::EXECUTABLE &&
+                        target.GetType() <= cmTarget::MODULE_LIBRARY);
  #ifdef CM_USE_OLD_VS6
    // Lookup the library and executable output directories.
***************
*** 1137,1142 ****
  
    // Get standard libraries for this language.
!   if(target.GetType() >= cmTarget::EXECUTABLE && 
!      target.GetType() <= cmTarget::MODULE_LIBRARY)
      {
      // Get the language to use for linking.
--- 1139,1143 ----
  
    // Get standard libraries for this language.
!   if(targetBuilds)
      {
      // Get the language to use for linking.



More information about the Cmake-commits mailing list