mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-12-28 19:25:27 +08:00
[glm] no werror (#36658)
This commit is contained in:
parent
f56c8174eb
commit
b283d1db6f
119
ports/glm/disable-werror.patch
Normal file
119
ports/glm/disable-werror.patch
Normal file
@ -0,0 +1,119 @@
|
||||
From 7b53739128fe99b170011ab8c2733b7f56d93116 Mon Sep 17 00:00:00 2001
|
||||
From: Christophe <christophe@lunarg.com>
|
||||
Date: Tue, 6 Feb 2024 16:06:52 +0100
|
||||
Subject: [PATCH] Only enable compiler warnings and warnings as error on unit
|
||||
tests
|
||||
|
||||
---
|
||||
CMakeLists.txt | 43 -------------------------------------------
|
||||
readme.md | 3 +++
|
||||
test/CMakeLists.txt | 41 +++++++++++++++++++++++++++++++++++++++++
|
||||
3 files changed, 44 insertions(+), 43 deletions(-)
|
||||
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index 217b76bf3..034177220 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -244,49 +244,6 @@ elseif(GLM_ENABLE_SIMD_SSE2)
|
||||
message(STATUS "GLM: SSE2 instruction set")
|
||||
endif()
|
||||
|
||||
-# Compiler and default options
|
||||
-
|
||||
-if(CMAKE_CXX_COMPILER_ID MATCHES "Clang")
|
||||
- if(NOT GLM_QUIET)
|
||||
- message("GLM: Clang - ${CMAKE_CXX_COMPILER_ID} compiler")
|
||||
- endif()
|
||||
-
|
||||
- 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)
|
||||
-
|
||||
-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)
|
||||
-# add_compile_options(-Wpedantic)
|
||||
-# add_compile_options(-Wall)
|
||||
-# add_compile_options(-Wextra)
|
||||
- endif()
|
||||
- add_compile_options(-O2)
|
||||
- #add_compile_options(-Wno-long-long)
|
||||
-elseif(CMAKE_CXX_COMPILER_ID MATCHES "Intel")
|
||||
- if(NOT GLM_QUIET)
|
||||
- message("GLM: Intel - ${CMAKE_CXX_COMPILER_ID} compiler")
|
||||
- endif()
|
||||
-
|
||||
-elseif(CMAKE_CXX_COMPILER_ID MATCHES "MSVC")
|
||||
- if(NOT GLM_QUIET)
|
||||
- message("GLM: Visual C++ - ${CMAKE_CXX_COMPILER_ID} compiler")
|
||||
- endif()
|
||||
-
|
||||
- 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()
|
||||
-
|
||||
add_subdirectory(glm)
|
||||
|
||||
if (GLM_BUILD_TESTS)
|
||||
|
||||
diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt
|
||||
index abfa33451..9272c591d 100644
|
||||
--- a/test/CMakeLists.txt
|
||||
+++ b/test/CMakeLists.txt
|
||||
@@ -3,6 +3,47 @@ option(GLM_QUIET "No CMake Message" OFF)
|
||||
option(GLM_TEST_ENABLE "Build unit tests" ON)
|
||||
option(GLM_PERF_TEST_ENABLE "Build perf tests" OFF)
|
||||
|
||||
+# Compiler and default options
|
||||
+
|
||||
+if(CMAKE_CXX_COMPILER_ID MATCHES "Clang")
|
||||
+ if(NOT GLM_QUIET)
|
||||
+ message("GLM: Clang - ${CMAKE_CXX_COMPILER_ID} compiler")
|
||||
+ endif()
|
||||
+
|
||||
+ if(NOT GLM_DISABLE_AUTO_DETECTION)
|
||||
+ add_compile_options(-Werror -Weverything)
|
||||
+ endif()
|
||||
+
|
||||
+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)
|
||||
+# add_compile_options(-Wpedantic)
|
||||
+# add_compile_options(-Wall)
|
||||
+# add_compile_options(-Wextra)
|
||||
+ endif()
|
||||
+ add_compile_options(-O2)
|
||||
+ #add_compile_options(-Wno-long-long)
|
||||
+elseif(CMAKE_CXX_COMPILER_ID MATCHES "Intel")
|
||||
+ if(NOT GLM_QUIET)
|
||||
+ message("GLM: Intel - ${CMAKE_CXX_COMPILER_ID} compiler")
|
||||
+ endif()
|
||||
+
|
||||
+elseif(CMAKE_CXX_COMPILER_ID MATCHES "MSVC")
|
||||
+ if(NOT GLM_QUIET)
|
||||
+ message("GLM: Visual C++ - ${CMAKE_CXX_COMPILER_ID} compiler")
|
||||
+ endif()
|
||||
+
|
||||
+ 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()
|
||||
+
|
||||
function(glmCreateTestGTC NAME)
|
||||
set(SAMPLE_NAME test-${NAME})
|
||||
add_executable(${SAMPLE_NAME} ${NAME}.cpp)
|
@ -6,6 +6,8 @@ vcpkg_from_github(
|
||||
REF "${VERSION}"
|
||||
SHA512 62e22002a6369a54e1f0ee2885a65f2780af7d2a446573e5387b81518f5dc7e8076053837cb99ae850a0166ce8b0f077bed009e8986d9884d01c456ce467553f
|
||||
HEAD_REF master
|
||||
PATCHES
|
||||
"disable-werror.patch" # https://github.com/g-truc/glm/commit/7b53739128fe99b170011ab8c2733b7f56d93116
|
||||
)
|
||||
|
||||
vcpkg_cmake_configure(
|
||||
|
@ -1,6 +1,7 @@
|
||||
{
|
||||
"name": "glm",
|
||||
"version": "1.0.0",
|
||||
"port-version": 1,
|
||||
"description": "OpenGL Mathematics (GLM)",
|
||||
"homepage": "https://glm.g-truc.net",
|
||||
"license": "MIT",
|
||||
|
@ -3038,7 +3038,7 @@
|
||||
},
|
||||
"glm": {
|
||||
"baseline": "1.0.0",
|
||||
"port-version": 0
|
||||
"port-version": 1
|
||||
},
|
||||
"globjects": {
|
||||
"baseline": "1.1.0",
|
||||
|
@ -1,5 +1,10 @@
|
||||
{
|
||||
"versions": [
|
||||
{
|
||||
"git-tree": "1a0115a7d1f3c29d3ebfa85ed25914d077dbc6a3",
|
||||
"version": "1.0.0",
|
||||
"port-version": 1
|
||||
},
|
||||
{
|
||||
"git-tree": "ed558e712eafccb124025c665c39f21998c71438",
|
||||
"version": "1.0.0",
|
||||
|
Loading…
x
Reference in New Issue
Block a user