diff options
author | Brad King <brad.king@kitware.com> | 2007-11-19 19:27:31 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2007-11-19 19:27:31 (GMT) |
commit | 37e8c118272dc261a01b776bd7683ed0b869aa7a (patch) | |
tree | ec28899108c7d79b0cd2dc019e6aa211249bb5c8 /Source | |
parent | 678bccc64bf2104def5de610fb14447439fb4704 (diff) | |
download | CMake-37e8c118272dc261a01b776bd7683ed0b869aa7a.zip CMake-37e8c118272dc261a01b776bd7683ed0b869aa7a.tar.gz CMake-37e8c118272dc261a01b776bd7683ed0b869aa7a.tar.bz2 |
BUG: Do not force HEADER_FILE_ONLY off if the user has already set it on.
Diffstat (limited to 'Source')
-rw-r--r-- | Source/cmSourceFile.cxx | 8 |
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"); } |