From 50646f0efa5e59215a2d7b90902c84272749c59b Mon Sep 17 00:00:00 2001 From: Neal Gompa Date: Sat, 9 May 2020 14:29:06 -0400 Subject: [PATCH] Setup CMake to do out-of-tree builds by default This brings CMake in line with upstream best practices for building with CMake and lines up with how most people expect CMake to behave. --- macros.cmake | 2 ++ 1 file changed, 2 insertions(+) diff --git a/macros.cmake b/macros.cmake index ebfebee..9ffec75 100644 --- a/macros.cmake +++ b/macros.cmake @@ -24,6 +24,8 @@ %{?__global_ldflags:LDFLAGS="${LDFLAGS:-%__global_ldflags}" ; export LDFLAGS ;} \ %endif \ %__cmake \\\ + -S "%{_vpath_srcdir}" \\\ + -B "%{_vpath_builddir}" \\\ -DCMAKE_C_FLAGS_RELEASE:STRING="-DNDEBUG" \\\ -DCMAKE_CXX_FLAGS_RELEASE:STRING="-DNDEBUG" \\\ -DCMAKE_Fortran_FLAGS_RELEASE:STRING="-DNDEBUG" \\\