]> https://gitweb.dealii.org/ - dealii.git/commitdiff
CMake: Print informative error messages in case of configuration failure 2921/head
authorMatthias Maier <tamiko@43-1.org>
Fri, 5 Aug 2016 16:14:51 +0000 (11:14 -0500)
committerMatthias Maier <tamiko@43-1.org>
Fri, 5 Aug 2016 16:14:51 +0000 (11:14 -0500)
contrib/python-bindings/source/CMakeLists.txt

index 70b4b98b128228aadc27e8b4be1b3da131597503..867c3758fbaea46c388786447918d348a6d23230 100644 (file)
 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

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.