Skip to content

Commit

Permalink
Fix GLM_DISABLE_AUTO_DETECTION error with Werror on Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
christophe-lunarg committed Dec 20, 2023
1 parent 00b8206 commit 5652385
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -197,9 +197,11 @@ if(CMAKE_CXX_COMPILER_ID MATCHES "Clang")
message("GLM: Clang - ${CMAKE_CXX_COMPILER_ID} compiler")
endif()

add_compile_options(-Werror -Weverything)
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-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)
Expand All @@ -219,7 +221,9 @@ elseif(CMAKE_CXX_COMPILER_ID MATCHES "MSVC")
message("GLM: Visual C++ - ${CMAKE_CXX_COMPILER_ID} compiler")
endif()

add_compile_options(/W4 /WX)
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_definitions(-D_CRT_SECURE_NO_WARNINGS)
endif()
Expand Down

0 comments on commit 5652385

Please sign in to comment.