AmdisMacros.cmake 838 Bytes
Newer Older
1
2
include(AMDiSCXXFeatures)

3
# some additional packages and flags
Praetorius, Simon's avatar
Praetorius, Simon committed
4
5
6
7
8
9
10
11
12
13
14
find_package(MTL
  PATHS ${MTL_DIR}
  HINTS /usr/local/lib/mtl4 /opt/sources/mtl4 /opt/development/mtl4
)

if (MTL_FOUND)
  set(CXX_ELEVEN_FEATURE_LIST "MOVE" "AUTO" "RANGEDFOR" "INITLIST" "STATICASSERT" "DEFAULTIMPL")
  set(MTL_COMPILE_DEFINITIONS "")
  foreach(feature ${CXX_ELEVEN_FEATURE_LIST})
    list(APPEND MTL_COMPILE_DEFINITIONS "MTL_WITH_${feature}")
  endforeach()
15

Praetorius, Simon's avatar
Praetorius, Simon committed
16
17
18
19
20
  find_package(SuiteSparse QUIET)
  if (SuiteSparse_FOUND)
    list(APPEND MTL_COMPILE_DEFINITIONS "MTL_HAS_UMFPACK")
  endif (SuiteSparse_FOUND)
endif (MTL_FOUND)
21

Praetorius, Simon's avatar
Praetorius, Simon committed
22
set(HAVE_MTL MTL_FOUND)
23

Praetorius, Simon's avatar
Praetorius, Simon committed
24
25
26
27
28
29
if (MTL_FOUND)
  list(APPEND MTL_COMPILE_DEFINITIONS "ENABLE_MTL=1")
  dune_register_package_flags(
    COMPILE_DEFINITIONS ${MTL_COMPILE_DEFINITIONS}
    INCLUDE_DIRS ${MTL_INCLUDE_DIRS})
endif (MTL_FOUND)