【发布时间】:2019-12-29 18:42:57
【问题描述】:
我正在编译一个二进制文件,出于各种原因,我想在两个不同的target_link_libraries() 命令中添加它的依赖库。
我的命令如下所示:
target_link_libraries(my_prog PRIVATE foo bar)
target_link_libraries(my_prog baz)
我得到了错误:
The keyword signature for target_link_libraries has already been used with
the target "my_prog". All uses of target_link_libraries with a target
must be either all-keyword or all-plain.
The uses of the keyword signature are here:
* tests/CMakeLists.txt:10 (target_link_libraries)
这是什么意思?我该怎么办?
【问题讨论】: