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
4 changes: 4 additions & 0 deletions .clang-format
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# ---
# We'll use defaults from the LLVM style
# BasedOnStyle: LLVM
# IndentWidth: 2
---
Language: Cpp
AccessModifierOffset: -2
Expand Down
5 changes: 3 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ repos:
- id: check-yaml
- id: check-added-large-files

# TODO: keep this version, do not update!
# Clang-format for C++
# This brings in a portable version of clang-format.
# See also: https://github.com/ssciwr/clang-format-wheel
Expand All @@ -20,15 +21,15 @@ repos:

# CMake linting and formatting
- repo: https://github.com/BlankSpruce/gersemi
rev: 0.15.1
rev: 0.17.1
hooks:
- id: gersemi
name: CMake linting

# Markdown linting
# Config file: .markdownlint.yaml
- repo: https://github.com/igorshubovych/markdownlint-cli
rev: v0.41.0
rev: v0.43.0
hooks:
- id: markdownlint
exclude: ^papers/
2 changes: 1 addition & 1 deletion CMakePresets.json
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@
{
"name": "clang-16",
"inherits": "common",
"configurePreset": "clang-16"
"configurePreset": "clang-16",
"targets": [
"all_verify_interface_header_sets",
"all"
Expand Down
22 changes: 16 additions & 6 deletions etc/clang-flags.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,22 @@ set(CMAKE_CXX_FLAGS_TSAN
"C++ TSAN Flags"
FORCE
)
set(CMAKE_CXX_FLAGS_ASAN
"-O3 -g -DNDEBUG -fsanitize=address,undefined,leak"
CACHE STRING
"C++ ASAN Flags"
FORCE
)
if(APPLE)
set(CMAKE_CXX_FLAGS_ASAN
"-O3 -g -DNDEBUG -fsanitize=address,undefined"
CACHE STRING
"C++ ASAN Flags"
FORCE
)
else()
set(CMAKE_CXX_FLAGS_ASAN
"-O3 -g -DNDEBUG -fsanitize=address,undefined,leak"
CACHE STRING
"C++ ASAN Flags"
FORCE
)
endif()

set(CMAKE_CXX_FLAGS_GCOV
"-O0 -fno-inline -g --coverage"
CACHE STRING
Expand Down
21 changes: 15 additions & 6 deletions etc/gcc-flags.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,21 @@ set(CMAKE_CXX_FLAGS_TSAN
"C++ TSAN Flags"
FORCE
)
set(CMAKE_CXX_FLAGS_ASAN
"-O3 -g -DNDEBUG -fsanitize=address,undefined,leak"
CACHE STRING
"C++ ASAN Flags"
FORCE
)
if(APPLE)
set(CMAKE_CXX_FLAGS_ASAN
"-O3 -g -DNDEBUG -fsanitize=address,undefined"
CACHE STRING
"C++ ASAN Flags"
FORCE
)
else()
set(CMAKE_CXX_FLAGS_ASAN
"-O3 -g -DNDEBUG -fsanitize=address,undefined,leak"
CACHE STRING
"C++ ASAN Flags"
FORCE
)
endif()

set(CMAKE_CXX_FLAGS_GCOV
"-O0 -fno-inline -g --coverage -fprofile-abs-path"
Expand Down
Loading