Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,14 +37,14 @@ jobs:
cc: gcc-15,
cxx: g++-15,
gcov: gcov-15,
profiles: '-pr:h conan/gcc15'
profiles: '-pr:a conan/gcc15'
}
- {
name: 'Linux Clang',
cc: clang-22,
cxx: clang++-22,
gcov: llvm-cov-22 gcov,
profiles: '-pr:h conan/clang22 -pr:h conan/libc++'
profiles: '-pr:a conan/clang22 -pr:a conan/libc++'
}
steps:
- name: Checkout repository
Expand Down Expand Up @@ -84,7 +84,7 @@ jobs:
uv run conan install .
-b missing -pr:a default ${{ matrix.config.profiles }}
-c:a tools.cmake.cmaketoolchain:generator=Ninja
-c:h tools.build:compiler_executables="{\"c\": \"${{ matrix.config.cc }}\", \"cpp\": \"${{ matrix.config.cxx }}\"}"
-c:a tools.build:compiler_executables="{\"c\": \"${{ matrix.config.cc }}\", \"cpp\": \"${{ matrix.config.cxx }}\"}"
-s:h build_type=${{ matrix.build.type }}

- name: Configure
Expand Down Expand Up @@ -131,7 +131,7 @@ jobs:
cc: $(brew --prefix llvm@23)/bin/clang,
cxx: $(brew --prefix llvm@23)/bin/clang++,
gcov: $(brew --prefix llvm@23)/bin/llvm-cov gcov,
profiles: '-pr:h conan/clang23 -pr:h conan/libc++'
profiles: '-pr:a conan/clang23 -pr:a conan/libc++'
}
steps:
- name: Checkout repository
Expand Down Expand Up @@ -167,7 +167,7 @@ jobs:
uv run conan install .
-b missing -pr:a default ${{ matrix.config.profiles }}
-c:a tools.cmake.cmaketoolchain:generator=Ninja
-c:h tools.build:compiler_executables="{\"c\": \"${{ matrix.config.cc }}\", \"cpp\": \"${{ matrix.config.cxx }}\"}"
-c:a tools.build:compiler_executables="{\"c\": \"${{ matrix.config.cc }}\", \"cpp\": \"${{ matrix.config.cxx }}\"}"
-s:h build_type=${{ matrix.build.type }}

- name: Configure
Expand Down Expand Up @@ -209,7 +209,7 @@ jobs:
name: 'Windows MSVC',
cc: cl,
cxx: cl,
profiles: '-pr:h conan/msvc195-md'
profiles: '-pr:a conan/msvc195-md'
}
- {
name: 'Windows Clang',
Expand Down Expand Up @@ -252,8 +252,8 @@ jobs:
uv run conan install .
-b missing -pr:a default ${{ matrix.config.profiles }}
-c:a tools.cmake.cmaketoolchain:generator=Ninja
-c:h tools.env.virtualenv:powershell=pwsh
-c:h tools.build:compiler_executables="{'c': '${{ matrix.config.cc }}', 'cpp': '${{ matrix.config.cxx }}'}"
-c:a tools.env.virtualenv:powershell=pwsh
-c:a tools.build:compiler_executables="{'c': '${{ matrix.config.cc }}', 'cpp': '${{ matrix.config.cxx }}'}"
-s:h build_type=${{ matrix.build.type }}

- name: Configure
Expand Down
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,6 @@ repos:
- id: rst-inline-touching-normal
- id: text-unicode-replacement-char
- repo: https://github.com/astral-sh/uv-pre-commit
rev: 0.13.7
rev: 0.13.10
hooks:
- id: uv-lock
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 4.4 FATAL_ERROR)
cmake_minimum_required(VERSION 4.5 FATAL_ERROR)

project(
cpp-project-template
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ source .venv/bin/activate
conan install -pr:a default \
-pr:a conan/<profile matching the compiler in use> \
-c:a tools.cmake.cmaketoolchain:generator=<CMake generator> \
-c:h tools.build:compiler_executables='{"c": "<CC>", "cpp": "<CXX>"}' \
-c:a tools.build:compiler_executables='{"c": "<CC>", "cpp": "<CXX>"}' \
-c:h tools.build:skip_test=<True|False> \
-s:h build_type=<Debug|RelWithDebInfo|Release|MinSizeRel> -b missing .

Expand Down Expand Up @@ -100,8 +100,8 @@ GCOV=<"gcov" for GCC, "llvm-cov gcov" for Clang> gcovr
conan install -pr:a default \
-pr:a conan/<profile matching the compiler in use> \
-c:a tools.cmake.cmaketoolchain:generator=<CMake generator> \
-c:h tools.env.virtualenv:powershell=pwsh \
-c:h tools.build:compiler_executables='{"c": "<CC>", "cpp": "<CXX>"}' \
-c:a tools.env.virtualenv:powershell=pwsh \
-c:a tools.build:compiler_executables='{"c": "<CC>", "cpp": "<CXX>"}' \
-c:h tools.build:skip_test=<True|False> \
-s:h build_type=<Debug|RelWithDebInfo|Release|MinSizeRel> -b missing .

Expand Down
9 changes: 9 additions & 0 deletions cmake/defaults.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@ option(ENABLE_HARDENINGS "Enable hardenings" OFF)

# Useful CMake defaults
cmake_diagnostic(SET CMD_DEPRECATED FATAL_ERROR)
cmake_diagnostic(SET CMD_STRICT FATAL_ERROR)
cmake_diagnostic(SET CMD_UNINITIALIZED FATAL_ERROR)
cmake_diagnostic(SET CMD_UNUSED_CLI FATAL_ERROR)
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
set(CMAKE_FIND_PACKAGE_PREFER_CONFIG ON)
set(CMAKE_COMPILE_WARNING_AS_ERROR ON)
Expand All @@ -39,6 +42,12 @@ set(CMAKE_VS_JUST_MY_CODE_DEBUGGING ON)
set(CMAKE_COLOR_DIAGNOSTICS ON)
set(CMAKE_GTEST_DISCOVER_TESTS_DISCOVERY_MODE PRE_TEST)
set(CMAKE_CTEST_ARGUMENTS --progress --output-on-failure --parallel)
set(CMAKE_INSTALL_SBOM_FORMATS spdx)
if(LINUX)
set(CMAKE_INSTALL_RPATH \$ORIGIN/../lib)
elseif(APPLE)
set(CMAKE_INSTALL_RPATH @loader_path/../lib)
endif()

# Set a default build type if none was specified
if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES)
Expand Down
11 changes: 10 additions & 1 deletion src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,13 @@ install(
TARGETS ${PROJECT_NAME}
RUNTIME_DEPENDENCY_SET ${PROJECT_NAME}_runtime_dependencies
)
install(RUNTIME_DEPENDENCY_SET ${PROJECT_NAME}_runtime_dependencies)
install(
RUNTIME_DEPENDENCY_SET ${PROJECT_NAME}_runtime_dependencies
PRE_EXCLUDE_REGEXES
[[libc\.so\..*]]
[[libm\.so\..*]]
[[libpthread\.so\..*]]
[[ld-linux.*\.so\..*]]
[[libdl\.so\..*]]
[[librt\.so\..*]]
)
Loading
Loading