cmake: Fix CTest custom commands
This commit is related to: - https://github.com/NixOS/nixpkgs/issues/762 - http://public.kitware.com/Bug/view.php?id=13887 And fixes a bug present in recent CMake versions. The fix should be integrated in the next CMake release.
This commit is contained in:
parent
bef090400e
commit
e13720c3c4
|
@ -0,0 +1,17 @@
|
||||||
|
diff --git a/Source/CTest/cmCTestTestHandler.cxx b/Source/CTest/cmCTestTestHandler.cxx
|
||||||
|
index e7491bb..57b4348 100644
|
||||||
|
--- a/Source/CTest/cmCTestTestHandler.cxx
|
||||||
|
+++ b/Source/CTest/cmCTestTestHandler.cxx
|
||||||
|
@@ -1303,10 +1303,9 @@ int cmCTestTestHandler::ExecuteCommands(std::vector<cmStdString>& vec)
|
||||||
|
for ( it = vec.begin(); it != vec.end(); ++it )
|
||||||
|
{
|
||||||
|
int retVal = 0;
|
||||||
|
- std::string cmd = cmSystemTools::ConvertToOutputPath(it->c_str());
|
||||||
|
- cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT, "Run command: " << cmd
|
||||||
|
+ cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT, "Run command: " << *it
|
||||||
|
<< std::endl);
|
||||||
|
- if ( !cmSystemTools::RunSingleCommand(cmd.c_str(), 0, &retVal, 0,
|
||||||
|
+ if ( !cmSystemTools::RunSingleCommand((*it).c_str(), 0, &retVal, 0,
|
||||||
|
cmSystemTools::OUTPUT_MERGE
|
||||||
|
/*this->Verbose*/) || retVal != 0 )
|
||||||
|
{
|
|
@ -24,9 +24,13 @@ stdenv.mkDerivation rec {
|
||||||
enableParallelBuilding = true;
|
enableParallelBuilding = true;
|
||||||
|
|
||||||
patches =
|
patches =
|
||||||
|
# See https://github.com/NixOS/nixpkgs/issues/762
|
||||||
|
# and http://public.kitware.com/Bug/view.php?id=13887
|
||||||
|
# Remove this patch when a CMake release contains the corresponding fix
|
||||||
|
[ ./762-13887.patch ]
|
||||||
# Don't search in non-Nix locations such as /usr, but do search in
|
# Don't search in non-Nix locations such as /usr, but do search in
|
||||||
# Nixpkgs' Glibc.
|
# Nixpkgs' Glibc.
|
||||||
optional (stdenv ? glibc) ./search-path.patch;
|
++ optional (stdenv ? glibc) ./search-path.patch;
|
||||||
|
|
||||||
buildInputs = [ curl expat zlib bzip2 libarchive ]
|
buildInputs = [ curl expat zlib bzip2 libarchive ]
|
||||||
++ optional useNcurses ncurses
|
++ optional useNcurses ncurses
|
||||||
|
|
Loading…
Reference in New Issue