diff --git a/.cmake-format b/.cmake-format index 8c355cf..57fe620 100644 --- a/.cmake-format +++ b/.cmake-format @@ -22,7 +22,9 @@ parse: SVN_REPOSITORY: 1 SVN_REVISION: 1 SOURCE_DIR: 1 + SYSTEM: 1 DOWNLOAD_COMMAND: 1 + EXCLUDE_FROM_ALL: 1 FIND_PACKAGE_ARGUMENTS: 1 NO_CACHE: 1 GIT_SHALLOW: 1 diff --git a/.envrc b/.envrc new file mode 100644 index 0000000..f965b50 --- /dev/null +++ b/.envrc @@ -0,0 +1,14 @@ +# Define environment in this dir only with direnv. +# On first usage enter: direnv allow +# man direnv for more infos +# +# see too https://cmake.org/cmake/help/latest/manual/cmake-env-variables.7.html +export CMAKE_PREFIX_PATH=${PWD}/stagedir +export CMAKE_EXPORT_COMPILE_COMMANDS=YES +export CTEST_OUTPUT_ON_FAILURE=YES + +export CPM_USE_LOCAL_PACKAGES=YES +export CPM_SOURCE_CACHE=${PWD}/.cache/CPM + +export LD_LIBRARY_PATH=${CMAKE_PREFIX_PATH}/lib +export BUILD_DIR=${PWD}/build diff --git a/.github/workflows/install.yml b/.github/workflows/install.yml index f10b6dd..a195c42 100644 --- a/.github/workflows/install.yml +++ b/.github/workflows/install.yml @@ -1,14 +1,15 @@ +--- name: Install on: push: branches: - master - - main + - develop pull_request: branches: - master - - main + - develop env: CTEST_OUTPUT_ON_FAILURE: 1 @@ -33,7 +34,7 @@ jobs: rm -rf build - name: configure - run: cmake -Stest -Bbuild -DTEST_INSTALLED_VERSION=1 + run: cmake -S test -B build -D TEST_INSTALLED_VERSION=1 - name: build run: cmake --build build --config Debug -j4 diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml index 141a7ac..8083bc7 100644 --- a/.github/workflows/macos.yml +++ b/.github/workflows/macos.yml @@ -1,14 +1,15 @@ +--- name: MacOS on: push: branches: - master - - main + - develop pull_request: branches: - master - - main + - develop env: CTEST_OUTPUT_ON_FAILURE: 1 @@ -27,7 +28,7 @@ jobs: key: ${{ github.workflow }}-cpm-modules-${{ hashFiles('**/CMakeLists.txt', '**/*.cmake') }} - name: configure - run: cmake -Stest -Bbuild -DCMAKE_BUILD_TYPE=Debug + run: cmake -S test -B build -D CMAKE_BUILD_TYPE=Debug - name: build run: cmake --build build -j4 diff --git a/.github/workflows/standalone.yml b/.github/workflows/standalone.yml index dff55dc..ade6c47 100644 --- a/.github/workflows/standalone.yml +++ b/.github/workflows/standalone.yml @@ -1,14 +1,15 @@ +--- name: Standalone on: push: branches: - master - - main + - develop pull_request: branches: - master - - main + - develop env: CPM_SOURCE_CACHE: ${{ github.workspace }}/cpm_modules @@ -26,7 +27,7 @@ jobs: key: ${{ github.workflow }}-cpm-modules-${{ hashFiles('**/CMakeLists.txt', '**/*.cmake') }} - name: configure - run: cmake -Sstandalone -Bbuild -DCMAKE_BUILD_TYPE=Debug + run: cmake -S standalone -B build -D CMAKE_BUILD_TYPE=Debug - name: build run: cmake --build build -j4 diff --git a/.github/workflows/style.yml b/.github/workflows/style.yml index fa35e5b..c382115 100644 --- a/.github/workflows/style.yml +++ b/.github/workflows/style.yml @@ -1,14 +1,15 @@ +--- name: Style on: push: branches: - master - - main + - develop pull_request: branches: - master - - main + - develop env: CPM_SOURCE_CACHE: ${{ github.workspace }}/cpm_modules @@ -29,7 +30,7 @@ jobs: run: pip3 install clang-format==14.0.6 cmake_format==0.6.11 pyyaml - name: configure - run: cmake -Stest -Bbuild + run: cmake -S test -B build - name: check style run: cmake --build build --target check-format diff --git a/.github/workflows/ubuntu.yml b/.github/workflows/ubuntu.yml index 8839ff8..cf829a4 100644 --- a/.github/workflows/ubuntu.yml +++ b/.github/workflows/ubuntu.yml @@ -1,14 +1,15 @@ +--- name: Ubuntu on: push: branches: - master - - main + - develop pull_request: branches: - master - - main + - develop env: CTEST_OUTPUT_ON_FAILURE: 1 @@ -28,7 +29,7 @@ jobs: key: ${{ github.workflow }}-cpm-modules-${{ hashFiles('**/CMakeLists.txt', '**/*.cmake') }} - name: configure - run: cmake -Stest -Bbuild -DENABLE_TEST_COVERAGE=1 -DCMAKE_BUILD_TYPE=Debug + run: cmake -S test -B build -D ENABLE_TEST_COVERAGE=1 -D CMAKE_BUILD_TYPE=Debug - name: build run: cmake --build build -j4 diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml index 82d5a35..370fc46 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/windows.yml @@ -1,14 +1,15 @@ +--- name: Windows on: push: branches: - master - - main + - develop pull_request: branches: - master - - main + - develop env: CTEST_OUTPUT_ON_FAILURE: 1 @@ -27,7 +28,7 @@ jobs: key: ${{ github.workflow }}-cpm-modules-${{ hashFiles('**/CMakeLists.txt', '**/*.cmake') }} - name: configure - run: cmake -Stest -Bbuild + run: cmake -S test -B build -G "Visual Studio 17 2022" -D BUILD_SHARED_LIBS=NO - name: build run: cmake --build build --config Debug -j4 diff --git a/.gitignore b/.gitignore index d54a4f4..1e8c1e7 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,7 @@ +*~ +*.swp /build* +/stagedir /.vscode /cpm_modules -.DS_Store \ No newline at end of file +.DS_Store diff --git a/CMakeLists.txt b/CMakeLists.txt index 70b0670..aed292d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.14...3.27) +cmake_minimum_required(VERSION 3.21...3.27) # ---- Project ---- @@ -18,18 +18,25 @@ if(PROJECT_SOURCE_DIR STREQUAL PROJECT_BINARY_DIR) ) endif() +if(NOT PROJECT_IS_TOP_LEVEL) + option(CMAKE_SKIP_INSTALL_RULES "Whether to disable generation of installation rules" YES) +endif() + +option(OPTION_ENABLE_UNITY "Enable Unity builds of project" ON) + # ---- Add dependencies via CPM ---- # see https://github.com/TheLartians/CPM.cmake for more info include(cmake/CPM.cmake) # PackageProject.cmake will be used to make our target installable -CPMAddPackage("gh:TheLartians/PackageProject.cmake@1.8.0") +CPMAddPackage("gh:TheLartians/PackageProject.cmake@1.10.0") CPMAddPackage( NAME fmt GIT_TAG 9.1.0 GITHUB_REPOSITORY fmtlib/fmt + SYSTEM ON # used in case of cmake v3.25 OPTIONS "FMT_INSTALL YES" # create an installable target ) @@ -46,12 +53,15 @@ file(GLOB_RECURSE sources CONFIGURE_DEPENDS "${CMAKE_CURRENT_SOURCE_DIR}/source/ # target: add_library(${PROJECT_NAME} INTERFACE) add_library(${PROJECT_NAME} ${headers} ${sources}) target_compile_features(${PROJECT_NAME} PUBLIC cxx_std_20) +set_target_properties(${PROJECT_NAME} PROPERTIES UNITY_BUILD ${OPTION_ENABLE_UNITY}) -# enable compiler warnings -include(cmake/WarningsAsErrors.cmake) +if(PROJECT_IS_TOP_LEVEL) + # enable compiler warnings + include(cmake/WarningsAsErrors.cmake) -# being a cross-platform target, we enforce standards conformance on MSVC -target_compile_options(${PROJECT_NAME} PRIVATE "$<$:/permissive->") + # being a cross-platform target, we enforce standards conformance on MSVC + target_compile_options(${PROJECT_NAME} PRIVATE "$<$:/permissive->") +endif() # Link dependencies target_link_libraries(${PROJECT_NAME} PUBLIC fmt::fmt) @@ -79,3 +89,5 @@ packageProject( COMPATIBILITY SameMajorVersion DEPENDENCIES "fmt 9.1.0" ) + +include(CPack) diff --git a/CMakePresets.json b/CMakePresets.json new file mode 100644 index 0000000..2e2092e --- /dev/null +++ b/CMakePresets.json @@ -0,0 +1,97 @@ +{ + "version": 6, + "cmakeMinimumRequired": { + "major": 3, + "minor": 25, + "patch": 0 + }, + "configurePresets": [ + { + "name": "default", + "displayName": "Default user Config", + "description": "Default build using Ninja generator", + "generator": "Ninja", + "binaryDir": "${sourceDir}/build/default", + "installDir": "${sourceDir}/stagedir", + "cacheVariables": { + "CMAKE_PREFIX_PATH": { + "type": "path", + "value": "${sourceDir}/stagedir" + }, + "CMAKE_CXX_STANDARD": "20", + "CMAKE_BUILD_TYPE": "Release", + "CMAKE_DEBUG_POSTFIX": "D", + "BUILD_SHARED_LIBS": "NO" + }, + "environment": { + "CPM_USE_LOCAL_PACKAGES": "YES", + "PATH": "$env{HOME}/.local/bin${pathListSep}$penv{PATH}" + }, + "warnings": { + "deprecated": true, + "uninitialized": true + } + }, + { + "name": "ninja-multi", + "inherits": "default", + "displayName": "Ninja Multi-Config", + "description": "Default build using Ninja Multi-Config generator", + "generator": "Ninja Multi-Config" + }, + { + "name": "windows-only", + "inherits": "default", + "displayName": "Windows-only configuration", + "description": "This build is only available on Windows", + "condition": { + "type": "equals", + "lhs": "${hostSystemName}", + "rhs": "Windows" + } + } + ], + "buildPresets": [ + { + "name": "default", + "configurePreset": "default" + }, + { + "name": "install", + "configurePreset": "default", + "targets": ["install"] + } + ], + "packagePresets": [ + { + "name": "default", + "configurePreset": "default", + "generators": [ + "TGZ" + ] + } + ], + "workflowPresets": [ + { + "name": "default", + "steps": [ + { + "type": "configure", + "name": "default" + }, + { + "type": "build", + "name": "default" + }, + { + "type": "build", + "name": "install" + }, + { + "type": "package", + "name": "default" + } + ] + } + ] +} diff --git a/README.md b/README.md index 46b6226..0983aac 100644 --- a/README.md +++ b/README.md @@ -27,6 +27,7 @@ This template is the result of learnings from many previous projects and should - Installable target with automatic versioning information and header generation via [PackageProject.cmake](https://github.com/TheLartians/PackageProject.cmake) - Automatic [documentation](https://thelartians.github.io/ModernCppStarter) and deployment with [Doxygen](https://www.doxygen.nl) and [GitHub Pages](https://pages.github.com) - Support for [sanitizer tools, and more](#additional-tools) +- Supports [CMake Workflow Presets](https://cmake.org/cmake/help/v3.25/manual/cmake-presets.7.html#id10) ## Usage @@ -52,6 +53,8 @@ During development it is usually convenient to [build all subprojects at once](# Use the following command to build and run the executable target. ```bash +cd standalone && cmake --workflow --preset=default +# or cmake -S standalone -B build/standalone cmake --build build/standalone ./build/standalone/Greeter --help @@ -62,6 +65,8 @@ cmake --build build/standalone Use the following commands from the project's root directory to run the test suite. ```bash +cd test && cmake --workflow --preset=default +# or cmake -S test -B build/test cmake --build build/test CTEST_OUTPUT_ON_FAILURE=1 cmake --build build/test --target test @@ -114,6 +119,8 @@ The project also includes an `all` directory that allows building all targets at This is useful during development, as it exposes all subprojects to your IDE and avoids redundant builds of the library. ```bash +cd all && cmake --workflow --preset=default +# or cmake -S all -B build cmake --build build diff --git a/all/CMakeLists.txt b/all/CMakeLists.txt index 2a7987b..4753202 100644 --- a/all/CMakeLists.txt +++ b/all/CMakeLists.txt @@ -1,7 +1,7 @@ # this script adds all subprojects to a single build to allow IDEs understand the full project # structure. -cmake_minimum_required(VERSION 3.14...3.27) +cmake_minimum_required(VERSION 3.21...3.27) project(BuildAll LANGUAGES CXX) diff --git a/all/CMakePresets.json b/all/CMakePresets.json new file mode 100644 index 0000000..bad9832 --- /dev/null +++ b/all/CMakePresets.json @@ -0,0 +1,103 @@ +{ + "version": 6, + "cmakeMinimumRequired": { + "major": 3, + "minor": 23, + "patch": 0 + }, + "configurePresets": [ + { + "name": "default", + "displayName": "Default develop all Config", + "description": "Default build using Ninja generator", + "generator": "Ninja", + "binaryDir": "${sourceParentDir}/build/all", + "installDir": "${sourceParentDir}/stagedir", + "cacheVariables": { + "CMAKE_PREFIX_PATH": { + "type": "path", + "value": "${sourceParentDir}/stagedir" + }, + "CMAKE_CXX_STANDARD": "20", + "CMAKE_BUILD_TYPE": "Debug", + "CMAKE_DEBUG_POSTFIX": "D", + "CPM_USE_LOCAL_PACKAGES": "NO", + "BUILD_SHARED_LIBS": "YES", + "ENABLE_TEST_COVERAGE": "YES" + }, + "environment": { + "CPM_USE_LOCAL_PACKAGES": "YES", + "PATH": "$env{HOME}/.local/bin${pathListSep}$penv{PATH}" + } + }, + { + "name": "ninja-multi", + "inherits": "default", + "displayName": "Ninja Multi-Config", + "description": "Default build using Ninja Multi-Config generator", + "generator": "Ninja Multi-Config" + }, + { + "name": "windows-only", + "inherits": "default", + "displayName": "Windows-only configuration", + "description": "This build is only available on Windows", + "condition": { + "type": "equals", + "lhs": "${hostSystemName}", + "rhs": "Windows" + } + } + ], + "buildPresets": [ + { + "name": "default", + "configurePreset": "default" + }, + { + "name": "format", + "configurePreset": "default", + "targets": ["fix-clang-format", "check-cmake-format"] + } + ], + "testPresets": [ + { + "name": "default", + "configurePreset": "default", + "output": {"outputOnFailure": true}, + "execution": {"noTestsAction": "error", "stopOnFailure": true} + } + ], + "packagePresets": [ + { + "name": "default", + "configurePreset": "default", + "generators": [ + "TGZ" + ] + } + ], + "workflowPresets": [ + { + "name": "default", + "steps": [ + { + "type": "configure", + "name": "default" + }, + { + "type": "build", + "name": "default" + }, + { + "type": "build", + "name": "format" + }, + { + "type": "test", + "name": "default" + } + ] + } + ] +} diff --git a/cmake/WarningsAsErrors.cmake b/cmake/WarningsAsErrors.cmake index b23660c..967d901 100644 --- a/cmake/WarningsAsErrors.cmake +++ b/cmake/WarningsAsErrors.cmake @@ -6,6 +6,10 @@ elseif(CMAKE_CXX_COMPILER_ID MATCHES "GNU|Clang") if(CMAKE_CXX_COMPILER_ID STREQUAL "Clang" AND CMAKE_CXX_COMPILER_VERSION GREATER_EQUAL 10.0) target_compile_options(${PROJECT_NAME} PRIVATE -Wdeprecated-copy-dtor -Wnewline-eof) endif() + + if(CMAKE_CXX_COMPILER_ID MATCHES "AppleClang" AND CMAKE_CXX_COMPILER_VERSION GREATER_EQUAL 14.0) + target_compile_options(${PROJECT_NAME} PRIVATE -Wno-deprecated-declarations) + endif() elseif(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC") string(REGEX REPLACE " /W[0-4]" "" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}") target_compile_options(${PROJECT_NAME} PRIVATE /W4 /WX) diff --git a/documentation/CMakeLists.txt b/documentation/CMakeLists.txt index 4d4f80a..3ae656d 100644 --- a/documentation/CMakeLists.txt +++ b/documentation/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.14...3.27) +cmake_minimum_required(VERSION 3.21...3.27) project(GreeterDocs) diff --git a/gcovr.cfg b/gcovr.cfg new file mode 100644 index 0000000..610f7f8 --- /dev/null +++ b/gcovr.cfg @@ -0,0 +1,19 @@ +root = . +search-path = build + +filter = src/* +filter = include/* +filter = standalone/* + +exclude-directories = test +exclude-directories = stagedir +exclude-directories = build/_deps +exclude-directories = .cache + +gcov-ignore-parse-errors = yes +print-summary = yes + +html-details = build/gcovr.html + +cobertura-pretty = yes +cobertura = build/cobertura.xml diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000..6528a13 --- /dev/null +++ b/requirements.txt @@ -0,0 +1,18 @@ +# ============================================================================= +# PYTHON PACKAGES (PIP) +# ============================================================================= +# USE (python3): sudo pip3 install -r +# ============================================================================= + +PyYAML>=5.4.1,<6.0 +asyncio==3.4.3 +builddriver==0.9.0 +bumpversion>=0.6.0 +cmake-format>=0.6.13 +cmake>=3.25 +gcovr>=5.2 +ninja>=1.11 +pytest-asyncio==0.19.0 +pytest==7.1.3 +tftpy>=0.8.2 +wheel>=0.37.1 diff --git a/standalone/CMakeLists.txt b/standalone/CMakeLists.txt index 723c363..1ce01a5 100644 --- a/standalone/CMakeLists.txt +++ b/standalone/CMakeLists.txt @@ -1,7 +1,16 @@ -cmake_minimum_required(VERSION 3.14...3.27) +cmake_minimum_required(VERSION 3.21...3.27) project(GreeterStandalone LANGUAGES CXX) +if(PROJECT_IS_TOP_LEVEL AND CMAKE_BUILD_TYPE STREQUAL "Release") + set(CMAKE_SKIP_INSTALL_RULES + NO + CACHE BOOL "Forced generation of installation rules" FORCE + ) +endif() + +option(OPTION_ENABLE_UNITY "Enable Unity builds of project" ON) + # --- Import tools ---- include(../cmake/tools.cmake) @@ -13,6 +22,7 @@ include(../cmake/CPM.cmake) CPMAddPackage( GITHUB_REPOSITORY jarro2783/cxxopts VERSION 3.1.1 + SYSTEM ON # used in case of cmake v3.25 OPTIONS "CXXOPTS_BUILD_EXAMPLES NO" "CXXOPTS_BUILD_TESTS NO" "CXXOPTS_ENABLE_INSTALL YES" ) @@ -27,8 +37,22 @@ CPMAddPackage( file(GLOB sources CONFIGURE_DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/source/*.cpp) add_executable(${PROJECT_NAME} ${sources}) +if(CMAKE_DEBUG_POSTFIX) + set_property(TARGET ${PROJECT_NAME} PROPERTY DEBUG_POSTFIX ${CMAKE_DEBUG_POSTFIX}) +endif() +target_link_libraries(${PROJECT_NAME} Greeter::Greeter cxxopts::cxxopts) +set_target_properties(${PROJECT_NAME} PROPERTIES UNITY_BUILD ${OPTION_ENABLE_UNITY}) -# TODO(CK): why is this needed? +# TODO(CK): why is this used? This overrides the CMAKE_DEBUG_POSTFIX! set_target_properties(${PROJECT_NAME} PROPERTIES OUTPUT_NAME Greeter) -target_link_libraries(${PROJECT_NAME} Greeter::Greeter cxxopts::cxxopts) +# --- Test it --- + +enable_testing() +add_test(NAME ${PROJECT_NAME} COMMAND ${PROJECT_NAME} --help) + +# --- Install it --- + +install(TARGETS ${PROJECT_NAME} RUNTIME) + +include(CPack) diff --git a/standalone/CMakePresets.json b/standalone/CMakePresets.json new file mode 100644 index 0000000..39a7c31 --- /dev/null +++ b/standalone/CMakePresets.json @@ -0,0 +1,106 @@ +{ + "version": 6, + "cmakeMinimumRequired": { + "major": 3, + "minor": 23, + "patch": 0 + }, + "configurePresets": [ + { + "name": "default", + "displayName": "Default standalone Config", + "description": "Default build using Ninja generator", + "generator": "Ninja", + "binaryDir": "${sourceParentDir}/build/standalone", + "installDir": "${sourceParentDir}/stagedir", + "cacheVariables": { + "CMAKE_PREFIX_PATH": { + "type": "path", + "value": "${sourceParentDir}/stagedir" + }, + "CMAKE_CXX_STANDARD": "20", + "CMAKE_BUILD_TYPE": "Release", + "CMAKE_DEBUG_POSTFIX": "D", + "CPM_USE_LOCAL_PACKAGES": "YES", + "BUILD_SHARED_LIBS": "YES" + }, + "environment": { + "CPM_USE_LOCAL_PACKAGES": "YES", + "PATH": "$env{HOME}/.local/bin${pathListSep}$penv{PATH}" + } + }, + { + "name": "ninja-multi", + "inherits": "default", + "displayName": "Ninja Multi-Config", + "description": "Default build using Ninja Multi-Config generator", + "generator": "Ninja Multi-Config" + }, + { + "name": "windows-only", + "inherits": "default", + "displayName": "Windows-only configuration", + "description": "This build is only available on Windows", + "condition": { + "type": "equals", + "lhs": "${hostSystemName}", + "rhs": "Windows" + } + } + ], + "buildPresets": [ + { + "name": "default", + "configurePreset": "default" + }, + { + "name": "install", + "configurePreset": "default", + "targets": ["install"] + } + ], + "testPresets": [ + { + "name": "default", + "configurePreset": "default", + "output": {"outputOnFailure": true}, + "execution": {"noTestsAction": "error", "stopOnFailure": true} + } + ], + "packagePresets": [ + { + "name": "default", + "configurePreset": "default", + "generators": [ + "TGZ" + ] + } + ], + "workflowPresets": [ + { + "name": "default", + "steps": [ + { + "type": "configure", + "name": "default" + }, + { + "type": "build", + "name": "default" + }, + { + "type": "test", + "name": "default" + }, + { + "type": "build", + "name": "install" + }, + { + "type": "package", + "name": "default" + } + ] + } + ] +} diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index ae27db6..6aadf7f 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.14...3.27) +cmake_minimum_required(VERSION 3.21...3.27) project(GreeterTests LANGUAGES CXX) diff --git a/test/CMakePresets.json b/test/CMakePresets.json new file mode 100644 index 0000000..f68b744 --- /dev/null +++ b/test/CMakePresets.json @@ -0,0 +1,94 @@ +{ + "version": 6, + "cmakeMinimumRequired": { + "major": 3, + "minor": 23, + "patch": 0 + }, + "configurePresets": [ + { + "name": "default", + "displayName": "Default develop test Config", + "description": "Default build using Ninja generator", + "generator": "Ninja", + "binaryDir": "${sourceParentDir}/build/test", + "installDir": "${sourceParentDir}/stagedir", + "cacheVariables": { + "CMAKE_PREFIX_PATH": { + "type": "path", + "value": "${sourceParentDir}/stagedir" + }, + "CMAKE_CXX_STANDARD": "20", + "CMAKE_BUILD_TYPE": "Release", + "CMAKE_DEBUG_POSTFIX": "D", + "CPM_USE_LOCAL_PACKAGES": "NO", + "BUILD_SHARED_LIBS": "YES", + "TEST_INSTALLED_VERSION": "YES" + }, + "environment": { + "CPM_USE_LOCAL_PACKAGES": "YES", + "PATH": "$env{HOME}/.local/bin${pathListSep}$penv{PATH}" + } + }, + { + "name": "ninja-multi", + "inherits": "default", + "displayName": "Ninja Multi-Config", + "description": "Default build using Ninja Multi-Config generator", + "generator": "Ninja Multi-Config" + }, + { + "name": "windows-only", + "inherits": "default", + "displayName": "Windows-only configuration", + "description": "This build is only available on Windows", + "condition": { + "type": "equals", + "lhs": "${hostSystemName}", + "rhs": "Windows" + } + } + ], + "buildPresets": [ + { + "name": "default", + "configurePreset": "default" + } + ], + "testPresets": [ + { + "name": "default", + "configurePreset": "default", + "output": {"outputOnFailure": true}, + "execution": {"noTestsAction": "error", "stopOnFailure": true} + } + ], + "packagePresets": [ + { + "name": "default", + "configurePreset": "default", + "generators": [ + "TGZ" + ] + } + ], + "workflowPresets": [ + { + "name": "default", + "steps": [ + { + "type": "configure", + "name": "default" + }, + { + "type": "build", + "name": "default" + }, + { + "type": "test", + "name": "default" + } + ] + } + ] +}