我使用的项目具有以下依赖关系:
grpc
googletestbenchmark
同时,我的项目也有基准。
当我使用FetchContent声明以下依赖项时,会得到以下错误:
add_library cannot create target "benchmark" because another target
with the same name already exists. The existing target is an executable
created in source directory
我的CMakeLists.txt是:
cmake_minimu
我正在使用,我试图在文件中使用 for ,因为Cryptopp在其默认的项目存储库中没有CMakeLists.txt文件。我的CMakeLists.txt有以下与密码相关的内容:
# Include usage of external projects
include(FetchContent)
# Get the cryptopp CMakeLists.txt file for cryptopp package
set(CRYPTOPP_CMAKE "cryptopp-cmake")
FetchContent_Declare(
${CRYPTOPP_CMAK