Skip to content

Commit

Permalink
fix benchmark compilation, switch to clang-18
Browse files Browse the repository at this point in the history
  • Loading branch information
felixguendling committed Sep 10, 2024
1 parent 5c5fe08 commit 26a6933
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 8 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
run: |
find exe include src test \
-type f -a \( -name "*.cc" -o -name "*.h" -o -name ".cuh" -o -name ".cu" \) \
-print0 | xargs -0 clang-format-17 -i
-print0 | xargs -0 clang-format-18 -i
- name: Check for differences
run: |
Expand Down
6 changes: 3 additions & 3 deletions .pkg.lock
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
16761676331022936617
961121617423244719
cista bcabd041ddf07baf1b544bbe46ef195c2b6d22bd
zlib d1c943390ba4f97aa2f50bedc629b6d29027fa0e
boost 60cae66449fa3c9599b2b7d3d5d44c65301ed3a3
conf f9bf4bd83bf55a2170725707e526cbacc45dcc66
expat 636c9861e8e7c119f3626d1e6c260603ab624516
fmt edb385ac526c24bc917ec4a41bb0edb28f0ca59e
doctest 70e8f76437b76dd5e9c0a2eb9b907df190ab71a0
geo 10fde5b467825c059881c93aeea00412338a9b06
googletest 34a46558609e05865c197f0260ab36daa7cbbb6e
utl 77aac494c45d2b070e65fe712abc34ac74a91d0f
geo 66b34885c7e96e29ddb78a84ae3ab43302ed94e4
libosmium 6e6d6b3081cc8bdf25dda89730e25c36eb995516
mimalloc 0087f000848de31b0090cb6f282348bd2fd3a9b8
libressl 390253a44ceef00eb620c38606588414326e9f23
Expand All @@ -22,7 +23,6 @@ miniz 1edbdece9d71dc65c6ff405572ee37cbdcef7af4
res 7d97784ba785ce8a2677ea77164040fde484fb04
pbf-sdf-fonts 91b369e4eb8a618e0a83b0c04b1b08632ea872c4
sol2 fdb0f8a60e48aa737f0a8d73edede48627f0c984
utl 80df7a6f1e2de4d290c48e9218d48eb9792b7289
variant 5aa73631dc969087c77433a5cdef246303051f69
tiles 64f297ea0f782d04c89e82c6d478a1dd453e5f70
unordered_dense c11595a7743d20622637584bddf77243d72ae152
Expand Down
1 change: 1 addition & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
-Wno-duplicate-enum
-Wno-ctad-maybe-unsupported
-Wno-unknown-pragmas
-Wno-switch-default
-Werror)
elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "AppleClang")
set(osr-compile-options -Wall -Wextra -Werror -Wno-unknown-pragmas)
Expand Down
8 changes: 4 additions & 4 deletions CMakePresets.json
Original file line number Diff line number Diff line change
Expand Up @@ -103,8 +103,8 @@
"binaryDir": "${sourceDir}/build/sanitizer",
"cacheVariables": {
"CMAKE_BUILD_TYPE": "Debug",
"CMAKE_C_COMPILER": "clang-17",
"CMAKE_CXX_COMPILER": "clang++-17",
"CMAKE_C_COMPILER": "clang-18",
"CMAKE_CXX_COMPILER": "clang++-18",
"CMAKE_C_FLAGS": "-fsanitize=address,undefined -fno-omit-frame-pointer",
"CMAKE_CXX_FLAGS": "-stdlib=libc++ -fsanitize=address,undefined -fno-omit-frame-pointer",
"CMAKE_EXE_LINKER_FLAGS": "-lc++abi -fuse-ld=/opt/mold/ld"
Expand Down Expand Up @@ -150,8 +150,8 @@
"generator": "Ninja",
"binaryDir": "${sourceDir}/build/clang-tidy",
"cacheVariables": {
"CMAKE_C_COMPILER": "clang-17",
"CMAKE_CXX_COMPILER": "clang++-17",
"CMAKE_C_COMPILER": "clang-18",
"CMAKE_CXX_COMPILER": "clang++-18",
"CMAKE_CXX_FLAGS": "-stdlib=libc++",
"CMAKE_EXE_LINKER_FLAGS": "-lc++abi",
"CMAKE_BUILD_TYPE": "Release",
Expand Down
1 change: 1 addition & 0 deletions exe/benchmark.cc
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
#include "utl/timer.h"

#include "osr/lookup.h"
#include "osr/routing/dijkstra.h"
#include "osr/routing/profiles/car.h"
#include "osr/routing/route.h"
#include "osr/ways.h"
Expand Down
1 change: 1 addition & 0 deletions src/lookup.cc
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ void lookup::insert(way_idx_t const way) {
auto const min = b.min_.lnglat();
auto const max = b.max_.lnglat();
rtree_insert(rtree_, min.data(), max.data(),
// NOLINTNEXTLINE(performance-no-int-to-ptr)
reinterpret_cast<void*>(static_cast<std::size_t>(to_idx(way))));
}

Expand Down

0 comments on commit 26a6933

Please sign in to comment.