diff options
author | Brad King <brad.king@kitware.com> | 2009-03-16 18:30:24 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2009-03-16 18:30:24 (GMT) |
commit | 921f3a1ac233c121b8cf7cbf896bc4c88717c9a8 (patch) | |
tree | a4b5f4f972ce69a87d7433466562852d372b59b1 /Source/cmCPluginAPI.cxx | |
parent | 147d6f31015a64b3ec1b3799d4c0047942b27999 (diff) | |
download | CMake-921f3a1ac233c121b8cf7cbf896bc4c88717c9a8.zip CMake-921f3a1ac233c121b8cf7cbf896bc4c88717c9a8.tar.gz CMake-921f3a1ac233c121b8cf7cbf896bc4c88717c9a8.tar.bz2 |
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/cmCPluginAPI.cxx')
-rw-r--r-- | Source/cmCPluginAPI.cxx | 21 |
1 files changed, 5 insertions, 16 deletions
diff --git a/Source/cmCPluginAPI.cxx b/Source/cmCPluginAPI.cxx index 04257cb..d94cf3e 100644 --- a/Source/cmCPluginAPI.cxx +++ b/Source/cmCPluginAPI.cxx @@ -706,10 +706,6 @@ void CCONV cmSourceFileSetName(void *arg, const char* name, const char* dir, headerExts.push_back(headerExtensions[i]); } - // Implement the old SetName method code here. - sf->Properties.SetProperty("HEADER_FILE_ONLY", "1", - cmProperty::SOURCE_FILE); - // Save the original name given. sf->SourceName = name; @@ -742,13 +738,6 @@ void CCONV cmSourceFileSetName(void *arg, const char* name, const char* dir, } } - // See if the file is a header file - if(std::find( headerExts.begin(), headerExts.end(), - sf->SourceExtension ) == headerExts.end()) - { - sf->Properties.SetProperty("HEADER_FILE_ONLY", "0", - cmProperty::SOURCE_FILE); - } sf->FullPath = hname; return; } @@ -763,8 +752,6 @@ void CCONV cmSourceFileSetName(void *arg, const char* name, const char* dir, if(cmSystemTools::FileExists(hname.c_str())) { sf->SourceExtension = *ext; - sf->Properties.SetProperty("HEADER_FILE_ONLY", "0", - cmProperty::SOURCE_FILE); sf->FullPath = hname; return; } @@ -814,9 +801,11 @@ void CCONV cmSourceFileSetName2(void *arg, const char* name, const char* dir, } // Implement the old SetName method code here. - sf->Properties.SetProperty("HEADER_FILE_ONLY", - headerFileOnly? "1" : "0", - cmProperty::SOURCE_FILE); + if(headerFileOnly) + { + sf->Properties.SetProperty("HEADER_FILE_ONLY", "1", + cmProperty::SOURCE_FILE); + } sf->SourceName = name; std::string fname = sf->SourceName; if(ext && strlen(ext)) |