diff options
author | Roger Meier <roger@apache.org> | 2015-05-15 15:21:50 +0200 |
---|---|---|
committer | Roger Meier <roger@apache.org> | 2015-05-15 15:44:22 +0200 |
commit | a6b66332599f45dbfd7eb75d1bd001661b6cace4 (patch) | |
tree | bf7817f86dea9e02d38a8001f0a7fc9e33143e8e /build/cmake | |
parent | 86fded21b55573bb9240552a284f1f3d7255bd32 (diff) | |
download | thrift-a6b66332599f45dbfd7eb75d1bd001661b6cace4.tar.gz |
THRIFT-2850 CMake: Windows improvements, doc, TMemoryBufferTest fix
Diffstat (limited to 'build/cmake')
-rwxr-xr-x[-rw-r--r--] | build/cmake/DefinePlatformSpecifc.cmake | 15 | ||||
-rw-r--r-- | build/cmake/README.md | 20 |
2 files changed, 20 insertions, 15 deletions
diff --git a/build/cmake/DefinePlatformSpecifc.cmake b/build/cmake/DefinePlatformSpecifc.cmake index db411d516..40ec6276b 100644..100755 --- a/build/cmake/DefinePlatformSpecifc.cmake +++ b/build/cmake/DefinePlatformSpecifc.cmake @@ -69,19 +69,18 @@ if(MSVC) endif() elseif(UNIX) - # For UNIX - # WITH_*THREADS selects which threading library to use - if(WITH_BOOSTTHREADS) - add_definitions("-DUSE_BOOST_THREAD=1") - elseif(WITH_STDTHREADS) - add_definitions("-DUSE_STD_THREAD=1") - endif() - find_program( MEMORYCHECK_COMMAND valgrind ) set( MEMORYCHECK_COMMAND_OPTIONS "--gen-suppressions=all --leak-check=full" ) set( MEMORYCHECK_SUPPRESSIONS_FILE "${PROJECT_SOURCE_DIR}/test/valgrind.suppress" ) endif() +# WITH_*THREADS selects which threading library to use +if(WITH_BOOSTTHREADS) + add_definitions("-DUSE_BOOST_THREAD=1") +elseif(WITH_STDTHREADS) + add_definitions("-DUSE_STD_THREAD=1") +endif() + # GCC and Clang. if(CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang") # FIXME -pedantic can not be used at the moment because of: https://issues.apache.org/jira/browse/THRIFT-2784 diff --git a/build/cmake/README.md b/build/cmake/README.md index d76a96edb..311ef154a 100644 --- a/build/cmake/README.md +++ b/build/cmake/README.md @@ -15,15 +15,22 @@ specific soultion files. => No solution files within source tree. ## Usage just do this: - mkdir build - cmake ${THRIFT_SRC} + mkdir cmake-build && cd cmake-build + cmake .. if you use a specific toolchain pass it to cmake, the same for options: - cmake -DCMAKE_TOOLCHAIN_FILE=${THRIFT_SRC}/contrib/mingw32-toolchain.cmake ${THRIFT_SRC} - cmake -DCMAKE_C_COMPILER=clang-3.5 -DCMAKE_CXX_COMPILER=clang++-3.5 ${THRIFT_SRC} - cmake -DTHRIFT_COMPILER_HS=OFF ${THRIFT_SRC} - cmake -DWITH_ZLIB=ON ${THRIFT_SRC} + cmake -DCMAKE_TOOLCHAIN_FILE=${THRIFT_SRC}/contrib/mingw32-toolchain.cmake .. + cmake -DCMAKE_C_COMPILER=clang-3.5 -DCMAKE_CXX_COMPILER=clang++-3.5 .. + cmake -DTHRIFT_COMPILER_HS=OFF .. + cmake -DWITH_ZLIB=ON .. + +or on Windows + + cmake -G "Visual Studio 12 2013 Win64" \ + -DBOOST_ROOT=C:/3rdparty/boost_1_58_0 \ + -DZLIB_ROOT=C:/3rdparty/zlib128-dll \ + -DWITH_SHARED_LIB=off -DWITH_BOOSTTHREADS=ON .. and open the development environment you like with the solution or do this: @@ -51,4 +58,3 @@ to generate an installer and distribution package do this: * tutorial * test * merge into /README.md - |