flann-lib / flann

Fast Library for Approximate Nearest Neighbors
http://people.cs.ubc.ca/~mariusm/flann
Other
2.21k stars 646 forks source link

The package needs build dependency gmock to build #478

Open xiandaoo opened 3 years ago

xiandaoo commented 3 years ago

Cmake error occured when building it in manjaro. The error information is as follow:


CMake Warning (dev) at /usr/lib64/cmake/GTest/GTestConfig.cmake:37 (if): if given arguments:

"ON"

An argument named "ON" appears in a conditional statement. Policy CMP0012 is not set: if() recognizes numbers and boolean constants. Run "cmake --help-policy CMP0012" for policy details. Use the cmake_policy command to set the policy and suppress this warning. Call Stack (most recent call first): /usr/share/cmake-3.20/Modules/FindGTest.cmake:187 (find_package) CMakeLists.txt:118 (find_package) This warning is for project developers. Use -Wno-dev to suppress it.

CMake Error at /usr/lib64/cmake/GTest/GTestTargets.cmake:112 (message): The imported target "GTest::gmock" references the file

 "/usr/lib/libgmock.so.1.10.0"

but this file does not exist. Possible reasons include:

Call Stack (most recent call first): /usr/lib64/cmake/GTest/GTestConfig.cmake:42 (include) /usr/share/cmake-3.20/Modules/FindGTest.cmake:187 (find_package) CMakeLists.txt:118 (find_package)

CMake Warning (dev) in /usr/lib64/cmake/GTest/GTestTargets.cmake: Policy CMP0011 is not set: Included scripts do automatic cmake_policy PUSH and POP. Run "cmake --help-policy CMP0011" for policy details. Use the cmake_policy command to set the policy and suppress this warning.

The included script

/usr/lib64/cmake/GTest/GTestTargets.cmake

affects policy settings. CMake is implying the NO_POLICY_SCOPE option for compatibility, so the effects are applied to the including context. Call Stack (most recent call first): /usr/lib64/cmake/GTest/GTestConfig.cmake:42 (include) /usr/share/cmake-3.20/Modules/FindGTest.cmake:187 (find_package) CMakeLists.txt:118 (find_package) This warning is for project developers. Use -Wno-dev to suppress it.

-- Configuring incomplete, errors occurred! See also "/home/xiandaoo/flann/build/CMakeFiles/CMakeOutput.log".

The error seems to be caused by a missing file "/usr/lib/libgmock.so.1.10.0". What should i do to solve this problem.