Skip to content

Commit

Permalink
Remove disabled warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
christophe-lunarg committed Jan 4, 2024
1 parent da9a21d commit 1b6278f
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 27 deletions.
16 changes: 8 additions & 8 deletions glm/gtc/packing.inl
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ namespace detail

union u3u3u2
{
struct
struct Data
{
uint x : 3;
uint y : 3;
Expand All @@ -192,7 +192,7 @@ namespace detail

union u4u4
{
struct
struct Data
{
uint x : 4;
uint y : 4;
Expand All @@ -202,7 +202,7 @@ namespace detail

union u4u4u4u4
{
struct
struct Data
{
uint x : 4;
uint y : 4;
Expand All @@ -214,7 +214,7 @@ namespace detail

union u5u6u5
{
struct
struct Data
{
uint x : 5;
uint y : 6;
Expand All @@ -225,7 +225,7 @@ namespace detail

union u5u5u5u1
{
struct
struct Data
{
uint x : 5;
uint y : 5;
Expand All @@ -237,7 +237,7 @@ namespace detail

union u10u10u10u2
{
struct
struct Data
{
uint x : 10;
uint y : 10;
Expand All @@ -249,7 +249,7 @@ namespace detail

union i10i10i10i2
{
struct
struct Data
{
int x : 10;
int y : 10;
Expand All @@ -261,7 +261,7 @@ namespace detail

union u9u9u9e5
{
struct
struct Data
{
uint x : 9;
uint y : 9;
Expand Down
9 changes: 6 additions & 3 deletions test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand All @@ -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()

Expand Down
33 changes: 17 additions & 16 deletions test/core/core_setup_message.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
Expand Down Expand Up @@ -49,7 +49,7 @@ int test_compiler()
break;
}
}
else if(GLM_COMPILER & GLM_COMPILER_GCC)
# elif(GLM_COMPILER & GLM_COMPILER_GCC)
{
switch(GLM_COMPILER)
{
Expand Down Expand Up @@ -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)
{
Expand Down Expand Up @@ -180,7 +180,7 @@ int test_compiler()
break;
}
}
else if(GLM_COMPILER & GLM_COMPILER_INTEL)
# elif(GLM_COMPILER & GLM_COMPILER_INTEL)
{
switch(GLM_COMPILER)
{
Expand Down Expand Up @@ -211,12 +211,12 @@ int test_compiler()
break;
}
}
else
#else
{
std::printf("Undetected compiler\n");
Error += 1;
}
#endif
return Error;
}

Expand All @@ -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");

Expand Down

0 comments on commit 1b6278f

Please sign in to comment.