From 868cff3a53180debdf51f85c05102a31bed019f7 Mon Sep 17 00:00:00 2001 From: Blaine Bublitz Date: Tue, 7 Feb 2023 12:10:40 -0700 Subject: [PATCH] fix: Avoid targeting honk test files when testing is disabled --- cpp/src/aztec/honk/CMakeLists.txt | 34 ++++++++++++++++--------------- 1 file changed, 18 insertions(+), 16 deletions(-) diff --git a/cpp/src/aztec/honk/CMakeLists.txt b/cpp/src/aztec/honk/CMakeLists.txt index 14e137e775..ac0dc30fd0 100644 --- a/cpp/src/aztec/honk/CMakeLists.txt +++ b/cpp/src/aztec/honk/CMakeLists.txt @@ -1,18 +1,20 @@ barretenberg_module(honk numeric ecc srs proof_system transcript) -# TODO: Re-enable all these warnings once PoC is finished -if(CMAKE_CXX_COMPILER_ID MATCHES "Clang") - target_compile_options( - honk_test_objects - PRIVATE - -Wno-error=unused-variable - ) -elseif(CMAKE_CXX_COMPILER_ID MATCHES "GNU") - target_compile_options( - honk_test_objects - PRIVATE - -Wno-error=maybe-uninitialized - -Wno-error=uninitialized - -Wno-error=unused-variable - ) -endif() \ No newline at end of file +if(TESTING) + # TODO: Re-enable all these warnings once PoC is finished + if(CMAKE_CXX_COMPILER_ID MATCHES "Clang") + target_compile_options( + honk_test_objects + PRIVATE + -Wno-error=unused-variable + ) + elseif(CMAKE_CXX_COMPILER_ID MATCHES "GNU") + target_compile_options( + honk_test_objects + PRIVATE + -Wno-error=maybe-uninitialized + -Wno-error=uninitialized + -Wno-error=unused-variable + ) + endif() +endif()