Am 15.07.2017 um 21:57 schrieb Bryce Harrington:
On Sat, Jul 15, 2017 at 06:39:31PM +0200, Sylvain Chiron wrote:
Hi,
Le 15/07/2017 à 14:11, Eduard Braun a écrit :
- download-gtest.sh
This still seems necessary for setting up gtest (although current trunk breaks on configure due to lack of a "Findgtest.cmake"; but that seems unrelated).
Having to use this script has always seemed a bit hacky to me. (and it's downloading gtest 1.7, but 1.8 is current). I know there's been some good work done on improving our testing cmake rules, I wonder if there is a way we can eliminate this script?
I added support for gtest 1.8 in 6b8520e which should now be auto-detected by cmake if installed in the system (tested on Windows, maybe somebody on Linux with gtest 1.8 installed could cross-check). If we're fine to require gtest >= 1.8 (it's the first to include gmock) we can drop the script already (plus some legacy cmake code). Otherwise we'd require some additional code.
Running CMake normally to setup Inkscape compilation, I get the following message:
CMake Warning at CMakeLists.txt:102 (find_package): By not providing "Findgtest.cmake" in CMAKE_MODULE_PATH this project has asked CMake to find a package configuration file provided by "gtest", but CMake did not find one.
Could not find a package configuration file provided by "gtest" with any of the following names: gtestConfig.cmake gtest-config.cmake Add the installation prefix of "gtest" to CMAKE_PREFIX_PATH or set "gtest_DIR" to a directory containing one of the above files. If "gtest" provides a separate development package or SDK, be sure it has been installed.
I’m under Arch Linux and I installed the package ‘gtest’ (so it’s installed in /usr) but the message still appears.
Under Ubuntu there is a libgtest-dev but having it installed doesn't alter the warning. I see it is installing various stuff to /usr/src/gtest, /usr/include/gtest, and /usr/include/gtest/internal.
I pushed [1] earlier today which might have fixed the issue you're seeing. Did your checkouts have that commit already?
@Sylvain: Arch Linux' gtest does not seem to include gmock, so you might need to install the latter package separately
@bryce: As for libgtest-dev you need at least version 1.8.0 (which should include gmock and additionally install into /usr/include/gmock and /usr/include/gmock/internal). If I understand correctly libgtest-dev [2] will eventually be renamed to googletest [3] (libgtest-dev 1.8.0 depends on the latter already), at least that's what debian says (see NOTE in [4]).
Regards, Eduard
[1] https://gitlab.com/inkscape/inkscape/commit/ae330137b0b70f2d1a3f704c1bd0758c... [2] https://packages.ubuntu.com/search?keywords=libgtest-dev+&searchon=names [3] https://packages.ubuntu.com/search?keywords=googletest&searchon=names [4] https://packages.debian.org/stretch/libgtest-dev