GitHub user jeking3 opened a pull request: https://github.com/apache/thrift/pull/474
THRIFT-2850 get windows cmake working again and building the unit tests I made changes to the cmake environment so that cmake can build the compiler, static libraries and unit tests on Windows. In my testing I found that the shared thrift library build is not exporting any symbols so no IMPLIB is being generated (that would be thrift.lib or thriftd.lib), so none of the unit tests would link, nor would thriftz. Here's the command I used to generate the environment: mkdir thrift-build cd thrift-build "C:\Program Files (x86)\CMake\bin\cmake.exe" ..\thrift -G"NMake Makefiles" -DCMAKE_BUILD_TYPE=RelWithDebInfo -DWITH_SHARED_LIB=OFF -DWITH_STATIC_LIB=ON -DWITH_BOOSTTHREADS=ON -DBOOST_ROOT=C:\Boost -DZLIB_ROOT=C:\win3p\tools\x64\zlib-1.2.5 -DOPENSSL_ROOT_DIR=C:\win3p\tools\x64\openssl-1.0.1b -DFLEX_EXECUTABLE=C:\Users\Jim\workspace\winflexbison\win_flex.exe -DBISON_EXECUTABLE=C:\Users\Jim\workspace\winflexbison\win_bison.exe You can also use -G"Visual Studio 10 Win64" to get a thrift.sln file that you can use to load visual studio, this example is for Visual Studio 2010. Visual Studio 2013 would be -G"Visual Studio 12 Win64". I was not able to get the nonblocking server to build because libevent requires autoconf to generate a "event-config.h", and the libevent nmake project does not produce one of these, so I could not compile the non-blocking server; further the libevent header "event.h" conflicts with the Windows Platform SDK header Event.h, so FindLibevent.cmake always finds the Platform SDK as an include directory, so I did not attempt to get it working right now. Tested this on Windows and on Ubuntu 12.04 using CMake-3.2.2. When running the tests on Windows you need to put the library paths into your PATH environment for boost, openssl so that they can be found. The CMake environment does not copy required libraries into the "bin" directory at this time. You can merge this pull request into a Git repository by running: $ git pull https://github.com/jeking3/thrift bugfix/THRIFT-2850-wincmake-on-master-after-THRIFT-3084 Alternatively you can review and apply these changes as the patch at: https://github.com/apache/thrift/pull/474.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #474 ---- commit cd03e580855d4b37bbb97b79f398ff81b3804ee9 Author: Jim King <jim.k...@simplivity.com> Date: 2015-04-30T20:03:34Z THRIFT-2850 get windows cmake working again and building the unit tests for lib/cpp, and pass make check through cmake - also resolve some compiler warnings ---- --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---