This took me a bit to figure out: since zeek_plugin_end is a macro, setting the policy in ZeekPluginCommon.cmake only takes effect when done inside the macro, not higher up in the file. Two related things to flag:
Should we additionally wrap the policy adjustment in its own cmake_policy(PUSH) / cmake_policy(POP)?
Reading up about cmake policies, it seems like the preferred way to set them (if you need to set them at all) is at the project toplevel, but this is a plugin setting, so this code will also run for external plugins, Zeek packages with plugins, etc. It seems okay to me to set this policy for all users, but one could also argue that we're not in charge of the policies of any Zeek plugin out there.
@Neverlord let me know in case this clashes with any cmake cleanups you're planning!
This took me a bit to figure out: since
zeek_plugin_end
is a macro, setting the policy inZeekPluginCommon.cmake
only takes effect when done inside the macro, not higher up in the file. Two related things to flag:cmake_policy(PUSH)
/cmake_policy(POP)
?@Neverlord let me know in case this clashes with any cmake cleanups you're planning!
Resolves #46.