Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Building a C/C++ project without using Makefiles

Tags:

c++

build

I have a project containing C/C++ files. I'd like to build it without using make. What are my options? I'd like cross platform solutions if possible.

like image 446
Geo Avatar asked May 08 '26 22:05

Geo


2 Answers

I've used SCons and it is very good.

SCons is an Open Source software construction tool—that is, a next-generation build tool. Think of SCons as an improved, cross-platform substitute for the classic Make utility with integrated functionality similar to autoconf/automake and compiler caches such as ccache. In short, SCons is an easier, more reliable and faster way to build software.

I've also looked at cmake but have not seriously used it.

like image 136
Greg Hewgill Avatar answered May 11 '26 12:05

Greg Hewgill


Well, you're always going to need some way to invoke the compiler. If it's a trivial project, you can usually just stick all the .C filenames on the command line of the compiler and get some kind of output.

Or you can use a batch file / shell script instead of a makefile, but it would be less 'cross-platform' than a makefile and much less useful.

You should probably explain your motivations more clearly.

like image 26
Will Dean Avatar answered May 11 '26 11:05

Will Dean