Skip to content

Commit

Permalink
clang-tidy crash
Browse files Browse the repository at this point in the history
  • Loading branch information
F0bes committed Mar 31, 2024
1 parent ad25023 commit 84ab0cb
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/branch-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
steps:
- name: Install Dependencies
run: |
sudo apt update && sudo apt install -y gcc-12 g++-12 make ragel lemon cmake
sudo apt update && sudo apt install -y gcc-12 g++-12 make ragel lemon cmake clang-tidy llvm clang
- name: Checkout Repository
uses: actions/checkout@v3
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/master-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
custom_release_rules: release:major

- name: Install Dependencies
run: sudo apt update && sudo apt install -y gcc-12 g++-12 build-essential ragel lemon cmake
run: sudo apt update && sudo apt install -y gcc-12 g++-12 build-essential ragel lemon cmake clang-tidy

- name: Checkout Repository
uses: actions/checkout@v3
Expand Down
10 changes: 7 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,14 @@ cmake_minimum_required(VERSION 3.12)

project(gifscript CXX)

set(CMAKE_CXX_STANDARD 23)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_SOURCE_DIR})

# Using CMAKE_CXX_STANDARD doesn't work for GCC...
if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
set(CPP_23_ARG "-std=c++2b")
elseif(CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
set(CPP_23_ARG "-std=c++23")
endif()

find_package(RAGEL REQUIRED)

Expand Down Expand Up @@ -70,7 +74,7 @@ else()
)
string(CONCAT GIT_VERSION "\"" ${GIT_VERSION} "\"")
message("git version: ${GIT_VERSION}")
target_compile_options(gifscript PRIVATE -DGIT_VERSION=${GIT_VERSION} -std=c++23 -Wall -Werror -Wno-unused-const-variable)
target_compile_options(gifscript PRIVATE -DGIT_VERSION=${GIT_VERSION} -Wall -Werror -Wno-unused-const-variable ${CPP_23_ARG})
endif()

target_include_directories(gifscript PRIVATE ${CMAKE_SOURCE_DIR})
Expand Down

0 comments on commit 84ab0cb

Please sign in to comment.