From b41e0f8c955a85c742cf116951d7728ccd74e774 Mon Sep 17 00:00:00 2001 From: Bertrand Bellenot Date: Mon, 7 Jul 2025 14:00:51 +0200 Subject: [PATCH] [cmake][interop] Disable testing if no internet Disable `CppInterOp testing` when there is no internet connection --- interpreter/CppInterOp/CMakeLists.txt | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/interpreter/CppInterOp/CMakeLists.txt b/interpreter/CppInterOp/CMakeLists.txt index 8b2df5b4fc49f..e2c71873e2c7b 100644 --- a/interpreter/CppInterOp/CMakeLists.txt +++ b/interpreter/CppInterOp/CMakeLists.txt @@ -12,6 +12,11 @@ set(CMAKE_CXX_EXTENSIONS NO) option(CPPINTEROP_USE_CLING "Use Cling as backend" OFF) option(CPPINTEROP_USE_REPL "Use clang-repl as backend" ON) option(CPPINTEROP_ENABLE_TESTING "Enable the CppInterOp testing infrastructure." ON) +ROOT_CHECK_CONNECTION("CPPINTEROP_ENABLE_TESTING=OFF") +if(NO_CONNECTION) + message(STATUS "No internet connection, disabling the `CppInterOp testing infrastructure` option") + set(CPPINTEROP_ENABLE_TESTING OFF CACHE BOOL "Disabled because there is no internet connection" FORCE) +endif() if (CPPINTEROP_USE_CLING AND CPPINTEROP_USE_REPL) message(FATAL_ERROR "We can only use Cling (${CPPINTEROP_USE_CLING}=On) or Repl (CPPINTEROP_USE_REPL=On), but not both of them.")