CMake的–graphviz选项是否应该依赖于自定义目标?
示例CMakeLists.txt文件:
cmake_minimum_required(VERSION 2.8) add_executable(target0 test.cpp) add_dependencies(target0 target1) add_custom_target(target1 ALL COMMAND echo hello )
输出文件“cmake –graphviz = test.dot.”将会:
digraph GG { node [ fontsize = "12" ]; "node3" [ label="target0" shape="house"]; }
没有任何目标1的痕迹.
解决方法
CMake manual明确指出:
–graphviz=[file]
Generate a graphviz input file that will contain all the library and executable dependencies in the project. See the documentation for CMakeGraphVizOptions.cmake for more details.
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 [email protected] 举报,一经查实,本站将立刻删除。