diff --git a/CMakeLists.txt b/CMakeLists.txt index ed72031..78e0b6d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -11,15 +11,22 @@ add_subdirectory(vendors/enum.hpp) add_subdirectory(vendors/kari.hpp) add_library(${PROJECT_NAME} INTERFACE) +target_link_libraries(${PROJECT_NAME} INTERFACE enum.hpp kari.hpp) +target_compile_features(${PROJECT_NAME} INTERFACE cxx_std_17) +target_include_directories(${PROJECT_NAME} INTERFACE headers) -target_link_libraries(${PROJECT_NAME} - INTERFACE enum.hpp kari.hpp) - -target_compile_features(${PROJECT_NAME} - INTERFACE cxx_std_17) - -target_include_directories(${PROJECT_NAME} - INTERFACE headers) +target_compile_options(${PROJECT_NAME} + INTERFACE + $<$,$>: + -Wno-c++98-compat-pedantic + -Wno-covered-switch-default + -Wno-ctad-maybe-unsupported + -Wno-exit-time-destructors + -Wno-padded + -Wno-poison-system-directories + -Wno-shadow + -Wno-unknown-warning-option + -Wno-weak-vtables>) if(BUILD_AS_STANDALONE) option(BUILD_WITH_UNTESTS "Build with unit tests" ON) diff --git a/untests/CMakeLists.txt b/untests/CMakeLists.txt index 8e18fd3..1ce7207 100644 --- a/untests/CMakeLists.txt +++ b/untests/CMakeLists.txt @@ -29,9 +29,6 @@ target_compile_options(${PROJECT_NAME} -Werror -Wall -Wextra -Wpedantic> PRIVATE $<$,$>: - -Werror -Weverything -Wconversion -Wno-unknown-warning-option - -Wno-padded - -Wno-c++98-compat-pedantic - -Wno-shadow-field-in-constructor>) + -Werror -Weverything -Wconversion>) add_test(${PROJECT_NAME} ${PROJECT_NAME}) diff --git a/untests/features/types/ctor_type_tests.cpp b/untests/features/types/ctor_type_tests.cpp index 3fa34d9..61b8f53 100644 --- a/untests/features/types/ctor_type_tests.cpp +++ b/untests/features/types/ctor_type_tests.cpp @@ -18,9 +18,9 @@ namespace int x{}; int y{}; - ivec2() = default; - explicit ivec2(int v): x{v}, y{v} {} - ivec2(int x, int y): x{x}, y{y} {} + [[maybe_unused]] ivec2() = default; + [[maybe_unused]] explicit ivec2(int v): x{v}, y{v} {} + [[maybe_unused]] ivec2(int x, int y): x{x}, y{y} {} }; } diff --git a/untests/features/types/function_type_tests.cpp b/untests/features/types/function_type_tests.cpp index 7459767..b76a244 100644 --- a/untests/features/types/function_type_tests.cpp +++ b/untests/features/types/function_type_tests.cpp @@ -19,9 +19,9 @@ namespace int y{}; }; - void arg_copy(ivec2) {} - void arg_ref_noexcept(ivec2&) noexcept {} - void arg_cref_noexcept(const ivec2&) noexcept {} + [[maybe_unused]] void arg_copy(ivec2) {} + [[maybe_unused]] void arg_ref_noexcept(ivec2&) noexcept {} + [[maybe_unused]] void arg_cref_noexcept(const ivec2&) noexcept {} } TEST_CASE("features/types/function") { diff --git a/untests/features/types/method_type_tests.cpp b/untests/features/types/method_type_tests.cpp index 3a44321..952422e 100644 --- a/untests/features/types/method_type_tests.cpp +++ b/untests/features/types/method_type_tests.cpp @@ -18,7 +18,7 @@ namespace int x{}; int y{}; - int& at(std::size_t i) { + [[maybe_unused]] int& at(std::size_t i) { switch ( i ) { case 0: return x; case 1: return y; @@ -26,7 +26,7 @@ namespace } } - int length2() const noexcept { + [[maybe_unused]] int length2() const noexcept { return x * x + y * y; } }; diff --git a/vendors/enum.hpp b/vendors/enum.hpp index 0a549d3..ba3d7db 160000 --- a/vendors/enum.hpp +++ b/vendors/enum.hpp @@ -1 +1 @@ -Subproject commit 0a549d3341e8f6d9efd8e6cea343f2d3ab4e7633 +Subproject commit ba3d7db0ad3612358ffbbebdd9bc922e8c144189 diff --git a/vendors/kari.hpp b/vendors/kari.hpp index c52226f..c6f6a73 160000 --- a/vendors/kari.hpp +++ b/vendors/kari.hpp @@ -1 +1 @@ -Subproject commit c52226f8556a0a439389514143f336fe4979b480 +Subproject commit c6f6a73a4f7ed9d60677ae5376a218aea379be38