summaryrefslogtreecommitdiffstats
path: root/Source/cmMakefile.cxx
diff options
context:
space:
mode:
authorAndy Cedilnik <andy.cedilnik@kitware.com>2005-11-30 18:46:48 (GMT)
committerAndy Cedilnik <andy.cedilnik@kitware.com>2005-11-30 18:46:48 (GMT)
commit1578bebdad4444de56f56ff7b41e2ec1de5f7dad (patch)
tree5344c259453ff3417082395647981d11c5659533 /Source/cmMakefile.cxx
parent358a9b133d9caaa02b07a850cc4ae7545007f087 (diff)
downloadCMake-1578bebdad4444de56f56ff7b41e2ec1de5f7dad.zip
CMake-1578bebdad4444de56f56ff7b41e2ec1de5f7dad.tar.gz
CMake-1578bebdad4444de56f56ff7b41e2ec1de5f7dad.tar.bz2
ENH: Add variable for debugging. This variable CMAKE_PARENT_LIST_FILE holds the parent CMake list file of the current cmake list file.
Diffstat (limited to 'Source/cmMakefile.cxx')
-rw-r--r--Source/cmMakefile.cxx6
1 files changed, 6 insertions, 0 deletions
diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx
index 200533d..d281ddc 100644
--- a/Source/cmMakefile.cxx
+++ b/Source/cmMakefile.cxx
@@ -310,6 +310,9 @@ bool cmMakefile::ExecuteCommand(const cmListFileFunction& lff)
//
bool cmMakefile::ReadListFile(const char* filename_in, const char *external_in)
{
+ std::string currentFile = this->GetSafeDefinition("CMAKE_PARENT_LIST_FILE");
+ this->AddDefinition("CMAKE_PARENT_LIST_FILE", filename_in);
+
// used to watch for blockers going out of scope
// e.g. mismatched IF statement
std::set<cmFunctionBlocker *> originalBlockers;
@@ -378,6 +381,7 @@ bool cmMakefile::ReadListFile(const char* filename_in, const char *external_in)
requireProjectCommand);
if(!lf)
{
+ this->AddDefinition("CMAKE_PARENT_LIST_FILE", currentFile.c_str());
return false;
}
// add this list file to the list of dependencies
@@ -388,6 +392,7 @@ bool cmMakefile::ReadListFile(const char* filename_in, const char *external_in)
this->ExecuteCommand(lf->m_Functions[i]);
if ( cmSystemTools::GetFatalErrorOccured() )
{
+ this->AddDefinition("CMAKE_PARENT_LIST_FILE", currentFile.c_str());
return true;
}
}
@@ -409,6 +414,7 @@ bool cmMakefile::ReadListFile(const char* filename_in, const char *external_in)
}
}
+ this->AddDefinition("CMAKE_PARENT_LIST_FILE", currentFile.c_str());
return true;
}