Building & Installing v1.13.0 is not taken into account if system gtest is present #4596
Replies: 1 comment
-
Turn out not to be an issue. I forgot to clean cmake cache. Closing. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
system version install (in /usr) is 1.12.1.
I download https://github.com/google/googletest/archive/refs/tags/v1.13.0.zip, unzip it and cd to googletest-1.13.0 and do:
cmake -DCMAKE_INSTALL_PREFIX="/usr/local" -B build .
sudo cmake --build build --target install
In cmake makefiles I have:
find_package(GTest REQUIRED)
message(STATUS "GTest: ${GTest_VERSION}")
Which show "GTest: 1.12.1"
Conversely from a clean system, If I install first the 1.13.0, I get 1.13.0 (normal) and after installing the system gtest, I get 1.13.0 (which is what I want i.e have version in /usr/local overidding /usr).
How can make the the override works in both cases?
Beta Was this translation helpful? Give feedback.
All reactions