From 3930a44ccd3a67213b4f3e0a08def5b7e2feb489 Mon Sep 17 00:00:00 2001 From: Jordan Williams <19399197+jwillikers@users.noreply.github.com> Date: Tue, 11 Feb 2020 06:17:54 -0600 Subject: [PATCH] enable range-loop-analysis flag for tests --- tests/CMakeLists.txt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 6aaa779..af2f2cd 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -48,6 +48,7 @@ CHECK_CXX_COMPILER_FLAG("-Wduplicated-branches" COMPILER_SUPPORTS_WDUPLICATED_BR CHECK_CXX_COMPILER_FLAG("-Wlogical-op" COMPILER_SUPPORTS_WLOGICAL_OP) CHECK_CXX_COMPILER_FLAG("-Wuseless-cast" COMPILER_SUPPORTS_WUSELESS_CAST) CHECK_CXX_COMPILER_FLAG("-Wdouble-promotion" COMPILER_SUPPORTS_WDOUBLE_PROMOTION) +CHECK_CXX_COMPILER_FLAG("-Wrange-loop-analysis" COMPILER_SUPPORTS_WRANGE_LOOP_ANALYSIS) if(COMPILER_SUPPORTS_WALL) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall") @@ -82,6 +83,9 @@ endif() if(COMPILER_SUPPORTS_WDOUBLE_PROMOTION) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wdouble-promotion") endif() +if(COMPILER_SUPPORTS_WRANGE_LOOP_ANALYSIS) + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wrange-loop-analysis") +endif() option(TOML11_USE_UNRELEASED_TOML_FEATURES "use features in toml-lang/toml master while testing" OFF)