From 9be341383e3b843c75a825e24834d631ffb81613 Mon Sep 17 00:00:00 2001 From: Ken Martin Date: Fri, 23 Sep 2005 12:50:09 -0400 Subject: [PATCH] BUG: the -P option was not working with relative paths and a couple types --- Source/cmake.cxx | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/Source/cmake.cxx b/Source/cmake.cxx index fa4cb0c37..ad2a58031 100644 --- a/Source/cmake.cxx +++ b/Source/cmake.cxx @@ -283,7 +283,7 @@ bool cmake::SetCacheArgs(const std::vector& args) std::string path = args[i]; if ( path.size() == 0 ) { - cmSystemTools::Error("No cmake scrpt provided."); + cmSystemTools::Error("No cmake script provided."); return false; } std::cerr << "Running cmake script file " << path.c_str() << "\n"; @@ -312,10 +312,17 @@ void cmake::ReadListFile(const char *path) { std::auto_ptr lg(gg->CreateLocalGenerator()); lg->SetGlobalGenerator(gg); + lg->GetMakefile()->SetHomeOutputDirectory + (cmSystemTools::GetCurrentWorkingDirectory().c_str()); + lg->GetMakefile()->SetStartOutputDirectory + (cmSystemTools::GetCurrentWorkingDirectory().c_str()); + lg->GetMakefile()->SetHomeDirectory + (cmSystemTools::GetCurrentWorkingDirectory().c_str()); + lg->GetMakefile()->SetStartDirectory + (cmSystemTools::GetCurrentWorkingDirectory().c_str()); if (!lg->GetMakefile()->ReadListFile(0, path)) { - std::cerr << "Error in reading cmake initial cache file:" - << path << "\n"; + std::cerr << "Error processing file:" << path << "\n"; } }