FastNoise2 icon indicating copy to clipboard operation
FastNoise2 copied to clipboard

`unknown-pragmas` warnings in a header file with GCC on Github Actions CI

Open Zylann opened this issue 2 years ago • 0 comments

On my Github Actions CI I get warnings while compiling FastNoise2 on the ubuntu-20.04 image:

modules/voxel/thirdparty/fast_noise_2/include/FastNoise/Metadata.h:10: error: ignoring #pragma warning  [-Werror=unknown-pragmas]
   10 | #pragma warning( push )
      | 
modules/voxel/thirdparty/fast_noise_2/include/FastNoise/Metadata.h:11: error: ignoring #pragma warning  [-Werror=unknown-pragmas]
   11 | #pragma warning( disable : 4251 )
      | 
In file included from modules/voxel/thirdparty/fast_noise_2/src/FastNoise/FastNoise_C.cpp:3:
modules/voxel/thirdparty/fast_noise_2/include/FastNoise/Metadata.h:229: error: ignoring #pragma warning  [-Werror=unknown-pragmas]
  229 | #pragma warning( pop )
      | 

It should be noted I compile the library as part of Godot, it is neither a dynamic lib nor a static lib. I translated the CMake files to Godot's build system and it works fine, however I haven't seen anything related to silencing such warnings. Either way, this is in a header file.

Could it be due to a version of GCC not supported by the library? A Microsoft-specific feature? Could this be wrapped into conditionals?

Quick search found this https://github.com/microsoft/DirectXMath/issues/133#issue-1027984679

Zylann avatar Jan 08 '22 18:01 Zylann