diff options
author | Brad King <brad.king@kitware.com> | 2013-11-07 15:30:59 -0500 |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2013-11-12 08:23:35 -0500 |
commit | d1526f825e7464b8cb8a82b73718bbf2eb4965c9 (patch) | |
tree | 1830c8bb82b07c4a1c35145b677f975c9104a2b4 /Source/CTest/cmCTestScriptHandler.cxx | |
parent | 9fc158b6d5ae9902f544fd280c3b087c433fecc6 (diff) | |
download | cmake-d1526f825e7464b8cb8a82b73718bbf2eb4965c9.tar.gz |
Refactor internal resource location APIs and initialization
Rename cmSystemTools::FindExecutableDirectory to FindCMakeResources.
Teach it to compute the locations of cmake, ctest, cpack, ccmake, and
cmake-gui executables, and the location of CMAKE_ROOT. Provide this
information from static cmSystemTools::Get<resource>() methods.
Refactor code that needs these locations to use the new APIs.
Teach FindCMakeResources to use the OS X system API to lookup the
executable location. When running from the CMake build tree itself,
leave a file in the tree that FindCMakeResources can use to read the
location of the source tree. This avoids the need to compile the source
tree location into a binary that may be installed and used without the
source tree.
Teach the QtDialog on OS X to create a "cmake-gui" symlink in the build
tree next to "cmake" and the other tools, as is already done in the
install tree for the application bundle. This ensures a consistent set
of executables are available in one directory.
Diffstat (limited to 'Source/CTest/cmCTestScriptHandler.cxx')
-rw-r--r-- | Source/CTest/cmCTestScriptHandler.cxx | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Source/CTest/cmCTestScriptHandler.cxx b/Source/CTest/cmCTestScriptHandler.cxx index 7d33cf3682..00a0a097c8 100644 --- a/Source/CTest/cmCTestScriptHandler.cxx +++ b/Source/CTest/cmCTestScriptHandler.cxx @@ -222,13 +222,13 @@ int cmCTestScriptHandler::ExecuteScript(const std::string& total_script_arg) // execute the script passing in the arguments to the script as well as the // arguments from this invocation of cmake std::vector<const char*> argv; - argv.push_back(this->CTest->GetCTestExecutable()); + argv.push_back(cmSystemTools::GetCTestCommand().c_str()); argv.push_back("-SR"); argv.push_back(total_script_arg.c_str()); cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT, "Executable for CTest is: " << - this->CTest->GetCTestExecutable() << "\n"); + cmSystemTools::GetCTestCommand() << "\n"); // now pass through all the other arguments std::vector<cmStdString> &initArgs = @@ -397,9 +397,9 @@ int cmCTestScriptHandler::ReadInScript(const std::string& total_script_arg) this->Makefile->AddDefinition("CTEST_SCRIPT_NAME", cmSystemTools::GetFilenameName(script).c_str()); this->Makefile->AddDefinition("CTEST_EXECUTABLE_NAME", - this->CTest->GetCTestExecutable()); + cmSystemTools::GetCTestCommand().c_str()); this->Makefile->AddDefinition("CMAKE_EXECUTABLE_NAME", - this->CTest->GetCMakeExecutable()); + cmSystemTools::GetCMakeCommand().c_str()); this->Makefile->AddDefinition("CTEST_RUN_CURRENT_SCRIPT", true); this->UpdateElapsedTime(); |