May be a workaround might be to divide the C++ project to sub-components and compile the whole project with some high optimization level. Then, during development, recompile only the parts that changed with no optimization at all by using GCC/LLVM flag -O0
(letter "o" and digit "zero").
The key part to such a solution is a fine build system. As of 2015 I use Rake, which is a Ruby analogue to the GNU Make. Rakefile is an ordinary Ruby file that just loads a Rake specific library. The Rake tasks are essentially global Ruby functions, which means that anything that can be written in Ruby, can be executed from a Rake task. As of 2015 I use Rake tasks for starting self-tests, starting tests of a specific component (during the "test driven development"), building, code generation, etc.
- As of 2015 the corporate Java world seems to like Gradle, which is a successor of the Apache Maven, which is a successor of the Apache Ant.
- Open source scientific C++ software projects seem to find CMake practical. The Boost C++ library seems to offer Boost.Build.
On multi-core CPU's the classical GNU Make can build multiple files in parallel, if it receives the -j
command line option.