summaryrefslogtreecommitdiffstats
path: root/Source/cmTarget.cxx
diff options
context:
space:
mode:
authorKen Martin <ken.martin@kitware.com>2002-06-27 19:57:09 (GMT)
committerKen Martin <ken.martin@kitware.com>2002-06-27 19:57:09 (GMT)
commit44a7cd55ff126412d8ba8b82739a1bee132c62a1 (patch)
tree533de5563331136062407c254c05024bb5b91632 /Source/cmTarget.cxx
parenta1a05a5fbcd0d34aa5ab0dde7da2ba4c5082916a (diff)
downloadCMake-44a7cd55ff126412d8ba8b82739a1bee132c62a1.zip
CMake-44a7cd55ff126412d8ba8b82739a1bee132c62a1.tar.gz
CMake-44a7cd55ff126412d8ba8b82739a1bee132c62a1.tar.bz2
removed all source lists from the system and made them vectors. Also appended _CMAKE_PATH to the end of the automatic cache entries for executables and libraries. Odds of all these changes working are slim but cmake builds and passes all its tests. VTK40 starts building
Diffstat (limited to 'Source/cmTarget.cxx')
-rw-r--r--Source/cmTarget.cxx33
1 files changed, 7 insertions, 26 deletions
diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx
index d654342..3c0d052 100644
--- a/Source/cmTarget.cxx
+++ b/Source/cmTarget.cxx
@@ -39,19 +39,6 @@ void cmTarget::GenerateSourceFilesFromSourceLists( cmMakefile &mf)
std::string temps = *s;
mf.ExpandVariablesInString(temps);
- // look for a srclist, this is old code we really don't want
- // any source lists in the future.
- if (mf.GetSources().find(temps) != mf.GetSources().end())
- {
- const std::vector<cmSourceFile*> &clsList =
- mf.GetSources().find(temps)->second;
- // if we ahave a limited build list, use it
- m_SourceFiles.insert(m_SourceFiles.end(),
- clsList.begin(),
- clsList.end());
- done = 1;
- }
-
// Next if one wasn't found then assume it is a single class
if (!done && mf.GetSource(temps.c_str()))
{
@@ -64,25 +51,16 @@ void cmTarget::GenerateSourceFilesFromSourceLists( cmMakefile &mf)
// where a source list would be passed into here, by making it
// a vector we need to possibly lookup the variable to maintain
// CMake 1.2 compatability.
+ const char* versionValue
+ = mf.GetDefinition("CMAKE_MINIMUM_REQUIRED_VERSION");
if (!done)
{
- const char* versionValue
- = mf.GetDefinition("CMAKE_MINIMUM_REQUIRED_VERSION");
if (!versionValue || atof(versionValue) <= 1.2)
{
const char* varValue =
mf.GetDefinition(temps.c_str());
// if the definition exists
- // and it has an extension in it then assume it is a source file
- // the problem is that ADD_EXECUTABLE creates a definition with the
- // same name as the executable which could be the same name as the
- // source file without the extension, so if you do this:
- // ADD_EXECUTABLE(foo foo) where foo.cxx is a source file, then
- // foo will be varValue will be defined to the path of the executable, but
- // not a source list as we expect, so look for a "." in the string to see
- // if it is a file or not.
- if (varValue
- && strchr(varValue, '.'))
+ if (varValue)
{
std::vector<std::string> tval;
tval.push_back(varValue);
@@ -340,7 +318,10 @@ cmTarget::AnalyzeLibDependencies( const cmMakefile& mf )
{
if( addLibDirs )
{
- const char* libpath = mf.GetDefinition( k->c_str() );
+ // who the hell knows what this is, I think that K contains the
+ // name of a library but ... Ken
+ std::string libPathStr = *k + "_CMAKE_PATH";
+ const char* libpath = mf.GetDefinition( libPathStr.c_str() );
if( libpath )
{
// Don't add a link directory that is already present.