diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index 0b68c99..39bb8ff 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -21,6 +21,10 @@ if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU" OR CMAKE_CXX_COMPILER_ID MATCHES "Clang" target_compile_options(TurtleTestMain INTERFACE -Wno-unused-function) endif() if(TURTLE_WERROR) + check_cxx_compiler_flag(-Wdeprecated-declarations TURTLE_CXX_DEPRECATED_DECLARATIONS) + if(TURTLE_CXX_DEPRECATED_DECLARATIONS) + target_compile_options(TurtleTestMain INTERFACE -Wno-error=deprecated-declarations) + endif() target_compile_options(TurtleTestMain INTERFACE -Werror) endif() elseif(MSVC) @@ -98,4 +102,4 @@ foreach(testFile IN LISTS benchFiles) add_executable(${name} EXCLUDE_FROM_ALL ${testFile}) target_link_libraries(${name} PRIVATE turtle::turtle TurtleTestMain) add_test(NAME ${name} COMMAND "${CMAKE_COMMAND}" --build ${CMAKE_BINARY_DIR} --target ${name} --config $) -endforeach() \ No newline at end of file +endforeach()