From 1b6278f7c3e65374b6ebaba0fb56e8f559b8d072 Mon Sep 17 00:00:00 2001 From: Christophe Date: Thu, 4 Jan 2024 13:42:56 +0100 Subject: [PATCH] Remove disabled warnings --- glm/gtc/packing.inl | 16 ++++++++-------- test/CMakeLists.txt | 9 ++++++--- test/core/core_setup_message.cpp | 33 ++++++++++++++++---------------- 3 files changed, 31 insertions(+), 27 deletions(-) diff --git a/glm/gtc/packing.inl b/glm/gtc/packing.inl index 84ad60c70f..3f0c63a7b5 100644 --- a/glm/gtc/packing.inl +++ b/glm/gtc/packing.inl @@ -181,7 +181,7 @@ namespace detail union u3u3u2 { - struct + struct Data { uint x : 3; uint y : 3; @@ -192,7 +192,7 @@ namespace detail union u4u4 { - struct + struct Data { uint x : 4; uint y : 4; @@ -202,7 +202,7 @@ namespace detail union u4u4u4u4 { - struct + struct Data { uint x : 4; uint y : 4; @@ -214,7 +214,7 @@ namespace detail union u5u6u5 { - struct + struct Data { uint x : 5; uint y : 6; @@ -225,7 +225,7 @@ namespace detail union u5u5u5u1 { - struct + struct Data { uint x : 5; uint y : 5; @@ -237,7 +237,7 @@ namespace detail union u10u10u10u2 { - struct + struct Data { uint x : 10; uint y : 10; @@ -249,7 +249,7 @@ namespace detail union i10i10i10i2 { - struct + struct Data { int x : 10; int y : 10; @@ -261,7 +261,7 @@ namespace detail union u9u9u9e5 { - struct + struct Data { uint x : 9; uint y : 9; diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index 20834019eb..0624008cf9 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -199,14 +199,17 @@ if(CMAKE_CXX_COMPILER_ID MATCHES "Clang") if(NOT GLM_DISABLE_AUTO_DETECTION) add_compile_options(-Werror -Weverything) endif() - add_compile_options(-Wno-c++98-compat -Wno-c++98-compat-pedantic -Wno-c++11-long-long -Wno-padded -Wno-gnu-anonymous-struct -Wno-nested-anon-types) - add_compile_options(-Wno-undefined-reinterpret-cast -Wno-sign-conversion -Wno-unused-variable -Wno-missing-prototypes -Wno-unreachable-code -Wno-missing-variable-declarations -Wno-sign-compare -Wno-global-constructors -Wno-unused-macros -Wno-format-nonliteral -Wno-float-equal) +# add_compile_options(-Wno-c++98-compat -Wno-c++98-compat-pedantic -Wno-c++11-long-long -Wno-padded -Wno-gnu-anonymous-struct -Wno-nested-anon-types) +# add_compile_options(-Wno-undefined-reinterpret-cast -Wno-sign-conversion -Wno-unused-variable -Wno-missing-prototypes -Wno-unreachable-code -Wno-missing-variable-declarations -Wno-sign-compare -Wno-global-constructors -Wno-unused-macros -Wno-format-nonliteral -Wno-float-equal) elseif(CMAKE_CXX_COMPILER_ID MATCHES "GNU") if(NOT GLM_QUIET) message("GLM: GCC - ${CMAKE_CXX_COMPILER_ID} compiler") endif() + if(NOT GLM_DISABLE_AUTO_DETECTION) + add_compile_options(-Werror) + endif() add_compile_options(-O2) add_compile_options(-Wno-long-long) @@ -223,7 +226,7 @@ elseif(CMAKE_CXX_COMPILER_ID MATCHES "MSVC") if(NOT GLM_DISABLE_AUTO_DETECTION) add_compile_options(/W4 /WX) endif() - add_compile_options(/wd4309 /wd4324 /wd4389 /wd4127 /wd4267 /wd4146 /wd4201 /wd4464 /wd4514 /wd4701 /wd4820 /wd4365) +# add_compile_options(/wd4309 /wd4324 /wd4389 /wd4127 /wd4267 /wd4146 /wd4201 /wd4464 /wd4514 /wd4701 /wd4820 /wd4365) add_definitions(-D_CRT_SECURE_NO_WARNINGS) endif() diff --git a/test/core/core_setup_message.cpp b/test/core/core_setup_message.cpp index eef33cbc1c..671e76d244 100644 --- a/test/core/core_setup_message.cpp +++ b/test/core/core_setup_message.cpp @@ -6,7 +6,7 @@ int test_compiler() { int Error(0); - if(GLM_COMPILER & GLM_COMPILER_VC) +# if(GLM_COMPILER & GLM_COMPILER_VC) { switch(GLM_COMPILER) { @@ -49,7 +49,7 @@ int test_compiler() break; } } - else if(GLM_COMPILER & GLM_COMPILER_GCC) +# elif(GLM_COMPILER & GLM_COMPILER_GCC) { switch(GLM_COMPILER) { @@ -101,11 +101,11 @@ int test_compiler() break; } } - else if(GLM_COMPILER & GLM_COMPILER_CUDA) +# elif(GLM_COMPILER & GLM_COMPILER_CUDA) { std::printf("CUDA\n"); } - else if(GLM_COMPILER & GLM_COMPILER_CLANG) +# elif(GLM_COMPILER & GLM_COMPILER_CLANG) { switch(GLM_COMPILER) { @@ -180,7 +180,7 @@ int test_compiler() break; } } - else if(GLM_COMPILER & GLM_COMPILER_INTEL) +# elif(GLM_COMPILER & GLM_COMPILER_INTEL) { switch(GLM_COMPILER) { @@ -211,12 +211,12 @@ int test_compiler() break; } } - else +#else { std::printf("Undetected compiler\n"); Error += 1; } - +#endif return Error; } @@ -240,24 +240,25 @@ int test_instruction_set() std::printf("GLM_ARCH: "); - if(GLM_ARCH & GLM_ARCH_ARM_BIT) +# if(GLM_ARCH & GLM_ARCH_ARM_BIT) std::printf("ARM "); - if(GLM_ARCH & GLM_ARCH_NEON_BIT) +# elif(GLM_ARCH & GLM_ARCH_NEON_BIT) std::printf("NEON "); - if(GLM_ARCH & GLM_ARCH_AVX2_BIT) +# elif(GLM_ARCH & GLM_ARCH_AVX2_BIT) std::printf("AVX2 "); - if(GLM_ARCH & GLM_ARCH_AVX_BIT) +# elif(GLM_ARCH & GLM_ARCH_AVX_BIT) std::printf("AVX "); - if(GLM_ARCH & GLM_ARCH_SSE42_BIT) +# elif(GLM_ARCH & GLM_ARCH_SSE42_BIT) std::printf("SSE4.2 "); - if(GLM_ARCH & GLM_ARCH_SSE41_BIT) +# elif(GLM_ARCH & GLM_ARCH_SSE41_BIT) std::printf("SSE4.1 "); - if(GLM_ARCH & GLM_ARCH_SSSE3_BIT) +# elif(GLM_ARCH & GLM_ARCH_SSSE3_BIT) std::printf("SSSE3 "); - if(GLM_ARCH & GLM_ARCH_SSE3_BIT) +# elif(GLM_ARCH & GLM_ARCH_SSE3_BIT) std::printf("SSE3 "); - if(GLM_ARCH & GLM_ARCH_SSE2_BIT) +# elif(GLM_ARCH & GLM_ARCH_SSE2_BIT) std::printf("SSE2 "); +# endif std::printf("\n");