From 24a88545d9ed402d3b9a4ee95e0de3b5f11e008d Mon Sep 17 00:00:00 2001 From: Victor Zverovich Date: Sat, 31 Aug 2019 09:26:45 -0700 Subject: [PATCH] Add -Werror to tests --- test/CMakeLists.txt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index 968f4461..3a8e5cee 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -84,6 +84,9 @@ function(add_fmt_test name) if (FMT_PEDANTIC) target_compile_options(${name} PRIVATE ${PEDANTIC_COMPILE_FLAGS}) endif () + if (FMT_WERROR) + target_compile_options(${name} PRIVATE ${WERROR_FLAG}) + endif () target_include_directories(${name} SYSTEM PUBLIC gtest gmock) add_test(NAME ${name} COMMAND ${name}) endfunction()