Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
remove support for clang 14 and older
Browse files Browse the repository at this point in the history
malytomas committed Dec 7, 2023

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
1 parent e144d4b commit 5537d1c
Showing 6 changed files with 16 additions and 62 deletions.
35 changes: 15 additions & 20 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -88,24 +88,19 @@ jobs:
install: gcc-13 g++-13
}
- {
cc: clang-12,
cxx: clang++-12,
install: clang-12
}
- {
cc: clang-13,
cxx: clang++-13,
install: clang-13
cc: clang-15,
cxx: clang++-15,
install: clang-15
}
- {
cc: clang-14,
cxx: clang++-14,
install: clang-14
cc: clang-16,
cxx: clang++-16,
install: clang-16
}
- {
cc: clang-15,
cxx: clang++-15,
install: clang-15
cc: clang-17,
cxx: clang++-17,
install: clang-17
}

steps:
@@ -173,8 +168,8 @@ jobs:
CFLAGS: ${{ matrix.sanitizer.flags }}
CXXFLAGS: ${{ matrix.sanitizer.flags }}
LDFLAGS: ${{ matrix.sanitizer.flags }}
CC: clang
CXX: clang++
CC: clang-15
CXX: clang++-15
strategy:
fail-fast: false
matrix:
@@ -197,7 +192,7 @@ jobs:
- name: Install packages
run: |
sudo apt-get update
sudo apt-get install -y xorg-dev nasm libssl-dev
sudo apt-get install -y xorg-dev nasm libssl-dev clang-15
- name: Versions
run: |
@@ -232,16 +227,16 @@ jobs:
needs: Ubuntu
runs-on: ubuntu-latest
env:
CC: clang
CXX: clang++
CC: clang-15
CXX: clang++-15
strategy:
fail-fast: false

steps:
- name: Install packages
run: |
sudo apt-get update
sudo apt-get install -y xorg-dev nasm libssl-dev
sudo apt-get install -y xorg-dev nasm libssl-dev clang-15
- uses: actions/checkout@v3
with:
6 changes: 0 additions & 6 deletions sources/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -63,12 +63,6 @@ endif()
if(MSVC)
set_source_files_properties(libcore/mesh/marchingCubes.cpp PROPERTIES COMPILE_FLAGS "/wd4244 /wd4267") # it includes file with weird extension which does not honor warnings disabled by pragma
endif()
try_compile(sourceLocationAvailable "${CMAKE_CURRENT_BINARY_DIR}/tryCompile" SOURCES "${CMAKE_CURRENT_LIST_DIR}/tryCompileSourceLocation.cpp" OUTPUT_VARIABLE sourceLocationMessages)
if(NOT sourceLocationAvailable)
target_compile_definitions(cage-core PUBLIC GCHL_DUMMY_SOURCE_LOCATION)
message(STATUS "source location not available:")
message(STATUS "${sourceLocationMessages}")
endif()
cage_target_api_macro(cage-core CAGE_CORE_API)
cage_ide_category(cage-core cage/libs)
cage_ide_sort_files(cage-core)
7 changes: 1 addition & 6 deletions sources/include/cage-core/core.h
Original file line number Diff line number Diff line change
@@ -4,15 +4,10 @@
#include <compare>
#include <cstdint>
#include <limits>
#include <source_location>
#include <type_traits>
#include <utility>

#ifdef GCHL_DUMMY_SOURCE_LOCATION
#include "sourceLocationDummy.h"
#else
#include <source_location>
#endif

#if defined(_MSC_VER)
#define CAGE_ASSUME_TRUE(EXPR) __assume((bool)(EXPR))
#elif defined(__clang__)
19 changes: 0 additions & 19 deletions sources/include/cage-core/sourceLocationDummy.h

This file was deleted.

4 changes: 0 additions & 4 deletions sources/test-core/exceptions.cpp
Original file line number Diff line number Diff line change
@@ -67,11 +67,9 @@ void testExceptions()
}
catch (const Exception &e)
{
#ifndef GCHL_DUMMY_SOURCE_LOCATION
CAGE_TEST(std::strcmp(e.location.file_name(), __FILE__) == 0);
CAGE_TEST(e.location.line() == 66); // marked line number
CAGE_TEST(isPattern(String(e.location.function_name()), "", "testExceptions", ""));
#endif
CAGE_TEST(std::strcmp(e.message, "intentional") == 0);
CAGE_TEST(e.severity == SeverityEnum::Error);
}
@@ -92,11 +90,9 @@ void testExceptions()
}
catch (const Exception &e)
{
#ifndef GCHL_DUMMY_SOURCE_LOCATION
CAGE_TEST(std::strcmp(e.location.file_name(), __FILE__) == 0);
CAGE_TEST(e.location.line() == 17); // marked line number
CAGE_TEST(isPattern(String(e.location.function_name()), "", "assertFailureFunction", ""));
#endif
CAGE_TEST(e.severity == SeverityEnum::Critical);
}
}
7 changes: 0 additions & 7 deletions sources/tryCompileSourceLocation.cpp

This file was deleted.

0 comments on commit 5537d1c

Please sign in to comment.