Repository: thrift
Updated Branches:
  refs/heads/master 7191bc99f -> 311f7157a


THRIFT-2571 Simplify cross compilation using CMake

fix CMake build and update README.md


Project: http://git-wip-us.apache.org/repos/asf/thrift/repo
Commit: http://git-wip-us.apache.org/repos/asf/thrift/commit/311f7157
Tree: http://git-wip-us.apache.org/repos/asf/thrift/tree/311f7157
Diff: http://git-wip-us.apache.org/repos/asf/thrift/diff/311f7157

Branch: refs/heads/master
Commit: 311f7157a2dc5285b027cbf0bc517e9e741de687
Parents: 7191bc9
Author: Roger Meier <[email protected]>
Authored: Sun Aug 17 22:24:30 2014 +0200
Committer: Roger Meier <[email protected]>
Committed: Sun Aug 17 22:24:30 2014 +0200

----------------------------------------------------------------------
 compiler/cpp/CMakeLists.txt | 5 +++++
 compiler/cpp/README.md      | 7 +------
 compiler/cpp/src/thriftl.ll | 4 ----
 3 files changed, 6 insertions(+), 10 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/thrift/blob/311f7157/compiler/cpp/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/compiler/cpp/CMakeLists.txt b/compiler/cpp/CMakeLists.txt
index 43c37cc..e98adb7 100644
--- a/compiler/cpp/CMakeLists.txt
+++ b/compiler/cpp/CMakeLists.txt
@@ -149,6 +149,11 @@ target_link_libraries(thrift libparse)
 
 install(TARGETS thrift DESTINATION bin)
 
+# mingw32 does not support c++0x features
+if(NOT CMAKE_SYSTEM_NAME STREQUAL "Windows")
+set(CMAKE_CXX_FLAGS "-std=c++0x")
+endif()
+
 # create a Distribution Package for the Apache Thrift Compiler
 set(CPACK_PACKAGE_NAME "Apache Thrift")
 set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "Apache Thrift Compiler")

http://git-wip-us.apache.org/repos/asf/thrift/blob/311f7157/compiler/cpp/README.md
----------------------------------------------------------------------
diff --git a/compiler/cpp/README.md b/compiler/cpp/README.md
index 3c40809..017617f 100644
--- a/compiler/cpp/README.md
+++ b/compiler/cpp/README.md
@@ -17,14 +17,9 @@ Use the following steps to build using cmake:
 Now open the folder build_ec using eclipse.
 
 
-### Cross compile using mingw32
+### Cross compile using mingw32 and generate a Windows Installer with CPack
 
     mkdir build_mingw32 && cd build_mingw32
-    cmake -DCMAKE_TOOLCHAIN_FILE=../../../contrib/mingw32-toolchain.cmake ..
-    make
-
-### Generate a Windows Installer Package of the Apache Thrift Compiler
-
     cmake -DCMAKE_TOOLCHAIN_FILE=../../../contrib/mingw32-toolchain.cmake 
-DTHRIFT_COMPILER_HS=OFF ..
     cpack
 

http://git-wip-us.apache.org/repos/asf/thrift/blob/311f7157/compiler/cpp/src/thriftl.ll
----------------------------------------------------------------------
diff --git a/compiler/cpp/src/thriftl.ll b/compiler/cpp/src/thriftl.ll
index af67ff9..5afc601 100644
--- a/compiler/cpp/src/thriftl.ll
+++ b/compiler/cpp/src/thriftl.ll
@@ -52,10 +52,6 @@
 
 #ifdef _MSC_VER
 #include "windows/config.h"
-#else
-#ifndef _WIN32
-#include "config.h"
-#endif
 #endif
 #include "main.h"
 #include "globals.h"

Reply via email to