diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 6e6878ce..2a1bf11e 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -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"] @@ -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, @@ -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: @@ -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: | @@ -232,8 +217,8 @@ jobs: needs: Ubuntu runs-on: ubuntu-latest env: - CC: clang - CXX: clang++ + CC: clang-15 + CXX: clang++-15 strategy: fail-fast: false @@ -241,7 +226,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 - uses: actions/checkout@v3 with: diff --git a/sources/CMakeLists.txt b/sources/CMakeLists.txt index ae09e140..a6446cf3 100644 --- a/sources/CMakeLists.txt +++ b/sources/CMakeLists.txt @@ -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) diff --git a/sources/include/cage-core/core.h b/sources/include/cage-core/core.h index a7bd7cd2..ea2ed2e5 100644 --- a/sources/include/cage-core/core.h +++ b/sources/include/cage-core/core.h @@ -4,15 +4,10 @@ #include #include #include +#include #include #include -#ifdef GCHL_DUMMY_SOURCE_LOCATION - #include "sourceLocationDummy.h" -#else - #include -#endif - #if defined(_MSC_VER) #define CAGE_ASSUME_TRUE(EXPR) __assume((bool)(EXPR)) #elif defined(__clang__) diff --git a/sources/include/cage-core/sourceLocationDummy.h b/sources/include/cage-core/sourceLocationDummy.h deleted file mode 100644 index f5089934..00000000 --- a/sources/include/cage-core/sourceLocationDummy.h +++ /dev/null @@ -1,19 +0,0 @@ -#ifndef guard_source_location_dummy_dfrg4sd5g -#define guard_source_location_dummy_dfrg4sd5g - -#include - -namespace std -{ - struct source_location - { - static constexpr source_location current() noexcept { return {}; } - constexpr source_location() noexcept {} - constexpr std::uint32_t line() const noexcept { return 0; } - constexpr std::uint32_t column() const noexcept { return 0; } - constexpr const char *file_name() const noexcept { return ""; } - constexpr const char *function_name() const noexcept { return ""; } - }; -} - -#endif // guard_source_location_dummy_dfrg4sd5g diff --git a/sources/test-core/exceptions.cpp b/sources/test-core/exceptions.cpp index f2090bcf..a7aa9d0e 100644 --- a/sources/test-core/exceptions.cpp +++ b/sources/test-core/exceptions.cpp @@ -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); } } diff --git a/sources/tryCompileSourceLocation.cpp b/sources/tryCompileSourceLocation.cpp deleted file mode 100644 index 06fd4ba0..00000000 --- a/sources/tryCompileSourceLocation.cpp +++ /dev/null @@ -1,7 +0,0 @@ -#include -#include - -void foo(const std::source_location &src = std::source_location::current()); - -int main() -{}