Author Topic: Build documentation  (Read 2366 times)

Offline ancient nuby

  • Single posting newcomer
  • *
  • Posts: 5
Build documentation
« 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?

Offline stahta01

  • Lives here!
  • ****
  • Posts: 6666
    • My Best Post
Re: Build documentation
« Reply #1 on: February 11, 2012, 02:50:25 am »
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.
« Last Edit: February 11, 2012, 02:57:49 am by stahta01 »
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 32 bit.
On Debian Stretch, compiling CB Trunk against wxWidgets 3.0.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline ancient nuby

  • Single posting newcomer
  • *
  • Posts: 5
Re: Build documentation
« Reply #2 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?

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9508
Re: Build documentation
« Reply #3 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.
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: http://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: http://wiki.codeblocks.org/index.php?title=FAQ