Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 3 additions & 7 deletions interpreter/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -557,14 +557,10 @@ set(CPPINTEROP_USE_CLING ON CACHE BOOL "" FORCE)
set(CPPINTEROP_USE_REPL OFF CACHE BOOL "" FORCE)

#---Disable testing on InterOp if ROOT's testing is OFF (InterOp tests are enabled by default) -------------------------------------------------------
ROOT_CHECK_CONNECTION("CPPINTEROP_ENABLE_TESTING=OFF")
if(testing AND NOT NO_CONNECTION)
set(CPPINTEROP_ENABLE_TESTING ON CACHE BOOL "" FORCE)
if(testing)
set(CPPINTEROP_ENABLE_TESTING ON CACHE BOOL "Enable gtest in CppInterOp")
else()
if(NO_CONNECTION)
message(STATUS "No internet connection, disabling the `CppInterOp testing infrastructure` option")
endif()
set(CPPINTEROP_ENABLE_TESTING OFF CACHE BOOL "")
set(CPPINTEROP_ENABLE_TESTING OFF CACHE BOOL "Enable gtest in CppInterOp")
endif()

add_subdirectory(CppInterOp)
Expand Down
6 changes: 5 additions & 1 deletion interpreter/CppInterOp/unittests/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,11 @@ enable_testing()

# LLVM builds (not installed llvm) provides gtest.
if (NOT TARGET GTest::gtest AND NOT TARGET gtest)
include(GoogleTest)
find_package(GTest)
if (NOT GTest_FOUND)
message(WARNING "CppInterOp could not find GTest. Provide the package or set CPPINTEROP_ENABLE_TESTING=OFF to disable this warning.")
return()
endif()
endif()

if(EMSCRIPTEN)
Expand Down
Loading