From ed0b20804bcc983f95bf14dcc17b897aa770e0fe Mon Sep 17 00:00:00 2001 From: Matthias Maier Date: Fri, 5 Aug 2016 11:14:51 -0500 Subject: [PATCH] CMake: Print informative error messages in case of configuration failure --- contrib/python-bindings/source/CMakeLists.txt | 15 +++++++++++++++ 1 file changed, 15 insertions(+) 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 -- 2.39.5