Skip to content

Commit

Permalink
Merge pull request g-truc#1 from hunter-packages/pr.hunter.v.0.9.8
Browse files Browse the repository at this point in the history
v.0.9.8
  • Loading branch information
headupinclouds authored Jun 5, 2017
2 parents d80b487 + db3b948 commit 26a2271
Show file tree
Hide file tree
Showing 805 changed files with 68,161 additions and 74,476 deletions.
34 changes: 34 additions & 0 deletions .appveyor.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
clone_folder: c:\dev\glm-cmake

os:
- Visual Studio 2013

platform:
- x86
- x86_64

build_script:
- md build_pure_11
- cd build_pure_11
- cmake -DCMAKE_CXX_COMPILER=$COMPILER -DGLM_TEST_ENABLE=ON -DGLM_TEST_ENABLE_LANG_EXTENSIONS=ON -DGLM_TEST_FORCE_PURE=ON ..
- cmake --build . --config Debug
- cmake --build . --config Release
- cd ..
- md build_simd_11
- cd build_simd_11
- cmake -DCMAKE_CXX_COMPILER=$COMPILER -DGLM_TEST_ENABLE=ON -DGLM_TEST_ENABLE_LANG_EXTENSIONS=ON ..
- cmake --build . --config Debug
- cmake --build . --config Release
- cd ..
- md build_pure_98
- cd build_pure_98
- cmake -DCMAKE_CXX_COMPILER=$COMPILER -DGLM_TEST_ENABLE=ON -DGLM_TEST_ENABLE_CXX_98=ON -DGLM_TEST_FORCE_PURE=ON ..
- cmake --build . --config Debug
- cmake --build . --config Release
- cd ..
- md build_simd_98
- cd build_simd_98
- cmake -DCMAKE_CXX_COMPILER=$COMPILER -DGLM_TEST_ENABLE=ON -DGLM_TEST_ENABLE_CXX_98=ON ..
- cmake --build . --config Debug
- cmake --build . --config Release
- cd ..
9 changes: 8 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@
# CMake
CMakeCache.txt
CMakeFiles
Makefile
cmake_install.cmake
install_manifest.txt
*.cmake
Expand All @@ -43,5 +42,13 @@ Testing/*
test/gtc/*.dds

# Project Files
Makefile
*.cbp
*.user

# Misc.
*.log

# local build(s)
build*

84 changes: 84 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
language: cpp

os:
- linux
- osx

matrix:
include:
- compiler: gcc
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- g++-4.9
env: COMPILER=g++-4.9
- compiler: clang
addons:
apt:
sources:
- ubuntu-toolchain-r-test
- llvm-toolchain-precise-3.8
packages:
- clang-3.8
env: COMPILER=clang++-3.8

compiler:
- clang

before_script:

script:
- mkdir ./build_pure_11
- cd ./build_pure_11
- cmake -DCMAKE_CXX_COMPILER=$COMPILER -DCMAKE_BUILD_TYPE=Release -DGLM_TEST_ENABLE=ON -DGLM_TEST_ENABLE_CXX_11=ON -DGLM_TEST_FORCE_PURE=ON ..
- cmake --build .
- ctest
- cd ..
- mkdir ./build_pure_98
- cd ./build_pure_98
- cmake -DCMAKE_CXX_COMPILER=$COMPILER -DCMAKE_BUILD_TYPE=Release -DGLM_TEST_ENABLE=ON -DGLM_TEST_ENABLE_CXX_98=ON -DGLM_TEST_FORCE_PURE=ON ..
- cmake --build .
- ctest
- cd ..
- mkdir ./build_pure_11_debug
- cd ./build_pure_11_debug
- cmake -DCMAKE_CXX_COMPILER=$COMPILER -DCMAKE_BUILD_TYPE=Debug -DGLM_TEST_ENABLE=ON -DGLM_TEST_ENABLE_CXX_11=ON -DGLM_TEST_FORCE_PURE=ON ..
- cmake --build .
- ctest
- cd ..
- mkdir ./build_pure_98_debug
- cd ./build_pure_98_debug
- cmake -DCMAKE_CXX_COMPILER=$COMPILER -DCMAKE_BUILD_TYPE=Debug -DGLM_TEST_ENABLE=ON -DGLM_TEST_ENABLE_CXX_98=ON -DGLM_TEST_FORCE_PURE=ON ..
- cmake --build .
- ctest
- cd ..
- mkdir ./build_simd_11
- cd ./build_simd_11
- if [[ $TRAVIS_OS_NAME == 'osx' ]]; then cmake -DCMAKE_CXX_COMPILER=$COMPILER -DCMAKE_BUILD_TYPE=Release -DGLM_TEST_ENABLE=ON -DGLM_TEST_ENABLE_CXX_11=ON -DGLM_TEST_ENABLE_SIMD_SSE3=ON ..; else cmake -DCMAKE_CXX_COMPILER=$COMPILER -DCMAKE_BUILD_TYPE=Release -DGLM_TEST_ENABLE=ON -DGLM_TEST_ENABLE_CXX_11=ON -DGLM_TEST_ENABLE_SIMD_AVX=ON ..; fi
- cmake --build .
- ctest
- cd ..
- mkdir ./build_simd_98
- cd ./build_simd_98
- if [[ $TRAVIS_OS_NAME == 'osx' ]]; then cmake -DCMAKE_CXX_COMPILER=$COMPILER -DCMAKE_BUILD_TYPE=Release -DGLM_TEST_ENABLE=ON -DGLM_TEST_ENABLE_CXX_98=ON -DGLM_TEST_ENABLE_SIMD_SSE3=ON ..; else cmake -DCMAKE_CXX_COMPILER=$COMPILER -DCMAKE_BUILD_TYPE=Release -DGLM_TEST_ENABLE=ON -DGLM_TEST_ENABLE_CXX_98=ON -DGLM_TEST_ENABLE_SIMD_AVX=ON ..; fi
- cmake --build .
- ctest
- cd ..
- mkdir ./build_simd_11_debug
- cd ./build_simd_11_debug
- if [[ $TRAVIS_OS_NAME == 'osx' ]]; then cmake -DCMAKE_CXX_COMPILER=$COMPILER -DCMAKE_BUILD_TYPE=Debug -DGLM_TEST_ENABLE=ON -DGLM_TEST_ENABLE_CXX_11=ON -DGLM_TEST_ENABLE_SIMD_SSE3=ON ..; else cmake -DCMAKE_CXX_COMPILER=$COMPILER -DCMAKE_BUILD_TYPE=Debug -DGLM_TEST_ENABLE=ON -DGLM_TEST_ENABLE_CXX_11=ON -DGLM_TEST_ENABLE_SIMD_AVX=ON ..; fi
- cmake --build .
- ctest
- cd ..
- mkdir ./build_simd_98_debug
- cd ./build_simd_98_debug
- if [[ $TRAVIS_OS_NAME == 'osx' ]]; then cmake -DCMAKE_CXX_COMPILER=$COMPILER -DCMAKE_BUILD_TYPE=Debug -DGLM_TEST_ENABLE=ON -DGLM_TEST_ENABLE_CXX_98=ON -DGLM_TEST_ENABLE_SIMD_SSE3=ON ..; else cmake -DCMAKE_CXX_COMPILER=$COMPILER -DCMAKE_BUILD_TYPE=Debug -DGLM_TEST_ENABLE=ON -DGLM_TEST_ENABLE_CXX_98=ON -DGLM_TEST_ENABLE_SIMD_AVX=ON ..; fi
- cmake --build .
- ctest
- cd ..




82 changes: 46 additions & 36 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ if (NOT CMAKE_VERSION VERSION_LESS "3.1")
endif()

project(glm)
set(GLM_VERSION "0.9.7")
set(GLM_VERSION "0.9.8")

list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake")

Expand All @@ -16,11 +16,23 @@ enable_testing()

add_definitions(-D_CRT_SECURE_NO_WARNINGS)

option(GLM_STATIC_LIBRARY_ENABLE "GLM static library" OFF)
if(GLM_STATIC_LIBRARY_ENABLE)
message(STATUS "GLM is a header only library, no need to build it. Set the option GLM_STATIC_LIBRARY_ENABLE with ON to build an optional static library")
endif()

option(GLM_DYNAMIC_LIBRARY_ENABLE "GLM static library" OFF)
if(GLM_DYNAMIC_LIBRARY_ENABLE)
message(STATUS "GLM is a header only library, no need to build it. Set the option GLM_DYNAMIC_LIBRARY_ENABLE with ON to build an optional dynamic library")
endif()

option(GLM_TEST_ENABLE "GLM test" OFF)
if(NOT GLM_TEST_ENABLE)
message(STATUS "GLM is a header only library, no need to build it. Set the option GLM_TEST_ENABLE with ON to build and run the test bench")
endif()

option(GLM_TEST_ENABLE_FAST_MATH "Enable fast math optimizations" OFF)

if(("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang") OR ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU") OR (("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Intel") AND UNIX))
option(GLM_TEST_ENABLE_CXX_98 "Enable C++ 98" OFF)
option(GLM_TEST_ENABLE_CXX_0X "Enable C++ 0x" OFF)
Expand Down Expand Up @@ -54,20 +66,26 @@ if(("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang") OR ("${CMAKE_CXX_COMPILER_ID}"
set(CMAKE_XCODE_ATTRIBUTE_CLANG_CXX_LIBRARY "libc++")
set(CMAKE_CXX_FLAGS "-std=c++98")
if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
# GLM is using GCC 64 bits integer extension
add_definitions(-Wno-long-long)
elseif("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
add_definitions(-Wno-c++11-long-long)
endif()
endif()
endif()

option(GLM_TEST_ENABLE_MS_EXTENSIONS "Enable MS extensions" OFF)
option(GLM_TEST_ENABLE_LANG_EXTENSIONS "Enable language extensions" OFF)

if(GLM_TEST_ENABLE_LANG_EXTENSIONS)
if(GLM_TEST_ENABLE_FAST_MATH)
if(CMAKE_COMPILER_IS_GNUCXX)
add_definitions(-ffast-math)
endif()

if(GLM_TEST_ENABLE_MS_EXTENSIONS)
if(("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang") OR ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU"))
add_definitions(-Wgnu-anonymous-struct)
add_definitions(-Wnested-anon-types)
if(MSVC)
add_definitions(/fp:fast)
endif()
elseif(NOT GLM_TEST_ENABLE_FAST_MATH)
if(MSVC)
add_definitions(/fp:precise)
endif()
endif()
else()
if(("${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC") OR (("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Intel") AND WIN32))
Expand All @@ -89,55 +107,43 @@ if(GLM_TEST_FORCE_PURE)
if(CMAKE_COMPILER_IS_GNUCXX)
add_definitions(-mfpmath=387)
endif()
message(STATUS "GLM: No SIMD instruction set")
elseif(GLM_TEST_ENABLE_SIMD_AVX2)
if(CMAKE_COMPILER_IS_GNUCXX)
if(CMAKE_COMPILER_IS_GNUCXX OR ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang"))
add_definitions(-mavx2)
elseif(GLM_USE_INTEL)
add_definitions(/QxAVX2)
elseif(MSVC)
add_definitions(/arch:AVX2)
endif()
message(STATUS "GLM: AVX2 instruction set")
elseif(GLM_TEST_ENABLE_SIMD_AVX)
if(CMAKE_COMPILER_IS_GNUCXX)
if(CMAKE_COMPILER_IS_GNUCXX OR ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang"))
add_definitions(-mavx)
elseif(GLM_USE_INTEL)
add_definitions(/QxAVX)
elseif(MSVC)
add_definitions(/arch:AVX)
endif()
message(STATUS "GLM: AVX instruction set")
elseif(GLM_TEST_ENABLE_SIMD_SSE3)
if(CMAKE_COMPILER_IS_GNUCXX)
if(CMAKE_COMPILER_IS_GNUCXX OR ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang"))
add_definitions(-msse3)
elseif(GLM_USE_INTEL)
add_definitions(/QxSSE3)
elseif(MSVC)
add_definitions(/arch:SSE2) # VC doesn't support /arch:SSE3
elseif(MSVC AND NOT CMAKE_CL_64)
add_definitions(/arch:SSE2) # VC doesn't support /arch:SSE3
endif()
message(STATUS "GLM: SSE3 instruction set")
elseif(GLM_TEST_ENABLE_SIMD_SSE2)
if(CMAKE_COMPILER_IS_GNUCXX)
if(CMAKE_COMPILER_IS_GNUCXX OR ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang"))
add_definitions(-msse2)
elseif(GLM_USE_INTEL)
add_definitions(/QxSSE2)
elseif(MSVC)
if(NOT CMAKE_CL_64)
add_definitions(/arch:SSE2)
endif()
endif()
endif()

option(GLM_TEST_ENABLE_FAST_MATH "Enable fast math optimizations" OFF)
if(GLM_TEST_ENABLE_FAST_MATH)
if(CMAKE_COMPILER_IS_GNUCXX)
add_definitions(-ffast-math)
endif()

if(MSVC)
add_definitions(/fp:fast)
endif()
elseif(NOT GLM_TEST_ENABLE_FAST_MATH)
if(MSVC)
add_definitions(/fp:precise)
elseif(MSVC AND NOT CMAKE_CL_64)
add_definitions(/arch:SSE2)
endif()
message(STATUS "GLM: SSE2 instruction set")
endif()

if(CMAKE_COMPILER_IS_GNUCXX)
Expand All @@ -149,6 +155,10 @@ if(CMAKE_COMPILER_IS_GNUCXX)
#ctest_enable_coverage()
endif()

if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC")
add_definitions(/FAs)
endif()

include_directories("${PROJECT_SOURCE_DIR}")
include_directories("${PROJECT_SOURCE_DIR}/test/external")

Expand All @@ -159,7 +169,7 @@ set(GLM_INSTALL_CONFIGDIR "${CMAKE_INSTALL_LIBDIR}/cmake/glm")
install(DIRECTORY glm DESTINATION ${CMAKE_INSTALL_INCLUDEDIR})

write_basic_package_version_file(
"${CMAKE_CURRENT_BINARY_DIR}/glmVersion.cmake"
"${CMAKE_CURRENT_BINARY_DIR}/glmConfigVersion.cmake"
VERSION ${GLM_VERSION}
COMPATIBILITY AnyNewerVersion
)
Expand All @@ -183,7 +193,7 @@ configure_package_config_file(
install(
FILES
"${CMAKE_CURRENT_BINARY_DIR}/${GLM_INSTALL_CONFIGDIR}/glmConfig.cmake"
"${CMAKE_CURRENT_BINARY_DIR}/glmVersion.cmake"
"${CMAKE_CURRENT_BINARY_DIR}/glmConfigVersion.cmake"
DESTINATION ${GLM_INSTALL_CONFIGDIR}
)

Expand Down
13 changes: 0 additions & 13 deletions CTestConfig.cmake

This file was deleted.

2 changes: 1 addition & 1 deletion cmake/CMakePackageConfigHelpers.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@
# own custom ConfigVersion.cmake file instead of using this macro.
#
# Internally, this macro executes configure_file() to create the resulting
# version file. Depending on the COMPATIBLITY, either the file
# version file. Depending on the COMPATIBILITY, either the file
# BasicConfigVersion-SameMajorVersion.cmake.in or BasicConfigVersion-AnyNewerVersion.cmake.in
# is used. Please note that these two files are internal to CMake and you should
# not call configure_file() on them yourself, but they can be used as starting
Expand Down
4 changes: 2 additions & 2 deletions copying.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ a) The Happy Bunny License, or b) the MIT License.
================================================================================
The Happy Bunny License (Modified MIT License)
--------------------------------------------------------------------------------
Copyright (c) 2005 - 2015 G-Truc Creation
Copyright (c) 2005 - 2016 G-Truc Creation

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand All @@ -33,7 +33,7 @@ THE SOFTWARE.
================================================================================
The MIT License
--------------------------------------------------------------------------------
Copyright (c) 2005 - 2015 G-Truc Creation
Copyright (c) 2005 - 2016 G-Truc Creation

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
13 changes: 3 additions & 10 deletions doc/api/a00001.html

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

Loading

0 comments on commit 26a2271

Please sign in to comment.