diff --git a/cmake/modules/CMakeLists.txt b/cmake/modules/CMakeLists.txt index 5927abb75b6ef27ea23ce8e33e01176af6f63fed..4c2a8184d871a452b049b3c4249df9d246b56ee3 100644 --- a/cmake/modules/CMakeLists.txt +++ b/cmake/modules/CMakeLists.txt @@ -4,7 +4,10 @@ set(modules DumuxDoxygen.cmake DumuxMacros.cmake DumuxTestMacros.cmake + FindGLPK.cmake FindGstat.cmake + FindNLOPT.cmake + FindPVPython.cmake FindValgrind.cmake) include(GNUInstallDirs) install(FILES ${modules} DESTINATION ${DUNE_INSTALL_MODULEDIR}) diff --git a/cmake/modules/DumuxMacros.cmake b/cmake/modules/DumuxMacros.cmake index 97ea267aa20896c27b595383c0da5ffef223763a..d89484b592551353e431229e845e437df7bef7b5 100644 --- a/cmake/modules/DumuxMacros.cmake +++ b/cmake/modules/DumuxMacros.cmake @@ -5,10 +5,10 @@ include(DumuxDoxygen) include(DumuxTestMacros) find_package(GLPK) -find_package(Gstat) find_package(Gnuplot) set(HAVE_GNUPLOT ${GNUPLOT_FOUND}) - +find_package(Gstat) find_package(NLOPT) -find_package(Valgrind) find_package(PTScotch) +find_package(PVPython) +find_package(Valgrind) diff --git a/cmake/modules/FindPVPython.cmake b/cmake/modules/FindPVPython.cmake new file mode 100644 index 0000000000000000000000000000000000000000..0419008b4ec6009adf468d3b12e8d4b0826108e0 --- /dev/null +++ b/cmake/modules/FindPVPython.cmake @@ -0,0 +1,45 @@ +# .. cmake_module:: +# +# Find the pvpython library +# +# You may set the following variables to modify the +# behaviour of this module: +# +# :ref:`PVPYTHON_ROOT` +# Path list to search for pvpython. +# +# Sets the following variables: +# +# :code:`PVPYTHON_FOUND` +# True if the pvpython library was found. +# +# :code:`PVPYTHON_EXECUTABLE` +# Path to pvpython executable +# +# .. cmake_variable:: PVPYTHON_ROOT +# +# You may set this variable to have :ref:`FindPVPython" look +# for the pvpython library in the given path before inspecting +# system paths. +# + +# look for header files, only at positions given by the user +find_program(PVPYTHON_EXECUTABLE + NAMES pvpython + PATHS "${PVPYTHON_ROOT}/" + "${CMAKE_SOURCE_DIR}/../" + "/usr/bin/" + PATH_SUFFIXES "pvpython" + NO_DEFAULT_PATH +) + +include(FindPackageHandleStandardArgs) +find_package_handle_standard_args( + "PVPython" + DEFAULT_MSG + PVPYTHON_EXECUTABLE +) + +# set macros for config.h +set(HAVE_PVPYTHON ${PVPYTHON_FOUND}) +set(PVPYTHON_EXECUTABLE ${PVPYTHON_EXECUTABLE})