Skip to content

Commit e97a7e1

Browse files
authored
Merge branch 'main' into conan-quiet
2 parents 2412f6b + b6a86f8 commit e97a7e1

23 files changed

Lines changed: 260 additions & 222 deletions

.cmake-format.yaml

Lines changed: 0 additions & 123 deletions
Original file line numberDiff line numberDiff line change
@@ -10,126 +10,3 @@ markup:
1010
bullet_char: "*"
1111
enum_char: .
1212
enable_markup: false
13-
parse:
14-
additional_commands:
15-
project_options:
16-
pargs:
17-
nargs: "*"
18-
flags: []
19-
spelling: project_options
20-
kwargs:
21-
CLANG_WARNINGS: 1
22-
GCC_WARNINGS: 1
23-
MSVC_WARNINGS: 1
24-
CONAN_OPTIONS: +
25-
catch_discover_tests:
26-
pargs:
27-
nargs: "*"
28-
flags: []
29-
kwargs:
30-
OUTPUT_DIR: 1
31-
OUTPUT_PREFIX: 1
32-
OUTPUT_SUFFIX: 1
33-
REPORTER: 1
34-
TEST_PREFIX: 1
35-
conan_add_remote:
36-
pargs:
37-
nargs: "*"
38-
flags: []
39-
kwargs:
40-
INDEX: 1
41-
NAME: 1
42-
URL: 1
43-
conan_cmake_install:
44-
pargs:
45-
nargs: "*"
46-
flags: []
47-
kwargs:
48-
BUILD: +
49-
INSTALL_FOLDER: 1
50-
LOCKFILE: 1
51-
LOCKFILE_NODE_ID: 1
52-
LOCKFILE_OUT: 1
53-
PATH_OR_REFERENCE: 1
54-
REFERENCE: 1
55-
REMOTE: 1
56-
ENV: +
57-
ENV_BUILD: +
58-
ENV_HOST: +
59-
GENERATOR: +
60-
OPTIONS: +
61-
OPTIONS_BUILD: +
62-
OPTIONS_HOST: +
63-
PROFILE: +
64-
PROFILE_BUILD: +
65-
PROFILE_HOST: +
66-
SETTINGS: +
67-
SETTINGS_BUILD: +
68-
SETTINGS_HOST: +
69-
cpmaddpackage:
70-
pargs:
71-
nargs: "*"
72-
flags: []
73-
spelling: CPMAddPackage
74-
kwargs: &id001
75-
DOWNLOAD_COMMAND: 1
76-
DOWNLOAD_NAME: 1
77-
DOWNLOAD_NO_EXTRACT: 1
78-
DOWNLOAD_ONLY: 1
79-
FIND_PACKAGE_ARGUMENTS: 1
80-
FORCE: 1
81-
GITHUB_REPOSITORY: 1
82-
GITLAB_REPOSITORY: 1
83-
GIT_REPOSITORY: 1
84-
GIT_SHALLOW: 1
85-
GIT_TAG: 1
86-
HTTP_PASSWORD: 1
87-
HTTP_USERNAME: 1
88-
NAME: 1
89-
NO_CACHE: 1
90-
SOURCE_DIR: 1
91-
SVN_REPOSITORY: 1
92-
SVN_REVISION: 1
93-
URL: 1
94-
URL_HASH: 1
95-
URL_MD5: 1
96-
VERSION: 1
97-
OPTIONS: +
98-
cpmfindpackage:
99-
pargs:
100-
nargs: "*"
101-
flags: []
102-
spelling: CPMFindPackage
103-
kwargs: *id001
104-
cpmdeclarepackage:
105-
pargs:
106-
nargs: "*"
107-
flags: []
108-
spelling: CPMDeclarePackage
109-
kwargs: *id001
110-
packageproject:
111-
pargs:
112-
nargs: "*"
113-
flags: []
114-
spelling: packageProject
115-
kwargs:
116-
BINARY_DIR: 1
117-
COMPATIBILITY: 1
118-
DISABLE_VERSION_SUFFIX: 1
119-
EXPORT_HEADER: 1
120-
INCLUDE_DESTINATION: 1
121-
INCLUDE_DIR: 1
122-
NAME: 1
123-
NAMESPACE: 1
124-
VERSION: 1
125-
VERSION_HEADER: 1
126-
DEPENDENCIES: +
127-
cpmusepackagelock:
128-
pargs: 1
129-
spelling: CPMUsePackageLock
130-
cpmregisterpackage:
131-
pargs: 1
132-
spelling: CPMRegisterPackage
133-
cpmgetpackageversion:
134-
pargs: 2
135-
spelling: CPMGetPackageVersion

.github/workflows/ci.yml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,4 +60,12 @@ jobs:
6060
run: |
6161
task test
6262
task test_release
63-
task test_install
63+
task test_install
64+
65+
- name: Lint
66+
if: ${{ matrix.os == 'ubuntu-20.04' && matrix.compiler == 'gcc' }}
67+
run: |
68+
# TODO add to setup-cpp
69+
python3 -m pip install --user cmakelint cmake-format
70+
71+
task lint

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,11 @@ cmake_minimum_required(VERSION 3.16)
1515
# If commented, the latest supported standard for your compiler is automatically set.
1616
# set(CMAKE_CXX_STANDARD 20)
1717
18-
# Add project_options v0.18.1
18+
# Add project_options v0.19.0
1919
# https://github.com/cpp-best-practices/project_options
2020
# Change the version in the following URL to update the package (watch the releases of the repository for future updates)
2121
include(FetchContent)
22-
FetchContent_Declare(_project_options URL https://github.com/cpp-best-practices/project_options/archive/refs/tags/v0.18.1.zip)
22+
FetchContent_Declare(_project_options URL https://github.com/cpp-best-practices/project_options/archive/refs/tags/v0.19.0.zip)
2323
FetchContent_MakeAvailable(_project_options)
2424
include(${_project_options_SOURCE_DIR}/Index.cmake)
2525
@@ -283,11 +283,11 @@ cmake_minimum_required(VERSION 3.16)
283283
# If commented, the latest supported standard for your compiler is automatically set.
284284
# set(CMAKE_CXX_STANDARD 20)
285285
286-
# Add project_options v0.18.1
286+
# Add project_options v0.19.0
287287
# https://github.com/cpp-best-practices/project_options
288288
# Change the version in the following URL to update the package (watch the releases of the repository for future updates)
289289
include(FetchContent)
290-
FetchContent_Declare(_project_options URL https://github.com/cpp-best-practices/project_options/archive/refs/tags/v0.18.1.zip)
290+
FetchContent_Declare(_project_options URL https://github.com/cpp-best-practices/project_options/archive/refs/tags/v0.19.0.zip)
291291
FetchContent_MakeAvailable(_project_options)
292292
include(${_project_options_SOURCE_DIR}/Index.cmake)
293293

Taskfile.yml

Lines changed: 19 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -13,21 +13,32 @@ tasks:
1313
- cd ./test/build && ctest -C Release --verbose
1414

1515
test_install:
16-
cmds:
16+
cmds:
1717
- task: test_release
1818
- cmake --install ./test/build --config Release --prefix ./install
1919
- cmake ./test_install -B ./test_install/build -DCMAKE_BUILD_TYPE:STRING=Release -G "Ninja Multi-Config" -DCMAKE_PREFIX_PATH:STRING={{.CWD}}/install;
2020
- cmake --build ./test_install/build --config Release
2121
- cd ./test_install/build && ctest -C Release --verbose
22-
vars:
23-
CWD:
24-
sh: git rev-parse --show-toplevel
22+
vars:
23+
CWD:
24+
sh: git rev-parse --show-toplevel
2525

26-
format:
27-
- clang-format -i ./test/src/*/*.cpp ./test/include/*/*.hpp ./test_install/*.cpp
28-
- cmake-format --in-place ./Index.cmake ./src/*.cmake ./test/CMakeLists.txt ./test_install/CMakeLists.txt
26+
lint:
27+
- |
28+
{{if eq OS "windows"}}
29+
powershell -c '$files=(git ls-files --exclude-standard); foreach ($file in $files) { if ((get-item $file).Extension -in ".cpp", ".hpp", ".c", ".cc", ".cxx", ".hxx", ".ixx") { clang-format -i -style=file $file } }'
30+
{{else}}
31+
git ls-files --exclude-standard | grep -E '\.(cpp|hpp|c|cc|cxx|hxx|ixx)$' | xargs clang-format -i -style=file
32+
{{end}}
33+
- |
34+
{{if eq OS "windows"}}
35+
powershell -c '$files=(git ls-files --exclude-standard); foreach ($file in $files) { $item=(get-item $file); if (($item.Name -eq "CMakeLists.txt") -or ($item.Extension -in ".cmake")) { cmake-format --in-place $file; cmake-lint $file --disabled-codes C0103 C0301 R0912 R0915 R0913 --suppress-decorations } }'
36+
{{else}}
37+
git ls-files --exclude-standard | grep -E '(CMakeLists\.txt)|(\.(cmake))$' | xargs cmake-format --in-place | xargs cmake-lint --disabled-codes C0103 C0301 R0912 R0915 R0913 --suppress-decorations
38+
{{end}}
2939
30-
lint: cmake-lint ./Index.cmake ./src/*.cmake
40+
- ~/vcpkg/vcpkg format-manifest ./test/vcpkg.json ./test_install/vcpkg.json
41+
- npx -y cspell lint --no-progress --show-suggestions
3142

3243
clean: |
3344
{{if eq OS "windows"}}

cspell.config.yaml

Lines changed: 103 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,103 @@
1+
version: "0.2"
2+
files:
3+
- "**/*"
4+
ignorePaths:
5+
- pnpm-lock.yaml
6+
- .git/
7+
- dist/
8+
useGitignore: true
9+
language: en, en-GB
10+
allowCompoundWords: true
11+
enableGlobDot: true
12+
words:
13+
- aarch
14+
- aminya
15+
- anotherproj
16+
- applellvm
17+
- ARGN
18+
- asan
19+
- buildtools
20+
- ccache
21+
- ccmake
22+
- choco
23+
- cmake
24+
- cmakelint
25+
- cmds
26+
- cond
27+
- CPATH
28+
- Cppcheck
29+
- cppcoreguidelines
30+
- CPPFLAGS
31+
- cpprc
32+
- ctest
33+
- Cuda
34+
- DCMAKE
35+
- deps
36+
- DOPT
37+
- dyld
38+
- dylib
39+
- Eigen
40+
- fargs
41+
- fcolor
42+
- fdiagnostics
43+
- ftime
44+
- gcovr
45+
- Graphviz
46+
- hwrap
47+
- kcov
48+
- LDFLAGS
49+
- libc
50+
- libcuda
51+
- libstdc
52+
- LPSTR
53+
- LPWSTR
54+
- mdfile
55+
- msbuild
56+
- msvc
57+
- msys
58+
- multilib
59+
- mylib
60+
- myprogram
61+
- myproj
62+
- myproject
63+
- nothrow
64+
- nvcc
65+
- Opencppcoverage
66+
- pargs
67+
- pnpm
68+
- pwsh
69+
- rmrf
70+
- rpath
71+
- sccache
72+
- setx
73+
- shlib
74+
- suppr
75+
- TOLOWER
76+
- ubsan
77+
- vcpkg
78+
- vcvarsall
79+
- visualc
80+
- visualcpp
81+
- VSCMD
82+
- VSINSTALLDIR
83+
- vsversion
84+
- Wcast
85+
- Wconversion
86+
- Wdouble
87+
- Wduplicated
88+
- Werror
89+
- Weverything
90+
- Wextra
91+
- Wformat
92+
- Wlogical
93+
- Wmisleading
94+
- Wnon
95+
- Wnull
96+
- Woverloaded
97+
- Wpedantic
98+
- Wshadow
99+
- Wsign
100+
- Wunused
101+
- Wuseless
102+
- xcrun
103+
- Yahyaabadi

src/CompilerWarnings.cmake

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
# from here:
1+
# Set the compiler warnings
22
#
3+
# https://clang.llvm.org/docs/DiagnosticsReference.html
34
# https://github.com/lefticus/cppbestpractices/blob/master/02-Use_the_Tools_Available.md
4-
55
function(
66
set_project_warnings
77
project_name

src/Conan.cmake

Lines changed: 24 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
# Run Conan for dependency management
12
macro(run_conan)
23
# Download automatically, you can also just copy the conan.cmake file
34
if(NOT EXISTS "${CMAKE_BINARY_DIR}/conan.cmake")
@@ -18,10 +19,17 @@ macro(run_conan)
1819
# Add (or remove) remotes as needed
1920
# conan_add_remote(NAME conan-center URL https://conan.bintray.com)
2021
conan_add_remote(
21-
NAME cci
22-
URL https://center.conan.io
23-
INDEX 0)
24-
conan_add_remote(NAME bincrafters URL https://bincrafters.jfrog.io/artifactory/api/conan/public-conan)
22+
NAME
23+
cci
24+
URL
25+
https://center.conan.io
26+
INDEX
27+
0)
28+
conan_add_remote(
29+
NAME
30+
bincrafters
31+
URL
32+
https://bincrafters.jfrog.io/artifactory/api/conan/public-conan)
2533

2634
# For multi configuration generators, like VS and XCode
2735
if(NOT CMAKE_CONFIGURATION_TYPES)
@@ -49,13 +57,20 @@ macro(run_conan)
4957
# the external "conanfile.py" provided with the project
5058
# Alternatively a conanfile.txt could be used
5159
conan_cmake_install(
52-
PATH_OR_REFERENCE ${CMAKE_SOURCE_DIR}
53-
BUILD missing
60+
PATH_OR_REFERENCE
61+
${CMAKE_SOURCE_DIR}
62+
BUILD
63+
missing
5464
# Pass compile-time configured options into conan
55-
OPTIONS ${ProjectOptions_CONAN_OPTIONS}
65+
OPTIONS
66+
${ProjectOptions_CONAN_OPTIONS}
5667
# Pass CMake compilers to Conan
57-
ENV "CC=${CMAKE_C_COMPILER}" "CXX=${CMAKE_CXX_COMPILER}"
58-
SETTINGS ${settings} ${OUTPUT_QUIET})
68+
ENV
69+
"CC=${CMAKE_C_COMPILER}"
70+
"CXX=${CMAKE_CXX_COMPILER}"
71+
SETTINGS
72+
${settings}
73+
${OUTPUT_QUIET})
5974
endforeach()
6075

6176
endmacro()

src/Doxygen.cmake

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,9 @@ function(enable_doxygen DOXYGEN_THEME)
2929

3030
if("${DOXYGEN_THEME}" STREQUAL "awesome" OR "${DOXYGEN_THEME}" STREQUAL "awesome-sidebar")
3131
# use a modern doxygen theme
32-
# https://github.com/jothepro/doxygen-awesome-css v1.6.1
32+
# https://github.com/jothepro/doxygen-awesome-css v2.0.2
3333
FetchContent_Declare(_doxygen_theme
34-
URL https://github.com/jothepro/doxygen-awesome-css/archive/refs/tags/v1.6.1.zip)
34+
URL https://github.com/jothepro/doxygen-awesome-css/archive/refs/tags/v2.0.2.zip)
3535
FetchContent_MakeAvailable(_doxygen_theme)
3636
if("${DOXYGEN_THEME}" STREQUAL "awesome" OR "${DOXYGEN_THEME}" STREQUAL "awesome-sidebar")
3737
set(DOXYGEN_HTML_EXTRA_STYLESHEET "${_doxygen_theme_SOURCE_DIR}/doxygen-awesome.css")

0 commit comments

Comments
 (0)