我可以并且应该使用 CMake 进行设置吗
我从事的项目按如下方式组织到根文件夹 (VOBS) 中:
|--BUILD_FOLDER
| |-- BUILD_SCRIPTS
| |-- SOME_MORE_CODE
|
|--COMPONENT_A
|--COMPONENT_B
因为它们是 ClearCase VOBS,所以没有更高级别的根文件夹来放置 CMakeLists.txt 此设置似乎不适合 CMake 模式...
- 是这样吗使用 CMake 的精彩之处?
- 似乎 CMake 要求所有内容都是分层的,因为它从一个点向下延伸。 .
- CMake 是适合非 Windows/Linux 目标的工具吗?
- 这些项目使用自定义 C 编译器并调用第 3 方工具来生成多种格式的应用程序文件。
The projects I work on are organised into root folders (VOBS) as follows:
|--BUILD_FOLDER
| |-- BUILD_SCRIPTS
| |-- SOME_MORE_CODE
|
|--COMPONENT_A
|--COMPONENT_B
Because they are ClearCase VOBS there is no higher level root folder to place a CMakeLists.txt This setup doesn't seem to fit the CMake pattern...
- Is this a show-stopper to using CMake?
- It seems that CMake requires everything to be hierarchical as it descends down from one point.
.
- It seems that CMake requires everything to be hierarchical as it descends down from one point.
- Is CMake the right tool for non-windows/Linux targets?
- The projects use custom c compilers and invoke 3rd party tools to generate application files in several formats.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您的组件不必是 CMakeLists.txt 文件所在目录的子目录。将其放置在与组件具有相同级别的文件夹中,并且只需在
ADD_SUBDIRECTORY
命令中使用相对路径:这就是我建议您安排文件夹的方式。
类似的目录布局用于构建 OpenJDK 6(但当时使用的是常用的 make,而不是 CMake)。
Your components don't have to be subdirectories of the directory you have the CMakeLists.txt file in. Place it in the folder with same rank as of the components and just use relative paths in your
ADD_SUBDIRECTORY
command:That's how i suggest you to arrange your folders
Similar directory layout was used to build OpenJDK 6 (but instead of CMake, a usual make was used those days).