From e06cbf613c173cdf2a488d8f6f26b6b7a141dcca Mon Sep 17 00:00:00 2001 From: Hans Ekkehard Plesser Date: Thu, 8 Aug 2024 14:16:04 +0200 Subject: [PATCH 1/2] Update Boost detection to CMake's CONFIG scheme --- cmake/ProcessOptions.cmake | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/cmake/ProcessOptions.cmake b/cmake/ProcessOptions.cmake index b4abab8237..09498146d1 100644 --- a/cmake/ProcessOptions.cmake +++ b/cmake/ProcessOptions.cmake @@ -294,11 +294,9 @@ function( NEST_PROCESS_WITH_GSL ) set( GSL_ROOT "${with-gsl}" ) endif () - find_package( GSL ) + find_package( GSL 1.11 ) - # only allow GSL 1.11 and later - if ( GSL_FOUND AND ( "${GSL_VERSION}" VERSION_GREATER "1.11" - OR "${GSL_VERSION}" VERSION_EQUAL "1.11" )) + if ( GSL_FOUND ) set( HAVE_GSL ON PARENT_SCOPE ) # export found variables to parent scope @@ -550,7 +548,8 @@ function( NEST_PROCESS_WITH_BOOST ) set(Boost_USE_RELEASE_LIBS ON) # only find release libs # Needs Boost version >=1.62.0 to use Boost sorting, JUNIT logging # Require Boost version >=1.69.0 due to change in Boost sort - find_package( Boost 1.69.0 ) + # Require Boost version >=1.70.0 due to change in package finding + find_package( Boost 1.70 CONFIG ) if ( Boost_FOUND ) # export found variables to parent scope set( HAVE_BOOST ON PARENT_SCOPE ) From d857959f03e80f4e54a38f7da546966ab7605b6c Mon Sep 17 00:00:00 2001 From: Hans Ekkehard Plesser Date: Thu, 8 Aug 2024 14:16:29 +0200 Subject: [PATCH 2/2] Issue warning if NEST is built without Boost --- cmake/ConfigureSummary.cmake | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/cmake/ConfigureSummary.cmake b/cmake/ConfigureSummary.cmake index 0e3eba6208..ea9610aa9a 100644 --- a/cmake/ConfigureSummary.cmake +++ b/cmake/ConfigureSummary.cmake @@ -261,6 +261,18 @@ function( NEST_PRINT_CONFIG_SUMMARY ) message( "" ) endif () + if ( NOT HAVE_BOOST ) + message( "" ) + message( "ATTENTION!" ) + message( "You are about to compile NEST without the Boost Library or" ) + message( "your Boost Library is too old (before v1.70). This means" ) + message( "that a few neuron models will not be available and that" ) + message( "overall performance may be reduced." ) + message( "" ) + message( "--------------------------------------------------------------------------------" ) + message( "" ) + endif () + message( "You can now build and install NEST with" ) message( " make" ) message( " make install" )