Code::Blocks

User forums => General (but related to Code::Blocks) => Topic started by: ancient nuby on February 11, 2012, 02:39:25 am

Title: Build documentation
Post by: ancient nuby on February 11, 2012, 02:39:25 am
Is there any documentation on the build process that describes how CB determines what needs to be built?
Title: Re: Build documentation
Post by: stahta01 on February 11, 2012, 02:50:25 am
http://wiki.codeblocks.org/index.php?title=The_build_process_of_Code::Blocks (http://wiki.codeblocks.org/index.php?title=The_build_process_of_Code::Blocks)

The above is the closest I could find on the Wiki.
I know that Code::Blocks uses the file date/time and if newer compiles that file.
Code::Blocks also looks for headers files that a C/CPP source file includes and if the header is newer it rebuilds the source file. Not sure what CB does if the header file is not found or if not part of project.

To change the build order you can change the source file build weight property to make it be compile/linked earlier or later.

Tim S.
Title: Re: Build documentation
Post by: ancient nuby on February 11, 2012, 04:55:25 am
OK, next question:  is it possible for a plugin to override the internal build mechanism other than the "use makefile" settings?  I would like to use an existing, high performance build tool by integrating it with the CB environment.

Does this question belong in the development section?
Title: Re: Build documentation
Post by: MortenMacFly on February 11, 2012, 06:18:03 am
is it possible for a plugin to override the internal build mechanism other than the "use makefile" settings?
The build commands can be found in the advanced section of each compiler and can be adjusted to your need.

Here:
http://forums.codeblocks.org/index.php/topic,15915.0.html
...I posted a patch for the compiler plugins that allows you to override / send build file commands, the included plugin demonstrates how to do that.

In the end surely you can write your own compiler plugin or extend the existing and do whatever you like. The compiler / build mechanism is in the plugin at last.