From cd493d87efe30b4a71ae61f522a648cbee8c0350 Mon Sep 17 00:00:00 2001 From: Aaron Jomy Date: Sat, 18 Jan 2025 12:16:59 +0100 Subject: [PATCH] Build CppInterOp with libCling --- core/metacling/src/CMakeLists.txt | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/core/metacling/src/CMakeLists.txt b/core/metacling/src/CMakeLists.txt index e608e3a461e16..1a3b0515dc873 100644 --- a/core/metacling/src/CMakeLists.txt +++ b/core/metacling/src/CMakeLists.txt @@ -44,6 +44,7 @@ target_include_directories(MetaCling SYSTEM PRIVATE ${CLANG_INCLUDE_DIRS} ${LLVM_INCLUDE_DIRS} ${CLAD_INCLUDE_DIRS} + ${CPPINTEROP_INCLUDE_DIRS} ) target_include_directories(MetaCling PRIVATE @@ -74,7 +75,7 @@ if(MSVC) set_source_files_properties(TCling.cxx COMPILE_FLAGS /bigobj) endif() -add_dependencies(MetaCling CLING) +add_dependencies(MetaCling CLING clangCppInterOp) ##### libCling ############################################################# @@ -113,11 +114,15 @@ ROOT_LINKER_LIBRARY(Cling $ $ $ - LIBRARIES ${CLING_LIBRARIES} ${LINK_LIBS} ${CLING_PLUGIN_LINK_LIBS}) + LIBRARIES ${CLING_LIBRARIES} clangCppInterOp ${LINK_LIBS} ${CLING_PLUGIN_LINK_LIBS}) # When these two link at the same time, they can exhaust the RAM on many machines, since they both link against llvm. add_dependencies(Cling rootcling_stage1) +if(testing) + add_dependencies(Cling CppInterOpUnitTests) +endif() + if(MSVC) set_target_properties(Cling PROPERTIES WINDOWS_EXPORT_ALL_SYMBOLS TRUE) set(cling_exports ${cling_exports}