作者热门文章
- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
给定一个递归构建结构。如何将目标从较低级别导入到较高级别?
这是一个简化的示例:
顶级 CMakeLists.txt:
cmake_minimum_required(VERSION 2.8)
add_subdirectory(sub1)
add_subdirectory(subdir)
add_executable(foo EXCLUDE_FROM_ALL
foo.cpp)
add_custom_target(both)
add_dependencies(both DEPENDS foo bar)
add_executable(bar EXCLUDE_FROM_ALL
bar.cpp)
最佳答案
如果我改变
add_dependencies(both DEPENDS foo bar)
add_dependencies(both foo bar)
The following are some of the valid targets for this Makefile:
... all (the default if no target is provided)
... clean
... depend
... edit_cache
... rebuild_cache
... both
... foo
... bar
关于cmake:如何将目标从子目录导入到更高级别?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35488501/
我是一名优秀的程序员,十分优秀!