PARQUET-1262: Use the same BOOST_ROOT and Boost_NAMESPACE for Thrift

Author: Korn, Uwe <Uwe.Korn@blue-yonder.com>

Closes #460 from xhochy/PARQUET-1262 and squashes the following commits:

2a886ce [Korn, Uwe] PARQUET-1262: Use the same BOOST_ROOT and Boost_NAMESPACE for Thrift
diff --git a/cmake_modules/ThirdpartyToolchain.cmake b/cmake_modules/ThirdpartyToolchain.cmake
index 690fd0b..c23fea9 100644
--- a/cmake_modules/ThirdpartyToolchain.cmake
+++ b/cmake_modules/ThirdpartyToolchain.cmake
@@ -205,6 +205,14 @@
                         "-DWITH_LIBEVENT=OFF"
                         )
 
+  # Thrift also uses boost. Forward important boost settings if there were ones passed.
+  if (DEFINED BOOST_ROOT)
+    set(THRIFT_CMAKE_ARGS ${THRIFT_CMAKE_ARGS} "-DBOOST_ROOT=${BOOST_ROOT}")
+  endif()
+  if (DEFINED Boost_NAMESPACE)
+    set(THRIFT_CMAKE_ARGS ${THRIFT_CMAKE_ARGS} "-DBoost_NAMESPACE=${Boost_NAMESPACE}")
+  endif()
+
   set(THRIFT_STATIC_LIB_NAME "${CMAKE_STATIC_LIBRARY_PREFIX}thrift")
   if (MSVC)
     if (PARQUET_USE_STATIC_CRT)