cartographer CMake Error at /usr/src/gmock/gtest/cmake/internal_utils.cmake:130 (add_library)

时间:2024-05-23 19:52:17

问题:
CMake Error at CMake Error at /usr/src/gmock/gtest/cmake/internal_utils.cmake:130 (add_library)
add_library cannot create target “gtest” because another target with the
same name already exists. The existing target is a shared library created
in source directory “/usr/src/gtest”. See documentation for policy CMP0002
for more details.
解决方法:
在/usr/src/gmock/gtest/中的CMakeLists.txt文件中注释掉如下几行:
cartographer CMake Error at /usr/src/gmock/gtest/cmake/internal_utils.cmake:130 (add_library)