From 65c775904d017d5facbe5bec618333965bd710c0 Mon Sep 17 00:00:00 2001 From: Vaclav Petras Date: Fri, 1 Mar 2024 11:24:35 -0500 Subject: [PATCH 1/2] Add float conversion warning to compile options --- tests/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 90f7a74a..6df85a96 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -10,7 +10,7 @@ function(add_pops_test NAME) # Enable compiler warnings target_compile_options(${NAME} PRIVATE $<$,$,$>: - -Wall -Wextra -pedantic> + -Wall -Wextra -pedantic -Wfloat-conversion> $<$: /W4>) if (CMAKE_CXX_COMPILER_ID STREQUAL "Clang") From d357bd21a04d8c06f6d0fb66cbfb93e30f41b234 Mon Sep 17 00:00:00 2001 From: Vaclav Petras Date: Thu, 7 Mar 2024 15:57:08 -0500 Subject: [PATCH 2/2] For tests, consider GCC and Clang warnings as errors --- tests/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 6df85a96..143b39c8 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -10,7 +10,7 @@ function(add_pops_test NAME) # Enable compiler warnings target_compile_options(${NAME} PRIVATE $<$,$,$>: - -Wall -Wextra -pedantic -Wfloat-conversion> + -Wall -Wextra -pedantic -Wfloat-conversion -Werror> $<$: /W4>) if (CMAKE_CXX_COMPILER_ID STREQUAL "Clang")