Commit bab58187 authored by COULAUD Olivier's avatar COULAUD Olivier

Add two new morse files

parent 5551c038
cmake_minimum_required(VERSION 2.8)
project(TEST_MORSE_CMAKE_MODULES_FIND Fortran C CXX)
# location of find package modules
list(APPEND CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/../")
# main variable: control the list of libraries to find thanks to find_package
# pay attention that package names must be given with capital letters
set(PACKAGES "" CACHE STRING "List of packages to find, ex: BLAS;STARPU;PASTIX")
# specific components to look for with packages
set(LAPACKE_COMPONENTS "" CACHE STRING "List of specific dependencies to look for with LAPACKE, ex: TMG")
set(QUARK_COMPONENTS "" CACHE STRING "List of specific dependencies to look for with QUARK, ex: HWLOC")
set(PASTIX_COMPONENTS "" CACHE STRING "List of specific dependencies to look for with PASTIX, ex: MPI;SEQ;STARPU;STARPU_CUDA;STARPU_FXT;SCOTCH;PTSCOTCH;METIS")
set(PETSC_COMPONENTS "" CACHE STRING "List of specific dependencies to look for with PETSc, ex: CXX|C")
set(FFTW_COMPONENTS "" CACHE STRING "List of specific dependencies to look for with FFTW, ex: MKL;ESSL;THREADS;OMP;SIMPLE;LONG;QUAD")
set(MUMPS_COMPONENTS "" CACHE STRING "List of specific dependencies to look for with MUMPS, ex: MPI;SEQ;SCOTCH;PTSCOTCH;METIS;PARMETIS;OPENMP")
set(CHAMELEON_COMPONENTS "" CACHE STRING "List of specific dependencies to look for with CHAMELEON, ex: STARPU;QUARK;CUDA;MPI;FXT")
set(STARPU_COMPONENTS "" CACHE STRING "List of specific dependencies to look for with STARPU, ex: HWLOC;CUDA;MPI;BLAS;MAGMA;FXT;SIMGRID")
set(PARSEC_COMPONENTS "" CACHE STRING "List of specific dependencies to look for with PARSEC, ex: HWLOC;CUDA;MPI;AYUDAME")
# to enable ctests
option(ENABLE_CTEST "Enable Testing: will test all supported packages" OFF)
foreach(_library ${PACKAGES})
if (${_library}_COMPONENTS)
find_package(${_library} COMPONENTS ${${_library}_COMPONENTS})
else()
find_package(${_library})
endif()
if (${_library}_FOUND)
if (${_library}_LIBRARIES)
message(STATUS "${_library}_LIBRARIES found: ${${_library}_LIBRARIES}")
else()
message(WARNING "${_library}_LIBRARIES not found: ${${_library}_LIBRARIES}")
endif()
if (${_library}_LIBRARIES_DEP)
message(STATUS "${_library}_LIBRARIES_DEP found: ${${_library}_LIBRARIES_DEP}")
endif()
if (${_library}_LIBRARY_DIRS)
message(STATUS "${_library}_LIBRARY_DIRS found: ${${_library}_LIBRARY_DIRS}")
else()
message(WARNING "${_library}_LIBRARY_DIRS not found: ${${_library}_LIBRARY_DIRS}")
endif()
if (${_library}_LIBRARY_DIRS_DEP)
message(STATUS "${_library}_LIBRARY_DIRS_DEP found: ${${_library}_LIBRARY_DIRS_DEP}")
endif()
if (${_library}_INCLUDE_DIRS)
message(STATUS "${_library}_INCLUDE_DIRS found: ${${_library}_INCLUDE_DIRS}")
else()
message(WARNING "${_library}_INCLUDE_DIRS not found: ${${_library}_INCLUDE_DIRS}")
endif()
if (${_library}_INCLUDE_DIRS_DEP)
message(STATUS "${_library}_INCLUDE_DIRS_DEP found: ${${_library}_INCLUDE_DIRS_DEP}")
endif()
else()
message(FATAL_ERROR "${_library} NOT FOUND !!")
endif()
endforeach()
# Add CTest rules
if (ENABLE_CTEST)
enable_testing()
include(CTest)
set(CTEST_PACKAGES_LIST
BLAS
BLASEXT
CBLAS
CHAMELEON
CPPCHECK
EZTRACE
FABULOUS
FFTW
FXT
GTG
HQR
HWLOC
#HYPRE module not ready TODO: complete it
LAPACK
LAPACKE
LAPACKEXT
METIS
MPIEXT
MUMPS
#PAMPA not able to install it, link problem with ptscotch
PAPI
PARMETIS
PARSEC
PASTIX
PETSc
PTSCOTCH
QUARK
SCALAPACK
SCOTCH
SIMGRID
STARPU
SUITESPARSE
TMG)
foreach(_package ${CTEST_PACKAGES_LIST})
add_test(FIND${_package} cmake ${CMAKE_SOURCE_DIR} -DPACKAGES=${_package})
endforeach()
endif()
###
### END CMakeLists.txt
###
Test MORSE CMake modules
========================
Procedure to test the `find_package` modules hosted in `modules/find`
```
git clone https://gitlab.inria.fr/solverstack/morse_cmake.git
cd morse_cmake/modules/find/tests
mkdir build
cd build
# to test all the packages, e.g.
cmake .. -DENABLE_CTEST=ON
# to test some only, e.g.
cmake .. -DPACKAGES="HWLOC;STARPU;PASTIX"
# to enable some components in some find, e.g. here we look for QUARK linked with HWLOC and PASTIX with PARSEC and STARPU
cmake .. -DENABLE_CTEST=ON -DQUARK_COMPONENTS="HWLOC" -DPASTIX_COMPONENTS="PARSEC;STARPU"
```
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