<div dir="ltr"><div><div><div><div><div><div><div><div><div><div><div><div><div>Hi,<br><br></div>I've recently been trying to use kdevelop to build some embedded code, and seem to have run into a rather trying glitch.<br><br></div>A lot of the code, both within the header files and libraries that I intend to use and the code that I intend to write, depends heavily on preprocessor directives - most importantly the -mmcu compiler flag and the directives it generates. In the absence of this directive, the preprocessor dumps out of most of the header files because it doesn't know which processor it should set up the defines for.<br><br></div>Some very old posts on the internets suggested that kdevelop 3.x did, at some point, have the ability to add extra preprocessor directives to the parser. Try as I might, I can't find anything like that on 4.6.0, which makes using kdevelop for this disturbing.<br><br></div>So here's what I would like to know / request : <br><br></div>* Is there a way to specify custom preprocessor defines for the parser in kdevelop? During the build cmake provides the necessary flags to the compiler and the build works fine - I just need to be able to set some relatively sane default during development to make autocomplete and crossreferencing work within the editor and kdevelop. <br><br></div>* If not, is there some way a custom environment setting could be used to achieve the same effect?<br><br></div>* Is there any way in which kdevelop's parser announces itself to the preprocessor? While not ideal (since it'll probably need to go into multiple files), it should be fundamentally sufficient if I could do something like : <br></div><br>#ifdef KDEVELOP_PARSER<br></div>#define __MSP4305529__ (or what have you)<br></div>#endif<br></div><br>This would allow the code to compile fine while being compatible with the IDE. <br><br></div>Thanks<br></div>Shashank<br></div>