Browse Source

BUG: Do not force HEADER_FILE_ONLY off if the user has already set it on.

Brad King 18 years ago
parent
commit
37e8c11827
1 changed files with 7 additions and 1 deletions
  1. 7 1
      Source/cmSourceFile.cxx

+ 7 - 1
Source/cmSourceFile.cxx

@@ -222,10 +222,16 @@ void cmSourceFile::CheckExtension()
   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");
     }