简体   繁体   English

Eclipse CDT中的优化项目结构

[英]Optimized Project Structure in Eclipse CDT

I'm in a c++ project on linux in the starting stages. 在起步阶段,我正在Linux上的一个c ++项目中。 (team contains 3-5 developer, IDE is Eclipse CDT 6) And i'm wondering your ideas about what should be the project structure about the following subjects: (团队中包含3-5个开发人员,IDE是Eclipse CDT 6)而且我想知道您对以下主题的项目结构应该是什么的想法:

  • Dependency management, how would you reference different sub-project directories in the same project 依赖管理,如何在同一项目中引用不同的子项目目录
  • Building system, handwrite makefile or Eclipse automake? 构建系统,手写makefile还是Eclipse automake? (Eclipse generates makefiles for per project. and i want a general makefile for all the subprojects) (Eclipse为每个项目生成makefile。我想要所有子项目的通用makefile)
  • For A Test framework, would i prefer precompiled library or holding the source of framework on the project, then building with the overall building process? 对于A Test框架,我希望使用预编译的库还是将框架的源代码保留在项目中,然后使用整个构建过程进行构建?

Sample sub-projects 子项目样本

  • /Project.Model.A /Project.Model.A
  • /Project.Model.B /Project.Model.B
  • /Project.Model.A.Tests /Project.Model.A.Tests
  • /Project.Model.B.Tests /Project.Model.B.Tests
  • /Project.Views etc... /Project.Views等...

And i'm looking for an open source project similar to this structure... 我正在寻找一个类似于此结构的开源项目...

best regards 最好的祝福

For a great look of huge C++ project with tons of nested autogenerated Makefiles, I suggest you to check QT 4 sources. 要查看带有大量嵌套自动生成的Makefile的大型 C ++项目,我建议您检查QT 4源代码。 It's amazing how them reached a very solid and reliable structure with that number of subprojects and dependencies. 令人惊讶的是,它们如何通过如此众多的子项目和依赖项达到了一个非常牢固和可靠的结构。 It's true, anyway, that they use QMake (own tool) for handling .pro (project definitions) and .pri (project include) files. 无论如何,他们确实使用QMake(自己的工具)来处理.pro(项目定义)和.pri(项目包含)文件。

Recently I worked with CMake build system and I have to say that's very handly, driving you to split sources from binaries by design and with overall good tools for configuring your compiler's options. 最近,我使用了CMake构建系统 ,我不得不说这非常方便,它驱使您按照设计并使用用于配置编译器选项的总体良好工具从二进制文件中拆分源代码。 I know that should be compatible with Eclipse, check here for details. 我知道应该与Eclipse兼容,请在此处查看详细信息。 It will enable also graphic configure and make tool within Eclipse framework. 它还将在Eclipse框架内启用图形配置和制作工具。

Poco框架合适

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM