Skip to content

Commit

Permalink
Build test dependencies only if testing is enabled. (#3061)
Browse files Browse the repository at this point in the history
  • Loading branch information
teo-tsirpanis authored Aug 1, 2024
1 parent 71c6ebe commit f691b28
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions cmake/sdks.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,14 @@ if(BUILD_ONLY)
endforeach()
endif()

get_dependencies_for_test(${TARGET} DEPENDENCY_LIST)
if(DEPENDENCY_LIST)
STRING(REPLACE "," ";" LIST_RESULT ${DEPENDENCY_LIST})
foreach(DEPENDENCY IN LISTS LIST_RESULT)
list(APPEND SDK_DEPENDENCY_BUILD_LIST ${DEPENDENCY})
endforeach()
if(ENABLE_TESTING)
get_dependencies_for_test(${TARGET} DEPENDENCY_LIST)
if(DEPENDENCY_LIST)
STRING(REPLACE "," ";" LIST_RESULT ${DEPENDENCY_LIST})
foreach(DEPENDENCY IN LISTS LIST_RESULT)
list(APPEND SDK_DEPENDENCY_BUILD_LIST ${DEPENDENCY})
endforeach()
endif()
endif()
endforeach()
LIST(REMOVE_DUPLICATES SDK_BUILD_LIST)
Expand Down

0 comments on commit f691b28

Please sign in to comment.