Skip to content

Commit

Permalink
remove support for clang 14 and older
Browse files Browse the repository at this point in the history
  • Loading branch information
malytomas committed Dec 7, 2023
1 parent e144d4b commit 6fc9549
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 64 deletions.
29 changes: 7 additions & 22 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:
strategy:
fail-fast: false
matrix:
os-version: [2019, 2022]
os-version: [2022]
build-config: [debug, release, relwithdebinfo]
build-arch: [Win32, x64]
build-tool: ["", "-T ClangCL"]
Expand Down Expand Up @@ -87,21 +87,6 @@ jobs:
cxx: g++-13,
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-14,
cxx: clang++-14,
install: clang-14
}
- {
cc: clang-15,
cxx: clang++-15,
Expand Down Expand Up @@ -173,8 +158,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:
Expand All @@ -197,7 +182,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: |
Expand Down Expand Up @@ -232,16 +217,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:
Expand Down
6 changes: 0 additions & 6 deletions sources/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
7 changes: 1 addition & 6 deletions sources/include/cage-core/core.h
Original file line number Diff line number Diff line change
Expand Up @@ -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__)
Expand Down
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
Expand Up @@ -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);
}
Expand All @@ -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);
}
}
Expand Down
7 changes: 0 additions & 7 deletions sources/tryCompileSourceLocation.cpp

This file was deleted.

0 comments on commit 6fc9549

Please sign in to comment.