From 5c97a8583dd40db40d79e9752cee7060081bdec8 Mon Sep 17 00:00:00 2001 From: Chris Thrasher Date: Sat, 26 Apr 2025 10:59:42 -0600 Subject: [PATCH] Use more modern `-S` for specifying CMake source dir --- .github/workflows/linux-other-builds.yml | 4 ++-- .github/workflows/linux-simple-builds.yml | 2 +- .github/workflows/mac-builds-m1.yml | 2 +- .github/workflows/mac-builds.yml | 2 +- tests/TestScripts/ConfigureTestsCommon.py | 2 +- tools/misc/appveyorBuildConfigurationScript.bat | 8 ++++---- 6 files changed, 10 insertions(+), 10 deletions(-) diff --git a/.github/workflows/linux-other-builds.yml b/.github/workflows/linux-other-builds.yml index 4b1ae69e..0ff27556 100644 --- a/.github/workflows/linux-other-builds.yml +++ b/.github/workflows/linux-other-builds.yml @@ -86,7 +86,7 @@ jobs: # Note: $GITHUB_WORKSPACE is distinct from ${{runner.workspace}}. # This is important run: | - cmake -Bbuild -H$GITHUB_WORKSPACE \ + cmake -Bbuild -S$GITHUB_WORKSPACE \ -DCMAKE_BUILD_TYPE=${{matrix.build_type}} \ -DCMAKE_CXX_STANDARD=${{matrix.std}} \ -DCMAKE_CXX_STANDARD_REQUIRED=ON \ @@ -133,7 +133,7 @@ jobs: clangtidy="clang-tidy-${{matrix.version}};-use-color" # Use a dummy compiler/linker/ar/ranlib to effectively disable the # compilation and only run clang-tidy. - cmake -Bbuild -H$GITHUB_WORKSPACE \ + cmake -Bbuild -S$GITHUB_WORKSPACE \ -DCMAKE_BUILD_TYPE=${{matrix.build_type}} \ -DCMAKE_CXX_STANDARD=${{matrix.std}} \ -DCMAKE_CXX_STANDARD_REQUIRED=ON \ diff --git a/.github/workflows/linux-simple-builds.yml b/.github/workflows/linux-simple-builds.yml index 73529a72..1eec922a 100644 --- a/.github/workflows/linux-simple-builds.yml +++ b/.github/workflows/linux-simple-builds.yml @@ -105,7 +105,7 @@ jobs: # Note: $GITHUB_WORKSPACE is distinct from ${{runner.workspace}}. # This is important run: | - cmake -Bbuild -H$GITHUB_WORKSPACE \ + cmake -Bbuild -S$GITHUB_WORKSPACE \ -DCMAKE_BUILD_TYPE=${{matrix.build_type}} \ -DCMAKE_CXX_STANDARD=${{matrix.std}} \ -DCMAKE_CXX_STANDARD_REQUIRED=ON \ diff --git a/.github/workflows/mac-builds-m1.yml b/.github/workflows/mac-builds-m1.yml index 97fc03e1..f65e6c76 100644 --- a/.github/workflows/mac-builds-m1.yml +++ b/.github/workflows/mac-builds-m1.yml @@ -26,7 +26,7 @@ jobs: CXX: ${{matrix.cxx}} CXXFLAGS: ${{matrix.cxxflags}} run: | - cmake -Bbuild -H$GITHUB_WORKSPACE \ + cmake -Bbuild -S$GITHUB_WORKSPACE \ -DCMAKE_BUILD_TYPE=${{matrix.build_type}} \ -DCMAKE_CXX_STANDARD=${{matrix.std}} \ -DCMAKE_CXX_STANDARD_REQUIRED=ON \ diff --git a/.github/workflows/mac-builds.yml b/.github/workflows/mac-builds.yml index bd64814d..9c4183e3 100644 --- a/.github/workflows/mac-builds.yml +++ b/.github/workflows/mac-builds.yml @@ -30,7 +30,7 @@ jobs: CXX: ${{matrix.cxx}} CXXFLAGS: ${{matrix.cxxflags}} run: | - cmake -Bbuild -H$GITHUB_WORKSPACE \ + cmake -Bbuild -S$GITHUB_WORKSPACE \ -DCMAKE_BUILD_TYPE=${{matrix.build_type}} \ -DCMAKE_CXX_STANDARD=${{matrix.std}} \ -DCMAKE_CXX_STANDARD_REQUIRED=ON \ diff --git a/tests/TestScripts/ConfigureTestsCommon.py b/tests/TestScripts/ConfigureTestsCommon.py index 13b1d927..66896a89 100644 --- a/tests/TestScripts/ConfigureTestsCommon.py +++ b/tests/TestScripts/ConfigureTestsCommon.py @@ -15,7 +15,7 @@ import subprocess def configure_and_build(source_path: str, project_path: str, options: List[Tuple[str, str]]): base_configure_cmd = ['cmake', '-B{}'.format(project_path), - '-H{}'.format(source_path), + '-S{}'.format(source_path), '-DCMAKE_BUILD_TYPE=Debug', '-DCATCH_DEVELOPMENT_BUILD=ON'] for option, value in options: diff --git a/tools/misc/appveyorBuildConfigurationScript.bat b/tools/misc/appveyorBuildConfigurationScript.bat index 727f829b..75b39550 100644 --- a/tools/misc/appveyorBuildConfigurationScript.bat +++ b/tools/misc/appveyorBuildConfigurationScript.bat @@ -8,14 +8,14 @@ SETLOCAL EnableDelayedExpansion if "%CONFIGURATION%"=="Debug" ( if "%coverage%"=="1" ( @REM # coverage needs to build the special helper as well as the main - cmake -Htools/misc -Bbuild-misc -A%PLATFORM% || exit /b !ERRORLEVEL! + cmake -Stools/misc -Bbuild-misc -A%PLATFORM% || exit /b !ERRORLEVEL! cmake --build build-misc || exit /b !ERRORLEVEL! - cmake -H. -BBuild -A%PLATFORM% -DCATCH_TEST_USE_WMAIN=%wmain% -DMEMORYCHECK_COMMAND=build-misc\Debug\CoverageHelper.exe -DMEMORYCHECK_COMMAND_OPTIONS=--sep-- -DMEMORYCHECK_TYPE=Valgrind -DCATCH_BUILD_EXAMPLES=%examples% -DCATCH_BUILD_EXTRA_TESTS=%examples% -DCATCH_ENABLE_CONFIGURE_TESTS=%configure_tests% -DCATCH_DEVELOPMENT_BUILD=ON || exit /b !ERRORLEVEL! + cmake -S. -BBuild -A%PLATFORM% -DCATCH_TEST_USE_WMAIN=%wmain% -DMEMORYCHECK_COMMAND=build-misc\Debug\CoverageHelper.exe -DMEMORYCHECK_COMMAND_OPTIONS=--sep-- -DMEMORYCHECK_TYPE=Valgrind -DCATCH_BUILD_EXAMPLES=%examples% -DCATCH_BUILD_EXTRA_TESTS=%examples% -DCATCH_ENABLE_CONFIGURE_TESTS=%configure_tests% -DCATCH_DEVELOPMENT_BUILD=ON || exit /b !ERRORLEVEL! ) else ( @REM # We know that coverage is 0 - cmake -H. -BBuild -A%PLATFORM% -DCATCH_TEST_USE_WMAIN=%wmain% -DCATCH_BUILD_EXAMPLES=%examples% -DCATCH_BUILD_EXTRA_TESTS=%examples% -DCATCH_BUILD_SURROGATES=%surrogates% -DCATCH_DEVELOPMENT_BUILD=ON -DCATCH_ENABLE_CONFIGURE_TESTS=%configure_tests% || exit /b !ERRORLEVEL! + cmake -S. -BBuild -A%PLATFORM% -DCATCH_TEST_USE_WMAIN=%wmain% -DCATCH_BUILD_EXAMPLES=%examples% -DCATCH_BUILD_EXTRA_TESTS=%examples% -DCATCH_BUILD_SURROGATES=%surrogates% -DCATCH_DEVELOPMENT_BUILD=ON -DCATCH_ENABLE_CONFIGURE_TESTS=%configure_tests% || exit /b !ERRORLEVEL! ) ) if "%CONFIGURATION%"=="Release" ( - cmake -H. -BBuild -A%PLATFORM% -DCATCH_TEST_USE_WMAIN=%wmain% -DCATCH_DEVELOPMENT_BUILD=ON || exit /b !ERRORLEVEL! + cmake -S. -BBuild -A%PLATFORM% -DCATCH_TEST_USE_WMAIN=%wmain% -DCATCH_DEVELOPMENT_BUILD=ON || exit /b !ERRORLEVEL! )