CMakeLists.txt 2.76 KB
Newer Older
1
#install headers
2
3

dune_add_library("duneamdis" NO_EXPORT
4
    AdaptBase.cpp
5
    AdaptInfo.cpp
6
7
    AdaptInstationary.cpp
    AdaptStationary.cpp
8
9
    AMDiS.cpp
    Initfile.cpp
10
11
    ProblemInstatBase.cpp
    ProblemInstat.cpp
12
    ProblemStat.cpp
13
14
15
16
17
    StandardProblemIteration.cpp
    linear_algebra/istl/SystemMatrix.cpp
    linear_algebra/istl/SystemVector.cpp
    linear_algebra/mtl/SystemMatrix.cpp
    linear_algebra/mtl/SystemVector.cpp
18
19
    )
add_dune_alberta_flags("duneamdis" OBJECT USE_GENERIC)
20
target_compile_definitions("duneamdis" PUBLIC AMDIS_BACKEND_MTL=1)
21
22
23
24
25
26
27
28
29

set(BOOST_VERSION "1.54")
set(BOOST_LIBS_REQUIRED system program_options)
if (NOT BUILD_SHARED_LIBS)
    set(Boost_USE_STATIC_LIBS ON)
endif (NOT BUILD_SHARED_LIBS)
set(Boost_NO_SYSTEM_PATHS ON)
find_package(Boost ${BOOST_VERSION} REQUIRED ${BOOST_LIBS_REQUIRED})
if (Boost_FOUND)
30
31
32
33
34
35
36
37
38
  add_library(boost INTERFACE)
  target_include_directories(boost INTERFACE ${Boost_INCLUDE_DIR})
  target_link_libraries(boost INTERFACE  ${Boost_LIBRARIES})
  target_link_libraries("duneamdis" INTERFACE boost)

  if (MSVC_SHARED_LIBS)
    link_directories(${Boost_LIBRARY_DIRS})
    target_compile_definitions("duneamdis" INTERFACE ${Boost_LIB_DIAGNOSTIC_DEFINITIONS})
  endif (MSVC_SHARED_LIBS)
39
40
41
endif (Boost_FOUND)


42
43
44
45
46
47
48
49
50
51
52
53
54
find_package(MTL REQUIRED)
if (MTL_FOUND)
  target_include_directories("duneamdis" PUBLIC ${MTL_INCLUDE_DIRS})
#   target_link_libraries("duneamdis" PUBLIC ${MTL_LIBRARIES})
#   target_compile_options("duneamdis" PUBLIC ${MTL_CXX_DEFINITIONS})

  set (CXX_ELEVEN_FEATURE_LIST "MOVE" "AUTO" "RANGEDFOR" "INITLIST" "STATICASSERT" "DEFAULTIMPL")
  foreach (feature ${CXX_ELEVEN_FEATURE_LIST})
      target_compile_definitions("duneamdis" PUBLIC MTL_WITH_${feature})
  endforeach ()
endif (MTL_FOUND)


55
install(FILES 
56
    AdaptBase.hpp
57
    AdaptInfo.hpp
58
59
    AdaptInstationary.hpp
    AdaptStationary.hpp
60
61
62
63
64
65
66
67
68
69
70
71
72
    AMDiS.hpp
    Basic.hpp
    DirichletBC.hpp
    DirichletBC.inc.hpp
    Flag.hpp
    IndexSeq.hpp
    Initfile.hpp
    Log.hpp
    Loop.hpp
    Math.hpp
    Operator.hpp
    Operator.inc.hpp
    OperatorTerm.hpp
73
74
75
76
    ProblemInstatBase.hpp
    ProblemInstat.hpp
    ProblemInstat.inc.hpp
    ProblemInterationInterface.hpp
77
78
79
    ProblemStat.hpp
    ProblemStat.inc.hpp
    ProblemStatBase.hpp
80
81
    ProblemTimeInterface.hpp
    StandardProblemIteration.hpp
82
    Timer.hpp
83
84
85
86
87
88
89
90
91
92
93
    linear_algebra/istl/DOFMatrix.hpp
    linear_algebra/istl/DOFVector.hpp
    linear_algebra/istl/LinearSolver.hpp
    linear_algebra/istl/Preconditioner.hpp
    linear_algebra/istl/SystemMatrix.hpp
    linear_algebra/istl/SystemVector.hpp
    linear_algebra/mtl/DOFMatrix.hpp
    linear_algebra/mtl/DOFVector.hpp
    linear_algebra/mtl/LinearSolver.hpp
    linear_algebra/mtl/SystemMatrix.hpp
    linear_algebra/mtl/SystemVector.hpp
94
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/dune/amdis)