add_library cannot create target “gmock“ because another target with thesame name already exists

Posted wishchin

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了add_library cannot create target “gmock“ because another target with thesame name already exists相关的知识,希望对你有一定的参考价值。

chuxian 问题 :

CMake Error at /usr/src/googletest/googletest/cmake/internal_utils.cmake:149 (add_library):
add_library cannot create target "gmock" because another target with thesame name already exists. The existing target is a static library created in source directory "/usr/src/googletest/googlemock". See documentationfor policy CMP0002 for more details.
Call Stack (most recent call first):
/usr/src/googletest/googletest/cmake/internal_utils.cmake:172 (cxx_library_with_type)
/usr/src/gmock/CMakeLists.txt:84 (cxx_library)

问题:在使用Cmake-gui的时候,使用了gmock超连接

解决:用 /usr/src/googletest/googlemock替代那个超链接/usr/src/gmock ,配置Compile成功.

以上是关于add_library cannot create target “gmock“ because another target with thesame name already exists的主要内容,如果未能解决你的问题,请参考以下文章

add_library cannot create target “gmock“ because another target with thesame name already exists

Xampp + Wordpress Rest API(401 代码:rest_cannot_create)

cannot create directory linux 中mkdir时候出现的问题解决

cannot create directory linux 中mkdir时候出现的问题解决

Activiti启报错: Cannot create PoolableConnectionFactory (Could not create connection to database server

Wordpress API - JWT Auth - Rest_cannot_create - 抱歉,您不能以此用户身份创建帖子