mirror of
https://github.com/mat007/turtle.git
synced 2026-06-22 12:13:43 +00:00
Disable -Wunused-function for tests
This commit is contained in:
parent
87e4326883
commit
70ae7674e5
1 changed files with 5 additions and 0 deletions
|
|
@ -15,6 +15,11 @@ endif()
|
|||
option(TURTLE_WERROR "Treat warnings as errors" ON)
|
||||
if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU" OR CMAKE_CXX_COMPILER_ID MATCHES "Clang")
|
||||
target_compile_options(TurtleTestMain INTERFACE -Wall -Wextra -pedantic -Wno-long-long)
|
||||
include(CheckCXXCompilerFlag)
|
||||
check_cxx_compiler_flag(-Wunused-function TURTLE_CXX_UNUSED_FUNCTION)
|
||||
if(TURTLE_CXX_UNUSED_FUNCTION)
|
||||
target_compile_options(TurtleTestMain INTERFACE -Wno-unused-function)
|
||||
endif()
|
||||
if(TURTLE_WERROR)
|
||||
target_compile_options(TurtleTestMain INTERFACE -Werror)
|
||||
endif()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue