From: Gereon Kremer Date: Fri, 2 Apr 2021 16:32:36 +0000 (+0200) Subject: FindCaDiCaL: Avoid redirect to file (#6272) X-Git-Tag: cvc5-1.0.0~1984 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=ed1e21df4c7364e9d78f1a5c0605c45640d9ccca;p=cvc5.git 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. --- 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