summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
Diffstat (limited to 'Source')
-rw-r--r--Source/cmSourceFile.cxx8
1 files changed, 7 insertions, 1 deletions
diff --git a/Source/cmSourceFile.cxx b/Source/cmSourceFile.cxx
index 1468869..549ff28 100644
--- a/Source/cmSourceFile.cxx
+++ b/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");
}