Skip to content

Commit 0f2b341

Browse files
committed
[interpreter] Configure the flags for InterOp correctly
Also moves the addition of `CppInterOpUnitTests` to the build chain, from metacling, to the interpreter cmake
1 parent 445e821 commit 0f2b341

File tree

2 files changed

+12
-5
lines changed

2 files changed

+12
-5
lines changed

core/metacling/src/CMakeLists.txt

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -119,10 +119,6 @@ ROOT_LINKER_LIBRARY(Cling
119119
# When these two link at the same time, they can exhaust the RAM on many machines, since they both link against llvm.
120120
add_dependencies(Cling rootcling_stage1)
121121

122-
if(testing)
123-
set_target_properties(CppInterOpUnitTests PROPERTIES EXCLUDE_FROM_ALL OFF)
124-
endif()
125-
126122
if(MSVC)
127123
set_target_properties(Cling PROPERTIES WINDOWS_EXPORT_ALL_SYMBOLS TRUE)
128124
set(cling_exports ${cling_exports}

interpreter/CMakeLists.txt

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -523,6 +523,17 @@ set(CPPINTEROP_INCLUDE_DIRS
523523
CACHE STRING "CppInterOp include directories.")
524524

525525
#---Set InterOp to build on Cling, this can be toggled to use Clang-REPL-------------------------------------------------------
526-
set(CPPINTEROP_USE_CLING ON BOOL "Use Cling as backend")
526+
set(CPPINTEROP_USE_CLING ON CACHE BOOL "" FORCE)
527+
set(CPPINTEROP_USE_REPL OFF CACHE BOOL "" FORCE)
528+
529+
#---Disable testing on InterOp if ROOT's testing is OFF (InterOp tests are enabled by default) -------------------------------------------------------
530+
if(testing)
531+
set(CPPINTEROP_ENABLE_TESTING ON CACHE BOOL "" FORCE)
532+
else()
533+
set(CPPINTEROP_ENABLE_TESTING OFF CACHE BOOL "")
534+
endif()
527535

528536
add_subdirectory(CppInterOp)
537+
if(testing)
538+
set_target_properties(CppInterOpUnitTests PROPERTIES EXCLUDE_FROM_ALL OFF)
539+
endif()

0 commit comments

Comments
 (0)