[cmake-commits] king committed cmSourceFile.cxx 1.37 1.38

cmake-commits at cmake.org cmake-commits at cmake.org
Mon Nov 19 14:27:33 EST 2007


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

Modified Files:
	cmSourceFile.cxx 
Log Message:
BUG: Do not force HEADER_FILE_ONLY off if the user has already set it on.


Index: cmSourceFile.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmSourceFile.cxx,v
retrieving revision 1.37
retrieving revision 1.38
diff -u -d -r1.37 -r1.38
--- cmSourceFile.cxx	13 Sep 2007 17:37:45 -0000	1.37
+++ cmSourceFile.cxx	19 Nov 2007 19:27:31 -0000	1.38
@@ -222,10 +222,16 @@
   if(std::find(hdrExts.begin(), hdrExts.end(), this->Extension) ==
      hdrExts.end())
     {
-    this->SetProperty("HEADER_FILE_ONLY", "0");
+    // This is not a known header file extension.  Mark it as not a
+    // header unless the user has already explicitly set the property.
+    if(!this->GetProperty("HEADER_FILE_ONLY"))
+      {
+      this->SetProperty("HEADER_FILE_ONLY", "0");
+      }
     }
   else
     {
+    // This is a known header file extension.  The source cannot be compiled.
     this->SetProperty("HEADER_FILE_ONLY", "1");
     }
 



More information about the Cmake-commits mailing list