From d0715aa85c25d8f2d432445e4b5aa4151f7e60a9 Mon Sep 17 00:00:00 2001 From: Lukas Lipp Date: Mon, 22 Jul 2024 23:40:56 +0200 Subject: [PATCH] fix --- CMakeLists.txt | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 5a88b9e..244b445 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -42,9 +42,12 @@ target_include_directories(${BUILD_TARGET} PRIVATE ${PROJECT_SOURCE_DIR}) target_link_libraries(${BUILD_TARGET} ${TINYEXR_EXT_LIBRARIES} ${CMAKE_DL_LIBS}) # Increase warning level for clang. -IF (CMAKE_CXX_COMPILER_ID MATCHES "Clang" AND NOT MSVC) +if (CMAKE_CXX_COMPILER_ID MATCHES "Clang" AND NOT MSVC) set_source_files_properties(${TINYEXR_SOURCES} PROPERTIES COMPILE_FLAGS "-Weverything -Werror -Wno-padded -Wno-c++98-compat-pedantic -Wno-documentation -Wno-unused-member-function") -ENDIF () + if (${CMAKE_CXX_COMPILER_VERSION} VERSION_GREATER 16) + set_source_files_properties(${TINYEXR_SOURCES} PROPERTIES COMPILE_FLAGS "-Wno-unsafe-buffer-usage") + endif() +endif () if (TINYEXR_BUILD_SAMPLE)