From 558e1ca13540e7dbc6aeb5bc4df4931e9d6d81b1 Mon Sep 17 00:00:00 2001 From: Alexander Grund Date: Tue, 14 Jul 2020 19:14:36 +0200 Subject: [PATCH] Don't error when TURTLE_AUTO_PTR=ON --- test/CMakeLists.txt | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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()