相关疑难解决方法(0)

如何在CMake中删除"可能无法从目标读取位置属性"错误?

我现在正在尝试在这篇文章中运行一个cmake脚本.使用此脚本,CMake将打印目标的所有属性.但是,当它尝试检索目标的"LOCATION"属性时,会发现以下错误:

The LOCATION property may not be read from target "abc".  Use the target
  name directly with add_custom_command, or use the generator expression
  $<TARGET_FILE>, as appropriate.
Run Code Online (Sandbox Code Playgroud)

然后我尝试打印属性LOCATION,它也不起作用.有任何想法吗?

cmake

7
推荐指数
1
解决办法
2077
查看次数

标签 统计

cmake ×1