Skip to content

Commit

Permalink
Build CppInterOp with libCling
Browse files Browse the repository at this point in the history
  • Loading branch information
aaronj0 committed Jan 18, 2025
1 parent fe7b036 commit 80fe1da
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions core/metacling/src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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 #############################################################

Expand Down Expand Up @@ -113,11 +114,15 @@ ROOT_LINKER_LIBRARY(Cling
$<TARGET_OBJECTS:ClingUtils>
$<TARGET_OBJECTS:Dictgen>
$<TARGET_OBJECTS:MetaCling>
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}
Expand Down

0 comments on commit 80fe1da

Please sign in to comment.