Skip to content

Commit

Permalink
Pass -Werror in static plugin builds
Browse files Browse the repository at this point in the history
  • Loading branch information
timwoj committed Jan 4, 2024
1 parent 37283ab commit 2a946b4
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions ZeekPluginStatic.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,16 @@ function (zeek_add_static_plugin ns name)
zeek_next_pac_block(at_end pacInputs pacRemainder ${pacRemainder})
endwhile ()

if (MSVC)
#set(WERROR_FLAG "/WX")
else ()
set(WERROR_FLAG "-Werror")
endif ()

# Pass compiler flags, paths and dependencies to the target.
target_link_libraries(${target_name} PRIVATE $<BUILD_INTERFACE:zeek_internal>)
target_include_directories(${target_name} PRIVATE ${CMAKE_CURRENT_BINARY_DIR})
target_compile_options(${target_name} PRIVATE ${WERROR_FLAG})

# Per convention, plugins have their headers and sources under src/ and
# legacy/external plugins expect this to auto-magically be available as
Expand Down

0 comments on commit 2a946b4

Please sign in to comment.