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

Fix handling oft existing dependencies #24

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 4 additions & 5 deletions RepoMan.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -282,16 +282,15 @@ function(repoman__internal__handle_dependencies DIRECTORY)
# Include dependencies as sub-projects and resolve their dependencies
foreach(DEPENDENCY IN LISTS REPOMAN_DEPENDENCIES)
get_property(ADDED GLOBAL PROPERTY ${DEPENDENCY}_ADDED)
string(TOLOWER ${DEPENDENCY} NAME)

FetchContent_GetProperties(${NAME})
FetchContent_GetProperties(${DEPENDENCY})

# Add not-yet included dependencies
if(NOT ADDED AND ${NAME}_POPULATED)
repoman__internal__handle_dependencies(${${NAME}_SOURCE_DIR})
if(NOT ADDED AND ${DEPENDENCY}_POPULATED)
repoman__internal__handle_dependencies(${${DEPENDENCY}_SOURCE_DIR})
if(NOT SCRIPT_MODE)
# add_subdirectory() does not work in script mode
add_subdirectory(${${NAME}_SOURCE_DIR} ${${NAME}_BINARY_DIR})
add_subdirectory(${${DEPENDENCY}_SOURCE_DIR} ${${DEPENDENCY}_BINARY_DIR})
endif()
set_property(GLOBAL PROPERTY ${DEPENDENCY}_ADDED TRUE)
endif()
Expand Down
Loading