Skip to content

Commit

Permalink
Generate cmake_variables.qbk and cmake_toolchains.qbk outside of …
Browse files Browse the repository at this point in the history
…the source tree

* Prevents built system caused working tree pollution
  • Loading branch information
Naios committed May 13, 2017
1 parent 944988f commit 7952bcb
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
1 change: 1 addition & 0 deletions cmake/HPX_Documentation.cmake
Expand Up @@ -110,6 +110,7 @@ macro(hpx_quickbook_to_boostbook name)
add_custom_command(OUTPUT ${name}.xml
COMMAND "${BOOSTQUICKBOOK_EXECUTABLE}"
"--output-file=${name}.xml"
"--include-path=${CMAKE_CURRENT_BINARY_DIR}/generated"
"${git_commit_option}"
"${doxygen_option}"
"-D__hpx_source_dir__=${doc_source_dir}"
Expand Down
13 changes: 8 additions & 5 deletions docs/CMakeLists.txt
Expand Up @@ -282,9 +282,11 @@ foreach(_cat ${HPX_OPTION_CATEGORIES})
set(HPX_CMAKE_OPTIONS "${HPX_CMAKE_OPTIONS}] [/ ${_cat} Options]\n\n")
endforeach()

set(QUICKBOOK_CMAKE_VARIABLES_DEST
"${CMAKE_CURRENT_BINARY_DIR}/generated/build_system/cmake_variables.qbk")
configure_file(
"${PROJECT_SOURCE_DIR}/cmake/templates/cmake_variables.qbk.in"
"${PROJECT_SOURCE_DIR}/docs/manual/build_system/cmake_variables.qbk"
${QUICKBOOK_CMAKE_VARIABLES_DEST}
@ONLY
)

Expand All @@ -309,10 +311,11 @@ foreach(_toolchain ${_toolchain_files})
set(HPX_CMAKE_TOOLCHAINS "${HPX_CMAKE_TOOLCHAINS}\n")
endforeach()


set(QUICKBOOK_CMAKE_TOOLCHAINS_DEST
"${CMAKE_CURRENT_BINARY_DIR}/generated/build_system/cmake_toolchains.qbk")
configure_file(
"${PROJECT_SOURCE_DIR}/cmake/templates/cmake_toolchains.qbk.in"
"${PROJECT_SOURCE_DIR}/docs/manual/build_system/cmake_toolchains.qbk"
${QUICKBOOK_CMAKE_TOOLCHAINS_DEST}
@ONLY
)

Expand All @@ -321,8 +324,8 @@ hpx_quickbook_to_html(hpx
INDEX hpx.idx
DEPENDENCIES
${all_documentation_dependencies}
"${PROJECT_SOURCE_DIR}/docs/manual/build_system/cmake_variables.qbk"
"${PROJECT_SOURCE_DIR}/docs/manual/build_system/cmake_toolchains.qbk"
${QUICKBOOK_CMAKE_VARIABLES_DEST}
${QUICKBOOK_CMAKE_TOOLCHAINS_DEST}
CATALOG "${CMAKE_CURRENT_BINARY_DIR}/boostbook_catalog.xml"
XSLTPROC_ARGS chunk.section.depth=4
chunk.first.sections=1
Expand Down

0 comments on commit 7952bcb

Please sign in to comment.