Code::Blocks Forums

User forums => Using Code::Blocks => Topic started by: CyberSlayer on April 24, 2007, 08:26:13 am

Title: Using a Custom Build System (not just a custom makefile)
Post by: CyberSlayer on April 24, 2007, 08:26:13 am
Is there a way to use a custom build system with CB?  I know I could add it to the tools menu in CB but can I configure CB so that it will run a custom build system when I press ctrl-F9?  What I need it to do to is to call a command line program with the source file containing the main function and several flags as arguments.  Is this possible? 

Thanks.
Title: Re: Using a Custom Build System (not just a custom makefile)
Post by: raph on April 24, 2007, 10:56:17 am
Have a look at Project->Properties.
Makefile will be the value of $makefile later. Check "This is a custom Makefile".
Then go to Project->Build options->Make commands.
Here you'll find what you want.

Regards raph
Title: Re: Using a Custom Build System (not just a custom makefile)
Post by: CyberSlayer on April 25, 2007, 08:38:47 am
Thanks for the reply.  I can't do that for my build system because my build system does not require a makefile.  It only needs the path to the file with the main function to be passed to it and it will determine what other source files need to be linked in (exact file naming conventions are followed during coding to ensure that this works).

I tried just setting the build project/target command to call my build system with the main file as an argument directly but it doesn't build.  Is there a better way to do this since my build system isn't using the Makefile?

Thanks.
Title: Re: Using a Custom Build System (not just a custom makefile)
Post by: Game_Ender on April 29, 2007, 04:05:26 am
Can you post the output so we know what "it doesn't build" means?
Title: Re: Using a Custom Build System (not just a custom makefile)
Post by: CyberSlayer on April 29, 2007, 07:02:15 am
I don't remember what the output was.  Anyway, I solved the problem a different way by modifying my build system so that it generates CB project files instead of compiling the code.  Then I just open the CB project file and everything works correctly.  This has the desired effect and works much better with CB.  Thanks for your help.