]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Cleanup of FindBOOST.cmake 6727/head
authorMarc Fehling <m.fehling@fz-juelich.de>
Thu, 7 Jun 2018 03:37:06 +0000 (21:37 -0600)
committerMarc Fehling <m.fehling@fz-juelich.de>
Fri, 15 Jun 2018 00:36:27 +0000 (18:36 -0600)
cmake/modules/FindBOOST.cmake

index 068d70ed4273cc1317ad46866f0e67e35b749833..78b4943d6d1386b3826f0d29fe9fdb1134159984 100644 (file)
 #     BOOST_VERSION_MINOR
 #     BOOST_VERSION_SUBMINOR
 #
-# We require at least boost 1.59 since boost::container::small_vector was
-# introduced in 1.58 and some serialization bugs in 1.58 were not fixed until
-# 1.59.
+
+#
+# We require at least boost 1.59.
+# - Boost::container::small_vector was introduced in 1.58 and some
+#   serialization bugs in 1.58 were not fixed until 1.59.
+#
+SET(BOOST_VERSION_REQUIRED 1.59)
 
 SET(BOOST_DIR "" CACHE PATH "An optional hint to a BOOST installation")
 SET_IF_EMPTY(BOOST_DIR "$ENV{BOOST_DIR}")
@@ -47,11 +51,11 @@ ENDIF()
 # temporarily disable ${CMAKE_SOURCE_DIR}/cmake/modules for module lookup
 LIST(REMOVE_ITEM CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake/modules/)
 IF(DEAL_II_WITH_ZLIB)
-  FIND_PACKAGE(Boost 1.59 COMPONENTS
+  FIND_PACKAGE(Boost ${BOOST_VERSION_REQUIRED} COMPONENTS
     iostreams serialization system thread
     )
 ELSE()
-  FIND_PACKAGE(Boost 1.59 COMPONENTS
+  FIND_PACKAGE(Boost ${BOOST_VERSION_REQUIRED} COMPONENTS
     serialization system thread
     )
 ENDIF()
@@ -66,9 +70,9 @@ IF(NOT Boost_FOUND AND Boost_USE_STATIC_LIBS)
   # temporarily disable ${CMAKE_SOURCE_DIR}/cmake/modules for module lookup
   LIST(REMOVE_ITEM CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake/modules/)
   IF(DEAL_II_WITH_ZLIB)
-    FIND_PACKAGE(Boost 1.59 COMPONENTS iostreams serialization system thread)
+    FIND_PACKAGE(Boost ${BOOST_VERSION_REQUIRED} COMPONENTS iostreams serialization system thread)
   ELSE()
-    FIND_PACKAGE(Boost 1.59 COMPONENTS serialization system thread)
+    FIND_PACKAGE(Boost ${BOOST_VERSION_REQUIRED} COMPONENTS serialization system thread)
   ENDIF()
   LIST(APPEND CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake/modules/)
 ENDIF()

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.