Silenced some Clang compiler warnings

This commit is contained in:
Leon Styhre 2024-08-09 22:54:57 +02:00
parent 2d84fa78db
commit 0347a276ea
2 changed files with 3 additions and 2 deletions

View file

@ -217,7 +217,8 @@ else()
endif() endif()
endif() endif()
if(APPLE AND CMAKE_CXX_COMPILER_VERSION GREATER_EQUAL 15.0.0) # Silence some annoying warnings caused by invalid characters in some FreeImage source comments.
if(CMAKE_CXX_COMPILER_VERSION GREATER_EQUAL 15.0.0)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-invalid-utf8") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-invalid-utf8")
endif() endif()

View file

@ -9,7 +9,7 @@
// Suppress codecvt deprecation warnings. // Suppress codecvt deprecation warnings.
#if defined(_MSC_VER) // MSVC compiler. #if defined(_MSC_VER) // MSVC compiler.
#define _SILENCE_CXX17_CODECVT_HEADER_DEPRECATION_WARNING #define _SILENCE_CXX17_CODECVT_HEADER_DEPRECATION_WARNING
#elif defined(__APPLE__) #elif defined(__clang__)
#pragma clang diagnostic ignored "-Wdeprecated-declarations" #pragma clang diagnostic ignored "-Wdeprecated-declarations"
#endif #endif