From: Matthias Maier Date: Fri, 5 Aug 2016 16:14:51 +0000 (-0500) Subject: CMake: Print informative error messages in case of configuration failure X-Git-Tag: v8.5.0-rc1~801^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F2921%2Fhead;p=dealii.git CMake: Print informative error messages in case of configuration failure --- diff --git a/contrib/python-bindings/source/CMakeLists.txt b/contrib/python-bindings/source/CMakeLists.txt index 70b4b98b12..867c3758fb 100644 --- a/contrib/python-bindings/source/CMakeLists.txt +++ b/contrib/python-bindings/source/CMakeLists.txt @@ -20,6 +20,14 @@ INCLUDE(FindPythonLibs) INCLUDE(FindPythonInterp) +IF(FEATURE_BOOST_BUNDLED_CONFIGURED) + MESSAGE(FATAL_ERROR + "DEAL_II_COMPONENT_PYTHON_BINDINGS has unmet configuration requirements: " + "Python bindings require an external boost library, but deal.II was " + "configured with bundled boost." + ) +ENDIF() + # # Unset Boost_Found and run the low level FindBOOST.cmake module again to # pick up libboost_python.so @@ -30,6 +38,13 @@ SET(Boost_FOUND) _FIND_PACKAGE(Boost 1.54 COMPONENTS python) LIST(APPEND CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake/modules/) +IF(NOT Boost_FOUND) + MESSAGE(FATAL_ERROR + "DEAL_II_COMPONENT_PYTHON_BINDINGS has unmet configuration requirements: " + "The external boost library does not provide Boost.Python" + ) +ENDIF() + # # FIXME: Once finalized, reconsider moving this definitions into # cmake/setup_dealii.cmake