shogun-toolbox/shogun — pull request #379 by jklontz (2012-03-05 02:47:30+00:00)
Title: Native Windows Compilation with CMake and Mingw-w64

Hey Guys,

I've been looking into using libshogun for a research project, but would only be interested in doing so if I could compile the library for 64-bit Windows (in addition to 64-bit Linux/OSX). I've got an untested bare-bones build of libshogun using the following workflow and the proposed changes:

1) From Cygwin: _./configure && make_
2) Use CMake with the CMakeLists.txt files I wrote to build Mingw Makefiles.
3) Build libshogun with Mingw-w64 toolchain.

I suspect step 1) could be eliminated by porting the auto-generation of _config.h_ (etc) into the CMake scripting language as well but I haven't looked into it yet.

I did look into compiling with MSVC 2010 as well but more work would need to be done including:
1) Providing alternatives to missing functionality, the most ominous being _pthreads.h_.
2) Tweaks to some existing code, particularly the _Math.h_ static templated functions, to resolve compilation errors due to nuances in language support.

Lastly, you'll notice that I didn't provide usable alternatives for a few functions. I was hoping to get some feedback first before I spent more time on it.

Many Thanks!

-Josh