From 0329afcb79e404b130ab4769346c33a67ea9a1b2 Mon Sep 17 00:00:00 2001 From: Rob Bocchino Date: Mon, 3 Mar 2025 11:11:49 -0800 Subject: [PATCH] Turn off -Wshadow for unit tests --- RPI/CMakeLists.txt | 8 ++++++++ Ref/CMakeLists.txt | 9 +++++++++ 2 files changed, 17 insertions(+) diff --git a/RPI/CMakeLists.txt b/RPI/CMakeLists.txt index 3d0450d2a7..5a6b37e56b 100644 --- a/RPI/CMakeLists.txt +++ b/RPI/CMakeLists.txt @@ -35,6 +35,14 @@ add_compile_options( -pedantic ) +# Turn off -Wshadow for now in unit testing +# The generated code needs additional fixes +if (BUILD_TESTING) + add_compile_options( + -Wno-shadow + ) +endif() + ## # Section 2: F prime Core # diff --git a/Ref/CMakeLists.txt b/Ref/CMakeLists.txt index 033fec9e29..012f72a141 100644 --- a/Ref/CMakeLists.txt +++ b/Ref/CMakeLists.txt @@ -34,6 +34,15 @@ add_compile_options( -Wshadow -pedantic ) + +# Turn off -Wshadow for now in unit testing +# The generated code needs additional fixes +if (BUILD_TESTING) + add_compile_options( + -Wno-shadow + ) +endif() + # Section 2: F prime Core # # This includes all of the F prime core components, and imports the make-system. F prime core