From 37e8c118272dc261a01b776bd7683ed0b869aa7a Mon Sep 17 00:00:00 2001 From: Brad King Date: Mon, 19 Nov 2007 14:27:31 -0500 Subject: [PATCH] BUG: Do not force HEADER_FILE_ONLY off if the user has already set it on. --- Source/cmSourceFile.cxx | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/Source/cmSourceFile.cxx b/Source/cmSourceFile.cxx index 146886906..549ff28c8 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"); }