diff --git a/barretenberg/cpp/src/aztec/honk/CMakeLists.txt b/barretenberg/cpp/src/aztec/honk/CMakeLists.txt index 14e137e7755..ac0dc30fd08 100644 --- a/barretenberg/cpp/src/aztec/honk/CMakeLists.txt +++ b/barretenberg/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()