diff options
-rw-r--r-- | CMakeLists.txt | 5 | ||||
-rw-r--r-- | compat/math.hpp | 4 | ||||
-rw-r--r-- | shaders/lightmap.cpp | 4 | ||||
-rw-r--r-- | src/light.cpp | 4 | ||||
-rw-r--r-- | test/magnum-math.cpp | 9 |
5 files changed, 5 insertions, 21 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 1b58b976..c52a2a2c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -135,6 +135,7 @@ if(MSVC) add_link_options(-HIGHENTROPYVA) endif() else() + add_compile_options(-Wno-float-equal) if(NOT WIN32) add_compile_options($<$<COMPILE_LANGUAGE:CXX>:-fuse-cxa-atexit>) endif() @@ -178,6 +179,10 @@ endif() fm_run_hook(fm-userconfig-src) +if(CMAKE_COMPILER_IS_GNUCXX) + add_compile_options(-Wno-float-equal) +endif() + if (CMAKE_CXX_COMPILER_ID MATCHES "Clang$") add_definitions(-D_LIBCPP_REMOVE_TRANSITIVE_INCLUDES) add_compile_options(-Wno-shift-op-parentheses) diff --git a/compat/math.hpp b/compat/math.hpp index 0afa3c8f..fff2a234 100644 --- a/compat/math.hpp +++ b/compat/math.hpp @@ -4,10 +4,6 @@ #include <bit> #include <cmath> -#ifdef __clang__ -#pragma clang diagnostic ignored "-Wfloat-equal" -#endif - namespace floormat::math::detail { template<typename T> struct int_type_for_; diff --git a/shaders/lightmap.cpp b/shaders/lightmap.cpp index 6600885c..20d5616e 100644 --- a/shaders/lightmap.cpp +++ b/shaders/lightmap.cpp @@ -18,10 +18,6 @@ #include <Magnum/GL/Renderer.h> #include <Magnum/GL/TextureFormat.h> -#if defined __CLION_IDE__ || defined __clang__ -#pragma GCC diagnostic ignored "-Wfloat-equal" -#endif - namespace floormat { namespace { diff --git a/src/light.cpp b/src/light.cpp index 13f39b22..4a240f29 100644 --- a/src/light.cpp +++ b/src/light.cpp @@ -4,10 +4,6 @@ #include "loader/vobj-info.hpp" #include <cmath> -#ifdef __clang__ -#pragma clang diagnostic ignored "-Wfloat-equal" // workaround ICE on clang 16 -#endif - namespace floormat { light_proto::light_proto() diff --git a/test/magnum-math.cpp b/test/magnum-math.cpp index d9dc7bb6..a9b7e98d 100644 --- a/test/magnum-math.cpp +++ b/test/magnum-math.cpp @@ -6,11 +6,6 @@ #include <Magnum/Math/Vector3.h> #include <Magnum/Math/Vector4.h> -#ifdef __GNUG__ -# pragma GCC diagnostic push -# pragma GCC diagnostic ignored "-Wfloat-equal" -#endif - namespace floormat { using Magnum::Math::Vector; @@ -68,7 +63,3 @@ void test_app::test_magnum_math() } } // namespace floormat - -#ifdef __GNUG__ -# pragma GCC diagnostic pop -#endif |