FindGTest Update, main branch (2023.09.21.)
This is my own attempt at solving the same thing as !1064 (closed).
Instead of mucking about with CMake compatibility rules, switched from GTEST_ROOT
to CMAKE_PREFIX_PATH
for finding GoogleTest.
At the same time removed the explicit CMP0074 setting from AtlasLCG, as it was not making a difference anyway. (This setting was only ever active for the code in Edit: It turns out that during the generation of the environment setup scripts we do make use of that compatibility rule after all.LCGConfig.cmake
, not for the user who called find_package(LCG ...)
.)
Note that this update actually changes the behaviour of find_package(GTest)
.
-- Found GTest: /cvmfs/sft.cern.ch/lcg/releases/LCG_104/gtest/1.13.0/x86_64-centos7-gcc11-opt/lib64/cmake/GTest/GTestConfig.cmake (found version "1.13.0")
Just like stated on: https://cmake.org/cmake/help/latest/module/FindGTest.html
While previously we were using just the code from the CMake's own FindGTest.cmake
module. I.e.:
-- Found GTest: /cvmfs/sft.cern.ch/lcg/releases/LCG_104/gtest/1.13.0/x86_64-centos7-gcc11-opt/lib64/libgtest.a
So I'll try an Athena build before going forward with this MR...
Merge request reports
Activity
mentioned in merge request !1064 (closed)
added 1 commit
- b2d0ba8f - Switched from GTEST_ROOT to CMAKE_PREFIX_PATH for finding GoogleTest.
Okay, I made some reasonably thorough tests with this change. I believe this is the way to go for ATLINFR-5073.
😉 mentioned in commit 71e54940