Skip to content

Commit 624090a

Browse files
authored
Merge pull request #1339 from g-truc/rebase-1.0.2
Fixed master branch C.I.
2 parents 6dddbfb + af69cb1 commit 624090a

File tree

11 files changed

+93
-21
lines changed

11 files changed

+93
-21
lines changed

.github/workflows/ci.yml

Lines changed: 63 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@ name: ci
22
run-name: ${{ github.actor }} is testing out GitHub Actions 🚀
33

44
on:
5+
pull_request:
6+
branches:
7+
- main
58
push:
69
workflow_dispatch:
710

@@ -68,7 +71,7 @@ jobs:
6871
6972
- name: Run with GLM_ENABLE_SIMD_SSE2
7073
run: |
71-
cmake -S. -B ./build_sse2_std -T ${{matrix.toolkit}} -DGLM_BUILD_TESTS=ON -DGLM_FORCE_PURE=ON -DGLM_ENABLE_CXX_${{matrix.std}}=ON
74+
cmake -S. -B ./build_sse2_std -T ${{matrix.toolkit}} -DGLM_BUILD_TESTS=ON -DGLM_ENABLE_SIMD_SSE2=ON -DGLM_ENABLE_CXX_${{matrix.std}}=ON
7275
cmake --build ./build_sse2_std --config ${{matrix.config}}
7376
ctest --verbose -C ${{matrix.config}} --test-dir ./build_sse2_std
7477
@@ -113,6 +116,8 @@ jobs:
113116
exclude:
114117
- os: ubuntu-20.04
115118
std: 20
119+
- os: ubuntu-latest
120+
std: 98
116121

117122
steps:
118123
- run: echo "🎉 The job was automatically triggered by a ${{ github.event_name }} event."
@@ -147,7 +152,7 @@ jobs:
147152
148153
- name: Run with GLM_ENABLE_SIMD_SSE2
149154
run: |
150-
cmake -S. -B ./build_sse2_std -DGLM_BUILD_TESTS=ON -DGLM_FORCE_PURE=ON -DGLM_ENABLE_CXX_${{matrix.std}}=ON
155+
cmake -S. -B ./build_sse2_std -DGLM_BUILD_TESTS=ON -DGLM_ENABLE_SIMD_SSE2=ON -DGLM_ENABLE_CXX_${{matrix.std}}=ON
151156
cmake --build ./build_sse2_std --config ${{matrix.config}}
152157
ctest --verbose -C ${{matrix.config}} --test-dir ./build_sse2_std
153158
- name: Run with GLM_ENABLE_SIMD_SSE2 and language extensions
@@ -178,17 +183,14 @@ jobs:
178183
cmake --build ./build_avx2_ext --config ${{matrix.config}}
179184
ctest --verbose -C ${{matrix.config}} --test-dir ./build_avx2_ext
180185
181-
macos:
186+
macos-13:
182187
runs-on: ${{ matrix.os }}
183188
strategy:
184189
fail-fast: false
185190
matrix:
186-
os: [macos-latest, macos-11]
191+
os: [macos-13]
187192
std: [98, 11, 14, 17, 20]
188193
config: [Debug, Release]
189-
exclude:
190-
- os: macos-11
191-
std: 20
192194

193195
steps:
194196
- run: echo "🎉 The job was automatically triggered by a ${{ github.event_name }} event."
@@ -223,7 +225,7 @@ jobs:
223225
224226
- name: Run with GLM_ENABLE_SIMD_SSE2
225227
run: |
226-
cmake -S. -B ./build_sse2_std -DGLM_BUILD_TESTS=ON -DGLM_FORCE_PURE=ON -DGLM_ENABLE_CXX_${{matrix.std}}=ON
228+
cmake -S. -B ./build_sse2_std -DGLM_BUILD_TESTS=ON -DGLM_ENABLE_SIMD_SSE2=ON -DGLM_ENABLE_CXX_${{matrix.std}}=ON
227229
cmake --build ./build_sse2_std --config ${{matrix.config}}
228230
ctest --verbose -C ${{matrix.config}} --test-dir ./build_sse2_std
229231
- name: Run with GLM_ENABLE_SIMD_SSE2 and language extensions
@@ -242,4 +244,56 @@ jobs:
242244
cmake -S. -B ./build_avx1_ext -DGLM_BUILD_TESTS=ON -DGLM_ENABLE_SIMD_AVX=ON -DGLM_ENABLE_CXX_${{matrix.std}}=ON -DGLM_ENABLE_LANG_EXTENSIONS=ON
243245
cmake --build ./build_avx1_ext --config ${{matrix.config}}
244246
ctest --verbose -C ${{matrix.config}} --test-dir ./build_avx1_ext
245-
247+
248+
macos-latest:
249+
runs-on: ${{ matrix.os }}
250+
strategy:
251+
fail-fast: false
252+
matrix:
253+
os: [macos-latest]
254+
std: [98, 11, 14, 17, 20]
255+
config: [Debug, Release]
256+
257+
steps:
258+
- run: echo "🎉 The job was automatically triggered by a ${{ github.event_name }} event."
259+
- run: echo "🐧 This job is now running on a ${{ runner.os }} server hosted by GitHub!"
260+
- run: echo "🔎 The name of your branch is ${{ github.ref }} and your repository is ${{ github.repository }}."
261+
- name: Check out repository code
262+
uses: actions/checkout@v4
263+
- run: echo "💡 The ${{ github.repository }} repository has been cloned to the runner."
264+
- run: echo "🖥️ The workflow is now ready to test your code on the runner."
265+
- name: List files in the repository
266+
run: |
267+
ls ${{ github.workspace }}
268+
- run: echo "🍏 This job's status is ${{ job.status }}."
269+
- name: CMake Version
270+
run: cmake --version
271+
- name: Run with automagic detection
272+
run: |
273+
cmake -S. -B ./build_auto -DGLM_BUILD_TESTS=ON
274+
cmake --build ./build_auto --config ${{matrix.config}}
275+
ctest --verbose -C ${{matrix.config}} --test-dir ./build_auto
276+
277+
- name: Run with GLM_FORCE_PURE
278+
run: |
279+
cmake -S. -B ./build_pure_std -DGLM_BUILD_TESTS=ON -DGLM_FORCE_PURE=ON -DGLM_ENABLE_CXX_${{matrix.std}}=ON
280+
cmake --build ./build_pure_std --config ${{matrix.config}}
281+
ctest --verbose -C ${{matrix.config}} --test-dir ./build_pure_std
282+
- name: Run with GLM_FORCE_PURE and language extensions
283+
run: |
284+
cmake -S. -B ./build_pure_ext -DGLM_BUILD_TESTS=ON -DGLM_FORCE_PURE=ON -DGLM_ENABLE_CXX_${{matrix.std}}=ON -DGLM_ENABLE_LANG_EXTENSIONS=ON
285+
cmake --build ./build_pure_ext --config ${{matrix.config}}
286+
ctest --verbose -C ${{matrix.config}} --test-dir ./build_pure_ext
287+
288+
- name: Run with GLM_ENABLE_SIMD_NEON
289+
run: |
290+
cmake -S. -B ./build_neon_std -DGLM_BUILD_TESTS=ON -DGLM_ENABLE_SIMD_NEON=ON -DGLM_ENABLE_CXX_${{matrix.std}}=ON
291+
cmake --build ./build_neon_std --config ${{matrix.config}}
292+
ctest --verbose -C ${{matrix.config}} --test-dir ./build_neon_std
293+
- name: Run with GLM_ENABLE_SIMD_NEON and language extensions
294+
run: |
295+
cmake -S. -B ./build_neon_ext -DGLM_BUILD_TESTS=ON -DGLM_ENABLE_SIMD_NEON=ON -DGLM_ENABLE_CXX_${{matrix.std}}=ON -DGLM_ENABLE_LANG_EXTENSIONS=ON
296+
cmake --build ./build_neon_ext --config ${{matrix.config}}
297+
ctest --verbose -C ${{matrix.config}} --test-dir ./build_neon_ext
298+
299+

CMakeLists.txt

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ option(GLM_ENABLE_SIMD_SSE4_1 "Enable SSE 4.1 optimizations" OFF)
150150
option(GLM_ENABLE_SIMD_SSE4_2 "Enable SSE 4.2 optimizations" OFF)
151151
option(GLM_ENABLE_SIMD_AVX "Enable AVX optimizations" OFF)
152152
option(GLM_ENABLE_SIMD_AVX2 "Enable AVX2 optimizations" OFF)
153-
option(GLM_TEST_ENABLE_SIMD_NEON "Enable ARM NEON optimizations" OFF)
153+
option(GLM_ENABLE_SIMD_NEON "Enable ARM NEON optimizations" OFF)
154154
option(GLM_FORCE_PURE "Force 'pure' instructions" OFF)
155155

156156
if(GLM_FORCE_PURE)
@@ -244,8 +244,9 @@ elseif(GLM_ENABLE_SIMD_SSE2)
244244
add_compile_options(/arch:SSE2)
245245
endif()
246246
message(STATUS "GLM: SSE2 instruction set")
247-
elseif(GLM_TEST_ENABLE_SIMD_NEON)
248-
add_definitions(-DGLM_FORCE_NEON)
247+
elseif(GLM_ENABLE_SIMD_NEON)
248+
add_definitions(-DGLM_FORCE_INTRINSICS)
249+
249250
message(STATUS "GLM: ARM NEON instruction set")
250251
endif()
251252

glm/detail/func_common_simd.inl

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -572,8 +572,10 @@ namespace glm {
572572
template<length_t L, qualifier Q>
573573
struct compute_splat<L, float, Q, true> {
574574
template<int c>
575-
GLM_FUNC_QUALIFIER GLM_CONSTEXPR static vec<L, float, Q> call(vec<L, float, Q> const&)
576-
{}
575+
GLM_FUNC_QUALIFIER GLM_CONSTEXPR static vec<L, float, Q> call(vec<L, float, Q> const& a)
576+
{
577+
(void)a;
578+
}
577579

578580
template<>
579581
GLM_FUNC_QUALIFIER GLM_CONSTEXPR static vec<L, float, Q> call<0>(vec<L, float, Q> const& a)

glm/detail/qualifier.hpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -240,13 +240,15 @@ namespace detail
240240
struct storage<3, unsigned int, true> : public storage<4, unsigned int, true>
241241
{};
242242

243+
# if GLM_HAS_ALIGNOF
243244
template<>
244245
struct storage<3, double, true>
245246
{
246247
typedef struct alignas(4 * sizeof(double)) type {
247248
double data[4];
248249
} type;
249250
};
251+
# endif//GLM_HAS_ALIGNOF
250252

251253
# endif
252254

glm/gtx/dual_quaternion.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ namespace glm
5454

5555
// -- Implicit basic constructors --
5656

57-
GLM_DEFAULTED_DEFAULT_CTOR_DECL GLM_CONSTEXPR tdualquat() GLM_DEFAULT_CTOR;
57+
GLM_DEFAULTED_FUNC_DECL GLM_CONSTEXPR tdualquat() GLM_DEFAULT;
5858
GLM_DEFAULTED_FUNC_DECL GLM_CONSTEXPR tdualquat(tdualquat<T, Q> const& d) GLM_DEFAULT;
5959
template<qualifier P>
6060
GLM_CTOR_DECL tdualquat(tdualquat<T, P> const& d);

glm/gtx/pca.inl

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,8 @@
22

33
#ifndef GLM_HAS_CXX11_STL
44
#include <algorithm>
5-
#else
6-
#include <utility>
75
#endif
6+
#include <utility>
87

98
namespace glm {
109

readme.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ target_link_libraries(main PRIVATE glm::glm)
105105

106106
## Release notes
107107

108-
### [GLM 1.0.2](https://github.com/g-truc/glm/tree/master) - 2024-0X-XX
108+
### [GLM 1.0.2](https://github.com/g-truc/glm/tree/master) - 2025-0X-XX
109109

110110
#### Improvements:
111111
- Unit tests are not build by default, `GLM_BUILD_TESTS` set to `ON` required.

test/core/core_force_intrinsics.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
#ifndef GLM_FORCE_INTRINSICS
22
# define GLM_FORCE_INTRINSICS
33
#endif//GLM_FORCE_INTRINSICS
4-
//#define GLM_FORCE_DEFAULT_ALIGNED_GENTYPES
54
#define GLM_FORCE_SWIZZLE
65
#include <glm/ext/scalar_constants.hpp>
76
#include <glm/ext/vector_relational.hpp>

test/core/core_type_aligned.cpp

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,12 @@
1+
#include <glm/detail/setup.hpp>
2+
3+
#if GLM_PLATFORM & GLM_PLATFORM_APPLE // Fail on Github macOS-latest (macOS-13 was fine)
4+
int main()
5+
{
6+
return 0;
7+
}
8+
#else
9+
110
#ifndef GLM_FORCE_PURE
211
#define GLM_FORCE_DEFAULT_ALIGNED_GENTYPES
312
#endif
@@ -111,3 +120,5 @@ int main()
111120

112121
return Error;
113122
}
123+
124+
#endif//GLM_PLATFORM & GLM_PLATFORM_APPLE

test/gtc/gtc_type_aligned.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#include <glm/glm.hpp>
22

3-
#if GLM_CONFIG_ALIGNED_GENTYPES == GLM_ENABLE
3+
#if GLM_CONFIG_ALIGNED_GENTYPES == GLM_ENABLE && !(GLM_ARCH & GLM_ARCH_NEON_BIT) // Fail on Github macOS latest C.I.
44
#include <glm/gtc/type_aligned.hpp>
55
#include <glm/gtc/type_precision.hpp>
66
#include <glm/ext/scalar_relational.hpp>

0 commit comments

Comments
 (0)