summaryrefslogtreecommitdiffstats
path: root/Source/cmTarget.cxx
diff options
context:
space:
mode:
authorKen Martin <ken.martin@kitware.com>2003-06-05 18:40:25 (GMT)
committerKen Martin <ken.martin@kitware.com>2003-06-05 18:40:25 (GMT)
commit703242071f022b211253c68e434ec20e0c58e637 (patch)
tree2db84d24d340300c61f0b0b8de8bf2941a944e34 /Source/cmTarget.cxx
parentd5d0f17e5cb4eea7af9940daefbf8d55df964456 (diff)
downloadCMake-703242071f022b211253c68e434ec20e0c58e637.zip
CMake-703242071f022b211253c68e434ec20e0c58e637.tar.gz
CMake-703242071f022b211253c68e434ec20e0c58e637.tar.bz2
more crazt changes source files now must match with full path
Diffstat (limited to 'Source/cmTarget.cxx')
-rw-r--r--Source/cmTarget.cxx14
1 files changed, 14 insertions, 0 deletions
diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx
index 9706ba8..4cb4bb8 100644
--- a/Source/cmTarget.cxx
+++ b/Source/cmTarget.cxx
@@ -54,12 +54,26 @@ void cmTarget::GenerateSourceFilesFromSourceLists( cmMakefile &mf)
mf.ExpandVariablesInString(temps);
// Next if one wasn't found then assume it is a single class
+ // check to see if it is an existing source file
if (!done && mf.GetSource(temps.c_str()))
{
m_SourceFiles.push_back(mf.GetSource(temps.c_str()));
done = 1;
}
+ // check to see if it is an existing source file in the output directory
+ if (!done && cmSystemTools::GetFilenamePath(temps).empty())
+ {
+ std::string testName = mf.GetCurrentOutputDirectory();
+ testName += "/";
+ testName += temps;
+ if (mf.GetSource(testName.c_str()))
+ {
+ m_SourceFiles.push_back(mf.GetSource(testName.c_str()));
+ done = 1;
+ }
+ }
+
// if it wasn't a source file listed with the makefile
// see if it is a variable. This is for old CMake 1.2 compatability
// where a source list would be passed into here, by making it