From d5d0bb6cd4ef8bc957bc20bf897857b032478585 Mon Sep 17 00:00:00 2001
From: "Joachim Wuttke (h)" <j.wuttke@fz-juelich.de>
Date: Fri, 3 Jul 2020 15:24:00 +0200
Subject: [PATCH] CMake now requires Boost 1.65.0

---
 .../modules/SearchInstalledSoftware.cmake         | 15 ++++++++-------
 1 file changed, 8 insertions(+), 7 deletions(-)

diff --git a/cmake/bornagain/modules/SearchInstalledSoftware.cmake b/cmake/bornagain/modules/SearchInstalledSoftware.cmake
index 24295575035..2681c742781 100644
--- a/cmake/bornagain/modules/SearchInstalledSoftware.cmake
+++ b/cmake/bornagain/modules/SearchInstalledSoftware.cmake
@@ -17,16 +17,17 @@ set(Boost_USE_STATIC_LIBS OFF)
 set(Boost_USE_MULTITHREADED ON)
 set(Boost_USE_STATIC_RUNTIME OFF)
 add_definitions(-DBOOST_ALL_DYN_LINK) # line is needed for MSVC
-#add_definitions(-DBOOST_LIB_DIAGNOSTIC) # shows during compilation auto-linked libraries
-set(boost_libraries_required program_options iostreams regex system filesystem)
+
+# Boost component libraries (do not list headers here)
+set(boost_libraries_required filesystem iostreams program_options)
 if(WIN32)
-    set(boost_libraries_required ${boost_libraries_required} zlib bzip2)
+    # system seems to be indirectly required
+    list(APPEND boost_libraries_required bzip2 system zlib)
 endif()
-
-find_package(Boost 1.48.0 COMPONENTS ${boost_libraries_required} REQUIRED)
-# In spite of the "REQUIRED" flag, FindBoost will not terminate if some components are missing.
+find_package(Boost 1.65.1 COMPONENTS ${boost_libraries_required} REQUIRED)
+# In spite of the "REQUIRED" flag, FindBoost will not terminate if some components are missing
 if(NOT Boost_FOUND)
-    message(FATAL_ERROR "Not all required Boost components were found")
+    message(FATAL_ERROR "Not all required Boost component libraries were found")
 endif()
 message(STATUS "Found Boost includes at ${Boost_INCLUDE_DIRS}, libraries at ${Boost_LIBRARY_DIRS}")
 
-- 
GitLab