So I've been integrating fastnoise2 with another project which has /W4 compiler flag enabled globally, and while I have created a working FindFastNoise.cmake using FetchContent, on MSVC I've encountered several compiler errors similar to the following:
[...\build\windows\_deps\fastnoise2-build\src\FastSIMD_FastNoise.vcxproj]
auto simd = dynamic_cast<VoidPtrStorageType>( base );
^ (compiling source file '../../../_deps/fastnoise2-build/src/fastsimd/FastSIMD_FastNoise/FastSIMD_FastNoise_AVX2.cpp')
...\build\windows\_deps\fastnoise2-src\include\FastNoise\Generators\Generator.inl(42,21):
Compile with /vd2 or define 'FastSIMD::DispatchClass<FastNoise::Generator,FastSIMD::FeatureSet::AVX2>' with #pragma vtordisp(2) in effect
auto simd = dynamic_cast<VoidPtrStorageType>( base );
^
...\build\windows\_deps\fastnoise2-src\include\FastNoise\Generators\Generator.inl(42,21):
the template instantiation context (the oldest one first) is
auto simd = dynamic_cast<VoidPtrStorageType>( base );
^
...\build\windows\_deps\fastnoise2-src\src\FastNoise\FastSIMD_Build.inl(86,1):
see reference to variable template 'const bool is_final_v<FastSIMD::DispatchClass<FastNoise::Constant,1022> >' being compiled
FASTNOISE_REGISTER_NODE( Constant );
^
...\build\windows\_deps\fastnoise2-src\src\FastNoise\FastSIMD_Build.inl(86,1):
see reference to class template instantiation 'FastSIMD::DispatchClass<FastNoise::Constant,FastSIMD::FeatureSet::AVX2>' being compiled
FASTNOISE_REGISTER_NODE( Constant );
^
...\build\windows\_deps\fastnoise2-src\include\FastNoise\Generators\BasicGenerators.inl(34,87):
see reference to class template instantiation 'FastSIMD::DispatchClass<FastNoise::Generator,FastSIMD::FeatureSet::AVX2>' being compiled
class FastSIMD::DispatchClass<Constant, SIMD> final : public virtual Constant, public DispatchClass<Generator, SIMD>
^
...\build\windows\_deps\fastnoise2-src\include\FastNoise\Generators\Generator.inl(35,10):
while compiling class template member function 'void FastSIMD::DispatchClass<FastNoise::Generator,FastSIMD::FeatureSet::AVX2>::SetSourceSIMDPtr(c
onst FastNoise::Generator *,const void **)'
void SetSourceSIMDPtr( const Generator* base, const void** simdPtr ) final
^
I tried adding
target_compile_options(FastSIMD_FastNoise PRIVATE /W0 /vd2)
target_compile_options(FastNoise PRIVATE /W0)
to the FindFastNoise.cmake but it doesn't help
So I've been integrating fastnoise2 with another project which has /W4 compiler flag enabled globally, and while I have created a working FindFastNoise.cmake using FetchContent, on MSVC I've encountered several compiler errors similar to the following:
I tried adding
to the FindFastNoise.cmake but it doesn't help