arbor-sim/arbor

configure should not look for googletest when no tests are built

Closed this issue · 5 comments

Describe the bug
configure looks for googletest in the process of regular build:

-- Found GTest: /usr/local/lib/cmake/GTest/GTestConfig.cmake (found version "1.13.0")

Context
Version: 0.9.0

Hi @yurivict,

I am not sure we can 'fix' this. Configure/CMake doesn't know -- and can never know -- that we are not building
tests or any related targets; that is done by the build step. Additionally, one configure step might serve to
build different targets: tests, examples, ... and all of might require different subsets of the full set of
dependencies.

Would you agree? If so, we can close this.

Since we had no further feedback, I'll close this.

@thorstenhater

Sorry, I missed your message.

cmake has the BUILD_TESTING variable, see here.

Test dependencies, including googletest, should be searched only when this variable is set.

@yurivict , Arbor doesn't use CTest to build or run it's tests.

@bcumming
BUILD_TESTING has nothing to do with ctest.