diff options
author | Brad King <brad.king@kitware.com> | 2005-11-17 18:49:10 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2005-11-17 18:49:10 (GMT) |
commit | 70b4e1051e04be892c86aa3ff729d63ccf1f7771 (patch) | |
tree | 780b663a4c900e576b798b4be894372420d12f99 /Source/cmSourceFile.cxx | |
parent | 6ce463dab36091ce77f5b2cb614478d5ab049fe5 (diff) | |
download | CMake-70b4e1051e04be892c86aa3ff729d63ccf1f7771.zip CMake-70b4e1051e04be892c86aa3ff729d63ccf1f7771.tar.gz CMake-70b4e1051e04be892c86aa3ff729d63ccf1f7771.tar.bz2 |
BUG: Fixed support for external object files built by custom commands. Also added a test to keep it working.
Diffstat (limited to 'Source/cmSourceFile.cxx')
-rw-r--r-- | Source/cmSourceFile.cxx | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/Source/cmSourceFile.cxx b/Source/cmSourceFile.cxx index 595e234..8e71afd 100644 --- a/Source/cmSourceFile.cxx +++ b/Source/cmSourceFile.cxx @@ -70,6 +70,10 @@ void cmSourceFile::SetName(const char* name, const char* dir, this->SetProperty("HEADER_FILE_ONLY","0"); } m_FullPath = hname; + + // Mark this as an external object file if it has the proper + // extension. THIS CODE IS DUPLICATED IN THE OTHER SetName METHOD. + // THESE METHODS SHOULD BE MERGED. if ( m_SourceExtension == "obj" || m_SourceExtension == "o" || m_SourceExtension == "lo" ) { @@ -141,6 +145,15 @@ void cmSourceFile::SetName(const char* name, const char* dir, const char *ext, m_FullPath = cmSystemTools::CollapseFullPath(fname.c_str(), dir); cmSystemTools::ConvertToUnixSlashes(m_FullPath); m_SourceExtension = ext; + + // Mark this as an external object file if it has the proper + // extension. THIS CODE IS DUPLICATED IN THE OTHER SetName METHOD. + // THESE METHODS SHOULD BE MERGED. + if ( m_SourceExtension == "obj" || m_SourceExtension == "o" || + m_SourceExtension == "lo" ) + { + this->SetProperty("EXTERNAL_OBJECT", "1"); + } return; } |