build: build all dependencies in parallel (#22329)

Previously, all targets were connected in one main target called
third-party in order to remove any potentially conflicting shared
library. We can make each dependency target independent of each other by
only removing shared libraries from luajit and msgpack in their own
targets, as only these has unwanted shared libraries.
This commit is contained in:
dundargoc
2023-02-19 21:11:27 +01:00
committed by GitHub
parent bfe6b49447
commit 5ffd3d035d
14 changed files with 22 additions and 57 deletions

View File

@@ -11,4 +11,10 @@ ExternalProject_Add(msgpack
-D MSGPACK_BUILD_EXAMPLES=OFF
CMAKE_CACHE_ARGS ${DEPS_CMAKE_CACHE_ARGS})
list(APPEND THIRD_PARTY_DEPS msgpack)
if (NOT MSVC)
add_custom_target(clean_shared_libraries_msgpack ALL
COMMAND ${CMAKE_COMMAND}
-D REMOVE_FILE_GLOB=${DEPS_INSTALL_DIR}/lib/${CMAKE_SHARED_LIBRARY_PREFIX}*${CMAKE_SHARED_LIBRARY_SUFFIX}*
-P ${PROJECT_SOURCE_DIR}/cmake/RemoveFiles.cmake)
add_dependencies(clean_shared_libraries_msgpack msgpack)
endif()