[cmake-commits] hoffman committed cmLocalVisualStudio6Generator.cxx 1.100.2.8 1.100.2.9 cmLocalVisualStudio7Generator.cxx 1.125.2.14 1.125.2.15 cmLocalVisualStudio7Generator.h 1.22.2.6 1.22.2.7 cmTryCompileCommand.cxx 1.55.2.3 1.55.2.4

cmake-commits at cmake.org cmake-commits at cmake.org
Tue Dec 11 22:28:47 EST 2007


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

Modified Files:
      Tag: CMake-2-4
	cmLocalVisualStudio6Generator.cxx 
	cmLocalVisualStudio7Generator.cxx 
	cmLocalVisualStudio7Generator.h cmTryCompileCommand.cxx 
Log Message:
ENH: changes for RC5


Index: cmLocalVisualStudio7Generator.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmLocalVisualStudio7Generator.cxx,v
retrieving revision 1.125.2.14
retrieving revision 1.125.2.15
diff -u -d -r1.125.2.14 -r1.125.2.15
--- cmLocalVisualStudio7Generator.cxx	4 Dec 2007 22:14:05 -0000	1.125.2.14
+++ cmLocalVisualStudio7Generator.cxx	12 Dec 2007 03:28:45 -0000	1.125.2.15
@@ -382,7 +382,7 @@
   {"LinkIncremental", "INCREMENTAL:NO", "link incremental", "1", 0},
   {"LinkIncremental", "INCREMENTAL:YES", "link incremental", "2", 0},
   {"IgnoreDefaultLibraryNames", "NODEFAULTLIB:", "default libs to ignore", "",
-   cmVS7FlagTable::UserValue},
+   cmVS7FlagTable::UserValue | cmVS7FlagTable::SemicolonAppendable},
   {"IgnoreAllDefaultLibraries", "NODEFAULTLIB", "ignore all default libs",
    "TRUE", 0},
   {0,0,0,0,0}
@@ -1804,51 +1804,68 @@
 ::CheckFlagTable(cmVS7FlagTable const* table, const char* flag,
                  bool& flag_handled)
 {
-      // Look for an entry in the flag table matching this flag.
+  // Look for an entry in the flag table matching this flag.
   for(cmVS7FlagTable const* entry = table; entry->IDEName; ++entry)
+    {
+    bool entry_found = false;
+    if(entry->special & cmVS7FlagTable::UserValue)
+      {
+      // This flag table entry accepts a user-specified value.  If
+      // the entry specifies UserRequired we must match only if a
+      // non-empty value is given.
+      int n = static_cast<int>(strlen(entry->commandFlag));
+      if(strncmp(flag+1, entry->commandFlag, n) == 0 &&
+         (!(entry->special & cmVS7FlagTable::UserRequired) ||
+          static_cast<int>(strlen(flag+1)) > n))
         {
-        bool entry_found = false;
-        if(entry->special & cmVS7FlagTable::UserValue)
+        if(entry->special & cmVS7FlagTable::UserIgnored)
           {
-          // This flag table entry accepts a user-specified value.  If
-          // the entry specifies UserRequired we must match only if a
-          // non-empty value is given.
-          int n = static_cast<int>(strlen(entry->commandFlag));
-          if(strncmp(flag+1, entry->commandFlag, n) == 0 &&
-             (!(entry->special & cmVS7FlagTable::UserRequired) ||
-              static_cast<int>(strlen(flag+1)) > n))
+          // Ignore the user-specified value.
+          this->FlagMap[entry->IDEName] = entry->value;
+          } 
+        else if(entry->special & cmVS7FlagTable::SemicolonAppendable)
+          {
+          const char *new_value = flag+1+n;
+          
+          std::map<cmStdString,cmStdString>::iterator itr;
+          itr = this->FlagMap.find(entry->IDEName);
+          if(itr != this->FlagMap.end())
             {
-            if(entry->special & cmVS7FlagTable::UserIgnored)
-              {
-              // Ignore the user-specified value.
-              this->FlagMap[entry->IDEName] = entry->value;
-              }
-            else
-              {
-              // Use the user-specified value.
-              this->FlagMap[entry->IDEName] = flag+1+n;
-              }
-            entry_found = true;
+            // Append to old value (if present) with semicolons;
+            itr->second += ";";
+            itr->second += new_value;
+            }
+          else
+            {
+            this->FlagMap[entry->IDEName] = new_value;
             }
           }
-        else if(strcmp(flag+1, entry->commandFlag) == 0)
-          {
-          // This flag table entry provides a fixed value.
-          this->FlagMap[entry->IDEName] = entry->value;
-          entry_found = true;
-          }
-
-        // If the flag has been handled by an entry not requesting a
-        // search continuation we are done.
-        if(entry_found && !(entry->special & cmVS7FlagTable::Continue))
+        else
           {
-      return true;
+          // Use the user-specified value.
+          this->FlagMap[entry->IDEName] = flag+1+n;
           }
-
-        // If the entry was found the flag has been handled.
-        flag_handled = flag_handled || entry_found;
+        entry_found = true;
         }
-
+      }
+    else if(strcmp(flag+1, entry->commandFlag) == 0)
+      {
+      // This flag table entry provides a fixed value.
+      this->FlagMap[entry->IDEName] = entry->value;
+      entry_found = true;
+      }
+    
+    // If the flag has been handled by an entry not requesting a
+    // search continuation we are done.
+    if(entry_found && !(entry->special & cmVS7FlagTable::Continue))
+      {
+      return true;
+      }
+    
+    // If the entry was found the flag has been handled.
+    flag_handled = flag_handled || entry_found;
+    }
+  
   return false;
 }
 

Index: cmLocalVisualStudio7Generator.h
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmLocalVisualStudio7Generator.h,v
retrieving revision 1.22.2.6
retrieving revision 1.22.2.7
diff -u -d -r1.22.2.6 -r1.22.2.7
--- cmLocalVisualStudio7Generator.h	16 Mar 2007 22:05:42 -0000	1.22.2.6
+++ cmLocalVisualStudio7Generator.h	12 Dec 2007 03:28:45 -0000	1.22.2.7
@@ -144,7 +144,11 @@
     UserIgnored  = (1<<1), // ignore any user value
     UserRequired = (1<<2), // match only when user value is non-empty
     Continue     = (1<<3), // continue looking for matching entries
-
+    SemicolonAppendable = (1<<4), // a flag that if specified multiple times
+                                  // should have its value appended to the
+                                  // old value with semicolons (e.g.
+                                  // /NODEFAULTLIB: => 
+                                  // IgnoreDefaultLibraryNames)
     UserValueIgnored  = UserValue | UserIgnored,
     UserValueRequired = UserValue | UserRequired
   };

Index: cmLocalVisualStudio6Generator.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmLocalVisualStudio6Generator.cxx,v
retrieving revision 1.100.2.8
retrieving revision 1.100.2.9
diff -u -d -r1.100.2.8 -r1.100.2.9
--- cmLocalVisualStudio6Generator.cxx	17 Mar 2007 17:23:25 -0000	1.100.2.8
+++ cmLocalVisualStudio6Generator.cxx	12 Dec 2007 03:28:45 -0000	1.100.2.9
@@ -588,6 +588,11 @@
   std::vector<std::string>::iterator i;
   for(i = this->Configurations.begin(); i != this->Configurations.end(); ++i)
     {
+    // Strip the subdirectory name out of the configuration name.
+    std::string config = *i;
+    std::string::size_type pos = config.find_last_of(" ");
+    config = config.substr(pos+1, std::string::npos);
+    config = config.substr(0, config.size()-1);
     if (i == this->Configurations.begin())
       {
       fout << "!IF  \"$(CFG)\" == " << i->c_str() << std::endl;
@@ -606,7 +611,8 @@
         d != depends.end(); ++d)
       {
       // Lookup the real name of the dependency in case it is a CMake target.
-      std::string dep = this->GetRealDependency(d->c_str(), i->c_str());
+      std::string dep = this->GetRealDependency(d->c_str(),
+                                                config.c_str());
       fout << "\\\n\t" <<
         this->ConvertToOptionallyRelativeOutputPath(dep.c_str());
       }

Index: cmTryCompileCommand.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmTryCompileCommand.cxx,v
retrieving revision 1.55.2.3
retrieving revision 1.55.2.4
diff -u -d -r1.55.2.3 -r1.55.2.4
--- cmTryCompileCommand.cxx	13 Oct 2006 14:52:06 -0000	1.55.2.3
+++ cmTryCompileCommand.cxx	12 Dec 2007 03:28:45 -0000	1.55.2.4
@@ -192,7 +192,8 @@
       fprintf(fout, " %s ", flags);
       }
     fprintf(fout, " ${COMPILE_DEFINITIONS}\")\n");
-    fprintf(fout, "INCLUDE_DIRECTORIES(${INCLUDE_DIRECTORIES})\n");
+    fprintf(fout, "INCLUDE_DIRECTORIES(${INCLUDE_DIRECTORIES})\n");  
+    fprintf(fout, "SET(CMAKE_SUPPRESS_REGENERATION 1)\n");
     fprintf(fout, "LINK_DIRECTORIES(${LINK_DIRECTORIES})\n");
     // handle any compile flags we need to pass on
     if (compileFlags.size())



More information about the Cmake-commits mailing list