Commit 9234adad authored by Utkarsh Ayachit's avatar Utkarsh Ayachit

Add matplotlib tests only if matplotlib is found.

Add matplotlib only if matplotlib is found at configure time.

Change-Id: I35c5fcb904644592d011fec126957c80a5afd023
parent 9327c32a
include(ParaViewTestingMacros)
# Check that matplotlib is available
include(FindPythonModules)
find_python_module(matplotlib matplotlib_found)
# Set variables to make the testing functions.
set(vtk-module pvpython)
set(${vtk-module}_TEST_LABELS PARAVIEW)
......@@ -22,7 +26,8 @@ if (FOUND_NUMPY)
)
set(PARAVIEW_PYTHON_ARGS)
if (PARAVIEW_ENABLE_MATPLOTLIB)
if (PARAVIEW_ENABLE_MATPLOTLIB AND matplotlib_found)
# add Matplotlib tests only if matplotlib was found at configure time.
paraview_add_test_python(
NO_DATA NO_RT
TestPythonViewMatplotlibScript.py
......
......@@ -256,7 +256,10 @@ if(PARAVIEW_ENABLE_PYTHON)
list(APPEND TESTS_WITHOUT_BASELINES
${CMAKE_CURRENT_SOURCE_DIR}/TraceIntegrateVariables.xml)
if (PARAVIEW_ENABLE_MATPLOTLIB)
# Check that matplotlib is available
include(FindPythonModules)
find_python_module(matplotlib matplotlib_found)
if (PARAVIEW_ENABLE_MATPLOTLIB AND matplotlib_found)
list(APPEND TESTS_WITH_BASELINES ${CMAKE_CURRENT_SOURCE_DIR}/TestPythonView.xml)
endif()
endif()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment