summaryrefslogtreecommitdiffstats
path: root/Source/cmSourceFile.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'Source/cmSourceFile.cxx')
-rw-r--r--Source/cmSourceFile.cxx13
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;
}