THRIFT-4081: appveyor retooling - added mingw64 build as a second job to the CI build process

This closes #1205
diff --git a/build/cmake/DefineOptions.cmake b/build/cmake/DefineOptions.cmake
index c2bc717..93fe2c0 100644
--- a/build/cmake/DefineOptions.cmake
+++ b/build/cmake/DefineOptions.cmake
@@ -40,7 +40,7 @@
 # and enables the library if all are found. This means the default is to build as
 # much as possible but leaving out libraries if their dependencies are not met.
 
-CMAKE_DEPENDENT_OPTION(WITH_BOOST_STATIC "Build with Boost static link library" OFF "NOT MSVC" ON)
+option(WITH_BOOST_STATIC "Build with Boost static link library" OFF)
 set(Boost_USE_STATIC_LIBS ${WITH_BOOST_STATIC})
 if (NOT WITH_BOOST_STATIC)
     add_definitions(-DBOOST_ALL_DYN_LINK)
@@ -194,16 +194,13 @@
 message(STATUS " Library features:")
 message(STATUS "  Build shared libraries:                     ${WITH_SHARED_LIB}")
 message(STATUS "  Build static libraries:                     ${WITH_STATIC_LIB}")
-message(STATUS "  Build with ZLIB support:                    ${WITH_ZLIB}")
-message(STATUS "  Build with libevent support:                ${WITH_LIBEVENT}")
-message(STATUS "  Build with Qt4 support:                     ${WITH_QT4}")
-message(STATUS "  Build with Qt5 support:                     ${WITH_QT5}")
-message(STATUS "  Build with OpenSSL support:                 ${WITH_OPENSSL}")
+message(STATUS "  Build with Boost static link library:       ${WITH_BOOST_STATIC}")
 message(STATUS "  Build with Boost thread support:            ${WITH_BOOSTTHREADS}")
 message(STATUS "  Build with C++ std::thread support:         ${WITH_STDTHREADS}")
-message(STATUS "  Build with Boost static link library:       ${WITH_BOOST_STATIC}")
-if(MSVC)
-    message(STATUS "    - Enabled for Visual C++")
-endif()
+message(STATUS "  Build with libevent support:                ${WITH_LIBEVENT}")
+message(STATUS "  Build with OpenSSL support:                 ${WITH_OPENSSL}")
+message(STATUS "  Build with Qt4 support:                     ${WITH_QT4}")
+message(STATUS "  Build with Qt5 support:                     ${WITH_QT5}")
+message(STATUS "  Build with ZLIB support:                    ${WITH_ZLIB}")
 message(STATUS "----------------------------------------------------------")
 endmacro(PRINT_CONFIG_SUMMARY)
diff --git a/build/cmake/DefinePlatformSpecifc.cmake b/build/cmake/DefinePlatformSpecifc.cmake
index f70ec0d..28cc5c2 100644
--- a/build/cmake/DefinePlatformSpecifc.cmake
+++ b/build/cmake/DefinePlatformSpecifc.cmake
@@ -17,6 +17,8 @@
 # under the License.
 #
 
+# Uncomment this to show some basic cmake variables about platforms
+# include (NewPlatformDebug)
 
 # Visual Studio specific options
 if(MSVC)
@@ -96,16 +98,12 @@
   add_definitions("-DUSE_STD_THREAD=1")
 endif()
 
-# GCC and Clang.
+# GCC and Clang: use C++11
 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
-  #set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -O2 -Wall -Wextra -pedantic")
-  # FIXME enabling c++11 breaks some Linux builds on Travis by triggering a g++ bug, see
-  # https://travis-ci.org/apache/thrift/jobs/58017022
-  # on the other hand, both MacOSX and FreeBSD need c++11
-  if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin" OR ${CMAKE_SYSTEM_NAME} MATCHES "FreeBSD")
-    set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -O2 -Wall -Wextra")
+  if(CMAKE_CXX_COMPILER_VERSION VERSION_GREATER "4.6")
+    set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
   endif()
+  set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O2 -Wall -Wextra -pedantic")
 endif()
 
 # If gcc older than 4.8 is detected and plugin support was requested, fail fast
diff --git a/build/cmake/NewPlatformDebug.cmake b/build/cmake/NewPlatformDebug.cmake
new file mode 100644
index 0000000..76cac15
--- /dev/null
+++ b/build/cmake/NewPlatformDebug.cmake
@@ -0,0 +1,43 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+
+#
+# For debugging new platforms, just to see what some environment flags are...
+#
+macro(SHOWFLAG flag)
+  message(STATUS "${flag} = ${${flag}}")
+endmacro(SHOWFLAG)
+
+set(NEWPLATFORMDEBUG ON)
+
+if(NEWPLATFORMDEBUG)
+  SHOWFLAG("APPLE")
+  SHOWFLAG("BORLAND")
+  SHOWFLAG("CMAKE_C_COMPILER_ID")
+  SHOWFLAG("CMAKE_CXX_COMPILER_ID")
+  SHOWFLAG("CMAKE_COMPILER_IS_GNUCC")
+  SHOWFLAG("CMAKE_COMPILER_IS_GNUCXX")
+  SHOWFLAG("CYGWIN")
+  SHOWFLAG("MINGW")
+  SHOWFLAG("MSVC")
+  SHOWFLAG("MSYS")
+  SHOWFLAG("UNIX")
+  SHOWFLAG("WATCOM")
+  SHOWFLAG("WIN32")
+endif(NEWPLATFORMDEBUG)