作者:子华2502924833 | 来源:互联网 | 2023-09-10 14:50
IveinheritedabodyofVisualC++sourcethatconsistsofaboutadozensub-projects.Oneofthese
I've inherited a body of Visual C++ source that consists of about a dozen sub-projects. One of these is an empty "MakeAll" project that depends on all the others, so I can build the entire project by setting the MakeAll project active and selecting "Build All."
我继承了一个由大约十二个子项目组成的Visual C ++源代码。其中一个是空的“MakeAll”项目,它依赖于所有其他项目,因此我可以通过设置MakeAll项目并选择“Build All”来构建整个项目。
I'd like to automate this process, and coming from a linux environment, my instinct was to generate a Makefile and build from the command line. The IDE will generate .mak
files for each of the sub-projects, but not for the top-level MakeAll. (I'm assuming this is because it contains nothing but dependencies.)
我想自动化这个过程,来自linux环境,我的本能是生成一个Makefile并从命令行构建。 IDE将为每个子项目生成.mak文件,但不为顶级MakeAll生成.mak文件。 (我假设这是因为它只包含依赖项。)
The linux answer would be a Makefile that simply descends into each of the sub-projects and executes make
in each one. But a quick look at the .mak
files showed that each wants to be told which of several configurations to use -- and apparently some use Debug, some use Release, and some use configurations concocted by a previous developer.
linux的答案是一个Makefile,它简单地下载到每个子项目中并在每个子项目中执行make。但是快速查看.mak文件显示每个人都希望被告知要使用几种配置中的哪一种 - 显然有些使用Debug,有些使用Release,有些使用前一个开发人员调制的配置。
What's the accepted way to build a set of projects like this from the command line?
从命令行构建一组这样的项目的可接受方法是什么?
Thank you!
1 个解决方案