-
Notifications
You must be signed in to change notification settings - Fork 41
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[build] Make building documentation configurable #672
Conversation
e25bd8f
to
d9e92e9
Compare
There seems to be a random segfault issue going on in the tests |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- See inline comment
- I'm thinking of 3 modes switch: build, don't build, build if
pandoc
is available (default). What do you think?
CMakeLists.txt
Outdated
@@ -125,7 +126,14 @@ add_custom_command( | |||
|
|||
target_link_libraries(ngs m Threads::Threads ${CMAKE_DL_LIBS} ${LIBGC_LIBRARIES} ${LIBFFI_LIBRARIES} ${JSONC_LIBRARIES} ${PCRE_LIBRARIES} ${Backtrace_LIBRARY}) | |||
|
|||
add_custom_target(man ALL WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/doc COMMAND make man DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/doc/*.1.md) | |||
if(BUILD_DOCS) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
More appropriate would be BUILD_MAN
I think.
Build if available is not easy to do in cmake.
Outside Stops the build with In meson it would be as simple. pandoc = find_program('pandoc', required : get_option('man'))
if pandoc.found()
...
endif And having the man option as |
This part I did not understand.
Docs:
Added Edit: added |
My bad, I forgot to remove the
The error message had the line of the error message in it put I overlooked it PR Ready |
I'm still for this design unless convinced otherwise. It should be possible to have control as follows (not solvable with single boolean flag):
|
Found the way to do it in https://cmake.org/pipermail/cmake/2016-October/064342.html |
Thanks! |
🚀 @jirutka The changes in your patch are now merged (in this PR and a few others) https://git.alpinelinux.org/aports/tree/testing/ngs/cmakelists.patch |
Also pulled in https://git.alpinelinux.org/aports/tree/testing/ngs/busybox-compat.patch