Skip to content

Commit

Permalink
fix: sphinx generation targets not properly setup
Browse files Browse the repository at this point in the history
  • Loading branch information
abdes committed Oct 22, 2024
1 parent 8942178 commit a06b9a1
Showing 1 changed file with 3 additions and 9 deletions.
12 changes: 3 additions & 9 deletions cmake/SphinxGeneration.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -32,16 +32,9 @@ if(SPHINX_FOUND)
macro(_master_sphinx_target)
string(MAKE_C_IDENTIFIER ${META_PROJECT_NAME} project_id)
string(TOLOWER ${project_id} project_id)
set(master_sphinx_target ${project_id}_master)
set(master_sphinx_target ${project_id})
endmacro()

function(_add_dependecy_to_master module_sphinx_target)
if(${META_PROJECT_ID}_IS_MASTER_PROJECT)
_master_sphinx_target()
add_dependencies(${master_sphinx_target}_sphinx ${module_sphinx_target}_sphinx)
endif()
endfunction()

# The macro to add a submodule as a sphinx target.
function(asap_with_sphinx TARGET_NAME)
# Nothing will be done unless the module is being built as a master project.
Expand Down Expand Up @@ -77,7 +70,8 @@ if(SPHINX_FOUND)
# Finally add the module sphinx target as a dependency for the overall
# sphinx target
if(${META_PROJECT_ID}_IS_MASTER_PROJECT)
_add_dependecy_to_master(${TARGET_NAME})
_master_sphinx_target()
add_dependencies(${master_sphinx_target}_sphinx ${TARGET_NAME}_sphinx)
endif()
endfunction()

Expand Down

0 comments on commit a06b9a1

Please sign in to comment.