From 0a4b8b5a1caa6725a826ca91e8add3bedc0f6847 Mon Sep 17 00:00:00 2001 From: Anuradha Karuppiah Date: Mon, 19 Aug 2024 03:01:01 +0000 Subject: [PATCH] Set a dependency on all morpheus python targets Signed-off-by: Anuradha Karuppiah --- python/morpheus/morpheus/_lib/CMakeLists.txt | 4 ++++ .../morpheus_llm/_lib/cmake/libmorpheus_llm.cmake | 6 ++++++ 2 files changed, 10 insertions(+) diff --git a/python/morpheus/morpheus/_lib/CMakeLists.txt b/python/morpheus/morpheus/_lib/CMakeLists.txt index 9ca49484cb..4962a2b56f 100644 --- a/python/morpheus/morpheus/_lib/CMakeLists.txt +++ b/python/morpheus/morpheus/_lib/CMakeLists.txt @@ -74,15 +74,19 @@ morpheus_utils_python_package_set_default_link_targets(morpheus) # #----------morpheus._lib.common--------- morpheus_add_pybind11_module(common SOURCE_FILES common/module.cpp) +set_property(GLOBAL APPEND PROPERTY py_morpheus_target_property morpheus._lib.common) #----------morpheus._lib.stages--------- morpheus_add_pybind11_module(stages SOURCE_FILES stages/module.cpp) +set_property(GLOBAL APPEND PROPERTY py_morpheus_target_property morpheus._lib.stages) #----------morpheus._lib.messages--------- morpheus_add_pybind11_module(messages SOURCE_FILES messages/module.cpp) +set_property(GLOBAL APPEND PROPERTY py_morpheus_target_property morpheus._lib.messages) #----------morpheus._lib.modules--------- morpheus_add_pybind11_module(modules SOURCE_FILES modules/module.cpp) +set_property(GLOBAL APPEND PROPERTY py_morpheus_target_property morpheus._lib.modules) #----------morpheus._lib.doca--------- if(MORPHEUS_SUPPORT_DOCA) diff --git a/python/morpheus_llm/morpheus_llm/_lib/cmake/libmorpheus_llm.cmake b/python/morpheus_llm/morpheus_llm/_lib/cmake/libmorpheus_llm.cmake index 8dc38eb594..558cb10c42 100644 --- a/python/morpheus_llm/morpheus_llm/_lib/cmake/libmorpheus_llm.cmake +++ b/python/morpheus_llm/morpheus_llm/_lib/cmake/libmorpheus_llm.cmake @@ -52,6 +52,12 @@ target_include_directories(morpheus # Also add a dependency to the target so that the headers are generated before the target is built add_dependencies(morpheus_llm ${cudf_helpers_target}) +message("add_dependencies morpheus_llm ${cudf_helpers_target}") + +# Add a dependency on the morpheus cpython libraries +get_property(py_morpheus_target GLOBAL PROPERTY py_morpheus_target_property) +add_dependencies(morpheus_llm ${py_morpheus_target}) +message("add_dependencies morpheus_llm ${py_morpheus_target}") # Morpheus has to built before morpheus llm add_dependencies(morpheus_llm morpheus)