Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
abdes committed Apr 17, 2023
2 parents 14648f2 + 9f906fd commit 2efad63
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 19 deletions.
4 changes: 2 additions & 2 deletions cmake/CompileOptions.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,8 @@ function(asap_set_compile_options)
if(NOT x_WARNING)
target_compile_options(${target} PRIVATE /WX)
endif()
# Enable coverage profiling in Debug builds
# (see https://github.com/abdes/asap/issues/22)
# Enable coverage profiling in Debug builds (see
# https://github.com/abdes/asap/issues/22)
target_link_options(${target} PRIVATE $<$<CONFIG:Debug>:/PROFILE>)
endforeach()
endif()
Expand Down
33 changes: 16 additions & 17 deletions cmake/SphinxGeneration.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -90,27 +90,26 @@ if(SPHINX_FOUND)
# invoked.
set_target_properties(sphinx PROPERTIES EXCLUDE_FROM_ALL TRUE)

# Add a target for copying the index.html from the doc dir to the sphinx
# build dir. A dependency on this target will be added to the master sphinx
# target.
add_custom_command(
OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/sphinx/index.html
COMMAND
${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/doc/index.html
${CMAKE_CURRENT_BINARY_DIR}/sphinx/index.html
DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/doc/index.html)
add_custom_target(copy_doc_index ALL
DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/sphinx/index.html)

# Setup sphinx doc master target and add other submodules as dependencies
function(_add_master_sphinx_target)
_master_sphinx_target()
asap_with_sphinx(${master_sphinx_target})
add_dependencies(
${master_sphinx_target}_sphinx copy_doc_index
# Add more submodule documentation targets after this, using variables
# in the target names consistently with the module's CMakeLists.txt.
)

set(index_file_src "${CMAKE_CURRENT_SOURCE_DIR}/doc/index.html")
set(index_file_out "${CMAKE_CURRENT_BINARY_DIR}/sphinx/index.html")
if(EXISTS ${index_file_src})
message(
STATUS "Will use project custom doc index file: ${index_file_src}")
# Add a target for copying the index.html from the doc dir to the sphinx
# build dir. A dependency on this target will be added to the master
# sphinx target.
add_custom_command(
OUTPUT ${index_file_out}
COMMAND ${CMAKE_COMMAND} -E copy ${index_file_src} ${index_file_out}
DEPENDS ${index_file_src})
add_custom_target(copy_doc_index ALL DEPENDS ${index_file_out})
add_dependencies(${master_sphinx_target}_sphinx copy_doc_index)
endif()
add_dependencies(sphinx ${master_sphinx_target}_sphinx)
endfunction()
_add_master_sphinx_target()
Expand Down

0 comments on commit 2efad63

Please sign in to comment.