Code::Blocks Forums

User forums => Using Code::Blocks => Topic started by: hanshuckebein on January 09, 2021, 05:55:39 pm

Title: How to make a build target to generate only gcc preprocessor output files
Post by: hanshuckebein on January 09, 2021, 05:55:39 pm
I would like to have a build target, which only produces the output of the gcc preprocessor for each file. How to do this?
Title: Re: How to make a build target to generate only gcc preprocessor output files
Post by: oBFusCATed on January 09, 2021, 07:01:10 pm
You'll probably have to define a compiler which does just that.
Inspect Settings -> Compiler.
Title: Re: How to make a build target to generate only gcc preprocessor output files
Post by: hanshuckebein on January 09, 2021, 07:13:25 pm
I tried it, but didn't succeed. Is there some information on this topic available?
Title: Re: How to make a build target to generate only gcc preprocessor output files
Post by: oBFusCATed on January 10, 2021, 01:47:46 am
Not exactly.
We  have this http://wiki.codeblocks.org/index.php/Adding_support_for_non_C/C%2B%2B_files_to_the_build_system
You have to modify an existing compiler. You have to make the compiler command do whatever you want and then make the linking command to do nothing...

Or you could just setup a tool to do it or write a script. http://wiki.codeblocks.org/index.php/Scripting_commands