diff options
author | Amitha Perera <perera@cs.rpi.edu> | 2001-12-28 20:54:05 (GMT) |
---|---|---|
committer | Amitha Perera <perera@cs.rpi.edu> | 2001-12-28 20:54:05 (GMT) |
commit | 4ec2836634c55c0ea5a9f3340cf7b63340ccaa0f (patch) | |
tree | 8f1f577e12496c8555298b1160a987ee7ceab43f /Source | |
parent | 8ccd9a9504e3f046b62764ac7f8bf116dab74e49 (diff) | |
download | CMake-4ec2836634c55c0ea5a9f3340cf7b63340ccaa0f.zip CMake-4ec2836634c55c0ea5a9f3340cf7b63340ccaa0f.tar.gz CMake-4ec2836634c55c0ea5a9f3340cf7b63340ccaa0f.tar.bz2 |
ENH: Classify a file as source or header even when the extension is given
explicitly.
Diffstat (limited to 'Source')
-rw-r--r-- | Source/cmSourceFile.cxx | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/Source/cmSourceFile.cxx b/Source/cmSourceFile.cxx index cc78d12..0fa21b8 100644 --- a/Source/cmSourceFile.cxx +++ b/Source/cmSourceFile.cxx @@ -90,8 +90,12 @@ void cmSourceFile::SetName(const char* name, const char* dir, m_SourceName = hname.substr(0, pos); } } - - m_HeaderFileOnly = false; + + // See if the file is a header file + if(std::find( headerExts.begin(), headerExts.end(), m_SourceExtension ) == headerExts.end()) + m_HeaderFileOnly = false; + else + m_HeaderFileOnly = true; m_FullPath = hname; return; } |