Fix standard include dirs and macros under Windows
authorAndreas Holzammer <andreas.holzammer@kdab.com>
Mon, 7 Mar 2011 20:05:24 +0000 (21:05 +0100)
committerAndreas Holzammer <andreas.holzammer@kdab.com>
Mon, 7 Mar 2011 20:05:24 +0000 (21:05 +0100)
commitdd3b915a3c816df8a6a1957b2ce8d977d53ab0d8
treeea1fb38e7da59e603dbffd1bc4f64cfafb1a2920
parenta8949af89bdebd3542ecf01ac784183c486183db
Fix standard include dirs and macros under Windows
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.
languages/cpp/CMakeLists.txt
languages/cpp/msvcdefinehelper.cpp [new file with mode: 0644]
languages/cpp/setuphelpers.cpp
languages/cpp/setuphelpers_gcc.cpp [new file with mode: 0644]
languages/cpp/setuphelpers_msvc.cpp [new file with mode: 0644]
languages/cpp/tests/CMakeLists.txt