mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 06:38:20 +00:00
Revert putting plugins into a fresh scope for now
This commit is contained in:
parent
1715028986
commit
9971121509
1 changed files with 8 additions and 2 deletions
|
@ -202,7 +202,10 @@ file(WRITE ${PRELOAD_SCRIPT} "# Warning, this is an autogenerated file!\n")
|
|||
set(LOAD_SCRIPT ${PROJECT_BINARY_DIR}/scripts/builtin-plugins/__load__.zeek)
|
||||
file(WRITE ${LOAD_SCRIPT} "# Warning, this is an autogenerated file!\n")
|
||||
|
||||
function(add_extra_builtin_plugin plugin_dir)
|
||||
# TODO: this really should be a function to make sure we have an isolated scope.
|
||||
# However, for historic reasons, we're not doing that yet. Some plugin
|
||||
# modify global state such as `zeekdeps`.
|
||||
macro(add_extra_builtin_plugin plugin_dir)
|
||||
get_filename_component(plugin_name "${plugin_dir}" NAME)
|
||||
|
||||
if(IS_DIRECTORY "${plugin_dir}/cmake")
|
||||
|
@ -215,7 +218,10 @@ function(add_extra_builtin_plugin plugin_dir)
|
|||
set(ZEEK_BUILDING_EXTRA_PLUGINS ON)
|
||||
|
||||
add_subdirectory(${plugin_dir} ${CMAKE_CURRENT_BINARY_DIR}/builtin-plugins/${plugin_name})
|
||||
endfunction()
|
||||
|
||||
# TODO: drop once we turn this into a function.
|
||||
set(ZEEK_BUILDING_EXTRA_PLUGINS OFF)
|
||||
endmacro()
|
||||
|
||||
foreach (plugin_dir ${BUILTIN_PLUGIN_LIST})
|
||||
add_extra_builtin_plugin("${plugin_dir}")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue