diff --git a/codegen/tools/CMakeLists.txt b/codegen/tools/CMakeLists.txt index 489a96aafb6..bd0408a0e64 100644 --- a/codegen/tools/CMakeLists.txt +++ b/codegen/tools/CMakeLists.txt @@ -24,8 +24,17 @@ target_include_directories( # Compile options target_compile_options( - selective_build PUBLIC -Wno-deprecated-declarations -fPIC -frtti -fexceptions + selective_build + PUBLIC -Wno-deprecated-declarations + -fPIC + -frtti + -fexceptions + -Werror + -Wunused-variable + -Wno-unknown-argument ) +# We suppress -Wno-unknown-argument because our build system passes -fPIC for +# Unix builds, but we also build on Windows where it's ignored # Link against required libraries target_link_libraries(selective_build PRIVATE executorch_core program_schema)