From ec839bbd7521acbaa77f03770f79f238bf24aca3 Mon Sep 17 00:00:00 2001 From: ToruNiina Date: Fri, 21 Jun 2019 00:29:45 +0900 Subject: [PATCH] chore: add -Wextra when compiling tests --- tests/CMakeLists.txt | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index ef5eed5..903272d 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -33,13 +33,16 @@ set(TEST_NAMES test_extended_conversions ) -CHECK_CXX_COMPILER_FLAG("-Wall" COMPILER_SUPPORTS_WALL) +CHECK_CXX_COMPILER_FLAG("-Wall" COMPILER_SUPPORTS_WALL) +CHECK_CXX_COMPILER_FLAG("-Wextra" COMPILER_SUPPORTS_WEXTRA) CHECK_CXX_COMPILER_FLAG("-Wpedantic" COMPILER_SUPPORTS_WPEDANTIC) if(COMPILER_SUPPORTS_WALL) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall") endif() - +if(COMPILER_SUPPORTS_WEXTRA) + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wextra") +endif() if(COMPILER_SUPPORTS_WPEDANTIC) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wpedantic") endif()