Skip to content
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

Add building the manual to cmake #2423

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

heirecka
Copy link

Also raise cmake_minimum_required to 3.18 for the LibXslt::xsltproc target.

Also raise cmake_minimum_required to 3.18 for the LibXslt::xsltproc
target.
@heirecka
Copy link
Author

If the raised minimum cmake version is a problem, I could easily replace LibXslt::xsltproc with LIBXSLT_XSLTPROC_EXECUTABLE

add_custom_command(OUTPUT
"${CMAKE_CURRENT_BINARY_DIR}/manual.xml"
COMMAND
asciidoc --backend=docbook --doctype=book --out-file "${CMAKE_CURRENT_BINARY_DIR}/manual.xml" "${CMAKE_CURRENT_SOURCE_DIR}/manual.asciidoc"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing DEPENDS for the input, doesn't it?


include(CheckSymbolExists)
include(CheckIPOSupported)

option(NINJA_BUILD_BINARY "Build ninja binary" ON)
option(NINJA_BUILD_DOC "Build ninja's manual" ON)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you default this to OFF?


add_custom_target(doc ALL DEPENDS "${CMAKE_CURRENT_BINARY_DIR}/manual.html")

install(FILES "${CMAKE_CURRENT_BINARY_DIR}/manual.html" TYPE DOC)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's the point of this?

add_custom_command(OUTPUT
"${CMAKE_CURRENT_BINARY_DIR}/manual.xml"
COMMAND
asciidoc --backend=docbook --doctype=book --out-file "${CMAKE_CURRENT_BINARY_DIR}/manual.xml" "${CMAKE_CURRENT_SOURCE_DIR}/manual.asciidoc"

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
asciidoc --backend=docbook --doctype=book --out-file "${CMAKE_CURRENT_BINARY_DIR}/manual.xml" "${CMAKE_CURRENT_SOURCE_DIR}/manual.asciidoc"
${Asciidoc_Executable} --backend=docbook --doctype=book --out-file "${CMAKE_CURRENT_BINARY_DIR}/manual.xml" "${CMAKE_CURRENT_SOURCE_DIR}/manual.asciidoc"

to be safe?

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.

3 participants