Skip to content

Commit f116d99

Browse files
chore(deps): update dependency https://github.com/serious-scaffold/ss-pybind11 to v0.8.29 (#119)
* chore(deps): update dependency https://github.com/serious-scaffold/ss-pybind11 to v0.8.29 * Resolve conflicts Signed-off-by: l.feng <[email protected]> --------- Signed-off-by: l.feng <[email protected]> Co-authored-by: msclock-bot[bot] <163820484+msclock-bot[bot]@users.noreply.github.com> Co-authored-by: l.feng <[email protected]>
1 parent 4c175d2 commit f116d99

17 files changed

+214
-119
lines changed

.copier-answers.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Changes here will be overwritten by Copier; NEVER EDIT MANUALLY
2-
_commit: v0.8.24
2+
_commit: v0.8.29
33
_src_path: https://github.com/serious-scaffold/ss-pybind11
44
author_email: [email protected]
55
author_name: l.feng
@@ -18,6 +18,7 @@ module_name: cppcheck
1818
organization_name: msclock
1919
project_description: Package cppcheck as a python wheel.
2020
project_name: Cppcheck Wheel
21+
repo_host: github.com
2122
repo_name: cppcheck-wheel
2223
repo_namespace: msclock
2324
repo_platform: github

.github/workflows/ci.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,9 @@ jobs:
8282
--durations=20
8383
8484
- name: Upload coverage report
85-
uses: codecov/codecov-action@7f8b4b4bde536c465e797be725718b88c5d95e0e # v5.1.1
85+
uses: codecov/codecov-action@1e68e06f1dbfde0e4cefc87efeba9e4643565303 # v5.1.2
86+
with:
87+
token: ${{ secrets.CODECOV_TOKEN }}
8688

8789

8890
check-docs:

.github/workflows/codeql.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ jobs:
4949
fetch-depth: 0
5050

5151
- name: Initialize CodeQL
52-
uses: github/codeql-action/init@df409f7d9260372bd5f19e5b04e83cb3c43714ae # v3.27.9
52+
uses: github/codeql-action/init@48ab28a6f5dbc2a99bf1e0131198dd8f1df78169 # v3.28.0
5353
with:
5454
languages: ${{ matrix.language }}
5555
config-file: ./.github/codeql-config.yml
@@ -71,4 +71,4 @@ jobs:
7171
run: python -m pip install .[test]
7272

7373
- name: Perform CodeQL Analysis
74-
uses: github/codeql-action/analyze@df409f7d9260372bd5f19e5b04e83cb3c43714ae # v3.27.9
74+
uses: github/codeql-action/analyze@48ab28a6f5dbc2a99bf1e0131198dd8f1df78169 # v3.28.0

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ repos:
4848

4949
# Strong lint from ruff
5050
- repo: https://github.com/astral-sh/ruff-pre-commit
51-
rev: v0.8.2
51+
rev: v0.8.5
5252
hooks:
5353
- id: ruff
5454
args: [--fix, --show-fixes]

.vscode/launch.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
"program": "${command:cmake.launchTargetPath}",
1212
"args": [],
1313
"stopAtEntry": false,
14-
"cwd": "${fileDirname}",
14+
"cwd": "${command:cmake.launchTargetDirectory}",
1515
"environment": [],
1616
"externalConsole": false,
1717
"MIMode": "gdb",

.vscode/settings.json

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,16 @@
11
{
2-
"python.testing.pytestArgs": ["tests"],
2+
"python.testing.pytestArgs": [
3+
"tests",
4+
"-ra",
5+
"--showlocals",
6+
"--strict-markers",
7+
"--strict-config"
8+
],
39
"python.testing.unittestEnabled": false,
410
"python.testing.pytestEnabled": true,
11+
"cmake.configureOnEdit": false,
12+
"cmake.options.statusBarVisibility": "icon",
513
"cmake.useCMakePresets": "always",
6-
"cmake.options.statusBarVisibility": "compact",
714
"files.associations": {
815
"iosfwd": "cpp",
916
"type_traits": "cpp",

CMakeLists.txt

Lines changed: 9 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,23 @@
11
cmake_minimum_required(VERSION 3.25)
22
message(STATUS "CMAKE VERSION:${CMAKE_VERSION}")
33

4-
if(NOT DEFINED SKBUILD_PROJECT_NAME)
5-
set(SKBUILD_PROJECT_NAME _core)
6-
set(SKBUILD_PROJECT_VERSION 0.0.0)
7-
endif()
8-
9-
message(
10-
STATUS
11-
"Building CMake project ${SKBUILD_PROJECT_NAME} ${SKBUILD_PROJECT_VERSION}")
12-
134
project(
14-
${SKBUILD_PROJECT_NAME}
15-
VERSION ${SKBUILD_PROJECT_VERSION}
16-
LANGUAGES C CXX)
17-
18-
set(CMAKE_CXX_STANDARD
19-
20
20-
CACHE STRING "C++ standard")
21-
set(CMAKE_CXX_STANDARD_REQUIRED
22-
ON
23-
CACHE BOOL "C++ standard required")
24-
set(CMAKE_CXX_EXTENSIONS
25-
OFF
26-
CACHE BOOL "C++ extensions")
5+
cppcheck
6+
LANGUAGES CXX C
7+
HOMEPAGE_URL "https://github.com/msclock/cppcheck-wheel"
8+
DESCRIPTION "Package cppcheck as a python wheel.")
279

2810
# Project default module
2911
find_package(cmake-modules REQUIRED)
3012
include(cmake-modules/ProjectDefault)
3113

14+
# Project custom modules
15+
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake")
16+
3217
find_program(cppcheck NAMES "cppcheck" "cppcheck.exe")
3318
cmake_path(GET cppcheck PARENT_PATH cppcheck_dir)
3419
file(GLOB cppcheck_runtimes ${cppcheck_dir}/*)
3520
install(PROGRAMS ${cppcheck_runtimes}
36-
DESTINATION ${SKBUILD_PROJECT_NAME}/Cppcheck)
21+
DESTINATION ${CMAKE_PROJECT_NAME}/Cppcheck)
3722
install(DIRECTORY ${VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/share/Cppcheck
38-
DESTINATION ${SKBUILD_PROJECT_NAME})
23+
DESTINATION ${CMAKE_PROJECT_NAME})

cmake/ProjectOptions.cmake

Lines changed: 106 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,106 @@
1+
#[[
2+
ProjectOptions.cmake - Defines project-specific options for CMake.
3+
]]
4+
5+
set(CMAKE_CXX_STANDARD
6+
20
7+
CACHE STRING "C++ standard")
8+
set(CMAKE_CXX_STANDARD_REQUIRED
9+
ON
10+
CACHE BOOL "C++ standard required")
11+
set(CMAKE_CXX_EXTENSIONS
12+
OFF
13+
CACHE BOOL "C++ extensions")
14+
15+
# ##############################################################################
16+
# Sanitizer - cmake-modules/build/Sanitizer.cmake
17+
# ##############################################################################
18+
19+
set(USE_SANITIZER
20+
OFF
21+
CACHE BOOL "Enable sanitizer")
22+
23+
# ##############################################################################
24+
# Valgrind - cmake-modules/test/Valgrind.cmake
25+
# ##############################################################################
26+
27+
set(USE_VALGRIND
28+
OFF
29+
CACHE BOOL "Enable Valgrind")
30+
set(USE_VALGRIND_OPTIONS
31+
--leak-check=full # Each individual leak will be shown in detail.
32+
--show-leak-kinds=all # Show all of "definite, indirect, possible,
33+
# reachable" leak kinds in the "full" report.
34+
--gen-suppressions=all # gen suppress info automatically.
35+
--track-origins=yes # Favor useful output over speed. This tracks the
36+
# origins of uninitialized values, which could be very
37+
# useful for memory errors. Consider turning off if
38+
# Valgrind is unacceptably slow.
39+
CACHE STRING "valgrind options.")
40+
41+
# ##############################################################################
42+
# Clang-Tidy - cmake-modules/build/ClangTidy.cmake
43+
# ##############################################################################
44+
45+
set(USE_CLANGTIDY
46+
OFF
47+
CACHE BOOL "Enable Clang-Tidy")
48+
49+
# ##############################################################################
50+
# Cppcheck - cmake-modules/build/Cppcheck.cmake
51+
# ##############################################################################
52+
53+
set(USE_CPPCHECK
54+
OFF
55+
CACHE BOOL "Enable Cppcheck")
56+
set(USE_CPPCHECK_SUPPRESSION_FILE
57+
${CMAKE_SOURCE_DIR}/.cppcheck-suppressions.txt
58+
CACHE STRING
59+
"Customize the path to the Cppcheck suppressions file of the project")
60+
61+
# ##############################################################################
62+
# Hardening - cmake-modules/build/Hardening.cmake
63+
# ##############################################################################
64+
65+
# Comment `-Wl,-z,nodlopen` for dlopen call
66+
if(NOT MSVC)
67+
set(USE_HARDENING_FLAGS
68+
-D_GLIBCXX_ASSERTIONS # Enable assertions
69+
-U_FORTIFY_SOURCE # Disable stack protector
70+
-D_FORTIFY_SOURCE=3 # Enable stack protector
71+
-fstack-protector-strong # Enable stack protector
72+
-fcf-protection # Control Flow Guard
73+
-fstack-clash-protection # Control Flow Guard
74+
-Wimplicit-fallthrough # Enabled in compiler flags by default
75+
-fstrict-flex-arrays=3 # Enable strict array bounds
76+
-Wformat # Enabled in compiler flags by default
77+
-Wformat=2 # Enabled in compiler flags by default
78+
# -Wl,-z,nodlopen # Restrict dlopen(3) calls to shared objects
79+
-Wl,-z,noexecstack # Enable data execution prevention by marking stack
80+
# memory as non-executable
81+
-Wl,-z,relro # Mark relocation table entries resolved at load-time as
82+
# read-only
83+
-Wl,-z,now # Mark relocation table entries resolved at load-time as
84+
# read-only. It impacts startup performance
85+
"-fsanitize=undefined -fsanitize-minimal-runtime" # Enable minimal runtime
86+
# undefined behavior sanitizer
87+
-fno-delete-null-pointer-checks
88+
-fno-strict-overflow
89+
-fno-strict-aliasing
90+
-ftrivial-auto-var-init=zero
91+
-Wtrampolines # Enable trampolines(gcc only)
92+
-mbranch-protection=standard # Enable indirect branches(aarch64 only)
93+
CACHE STRING "Additional hardening compilation flags for GCC/Clang")
94+
95+
set(USE_HARDENING_LINKS
96+
-fstack-protector-strong # Enable stack protector
97+
"-fsanitize=undefined -fsanitize-minimal-runtime"
98+
# -Wl,-z,nodlopen # Restrict dlopen(3) calls to shared objects
99+
-Wl,-z,noexecstack # Enable data execution prevention by marking stack
100+
# memory as non-executable
101+
-Wl,-z,relro # Mark relocation table entries resolved at load-time as
102+
# read-only
103+
-Wl,-z,now # Mark relocation table entries resolved at load-time as
104+
# read-only. It impacts startup performance
105+
CACHE STRING "Additional hardening linking flags for GCC/Clang")
106+
endif()

cmake/presets/base.json

Lines changed: 43 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -5,63 +5,68 @@
55
"toolchains/vcpkg.json"
66
],
77
"configurePresets": [
8+
{
9+
"name": "base-common",
10+
"hidden":true,
11+
"binaryDir":"${sourceDir}/out/build/${presetName}",
12+
"installDir":"${sourceDir}/out/install/${presetName}",
13+
"cacheVariables":{
14+
"CMAKE_COMPILE_WARNING_AS_ERROR":false,
15+
"CMAKE_EXPORT_COMPILE_COMMANDS":true,
16+
"CMAKE_VERBOSE_MAKEFILE":"FALSE"
17+
}
18+
},
819
{
920
"name": "base",
1021
"hidden": true,
1122
"inherits": [
23+
"base-common",
1224
"ninja",
1325
"vcpkg"
1426
],
15-
"binaryDir": "${sourceDir}/out/build/${presetName}",
16-
"installDir": "${sourceDir}/out/install/${presetName}",
1727
"cacheVariables": {
18-
"CMAKE_EXPORT_COMPILE_COMMANDS": true,
19-
"CMAKE_COMPILE_WARNING_AS_ERROR": false,
20-
"CMAKE_BUILD_TYPE": "Debug",
21-
"CMAKE_VERBOSE_MAKEFILE": "FALSE"
28+
"CMAKE_BUILD_TYPE": "Debug"
2229
}
2330
},
2431
{
2532
"name": "base-config",
2633
"hidden": true,
2734
"inherits": [
35+
"base-common",
2836
"ninja-config",
2937
"vcpkg"
30-
],
31-
"binaryDir": "${sourceDir}/out/build/${presetName}",
32-
"installDir": "${sourceDir}/out/install/${presetName}",
33-
"cacheVariables": {
34-
"CMAKE_EXPORT_COMPILE_COMMANDS": true,
35-
"CMAKE_COMPILE_WARNING_AS_ERROR": false,
36-
"CMAKE_VERBOSE_MAKEFILE": "FALSE"
37-
}
38+
]
3839
}
3940
],
4041
"buildPresets": [
4142
{
4243
"name": "base",
4344
"hidden": true,
44-
"inherits": "ninja",
4545
"configurePreset": "base"
4646
},
47+
{
48+
"name": "base-config-debug",
49+
"hidden": true,
50+
"configurePreset": "base-config",
51+
"configuration": "Debug"
52+
},
4753
{
4854
"name": "base-config-relwithdebinfo",
4955
"hidden": true,
50-
"inherits": "ninja-config-relwithdebinfo",
51-
"configurePreset": "base-config"
56+
"configurePreset": "base-config",
57+
"configuration": "RelWithDebInfo"
5258
},
5359
{
54-
"name": "base-config-debug",
60+
"name": "base-config-release",
5561
"hidden": true,
56-
"inherits": "ninja-config-debug",
57-
"configurePreset": "base-config"
62+
"configurePreset": "base-config",
63+
"configuration": "Release"
5864
}
5965
],
6066
"testPresets": [
6167
{
6268
"name": "base",
6369
"hidden": true,
64-
"inherits": "ninja",
6570
"configurePreset": "base",
6671
"output": {
6772
"outputOnFailure": true
@@ -74,28 +79,29 @@
7479
{
7580
"name": "base-config-relwithdebinfo",
7681
"hidden": true,
77-
"inherits": "ninja-config-relwithdebinfo",
82+
"inherits": [
83+
"base"
84+
],
7885
"configurePreset": "base-config",
79-
"output": {
80-
"outputOnFailure": true
81-
},
82-
"execution": {
83-
"noTestsAction": "error",
84-
"stopOnFailure": true
85-
}
86+
"configuration": "RelWithDebInfo"
8687
},
8788
{
8889
"name": "base-config-debug",
8990
"hidden": true,
90-
"inherits": "ninja-config-debug",
91+
"inherits": [
92+
"base"
93+
],
9194
"configurePreset": "base-config",
92-
"output": {
93-
"outputOnFailure": true
94-
},
95-
"execution": {
96-
"noTestsAction": "error",
97-
"stopOnFailure": true
98-
}
95+
"configuration": "Debug"
96+
},
97+
{
98+
"name": "base-config-release",
99+
"hidden": true,
100+
"inherits": [
101+
"base"
102+
],
103+
"configurePreset": "base-config",
104+
"configuration": "Release"
99105
}
100106
]
101107
}

cmake/presets/default.json

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,11 @@
3232
"name": "default-config-debug",
3333
"inherits": "base-config-debug",
3434
"configurePreset": "default-config"
35+
},
36+
{
37+
"name": "default-config-release",
38+
"inherits": "base-config-release",
39+
"configurePreset": "default-config"
3540
}
3641
],
3742
"testPresets": [
@@ -49,6 +54,11 @@
4954
"name": "default-config-debug",
5055
"inherits": "base-config-debug",
5156
"configurePreset": "default-config"
57+
},
58+
{
59+
"name": "default-config-release",
60+
"inherits": "base-config-release",
61+
"configurePreset": "default-config"
5262
}
5363
]
5464
}

0 commit comments

Comments
 (0)