summaryrefslogtreecommitdiff
path: root/compiler/cpp/CMakeLists.txt
diff options
context:
space:
mode:
authorPascal Bach <pascal.bach@siemens.com>2014-06-10 13:15:40 +0200
committerPascal Bach <pascal.bach@siemens.com>2014-06-10 13:44:02 +0200
commit569863a1385c38eb937662aa655db1c3fb0819fe (patch)
tree257419d25b8e4c5c886f3d5ae8bd5dbf937e1c7f /compiler/cpp/CMakeLists.txt
parent42be4e818ada259080811a87fb239fa81222f581 (diff)
downloadthrift-569863a1385c38eb937662aa655db1c3fb0819fe.tar.gz
Allow cross build for windows using mingw32
- Build the compiler using CMake for: - Linux native gcc - Windows using mingw32
Diffstat (limited to 'compiler/cpp/CMakeLists.txt')
-rw-r--r--compiler/cpp/CMakeLists.txt3
1 files changed, 1 insertions, 2 deletions
diff --git a/compiler/cpp/CMakeLists.txt b/compiler/cpp/CMakeLists.txt
index 5e07178ca..152e5db45 100644
--- a/compiler/cpp/CMakeLists.txt
+++ b/compiler/cpp/CMakeLists.txt
@@ -37,7 +37,7 @@ string(REGEX REPLACE "[0-9]+\\.[0-9]+\\.([0-9]+)" "\\1" thrift_VERSION_PATCH ${t
message(STATUS "Thrift version: ${thrift_VERSION} (${thrift_VERSION_MAJOR}.${thrift_VERSION_MINOR}.${thrift_VERSION_PATCH})")
# Windows has a different header
-if(WIN32)
+if(MSVC)
set(FLEX_FLAGS "--wincompat") # Don't use unistd.h on windows
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/src/windows/version.h.in ${CMAKE_CURRENT_BINARY_DIR}/version.h)
else()
@@ -144,7 +144,6 @@ THRIFT_ADD_COMPILER(lua "Enable compiler for Lua" ON)
include_directories(${CMAKE_CURRENT_BINARY_DIR} src)
add_executable(thrift ${thrift_SOURCES})
-set_target_properties(thrift PROPERTIES VERSION ${thrift_VERSION})
target_link_libraries(thrift libparse)