cmake vs gmake for qtcreator project

时间:2021-04-16 09:11:06

I am attempting to use QtCreator as an IDE for a straight C project. The reason is that I am comfortable with QtCreator and I want a visual IDE for stepping through this new project I am working on. My development box and my deployment box are different, but both of those have gmake on them. QtCreator requires cmake, which I dont mind putting on my development box, but my deployment box is not going to have cmake.

我试图将QtCreator用作直接C项目的IDE。原因是我对QtCreator很满意,我想要一个可视化IDE来逐步完成我正在研究的这个新项目。我的开发框和我的部署框是不同的,但两者都有gmake。 QtCreator需要cmake,我不介意把它放在我的开发盒上,但我的部署盒不会有cmake。

Am I OK to build my software on the Qt box, and be sure it will deploy on the deployment box?

我可以在Qt盒上构建我的软件,并确保它将部署在部署盒上吗?

Edit: to be clear, the existing code base already has a makefile structure going, and I'd rather not interrupt that. If I can set my project up to use those existing targets and such it would be great.

编辑:要清楚,现有的代码库已经有一个makefile结构,我宁愿不打断它。如果我可以将我的项目设置为使用那些现有目标,那么这将是很好的。

1 个解决方案

#1


0  

If your project is using CMake as build system, then you should have it installed on the machine you are building. You can't pregenerate Makefile's and then just run make on the other box.

如果您的项目使用CMake作为构建系统,那么您应该将它安装在您正在构建的计算机上。你无法预生成Makefile,然后只在另一个盒子上运行make。

Well, you actually can, but then you will probably need same compiler versions, libs/headers located in same paths and etc. So generally it's not good idea.

嗯,你实际上可以,但是你可能需要相同的编译器版本,位于相同路径的libs / header等等。所以一般来说这不是一个好主意。

As for deploying already compiled binaries - it have no relation to CMake. The general rule there is that you should have same shared libraries on both machines. Linking your project statically allows deploying single fat executable/library, without any additional dependencies.

至于部署已编译的二进制文件 - 它与CMake无关。一般规则是,您应该在两台计算机上都有相同的共享库。静态链接项目允许部署单个胖可执行文件/库,而不需要任何其他依赖项。

#1


0  

If your project is using CMake as build system, then you should have it installed on the machine you are building. You can't pregenerate Makefile's and then just run make on the other box.

如果您的项目使用CMake作为构建系统,那么您应该将它安装在您正在构建的计算机上。你无法预生成Makefile,然后只在另一个盒子上运行make。

Well, you actually can, but then you will probably need same compiler versions, libs/headers located in same paths and etc. So generally it's not good idea.

嗯,你实际上可以,但是你可能需要相同的编译器版本,位于相同路径的libs / header等等。所以一般来说这不是一个好主意。

As for deploying already compiled binaries - it have no relation to CMake. The general rule there is that you should have same shared libraries on both machines. Linking your project statically allows deploying single fat executable/library, without any additional dependencies.

至于部署已编译的二进制文件 - 它与CMake无关。一般规则是,您应该在两台计算机上都有相同的共享库。静态链接项目允许部署单个胖可执行文件/库,而不需要任何其他依赖项。