From e9b4f63c92f1ca7194f6cf74ba76dd6681790838 Mon Sep 17 00:00:00 2001 From: terik23 Date: Thu, 25 Apr 2019 22:08:44 +0500 Subject: [PATCH] Werror --- example/CMakeLists.txt | 4 ++-- test/CMakeLists.txt | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/example/CMakeLists.txt b/example/CMakeLists.txt index c1829cd..1006df1 100644 --- a/example/CMakeLists.txt +++ b/example/CMakeLists.txt @@ -4,10 +4,10 @@ set(OPTIONS "") if((CMAKE_CXX_COMPILER_ID MATCHES "GNU") OR (CMAKE_CXX_COMPILER_ID MATCHES "Clang")) set(CMAKE_VERBOSE_MAKEFILE ON) - set(OPTIONS -Wall -Wextra -pedantic-errors) + set(OPTIONS -Wall -Wextra -pedantic-errors -Werror) set(OPTIONS ${OPTIONS} -std=c++17) elseif(CMAKE_CXX_COMPILER_ID MATCHES "MSVC") - set(OPTIONS /W4) + set(OPTIONS /W4 /WX) check_cxx_compiler_flag(/permissive HAS_PERMISSIVE_FLAG) if(HAS_PERMISSIVE_FLAG) set(OPTIONS ${OPTIONS} /permissive-) diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index abc92ec..0072d15 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -5,7 +5,7 @@ set(SOURCES test.cpp) set(OPTIONS "") if(CMAKE_CXX_COMPILER_ID MATCHES "MSVC") - set(OPTIONS /W4) + set(OPTIONS /W4 /WX) check_cxx_compiler_flag(/permissive HAS_PERMISSIVE_FLAG) if(HAS_PERMISSIVE_FLAG) set(OPTIONS ${OPTIONS} /permissive-) @@ -16,7 +16,7 @@ if(CMAKE_CXX_COMPILER_ID MATCHES "MSVC") check_cxx_compiler_flag(/std:c++latest HAS_CPPLATEST_FLAG) elseif(CMAKE_CXX_COMPILER_ID MATCHES "GNU|Clang") set(CMAKE_VERBOSE_MAKEFILE ON) - set(OPTIONS -Wall -Wextra -pedantic-errors) + set(OPTIONS -Wall -Wextra -pedantic-errors -Werror) check_cxx_compiler_flag(-std=c++17 HAS_CPP17_FLAG) check_cxx_compiler_flag(-std=c++20 HAS_CPP20_FLAG)