Review Request: Fix standard include dirs and macros under Windows

Andreas Holzammer andy at kdab.com
Sun Mar 6 10:31:58 UTC 2011



> On March 5, 2011, 10:51 p.m., Andreas Pakulat wrote:
> > Just for your interest, at work we're using a pretty simple list of predefined macros that we gathered somehow at some point. This is being used for an internal tool to generate cpp/h code from the Qt headers and works since 8 years now. So maybe going through an actual process-execution is not really necessary and instead we could just hardcode the list of defines when MS cl.exe is being used. I should be able to contribute the macros we have for mingw and msvc 6/2003/2005/2008/2010.
> 
> Andreas Pakulat wrote:
>     Actually didn't want to flag this as a 'ship it' yet, though I won't protest if its being pushed.

why dont you want to flag this as 'ship it' yet? its a starting point, i know it does not have the functionally we all dreamt about, but we need to start somewhere. Then i dont know what the problem is with the generated standard macros? Its a more generic way todo so, so when the compiler changes it will still work, what i think is better then mantaining a static list of macros. I know there are lists out there, but i like a more generic way better, i know its a bit hacky but i think there is no other way to do it generic.


- Andreas


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://git.reviewboard.kde.org/r/100801/#review1790
-----------------------------------------------------------


On March 6, 2011, 10:25 a.m., Andreas Holzammer wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://git.reviewboard.kde.org/r/100801/
> -----------------------------------------------------------
> 
> (Updated March 6, 2011, 10:25 a.m.)
> 
> 
> Review request for KDevelop, kdewin, Milian Wolff, and Patrick Spendrin.
> 
> 
> Summary
> -------
> 
> This patch enables Kdevelop to find the include directories and standard macros under Windows.
> 
> There is no "gcc -dM -E -" under Windows. So you need to do a hack to find the standard defined macros. Therefore a empty cpp file is compiled with a special commandline option "/Bx" to replace the compiler against a program which interpretes the output of the preprocessor.
> 
> For include directories Windows uses enviroment variables, so this patch processes them.
> 
> This patch has been written by Patrick Spenderin, thank you for that.
> 
> 
> Diffs
> -----
> 
>   languages/cpp/CMakeLists.txt e7c3c0c07ac3ac0ad5b49c60b0d0c279b77e8e75 
>   languages/cpp/msvcdefinehelper.cpp PRE-CREATION 
>   languages/cpp/parser/rpp/chartools.cpp 7fecf1ef2df8ce7e52f8afd2f847dfc746ecd2fc 
>   languages/cpp/setuphelpers.cpp b35ec8386a2c04a7caa421be9bf8e0d268f1213a 
>   languages/cpp/setuphelpers_gcc.cpp PRE-CREATION 
>   languages/cpp/setuphelpers_msvc.cpp PRE-CREATION 
>   languages/cpp/tests/CMakeLists.txt e3b7add33e9f89b96ae8f86da3cc240647cd99a4 
>   projectmanagers/cmake/cmakedocumentation.cpp b4679051fb3ad3e9a4a664f79a1844058f4d8fb5 
> 
> Diff: http://git.reviewboard.kde.org/r/100801/diff
> 
> 
> Testing
> -------
> 
> tested it with Windows 7 Ultimate x64 with KDE Windows trunk compiled with MSVC 2010. Works so far.
> 
> 
> Thanks,
> 
> Andreas
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kdevelop-devel/attachments/20110306/279939b2/attachment.html>


More information about the KDevelop-devel mailing list