Skip to content

Commit

Permalink
Disable for now deprecated declarations Werrors
Browse files Browse the repository at this point in the history
  • Loading branch information
marxin committed Dec 19, 2023
1 parent aca41e9 commit f660442
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,10 @@ check_cxx_compiler_flag(
SUPPORTS_NON_TEMPLATE_FRIEND
)

check_cxx_compiler_flag(
"-Wdeprecated-declarations"
SUPPORTS_DEPRECATED_DECLARATIONS
)

if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU"
OR CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
Expand All @@ -188,6 +192,10 @@ if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU"
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-error=non-template-friend")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-error=non-template-friend")
endif()
iF(SUPPORTS_DEPRECATED_DECLARATIONS)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-error=deprecated-declarations")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-error=deprecated-declarations")
endif()

set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -O3")
set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELEASE} -O3 -g")
Expand Down

0 comments on commit f660442

Please sign in to comment.