Skip to content

Commit

Permalink
cmake: remove use of -H for -S
Browse files Browse the repository at this point in the history
  • Loading branch information
Ryp committed Sep 16, 2024
1 parent 7709606 commit 3d3b2c3
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 11 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }} \
Expand Down Expand Up @@ -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 `
Expand Down
8 changes: 0 additions & 8 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
```

0 comments on commit 3d3b2c3

Please sign in to comment.