diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 54407e4a..565ac03e 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -63,7 +63,7 @@ jobs: - name: Configure CMake run: | export CXX='${{ matrix.config.compiler_invocation }}' - cmake -H. -Bbuild \ + cmake -S . -B build \ -DCMAKE_INSTALL_PREFIX=install \ -DREAPER_DEBUG_BUILD=${{ matrix.cmake_build_type == 'Debug' && 'ON' || 'OFF'}} \ -DBUILD_SHARED_LIBS=${{ matrix.cmake_build_shared_libs }} \ @@ -129,7 +129,7 @@ jobs: - name: Configure CMake run: | - cmake .\ -Bbuild ` + cmake -S . -B build ` -G "${{ matrix.cmake_generator }}" ` -A "${{ matrix.cmake_arch }}" ` -DCMAKE_INSTALL_PREFIX=install ` diff --git a/CMakeLists.txt b/CMakeLists.txt index 8d979391..97e80c61 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -11,14 +11,6 @@ cmake_minimum_required(VERSION 3.21 FATAL_ERROR) -# Avoid source tree pollution -if(CMAKE_SOURCE_DIR STREQUAL CMAKE_BINARY_DIR) - message(FATAL_ERROR - " In-source builds are discouraged. Tell CMake to use a separate folder:\n" - " $ rm -rf CMakeCache.txt CMakeFiles\n" - " $ cmake -H. -Bbuild") -endif() - # You can choose the build type here, and a build directory will only support either Debug or Release. option(REAPER_DEBUG_BUILD "Debug build" ON) diff --git a/README.md b/README.md index 2ef8fcca..e4a30f42 100644 --- a/README.md +++ b/README.md @@ -6,6 +6,6 @@ Reaper is a small C++ test engine. ```sh $ git submodule update --init -$ cmake -H. -B./build +$ cmake -S . -B build $ cmake --build build ```