mirror of
https://github.com/BlackMATov/kari.hpp.git
synced 2025-12-13 13:06:17 +07:00
fix some warnings
This commit is contained in:
@@ -11,6 +11,15 @@ add_library(${PROJECT_NAME} INTERFACE)
|
||||
target_include_directories(${PROJECT_NAME} INTERFACE headers)
|
||||
target_compile_features(${PROJECT_NAME} INTERFACE cxx_std_17)
|
||||
|
||||
target_compile_options(${PROJECT_NAME}
|
||||
INTERFACE
|
||||
$<$<OR:$<CXX_COMPILER_ID:Clang>,$<CXX_COMPILER_ID:AppleClang>>:
|
||||
-Wno-c++98-compat-pedantic
|
||||
-Wno-ctad-maybe-unsupported
|
||||
-Wno-padded
|
||||
-Wno-poison-system-directories
|
||||
-Wno-unknown-warning-option>)
|
||||
|
||||
if(BUILD_AS_STANDALONE)
|
||||
option(BUILD_WITH_UNTESTS "Build with unit tests" ON)
|
||||
if(BUILD_WITH_UNTESTS)
|
||||
|
||||
@@ -23,9 +23,12 @@ target_link_libraries(${PROJECT_NAME} kari.hpp)
|
||||
target_compile_options(${PROJECT_NAME}
|
||||
PRIVATE
|
||||
$<$<CXX_COMPILER_ID:MSVC>:
|
||||
/W4>
|
||||
/WX /W4>
|
||||
PRIVATE
|
||||
$<$<OR:$<CXX_COMPILER_ID:GNU>,$<CXX_COMPILER_ID:Clang>,$<CXX_COMPILER_ID:AppleClang>>:
|
||||
-Wall -Wextra -Wpedantic>)
|
||||
$<$<CXX_COMPILER_ID:GNU>:
|
||||
-Werror -Wall -Wextra -Wpedantic>
|
||||
PRIVATE
|
||||
$<$<OR:$<CXX_COMPILER_ID:Clang>,$<CXX_COMPILER_ID:AppleClang>>:
|
||||
-Werror -Weverything -Wconversion>)
|
||||
|
||||
add_test(${PROJECT_NAME} ${PROJECT_NAME})
|
||||
|
||||
@@ -4,8 +4,8 @@
|
||||
|
||||
#define STATIC_REQUIRE(...)\
|
||||
static_assert(__VA_ARGS__, #__VA_ARGS__);\
|
||||
REQUIRE(__VA_ARGS__);
|
||||
REQUIRE(__VA_ARGS__)
|
||||
|
||||
#define STATIC_REQUIRE_FALSE(...)\
|
||||
static_assert(!(__VA_ARGS__), "!(" #__VA_ARGS__ ")");\
|
||||
REQUIRE(!(__VA_ARGS__));
|
||||
REQUIRE(!(__VA_ARGS__))
|
||||
|
||||
@@ -13,7 +13,7 @@ using namespace kari_hpp::ext;
|
||||
TEST_CASE("kari_ext") {
|
||||
struct box final {
|
||||
int v;
|
||||
constexpr box(int v): v(v) {}
|
||||
constexpr box(int nv): v(nv) {}
|
||||
};
|
||||
|
||||
SUBCASE("fid") {
|
||||
|
||||
@@ -471,7 +471,7 @@ TEST_CASE("kari") {
|
||||
: v_(v) {}
|
||||
|
||||
box(box&&) = default;
|
||||
box& operator=(box&&) = default;
|
||||
box& operator=(box&&) = delete;
|
||||
|
||||
box(const box&) = delete;
|
||||
box& operator=(const box&) = delete;
|
||||
|
||||
Reference in New Issue
Block a user