[cmake-commits] king committed cmLocalVisualStudio6Generator.cxx 1.132 1.133

cmake-commits at cmake.org cmake-commits at cmake.org
Tue Nov 20 11:18:06 EST 2007


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

Modified Files:
	cmLocalVisualStudio6Generator.cxx 
Log Message:
BUG: Need to honor HEADER_FILE_ONLY source file property and exclude the source from the build.


Index: cmLocalVisualStudio6Generator.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmLocalVisualStudio6Generator.cxx,v
retrieving revision 1.132
retrieving revision 1.133
diff -u -d -r1.132 -r1.133
--- cmLocalVisualStudio6Generator.cxx	9 Nov 2007 20:08:55 -0000	1.132
+++ cmLocalVisualStudio6Generator.cxx	20 Nov 2007 16:18:04 -0000	1.133
@@ -427,6 +427,9 @@
         compileFlags += " /TC ";
         }
       }
+
+    bool excludedFromBuild =
+      (lang && (*sf)->GetPropertyAsBool("HEADER_FILE_ONLY"));
       
     // Check for extra object-file dependencies.
     const char* dependsValue = (*sf)->GetProperty("OBJECT_DEPENDS");
@@ -460,7 +463,8 @@
         const char* flags = compileFlags.size() ? compileFlags.c_str(): 0;
         this->WriteCustomRule(fout, source.c_str(), *command, flags);
         }
-      else if(!compileFlags.empty() || !objectNameDir.empty())
+      else if(!compileFlags.empty() || !objectNameDir.empty() ||
+              excludedFromBuild)
         {
         for(std::vector<std::string>::iterator i
               = this->Configurations.begin(); 
@@ -474,6 +478,10 @@
             {
             fout << "!ELSEIF  \"$(CFG)\" == " << i->c_str() << std::endl;
             }
+          if(excludedFromBuild)
+            {
+            fout << "# PROP Exclude_From_Build 1\n";
+            }
           if(!compileFlags.empty())
             {
             fout << "\n# ADD CPP " << compileFlags << "\n\n";



More information about the Cmake-commits mailing list