# \`-Dtesting=OFF\` flag not honored

**URL:** <https://root-forum.cern.ch/t/dtesting-off-flag-not-honored/57135>\
**Category:** ROOT\
**Tags:** build\
**Created:** [November 16, 2023, 3:33pm UTC](https://root-forum.cern.ch/t/dtesting-off-flag-not-honored/57135 "2023-11-16T15:33:08Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![nothingface0](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/nothingface0/32/31305_2.png) [@nothingface0](https://root-forum.cern.ch/u/nothingface0)\
**Post date:** [November 16, 2023, 3:33pm UTC](https://root-forum.cern.ch/t/dtesting-off-flag-not-honored/57135/1 "2023-11-16T15:33:08Z")

</div>

Hello,

I’m building ROOT 6.28.08 from source on a RHEL8 machine that has no access to internet resources outside CERN (the main reason is that the system’s precompiled package is for python3.6, but I need ROOT built for python3.8) and I face an issue similar to the one mentioned [here](https://root-forum.cern.ch/t/unable-to-access-googletests/56036), i.e. I get:

```auto
-- Could NOT find Git (missing: GIT_EXECUTABLE)

```

and a bit later:

```auto
CMake Error at /usr/share/cmake/Modules/ExternalProject.cmake:2633 (message):
  error: could not find git for clone of googletest                          

```

However, even when trying using `-Dtesting=OFF`:

```auto
cmake -DCMAKE_INSTALL_PREFIX=/data/srv/root /tmp/root -Dtesting=OFF -DPython3_ROOT_DIR=/usr/bin/python3 

```

I still get the same message.

I made sure that `testing` is disabled, by adding a `message` inside the `CMakeLists.txt` file:

```plaintext
if(testing)
  message(WARNING "!!")
  enable_testing()
endif()

```

Any idea why this fails?

---

<div class="post-metadata">

**Author:** ![nothingface0](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/nothingface0/32/31305_2.png) [@nothingface0](https://root-forum.cern.ch/u/nothingface0)\
**Post date:** [November 16, 2023, 3:46pm UTC](https://root-forum.cern.ch/t/dtesting-off-flag-not-honored/57135/2 "2023-11-16T15:46:18Z")

</div>

Solved it by using `-Dbuiltin_gtest=OFF`.

---

<div class="post-metadata">

**Author:** ![system](https://root-forum.cern.ch/uploads/default/original/3X/e/f/efe4f24398fd8ffeb76bccb6ecc46d9d9c003376.png) [@system](https://root-forum.cern.ch/u/system)\
**Post date:** [November 30, 2023, 3:47pm UTC](https://root-forum.cern.ch/t/dtesting-off-flag-not-honored/57135/3 "2023-11-30T15:47:04Z")

</div>

Closed on November 30, 2023, 3:47pm UTC

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.
