Repository: madlib
Updated Branches:
  refs/heads/master 0490ea779 -> cf5ace944


Build: Download compatible Boost if version >= 1.65

JIRA: MADLIB-1235

BOOST 1.65.0 removed the TR1 library which is required by MADlib till
C++11 is completely supported. Hence, we force download of a compatible
version if existing Boost is 1.65 or greater. This should be removed
when TR1 dependency is removed.

Closes #310


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

Branch: refs/heads/master
Commit: cf5ace944bef74648fd456c1f00356df78e90f4f
Parents: 0490ea7
Author: Rahul Iyer <[email protected]>
Authored: Sat Aug 11 12:28:29 2018 -0700
Committer: Rahul Iyer <[email protected]>
Committed: Wed Aug 15 10:14:18 2018 -0700

----------------------------------------------------------------------
 src/CMakeLists.txt | 23 ++++++++++++++++-------
 1 file changed, 16 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/madlib/blob/cf5ace94/src/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index e2ce352..c9759ad 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -103,21 +103,30 @@ set(MAD_MODULE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/modules)
 # -- Third-party dependencies: Find or download Boost 
--------------------------
 
 find_package(Boost 1.47)
-
-# We use BOOST_ASSERT_MSG, which only exists in Boost 1.47 and later.
-# Unfortunately, the FindBoost module seems to be broken with respect to 
version
-# checking, so we will set Boost_FOUND to FALSE if the version is too old.
 if(Boost_FOUND)
+    # We use BOOST_ASSERT_MSG, which only exists in Boost 1.47 and later.
+    # Unfortunately, the FindBoost module seems to be broken with respect to
+    # version checking, so we will set Boost_FOUND to FALSE if the version is
+    # too old.
     if(Boost_VERSION LESS 104600)
+        message(STATUS "No sufficiently recent version (>= 1.47) of Boost was 
found. Will download.")
+        set(Boost_FOUND FALSE)
+    endif(Boost_VERSION LESS 104600)
+
+    # BOOST 1.65.0 removed the TR1 library which is required by MADlib till
+    # C++11 is completely supported. Hence, we force download of a compatible
+    # version if existing Boost is 1.65 or greater. FIXME: This should be
+    # removed when TR1 dependency is removed.
+    if(NOT Boost_VERSION LESS 106500)
+        message(STATUS
+                "Incompatible Boost version (>= 1.65) found. Will download a 
compatible version.")
         set(Boost_FOUND FALSE)
-    endif(Boost_VERSION LESS 104600 )
+    endif(NOT Boost_VERSION LESS 106500)
 endif(Boost_FOUND)
 
 if(Boost_FOUND)
     include_directories(${Boost_INCLUDE_DIRS})
 else(Boost_FOUND)
-    message(STATUS "No sufficiently recent version (>= 1.47) of Boost was 
found. Will download.")
-
     ExternalProject_Add(EP_boost
         PREFIX ${MAD_THIRD_PARTY}
         DOWNLOAD_DIR ${MAD_THIRD_PARTY}/downloads

Reply via email to