Skip to content
Snippets Groups Projects
Commit 9bc1a1d4 authored by Van Herck, Walter's avatar Van Herck, Walter
Browse files

Fix problem with ctest on Windows when python executable is in "Program Files" (whitespace in path)

parent 49e9f148
No related branches found
No related tags found
No related merge requests found
...@@ -58,7 +58,7 @@ bool TestUtils::runPython(const std::string& py_command) ...@@ -58,7 +58,7 @@ bool TestUtils::runPython(const std::string& py_command)
std::string("NOPLOT=TRUE") + " " + BABuild::pythonExecutable() + " -B " + py_command; std::string("NOPLOT=TRUE") + " " + BABuild::pythonExecutable() + " -B " + py_command;
#else #else
std::string sys_command = std::string("set PYTHONPATH=") + BABuild::buildLibDir() + " & " + std::string sys_command = std::string("set PYTHONPATH=") + BABuild::buildLibDir() + " & " +
std::string("set NOPLOT=TRUE") + " & " +BABuild::pythonExecutable() + " -B " + py_command; std::string("set NOPLOT=TRUE") + " & \"" +BABuild::pythonExecutable() + "\" -B " + py_command;
#endif #endif
std::cout << sys_command << std::endl/*sic*/; // flush output before calling std::system std::cout << sys_command << std::endl/*sic*/; // flush output before calling std::system
int ret = std::system(sys_command.c_str()); int ret = std::system(sys_command.c_str());
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment