Attention une mise à jour du service Gitlab va être effectuée le mardi 18 janvier (et non lundi 17 comme annoncé précédemment) entre 18h00 et 18h30. Cette mise à jour va générer une interruption du service dont nous ne maîtrisons pas complètement la durée mais qui ne devrait pas excéder quelques minutes.

CMakeLists.txt 3.19 KB
Newer Older
1
2
3
cmake_minimum_required(VERSION 2.8)
project(TEST_MORSE_CMAKE_MODULES_FIND Fortran C CXX)

4
# location of find package modules
5
6
7
8
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
9
set(PACKAGES "" CACHE STRING "List of packages to find, ex: BLAS;STARPU;PASTIX")
10
11
12
13
14
15
16
17
18
19
20
21

# specific components to look for with packages
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
PRUVOST Florent's avatar
PRUVOST Florent committed
22
option(ENABLE_CTEST "Enable Testing: will test all supported packages" OFF)
23

24
foreach(_library ${PACKAGES})
25

26
27
28
29
30
  if (${_library}_COMPONENTS)
    find_package(${_library} COMPONENTS ${${_library}_COMPONENTS})
  else()
    find_package(${_library})
  endif()
31
32
33
34
  if (${_library}_FOUND)
    if (${_library}_LIBRARIES)
      message(STATUS "${_library}_LIBRARIES found: ${${_library}_LIBRARIES}")
    else()
35
      message(WARNING "${_library}_LIBRARIES not found: ${${_library}_LIBRARIES}")
36
37
38
39
40
41
42
43
44
45
46
47
    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}_INCLUDE_DIRS)
      message(STATUS "${_library}_INCLUDE_DIRS found: ${${_library}_INCLUDE_DIRS}")
    else()
      message(WARNING "${_library}_INCLUDE_DIRS not found: ${${_library}_INCLUDE_DIRS}")
    endif()
  else()
48
    message(FATAL_ERROR "${_library} NOT FOUND !!")
49
50
51
52
  endif()

endforeach()

PRUVOST Florent's avatar
PRUVOST Florent committed
53
54
55
56
57
58
59
60
61
62
63
64
65
# Add CTest rules
if (ENABLE_CTEST)

  enable_testing()
  include(CTest)

  set(CTEST_PACKAGES_LIST
      BLAS
      BLASEXT
      CBLAS
      CHAMELEON
      CPPCHECK
      EZTRACE
66
      #FABULOUS
PRUVOST Florent's avatar
PRUVOST Florent committed
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
      FFTW
      FXT
      GTG
      HQR
      HWLOC
      HYPRE
      LAPACK
      LAPACKE
      LAPACKEXT
      METIS
      MPIEXT
      MUMPS
      PAMPA
      PAPI
      PARMETIS
      PARSEC
      PASTIX
84
      PETSC
PRUVOST Florent's avatar
PRUVOST Florent committed
85
86
87
88
89
90
91
92
93
94
      PTSCOTCH
      QUARK
      SCALAPACK
      SCOTCH
      SIMGRID
      STARPU
      SUITESPARSE
      TMG)

  foreach(_package ${CTEST_PACKAGES_LIST})
95
    add_test(FIND${_package} cmake ${CMAKE_SOURCE_DIR} -DPACKAGES=${_package})
PRUVOST Florent's avatar
PRUVOST Florent committed
96
97
98
99
  endforeach()

endif()

100
101
102
###
### END CMakeLists.txt
###