summaryrefslogtreecommitdiff
path: root/Source/cmSourceFile.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2009-03-16 14:30:24 -0400
committerBrad King <brad.king@kitware.com>2009-03-16 14:30:24 -0400
commit921f3a1ac233c121b8cf7cbf896bc4c88717c9a8 (patch)
treea4b5f4f972ce69a87d7433466562852d372b59b1 /Source/cmSourceFile.cxx
parent147d6f31015a64b3ec1b3799d4c0047942b27999 (diff)
downloadcmake-921f3a1ac233c121b8cf7cbf896bc4c88717c9a8.tar.gz
BUG: Do not automatically set HEADER_FILE_ONLY
Long ago the native build system generators needed HEADER_FILE_ONLY to be set on header files to stop them from building. The modern generators correctly handle headers without the help of this property. This removes automatic setting of the property so that it can be used reliably as an indicator of project author intention. It fixes VS IDE project files to show header files normally instead of excluded (broken by the fix for issue #7845).
Diffstat (limited to 'Source/cmSourceFile.cxx')
-rw-r--r--Source/cmSourceFile.cxx19
1 files changed, 0 insertions, 19 deletions
diff --git a/Source/cmSourceFile.cxx b/Source/cmSourceFile.cxx
index 6fe10245b2..8603d984a9 100644
--- a/Source/cmSourceFile.cxx
+++ b/Source/cmSourceFile.cxx
@@ -246,25 +246,6 @@ void cmSourceFile::CheckExtension()
this->SetProperty("EXTERNAL_OBJECT", "1");
}
- // Look for header files.
- cmMakefile* mf = this->Location.GetMakefile();
- const std::vector<std::string>& hdrExts = mf->GetHeaderExtensions();
- if(std::find(hdrExts.begin(), hdrExts.end(), this->Extension) ==
- hdrExts.end())
- {
- // 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");
- }
-
// Try to identify the source file language from the extension.
if(this->Language.empty())
{