From 106439a9a234f3b1d480ba593573539ccd09f5c9 Mon Sep 17 00:00:00 2001 From: Dalton Messmer Date: Thu, 7 Nov 2024 00:17:37 -0500 Subject: [PATCH] Simplification --- cmake/modules/ErrorFlags.cmake | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/cmake/modules/ErrorFlags.cmake b/cmake/modules/ErrorFlags.cmake index bc0d84bb1..836a4da26 100644 --- a/cmake/modules/ErrorFlags.cmake +++ b/cmake/modules/ErrorFlags.cmake @@ -44,9 +44,6 @@ if(CMAKE_CXX_COMPILER_ID MATCHES "GNU|Clang") "-Werror" # Treat warnings as errors ) endif() - - set(SILENCE_DEPRECATION_DEFS "") - set(THIRD_PARTY_SILENCE_DEPRECATION_DEFS "") elseif(MSVC) set(COMPILE_ERROR_FLAGS "/W2" # Enable some warnings by default @@ -69,11 +66,9 @@ elseif(MSVC) ) endif() - set(SILENCE_DEPRECATION_DEFS "_SILENCE_CXX20_OLD_SHARED_PTR_ATOMIC_SUPPORT_DEPRECATION_WARNING") - set(THIRD_PARTY_SILENCE_DEPRECATION_DEFS "") + add_compile_definitions("_SILENCE_CXX20_OLD_SHARED_PTR_ATOMIC_SUPPORT_DEPRECATION_WARNING") endif() # Add the flags to the whole directory tree. We use the third-party flags for # targets whose SYSTEM property is true, and the normal flags otherwise. add_compile_options("$>,${THIRD_PARTY_COMPILE_ERROR_FLAGS},${COMPILE_ERROR_FLAGS}>") -add_compile_definitions("$>,${THIRD_PARTY_SILENCE_DEPRECATION_DEFS},${SILENCE_DEPRECATION_DEFS}>")