Review Request 125573: Fix Compilation of libgpg-error 1.12 with MSVC2015
Michael Drueing
michael at drueing.de
Fri Oct 9 16:43:33 UTC 2015
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/125573/
-----------------------------------------------------------
Review request for kdewin.
Repository: emerge
Description
-------
When emerging libgpg-error with the patch file as is (libgpg-error-cmake-1.12.diff), the build fails because the generated file `_mkerrorcodes.h` comes up empty. The problem is that CMakeLists.txt invokes the C preprocessor by calling `COMMAND ${ERR_COMPILER} -E -P ${BIN_DIR}/_mkerrcodes.h` ... and this won't work for MSVC: The -E switch is "preprocess to stdout" (correct) but it is immediately overridden by the "-P" switch which is "preprocess to file". And indeed, after emerge errors out, there is a file `_mkerrorcodes.i` with the preprocessed output.
There is another diff file, libgpg-error-cmake.diff, which is obviously only used for older versions of libgpg-error, which has the correct call to the compiler (only -E), and if the 1.12 diff file is changed accordingly, libgpg-error compiles.
I wanted to pass this through the reviewboard though because I don't know if that will break e.g. the mingw build on Windows...
Diffs
-----
portage/win32libs/gpg-error/libgpg-error-cmake-1.12.diff 931c400
Diff: https://git.reviewboard.kde.org/r/125573/diff/
Testing
-------
Compiles fine with the patch whereas it fails to compile without.
Since the patch was obviously correct for at least one older version of libgpg-error (as evidenced by the fact that the other diff file includes the exact same patch) I'm pretty confident that this fix is okay here as well
Thanks,
Michael Drueing
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-windows/attachments/20151009/97e2be33/attachment.html>
More information about the Kde-windows
mailing list