From a3786be26a5825be86af51170cfd7cd06d8d5225 Mon Sep 17 00:00:00 2001 From: patrick96 Date: Tue, 15 May 2018 14:58:09 +0200 Subject: [PATCH] tests: Disable -Werror for tests This way we can still run tests with some compiler warnings --- tests/CMakeLists.txt | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 86f66edf..71069834 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -35,6 +35,10 @@ add_subdirectory(${CMAKE_BINARY_DIR}/googletest-src # }}} +# Disable errors for warnings so that we can run tests even with some warnings +string(REGEX REPLACE "-Werror[^ ]*" "" CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS}) +string(REPLACE "-pedantic-errors" "" CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS}) + function(unit_test file tests) set(multi_value_args SOURCES) @@ -65,12 +69,17 @@ function(unit_test file tests) endfunction() unit_test(utils/color unit_tests) + unit_test(utils/math unit_tests) + unit_test(utils/memory unit_tests) + unit_test(utils/scope unit_tests) + unit_test(utils/string unit_tests SOURCES utils/string.cpp) + unit_test(utils/file unit_tests SOURCES utils/command.cpp @@ -85,6 +94,7 @@ unit_test(components/command_line unit_tests SOURCES components/command_line.cpp utils/string.cpp) + unit_test(components/bar unit_tests) unit_test(components/builder unit_tests