How to manage a growing C ++ project

I am wondering how do I manage a growing C ++ project. Now I am developing a project with Netbeans and this is the dirty work of creating makefiles. The project became too large, and I decided to divide it into several parts. What is the best way to do this?

I am trying to use Scons as my build system. I had some success, but I have to edit the build scripts every time I add or delete files. This is too boring.

So I need your advice.

PS By the way, how does such a large project like google chrome do? Does everyone use the IDE to create scripts created just for software distribution?

+5
source share
3 answers

Netbeans ++ SCons. jVi Netbeans, .

- Netbeans Python , . , . Netbeans SCons (?), SCons.

SCons IDE, , . , , , , , .

script SCons, , CMake:

env = Environment()
env.EnsurePythonVersion(2, 5)
env.EnsureSConsVersion(2, 1)

libTarget = env.SharedLibrary(target = 'foo', source = ['a.cpp', 'b.cpp', 'c.pp'])
env.Program(target = 'bar', source = ['bar.cpp', libTarget])

SCons Glob() - , . , , . , /dirs, .

, SCons , , SCons GoFastButton , .

+4

, . CMake ( KDE ), scons - . (KDevelop) CMake, , .

( , , ). , , ( git, Mercurial Subversion ).


CMake:

project("My Awesome Project" CXX)
cmake_minimum_required(VERSION 2.8)
add_library(foo SHARED a.cpp b.cpp c.cpp) #we'll build an so file
add_executable(bar bar.cpp)
target_link_libraries(bar foo) #link bar to foo

, , , .

+4

Scons as build system. , , . .

, , , , Scon Glob(), . , ++ , :

 Program('program', Glob('*.cpp'))

CMake, .

SCons, Python, Python, .

( CMakeList.txt), - script.

+2
source

All Articles