Skip to content

Commit

Permalink
only use single set_source_files_properties
Browse files Browse the repository at this point in the history
  • Loading branch information
fknfilewalker committed Jul 23, 2024
1 parent d0715aa commit 7899343
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,11 @@ 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)
set_source_files_properties(${TINYEXR_SOURCES} PROPERTIES COMPILE_FLAGS "-Weverything -Werror -Wno-padded -Wno-c++98-compat-pedantic -Wno-documentation -Wno-unused-member-function")
set(CLANG_COMPILE_FLAGS "-Weverything -Werror -Wno-padded -Wno-c++98-compat-pedantic -Wno-documentation -Wno-unused-member-function")
if (${CMAKE_CXX_COMPILER_VERSION} VERSION_GREATER 16)
set_source_files_properties(${TINYEXR_SOURCES} PROPERTIES COMPILE_FLAGS "-Wno-unsafe-buffer-usage")
set(CLANG_COMPILE_FLAGS "${CLANG_COMPILE_FLAGS} -Wno-unsafe-buffer-usage")
endif()
set_source_files_properties(${TINYEXR_SOURCES} PROPERTIES COMPILE_FLAGS ${CLANG_COMPILE_FLAGS})
endif ()

if (TINYEXR_BUILD_SAMPLE)
Expand Down

0 comments on commit 7899343

Please sign in to comment.