From ed1e21df4c7364e9d78f1a5c0605c45640d9ccca Mon Sep 17 00:00:00 2001 From: Gereon Kremer Date: Fri, 2 Apr 2021 18:32:36 +0200 Subject: [PATCH] FindCaDiCaL: Avoid redirect to file (#6272) This PR avoids output redirection by replacing sed + redirect with copy + in-place sed. Using output redirects can cause problems if the cmake output itself is redirected as well. This should fix the current nightly failure. --- cmake/FindCaDiCaL.cmake | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/cmake/FindCaDiCaL.cmake b/cmake/FindCaDiCaL.cmake index c8490b8ca..40a048faa 100644 --- a/cmake/FindCaDiCaL.cmake +++ b/cmake/FindCaDiCaL.cmake @@ -61,9 +61,12 @@ if(NOT CaDiCaL_FOUND_SYSTEM) URL_HASH SHA1=9de1176737b74440921ba86395fe5edbb3b131eb CONFIGURE_COMMAND mkdir -p /build # avoid configure script, prepare the makefile manually + COMMAND ${CMAKE_COMMAND} -E copy /makefile.in + /build/makefile COMMAND - sed -e "s,@CXX@,${CMAKE_CXX_COMPILER}," -e "s,@CXXFLAGS@,${CXXFLAGS}," -e - "s,@MAKEFLAGS@,," /makefile.in > /build/makefile + sed -i.orig -e "s,@CXX@,${CMAKE_CXX_COMPILER}," -e + "s,@CXXFLAGS@,${CXXFLAGS}," -e "s,@MAKEFLAGS@,," + /build/makefile # use $(MAKE) instead of "make" to allow for parallel builds BUILD_COMMAND $(MAKE) -C /build libcadical.a INSTALL_COMMAND ${CMAKE_COMMAND} -E copy /build/libcadical.a -- 2.30.2