Some friends of mine criticized my old post «Build your C/C++ programs everywhere with SCons», arguing a build system is useless in modern world.
BUT, even if it's true that IDE are really helpfull, those friends forget some important facts
- Ant, Maven, SCons, Gradle, CMake are used today
- The most ancient are Ant, Scons and CMake of 2000 (not so old)
- Gradle first released version was in 2009-07-20, so quite recent
- Android projects use Gradle as build system
- libGDX uses Gradle too
What Is a Build System?
A build system is a software responsible to manage compilation of source code and other useful tasks, such as build a JAR file from these sources or upload it or signing your executable. They are used for compiled languages, to keep track of what compile again and what is not necessary. Let's suppose we are working on a C project with following sources- User.h + User.c: a struct to contains user informations
- List.h + List.c: data structure to store Users main.c: our main program
...but a IDE Does it For Me!
Yes, and it's a good thing. IDEs are basically a front-end for your build system. Yes, they have plugins to do many things graphically and they provide GUIs for many console utilities (diff, VCS, debugger and, obviously, build tools).You can live happily without use directly a build tool. But sometimes could be usefull to know what's under the hood of your IDE. Also, know your build system could help you in your work: not all function exposed by your GUI could be exaustive for your task. Maybe, upload your compiled C program to a remote server and copy some lua script on the same repository could be usefull.
A Question of Portability
Why all projects on GitHub or on Sourceforce are so... simple? 'cause they are composed just with their source files and their build script. This ensure you to use your favourite IDE to help a project. Eclipse, Netbeans and XCode can use different build system. So, with a single build script, you can use your IDE of choice.
No comments:
Post a Comment