Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update glm to v0.9.9.8 #15

Merged
merged 12 commits into from
May 3, 2023
2 changes: 1 addition & 1 deletion .azure-pipelines/azure-pipelines-osx.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 6 additions & 2 deletions .azure-pipelines/azure-pipelines-win.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion .ci_support/linux_64_.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ channel_targets:
cxx_compiler:
- gxx
cxx_compiler_version:
- '10'
- '12'
docker_image:
- quay.io/condaforge/linux-anvil-cos7-x86_64
target_platform:
Expand Down
2 changes: 1 addition & 1 deletion .ci_support/osx_64_.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ channel_targets:
cxx_compiler:
- clangxx
cxx_compiler_version:
- '13'
- '15'
macos_machine:
- x86_64-apple-darwin13.4.0
target_platform:
Expand Down
2 changes: 1 addition & 1 deletion .ci_support/osx_arm64_.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ channel_targets:
cxx_compiler:
- clangxx
cxx_compiler_version:
- '13'
- '15'
macos_machine:
- arm64-apple-darwin20.0.0
target_platform:
Expand Down
2 changes: 1 addition & 1 deletion .ci_support/win_64_.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ channel_sources:
channel_targets:
- conda-forge main
cxx_compiler:
- vs2017
- vs2019
target_platform:
- win-64
vc:
Expand Down
2 changes: 1 addition & 1 deletion .circleci/config.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion .github/CODEOWNERS

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion .scripts/run_osx_build.sh

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

17 changes: 9 additions & 8 deletions README.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion recipe/bld.bat
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,5 @@ if errorlevel 1 exit 1
cmake --build . --config Release --target install
if errorlevel 1 exit 1

ctest
ctest --output-on-failure
if errorlevel 1 exit 1
3 changes: 2 additions & 1 deletion recipe/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,6 @@ cmake ${CMAKE_ARGS} \
make install

if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" != "1" || "${CROSSCOMPILING_EMULATOR}" != "" ]]; then
ctest
# test-core_func_integer is a known test failure on GCC 11
ctest --output-on-failure -E "test-core_func_integer"
fi
8 changes: 5 additions & 3 deletions recipe/meta.yaml
Original file line number Diff line number Diff line change
@@ -1,18 +1,19 @@
{% set name = "GLM" %}
{% set version = "0.9.9.4" %}
{% set version = "0.9.9.8" %}

package:
name: {{ name|lower }}
version: {{ version }}

source:
url: https://github.com/g-truc/glm/releases/download/{{ version }}/glm-{{ version }}.zip
sha256: 972b8c319ff1b96eeac19c63563176f138527ebf6fa5110b8eac5fe23f5e7d9f
sha256: 37e2a3d62ea3322e43593c34bae29f57e3e251ea89f4067506c94043769ade4c
patches:
- patches/macos_test_errors.patch
- patches/cmake_install_target.patch

build:
number: 2
number: 0
skip: true # [win and vc<14]

requirements:
Expand All @@ -37,3 +38,4 @@ about:
extra:
recipe-maintainers:
- mcs07
- traversaro
73 changes: 73 additions & 0 deletions recipe/patches/cmake_install_target.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1,15 +1,40 @@
-cmake_minimum_required(VERSION 3.2 FATAL_ERROR)
+cmake_minimum_required(VERSION 3.20 FATAL_ERROR)
cmake_policy(VERSION 3.2)

-set(GLM_VERSION "0.9.9")
+file(READ "glm/detail/setup.hpp" GLM_SETUP_FILE)
+string(REGEX MATCH "#define[ ]+GLM_VERSION_MAJOR[ ]+([0-9]+)" _ ${GLM_SETUP_FILE})
+set(GLM_VERSION_MAJOR "${CMAKE_MATCH_1}")
+string(REGEX MATCH "#define[ ]+GLM_VERSION_MINOR[ ]+([0-9]+)" _ ${GLM_SETUP_FILE})
+set(GLM_VERSION_MINOR "${CMAKE_MATCH_1}")
+string(REGEX MATCH "#define[ ]+GLM_VERSION_PATCH[ ]+([0-9]+)" _ ${GLM_SETUP_FILE})
+set(GLM_VERSION_PATCH "${CMAKE_MATCH_1}")
+string(REGEX MATCH "#define[ ]+GLM_VERSION_REVISION[ ]+([0-9]+)" _ ${GLM_SETUP_FILE})
+set(GLM_VERSION_REVISION "${CMAKE_MATCH_1}")
+
+set(GLM_VERSION ${GLM_VERSION_MAJOR}.${GLM_VERSION_MINOR}.${GLM_VERSION_PATCH}.${GLM_VERSION_REVISION})
project(glm VERSION ${GLM_VERSION} LANGUAGES CXX)
enable_testing()

+include(GNUInstallDirs)
+
add_subdirectory(glm)
add_library(glm::glm ALIAS glm)

if(${CMAKE_SOURCE_DIR} STREQUAL ${CMAKE_CURRENT_SOURCE_DIR})

+install(DIRECTORY glm DESTINATION ${CMAKE_INSTALL_INCLUDEDIR} PATTERN "CMakeLists.txt" EXCLUDE)
+install(EXPORT glm FILE glmConfig.cmake DESTINATION ${CMAKE_INSTALL_DATADIR}/cmake/glm NAMESPACE glm::)
+include(CMakePackageConfigHelpers)
+write_basic_package_version_file("glmConfigVersion.cmake" COMPATIBILITY AnyNewerVersion ARCH_INDEPENDENT)
+install(FILES ${CMAKE_CURRENT_BINARY_DIR}/glmConfigVersion.cmake DESTINATION ${CMAKE_INSTALL_DATADIR}/cmake/glm)
+
+cmake_path(APPEND PKGCONFIG_INCLUDEDIR "\${prefix}" "${CMAKE_INSTALL_INCLUDEDIR}")
+configure_file("cmake/glm.pc.in" "glm.pc" @ONLY)
+install(
+ FILES "${CMAKE_CURRENT_BINARY_DIR}/glm.pc"
+ DESTINATION "${CMAKE_INSTALL_DATADIR}/pkgconfig"
+)
+
add_subdirectory(test)

endif(${CMAKE_SOURCE_DIR} STREQUAL ${CMAKE_CURRENT_SOURCE_DIR})
--- /dev/null
+++ b/cmake/glm.pc.in
@@ -0,0 +1,8 @@
+prefix=@CMAKE_INSTALL_PREFIX@
+includedir=@PKGCONFIG_INCLUDEDIR@
+
+Name: GLM
+Description: OpenGL Mathematics
+URL: https://glm.g-truc.net
+Version: @GLM_VERSION@
+Cflags: -I${includedir}
--- a/glm/CMakeLists.txt
+++ b/glm/CMakeLists.txt
@@ -43,7 +43,13 @@ source_group("SIMD Files" FILES ${SIMD_I
source_group("SIMD Files" FILES ${SIMD_HEADER})

add_library(glm INTERFACE)
-target_include_directories(glm INTERFACE ../)
+
+target_include_directories(glm INTERFACE
+ $<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}>
+ $<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>
+)
+
+install(TARGETS glm EXPORT glm)

if(BUILD_STATIC_LIBS)
add_library(glm_static STATIC ${ROOT_TEXT} ${ROOT_MD} ${ROOT_NAT}
27 changes: 8 additions & 19 deletions recipe/patches/macos_test_errors.patch
Original file line number Diff line number Diff line change
@@ -1,24 +1,13 @@
From 3211722dd24bd3a1e10addb8e6df8522b73dd7f5 Mon Sep 17 00:00:00 2001
From: Liam Wang <[email protected]>
Date: Wed, 29 Jun 2022 21:01:58 -0400
Subject: [PATCH] Disable warnings as errors

---
CMakeLists.txt | 1 +
1 file changed, 1 insertion(+)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 10bb1af..2d31596 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -211,6 +211,7 @@ if(CMAKE_CXX_COMPILER_ID MATCHES "Clang")
diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt
index e7f85f19f..e67a448f2 100644
--- a/test/CMakeLists.txt
+++ b/test/CMakeLists.txt
@@ -197,7 +197,7 @@ if(CMAKE_CXX_COMPILER_ID MATCHES "Clang")
message("GLM: Clang - ${CMAKE_CXX_COMPILER_ID} compiler")
endif()

add_compile_options(-Werror -Weverything)
+ add_compile_options(-Wno-error=implicit-int-conversion -Wno-error=implicit-int-float-conversion -Wno-error=unused-but-set-variable)
- add_compile_options(-Werror -Weverything)
+ #add_compile_options(-Werror -Weverything)
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)

--
2.32.1 (Apple Git-133)