mirror of
https://github.com/rive-app/rive-cpp.git
synced 2026-01-18 21:21:17 +01:00
Get more compiling on MSVC
Diffs= 1a271c437 Get more compiling on MSVC (#5547) Co-authored-by: Chris Dalton <99840794+csmartdalton@users.noreply.github.com>
This commit is contained in:
@@ -1 +1 @@
|
||||
5a18c89bdc51d7a1823aad4b3e0f2a383331afea
|
||||
1a271c4378f1fe79235e0e930d8261cbc09ea1be
|
||||
|
||||
@@ -31,14 +31,11 @@ do
|
||||
|
||||
files {'../src/**.cpp'}
|
||||
|
||||
buildoptions {
|
||||
'-Wall',
|
||||
'-fno-exceptions',
|
||||
'-fno-rtti',
|
||||
'-Werror=format',
|
||||
'-Wimplicit-int-conversion',
|
||||
'-Werror=vla'
|
||||
flags {
|
||||
'FatalCompileWarnings',
|
||||
}
|
||||
exceptionhandling 'off'
|
||||
rtti 'off'
|
||||
|
||||
filter {'system:macosx'}
|
||||
do
|
||||
@@ -48,6 +45,12 @@ do
|
||||
}
|
||||
end
|
||||
|
||||
filter {'toolset:not msc'}
|
||||
do
|
||||
buildoptions {
|
||||
'-Wimplicit-int-conversion',
|
||||
}
|
||||
end
|
||||
filter {'system:macosx', 'options:variant=runtime'}
|
||||
do
|
||||
buildoptions {
|
||||
@@ -70,11 +73,6 @@ do
|
||||
do
|
||||
architecture 'x64'
|
||||
defines {'_USE_MATH_DEFINES'}
|
||||
flags {'FatalCompileWarnings'}
|
||||
removebuildoptions {
|
||||
'-fno-exceptions',
|
||||
'-fno-rtti'
|
||||
}
|
||||
end
|
||||
|
||||
filter {'system:ios', 'options:variant=system'}
|
||||
|
||||
@@ -124,6 +124,8 @@ template <typename T> struct gvec_data<T, 4>
|
||||
// operator= is just a memcpy. So: "float.xz = float4.xz" would also assign y and w.
|
||||
gvec<T, 4, PackSwizzle4(4, 1, 0, 3, 2)> yxwz;
|
||||
gvec<T, 4, PackSwizzle4(4, 2, 3, 0, 1)> zwxy;
|
||||
gvec<T, 4, PackSwizzle4(4, 2, 1, 0, 3)> zyxw;
|
||||
gvec<T, 4, PackSwizzle4(4, 0, 3, 2, 1)> xwzy;
|
||||
};
|
||||
};
|
||||
|
||||
@@ -305,6 +307,7 @@ ENABLE_SWIZZLE2(min)
|
||||
ENABLE_SWIZZLE2(max)
|
||||
ENABLE_SWIZZLE3(clamp)
|
||||
ENABLE_SWIZZLE3F(mix)
|
||||
ENABLE_SWIZZLE3F(precise_mix)
|
||||
ENABLE_SWIZZLE3IT(if_then_else)
|
||||
template <typename T, int N, Swizzle Z> void store(void* dst, gvec<T, N, Z> vec)
|
||||
{
|
||||
|
||||
@@ -33,7 +33,11 @@ do
|
||||
'../src/**.cpp'
|
||||
}
|
||||
|
||||
buildoptions {'-Wall', '-fno-exceptions', '-fno-rtti', '-Werror=format'}
|
||||
flags {
|
||||
'FatalCompileWarnings',
|
||||
}
|
||||
exceptionhandling 'off'
|
||||
rtti 'off'
|
||||
|
||||
filter "system:windows"
|
||||
do
|
||||
@@ -81,7 +85,7 @@ do
|
||||
filter {'system:ios', 'options:variant=emulator'}
|
||||
do
|
||||
buildoptions {
|
||||
'--target=arm64-apple-ios12.0.0-simulator -mios-version-min=10.0 -arch x86_64 -arch arm64 -isysroot ' ..
|
||||
'--target=arm64-apple-ios12.0.0-simulator -mios-version-min=12.0 -arch x86_64 -arch arm64 -isysroot ' ..
|
||||
(os.getenv('IOS_SYSROOT') or '')
|
||||
}
|
||||
targetdir '%{cfg.system}_sim/bin/%{cfg.buildcfg}'
|
||||
|
||||
@@ -115,6 +115,8 @@ TEST_CASE("swizzles", "[simd]")
|
||||
CHECK_ALL((v4.yzw == vec<3>{-2, 3, -1}));
|
||||
CHECK_ALL((v4.yxwz == float4{-2, 1, -1, 3}));
|
||||
CHECK_ALL((v4.zwxy == float4{3, -1, 1, -2}));
|
||||
CHECK_ALL((v4.zyxw == float4{3, -2, 1, -1}));
|
||||
CHECK_ALL((v4.xwzy == float4{1, -1, 3, -2}));
|
||||
|
||||
v4.xy = v2.yx;
|
||||
CHECK_ALL((v4 == float4{-2, 1, 3, -1}));
|
||||
@@ -164,6 +166,8 @@ TEST_CASE("swizzles", "[simd]")
|
||||
CHECK_ALL(
|
||||
(simd::clamp(a.yxwz, float4(2), float4(10)) == simd::clamp(a_, float4(2), float4(10))));
|
||||
CHECK_ALL((simd::mix(a.yxwz, b.yxwz, float4(.5f)) == simd::mix(a_, b_, float4(.5f))));
|
||||
CHECK_ALL(
|
||||
(simd::precise_mix(a.yxwz, b.yxwz, float4(.5f)) == simd::precise_mix(a_, b_, float4(.5f))));
|
||||
CHECK_ALL(
|
||||
(simd::if_then_else(int4{~0}, a.yxwz, b.yxwz) == simd::if_then_else(int4{~0}, a_, b_)));
|
||||
CHECK_ALL((simd::if_then_else(int4{~0}, a.yxwz, b.yxwz) == float4{a.y, b.x, b.w, b.z}));
|
||||
|
||||
Reference in New Issue
Block a user