From 803d99da21f0d18e0d0d90bbf98b8a27278b740f Mon Sep 17 00:00:00 2001 From: Oliver Lee Date: Mon, 6 May 2024 16:21:34 -0700 Subject: [PATCH] treat warnings as errors in mdspan tests When compiling mdspan tests, treat compiler warnings as error. This option is *not* propagated to consumers of mdspan. --- tests/CMakeLists.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 1dcebcbd..f588a9ba 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -13,6 +13,7 @@ macro(mdspan_add_test name) add_executable(${name} ${name}.cpp) target_link_libraries(${name} mdspan gtest_main) add_test(${name} ${name}) + set_property(TARGET ${name} PROPERTY COMPILE_WARNING_AS_ERROR ON) endmacro() if(MDSPAN_USE_SYSTEM_GTEST)