summaryrefslogtreecommitdiff
path: root/compiler/cpp/CMakeLists.txt
diff options
context:
space:
mode:
authorJames E. King III <jking@apache.org>2019-01-11 12:17:44 -0500
committerJames E. King III <jking@apache.org>2019-01-11 20:47:00 -0500
commit278528cf7b1dd5dd977bce882aa126fac8695697 (patch)
tree311f723983babe76272a4cedc3bdd2d1b6428413 /compiler/cpp/CMakeLists.txt
parent76ee393d20044f7bf930611cf8fc370acb8e9e1a (diff)
downloadthrift-278528cf7b1dd5dd977bce882aa126fac8695697.tar.gz
THRIFT-4732: windows cmake refinements and add windows docker build support
Diffstat (limited to 'compiler/cpp/CMakeLists.txt')
-rw-r--r--compiler/cpp/CMakeLists.txt52
1 files changed, 23 insertions, 29 deletions
diff --git a/compiler/cpp/CMakeLists.txt b/compiler/cpp/CMakeLists.txt
index 0df790ee2..96efe65ab 100644
--- a/compiler/cpp/CMakeLists.txt
+++ b/compiler/cpp/CMakeLists.txt
@@ -16,18 +16,11 @@
# specific language governing permissions and limitations
# under the License.
#
-cmake_minimum_required(VERSION 2.8.12)
+
+cmake_minimum_required(VERSION 3.3)
+project("thrift-compiler" VERSION ${PACKAGE_VERSION})
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/src/thrift/version.h.in ${CMAKE_CURRENT_BINARY_DIR}/thrift/version.h)
-if(MSVC)
- # The winflexbison generator outputs some macros that conflict with the Visual Studio 2010 copy of stdint.h
- # This might be fixed in later versions of Visual Studio, but an easy solution is to include stdint.h first
- if(HAVE_STDINT_H)
- add_definitions(-D__STDC_FORMAT_MACROS)
- add_definitions(-D__STDC_LIMIT_MACROS)
- add_definitions(/FI"stdint.h")
- endif(HAVE_STDINT_H)
-endif()
find_package(FLEX REQUIRED)
find_package(BISON REQUIRED)
@@ -78,36 +71,37 @@ macro(THRIFT_ADD_COMPILER name description initial)
endmacro()
# The following compiler can be enabled or disabled
+THRIFT_ADD_COMPILER(as3 "Enable compiler for ActionScript 3" ON)
THRIFT_ADD_COMPILER(c_glib "Enable compiler for C with Glib" ON)
+THRIFT_ADD_COMPILER(cl "Enable compiler for Common LISP" ON)
+THRIFT_ADD_COMPILER(cocoa "Enable compiler for Cocoa Objective-C" ON)
THRIFT_ADD_COMPILER(cpp "Enable compiler for C++" ON)
-THRIFT_ADD_COMPILER(java "Enable compiler for Java" ON)
-THRIFT_ADD_COMPILER(as3 "Enable compiler for ActionScript 3" ON)
-THRIFT_ADD_COMPILER(dart "Enable compiler for Dart" ON)
-THRIFT_ADD_COMPILER(haxe "Enable compiler for Haxe" ON)
THRIFT_ADD_COMPILER(csharp "Enable compiler for C#" ON)
-THRIFT_ADD_COMPILER(netcore "Enable compiler for .NET Core" ON)
-THRIFT_ADD_COMPILER(py "Enable compiler for Python 2.0" ON)
-THRIFT_ADD_COMPILER(rb "Enable compiler for Ruby" ON)
-THRIFT_ADD_COMPILER(perl "Enable compiler for Perl" ON)
-THRIFT_ADD_COMPILER(php "Enable compiler for PHP" ON)
+THRIFT_ADD_COMPILER(d "Enable compiler for D" ON)
+THRIFT_ADD_COMPILER(dart "Enable compiler for Dart" ON)
+THRIFT_ADD_COMPILER(delphi "Enable compiler for Delphi" ON)
THRIFT_ADD_COMPILER(erl "Enable compiler for Erlang" ON)
-THRIFT_ADD_COMPILER(cocoa "Enable compiler for Cocoa Objective-C" ON)
-THRIFT_ADD_COMPILER(swift "Enable compiler for Cocoa Swift" ON)
-THRIFT_ADD_COMPILER(st "Enable compiler for Smalltalk" ON)
-THRIFT_ADD_COMPILER(ocaml "Enable compiler for OCaml" ON)
+THRIFT_ADD_COMPILER(go "Enable compiler for Go" ON)
+THRIFT_ADD_COMPILER(gv "Enable compiler for GraphViz" ON)
+THRIFT_ADD_COMPILER(haxe "Enable compiler for Haxe" ON)
THRIFT_ADD_COMPILER(hs "Enable compiler for Haskell" ON)
-THRIFT_ADD_COMPILER(xsd "Enable compiler for XSD" ON)
THRIFT_ADD_COMPILER(html "Enable compiler for HTML Documentation" ON)
+THRIFT_ADD_COMPILER(java "Enable compiler for Java" ON)
+THRIFT_ADD_COMPILER(javame "Enable compiler for Java ME" ON)
THRIFT_ADD_COMPILER(js "Enable compiler for JavaScript" ON)
THRIFT_ADD_COMPILER(json "Enable compiler for JSON" ON)
-THRIFT_ADD_COMPILER(javame "Enable compiler for Java ME" ON)
-THRIFT_ADD_COMPILER(delphi "Enable compiler for Delphi" ON)
-THRIFT_ADD_COMPILER(go "Enable compiler for Go" ON)
-THRIFT_ADD_COMPILER(d "Enable compiler for D" ON)
THRIFT_ADD_COMPILER(lua "Enable compiler for Lua" ON)
-THRIFT_ADD_COMPILER(gv "Enable compiler for GraphViz" ON)
+THRIFT_ADD_COMPILER(netcore "Enable compiler for .NET Core" ON)
+THRIFT_ADD_COMPILER(ocaml "Enable compiler for OCaml" ON)
+THRIFT_ADD_COMPILER(perl "Enable compiler for Perl" ON)
+THRIFT_ADD_COMPILER(php "Enable compiler for PHP" ON)
+THRIFT_ADD_COMPILER(py "Enable compiler for Python 2.0" ON)
+THRIFT_ADD_COMPILER(rb "Enable compiler for Ruby" ON)
THRIFT_ADD_COMPILER(rs "Enable compiler for Rust" ON)
+THRIFT_ADD_COMPILER(st "Enable compiler for Smalltalk" ON)
+THRIFT_ADD_COMPILER(swift "Enable compiler for Cocoa Swift" ON)
THRIFT_ADD_COMPILER(xml "Enable compiler for XML" ON)
+THRIFT_ADD_COMPILER(xsd "Enable compiler for XSD" ON)
# Thrift is looking for include files in the src directory
# we also add the current binary directory for generated files