summaryrefslogtreecommitdiffstats
path: root/Source/CTest
diff options
context:
space:
mode:
authorStephen Kelly <steveire@gmail.com>2015-05-30 23:57:04 (GMT)
committerStephen Kelly <steveire@gmail.com>2015-10-07 18:19:41 (GMT)
commit360e4e1db0cc89ea4f092eeb1ba1e6df8ee782b7 (patch)
treeddc52c40a5a4124c0441471627a27bdd2c79af00 /Source/CTest
parentf716460ed82134bd1ca09f49bfa507cb2645d96c (diff)
downloadCMake-360e4e1db0cc89ea4f092eeb1ba1e6df8ee782b7.zip
CMake-360e4e1db0cc89ea4f092eeb1ba1e6df8ee782b7.tar.gz
CMake-360e4e1db0cc89ea4f092eeb1ba1e6df8ee782b7.tar.bz2
Set the current dirs on the snapshot before creating the cmMakefile.
The cmMakefile should get a fully prepared snapshot and not clobber its definitions. It should eventually be able to process list files from any starting-point snapshot, though that is some refactoring away still.
Diffstat (limited to 'Source/CTest')
-rw-r--r--Source/CTest/cmCTestScriptHandler.cxx9
1 files changed, 3 insertions, 6 deletions
diff --git a/Source/CTest/cmCTestScriptHandler.cxx b/Source/CTest/cmCTestScriptHandler.cxx
index 2f125aa..b9016af 100644
--- a/Source/CTest/cmCTestScriptHandler.cxx
+++ b/Source/CTest/cmCTestScriptHandler.cxx
@@ -318,16 +318,13 @@ void cmCTestScriptHandler::CreateCMake()
this->GlobalGenerator = new cmGlobalGenerator(this->CMake);
cmState::Snapshot snapshot = this->CMake->GetCurrentSnapshot();
+ std::string cwd = cmSystemTools::GetCurrentWorkingDirectory();
+ snapshot.GetDirectory().SetCurrentSource(cwd);
+ snapshot.GetDirectory().SetCurrentBinary(cwd);
this->Makefile = new cmMakefile(this->GlobalGenerator, snapshot);
this->CMake->SetProgressCallback(ctestScriptProgressCallback, this->CTest);
- // Set CMAKE_CURRENT_SOURCE_DIR and CMAKE_CURRENT_BINARY_DIR.
- // Also, some commands need Makefile->GetCurrentSourceDirectory().
- std::string cwd = cmSystemTools::GetCurrentWorkingDirectory();
- this->Makefile->SetCurrentSourceDirectory(cwd);
- this->Makefile->SetCurrentBinaryDirectory(cwd);
-
// remove all cmake commands which are not scriptable, since they can't be
// used in ctest scripts
this->CMake->GetState()->RemoveUnscriptableCommands();