diff --git a/tools/plugin-template/CMakeLists.txt-template b/tools/plugin-template/CMakeLists.txt-template index 0cafe6d469c220d8dd091c9bdaf03ed4580378f5..9c6478b0711cbbd5e38a41f3eaa6c4736a300e67 100644 --- a/tools/plugin-template/CMakeLists.txt-template +++ b/tools/plugin-template/CMakeLists.txt-template @@ -2,12 +2,12 @@ cmake_minimum_required (VERSION 3.19) project("_PLUGIN_LOW_") -if (NOT PUGS_PREFIX_PATH) - if (DEFINED ENV{PUGS_INSTALL_DIR}) - message(STATUS "Looking for pugs in ${PUGS_INSTALL_DIR}") - else() - message(FATAL_ERROR "you must set PUGS_INSTALL_DIR environment variable") - endif() +set(PUGS_PREFIX_PATH "" CACHE STRING "pugs intall dir") + +string(COMPARE EQUAL "${PUGS_PREFIX_PATH}" "" pugs_prefix_undefined) + +if (pugs_prefix_undefined) + message(FATAL_ERROR "PUGS_PREFIX_PATH must be defined") endif() # CMake utils @@ -23,6 +23,7 @@ find_package(Pugs REQUIRED) list(APPEND CMAKE_MODULE_PATH "${PUGS_PREFIX_PATH}/lib/cmake/Kokkos") include(KokkosConfig) +set(HDF5_PREFER_PARALLEL TRUE) list(APPEND CMAKE_MODULE_PATH "${PUGS_PREFIX_PATH}/lib/cmake/HighFive") include(HighFiveConfig) diff --git a/tools/plugin-template/README.md-template b/tools/plugin-template/README.md-template index d89c74f974696b95dc875e5357007b5b67fba557..4db1071714e56642f3114dad4bc3451bbb274b56 100644 --- a/tools/plugin-template/README.md-template +++ b/tools/plugin-template/README.md-template @@ -32,7 +32,7 @@ make install In the build directory one runs ```shell -PUGS_INSTALL_DIR=pugs_install_dir cmake _PLUGIN_LOW__dir +cmake -DPUGS_PREFIX_PATH=pugs_install_dir _PLUGIN_LOW__dir ``` where `pugs_install_dir` has the same value as above and `_PLUGIN_LOW__dir` is the directory that contains this `README.md` file.