diff options
author | Ken Martin <ken.martin@kitware.com> | 2001-04-24 20:49:12 (GMT) |
---|---|---|
committer | Ken Martin <ken.martin@kitware.com> | 2001-04-24 20:49:12 (GMT) |
commit | 73f04d1409ec4dfcb3b8db3e104da2a894d019a2 (patch) | |
tree | e1578688252c8a50fb307d60045379a53a02d646 /Source/cmTarget.cxx | |
parent | b5746484e4c396489b707e0f8b4d1f539e62a965 (diff) | |
download | CMake-73f04d1409ec4dfcb3b8db3e104da2a894d019a2.zip CMake-73f04d1409ec4dfcb3b8db3e104da2a894d019a2.tar.gz CMake-73f04d1409ec4dfcb3b8db3e104da2a894d019a2.tar.bz2 |
many fixes and cleanup and features
Diffstat (limited to 'Source/cmTarget.cxx')
-rw-r--r-- | Source/cmTarget.cxx | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx new file mode 100644 index 0000000..eb9a048 --- /dev/null +++ b/Source/cmTarget.cxx @@ -0,0 +1,44 @@ +/*========================================================================= + + Program: Insight Segmentation & Registration Toolkit + Module: $RCSfile$ + Language: C++ + Date: $Date$ + Version: $Revision$ + + + Copyright (c) 2000 National Library of Medicine + All rights reserved. + + See COPYRIGHT.txt for copyright details. + +=========================================================================*/ +#include "cmTarget.h" +#include "cmMakefile.h" + +void cmTarget::GenerateSourceFilesFromSourceLists(const cmMakefile &mf) +{ + // for each src lists add the classes + for (std::vector<std::string>::const_iterator s = m_SourceLists.begin(); + s != m_SourceLists.end(); ++s) + { + // replace any variables + std::string temps = *s; + mf.ExpandVariablesInString(temps); + // look for a srclist + if (mf.GetSources().find(temps) != mf.GetSources().end()) + { + const std::vector<cmSourceFile> &clsList = + mf.GetSources().find(temps)->second; + m_SourceFiles.insert(m_SourceFiles.end(), clsList.begin(), clsList.end()); + } + // if one wasn't found then assume it is a single class + else + { + cmSourceFile file; + file.SetIsAnAbstractClass(false); + file.SetName(temps.c_str(), mf.GetCurrentDirectory()); + m_SourceFiles.push_back(file); + } + } +} |