Skip to content

Make rst2man optional, put enable_testing in outermost scope - #1

Open
fwsGonzo wants to merge 1 commit into
gquintard:cmakefrom
fwsGonzo:cmake
Open

fwsGonzo wants to merge 1 commit into
gquintard:cmakefrom
fwsGonzo:cmake

Conversation

@fwsGonzo

@fwsGonzo fwsGonzo commented Nov 16, 2021 •

Copy link
Copy Markdown

This changes 3 things as of now:

  1. rst2man is now optional. It was not required before so it would just failed to build - now it will just skip the docs and give a warning.
  2. The binary files are put into CMAKE_CURRENT_BINARY_DIR which is the binary directory of the current (libvmod_example) project. This will make it work nicely inside a bigger project.
  3. The testing was not enabled because enable_testing was inside a function - now it its in the outermost scope because includes are actual cut and paste, as is tradition.

There are 2 things that may have to be done to make this the ultimate vmod.cmake:

  1. Detect that you are inside a larger build system and not use the system libvarnishapi. In that case you should use the libvarnishapi of the build system. This will allow things like fuzzing and sanitizing vmods and Varnish at the same time, per build folder. Very handy.
  2. Detect Varnish Plus and simply set VARNISH_PLUS in CMake as well as adding a -DVARNISH_PLUS to VMODs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant