CMakeLists.txt 4.02 KB
Newer Older
Kevin Moreau's avatar
Kevin Moreau committed
1 2
cmake_minimum_required(VERSION 2.6)

3 4 5
message(STATUS "======================== --")
message(STATUS "PROJECT: TLSElementBased --")
message(STATUS "======================== --")
Kevin Moreau's avatar
Kevin Moreau committed
6

7
project(TLSElementBased CXX C)
8

Kevin Moreau's avatar
Kevin Moreau committed
9
# BEGIN options and parameters
10 11 12
#================================================================================
#ADDITIONAL OPTIONS 
#================================================================================
13 14 15 16 17 18 19
option(TLSELEMENTBASED_ATOMIC_TEST        "include atomic test"                    OFF)
option(TLSELEMENTBASED_TEST_DAM           "include test dam"                       ON )
option(TLSELEMENTBASED_TEST_DYN           "include test dyn"                       OFF)
option(TLSELEMENTBASED_TEST_PLAST         "include test plast"                     OFF)
option(TLSELEMENTBASED_TEST_ANIMESH_DAM   "include test animesh dam"               OFF)
option(TLSELEMENTBASED_TEST_INFINITE_DAM  "include test infinite dam"              OFF)
option(FASTMARCHINGINTERFACE              "include FastMarchingInterface"          ON )
Kevin Moreau's avatar
Kevin Moreau committed
20

21
# END
Kevin Moreau's avatar
Kevin Moreau committed
22 23 24



25
set(BUILD_LIBS "SHARED")
26

27
set(CXXFLAGS "-Wno-deprecated")
28

Kevin Moreau's avatar
Kevin Moreau committed
29 30
define_archos_suffixe(ARCHOS)

31 32


33 34 35
find_package(xTool          REQUIRED)
find_package(xInterfaceAOMDGeneral  REQUIRED)
find_package(xDistMesh              REQUIRED )
36
find_package(Trellis                REQUIRED )
37 38
find_package(xMapping               REQUIRED)
find_package(xQuadrature            REQUIRED )
39 40 41 42
find_package(xSolverBase             REQUIRED )
find_package(xInterfaceLapack        REQUIRED )
find_package(xInterfaceSuperLu       REQUIRED )
find_package(xInterfaceTaucs         REQUIRED )
43
find_package(xInterfaceParMetis     REQUIRED )
44 45
find_package(xFEM                   REQUIRED )
find_package(xExt                   REQUIRED )
46 47
find_package(xGeomTools             REQUIRED)
find_package(xDistanceNearest       REQUIRED)
48 49
find_package(xTLS                   REQUIRED )
find_package(xDoubleCut             REQUIRED )     
50
find_package(xLegacySimpleCut       REQUIRED)
51 52 53 54 55
find_package(ANN                    REQUIRED )
find_package(CGAL                   REQUIRED )
find_package(BLAS2                  REQUIRED )
find_package(LAPACK2                REQUIRED )
find_package(METIS                  REQUIRED )
Kevin Moreau's avatar
Kevin Moreau committed
56

57

Kevin Moreau's avatar
Kevin Moreau committed
58
file(GLOB SOURCES src/*)
59

Kevin Moreau's avatar
Kevin Moreau committed
60
list(APPEND EXTERNAL_INCLUDES
61 62 63 64
  ${xTool_INCLUDE_DIR}
  ${xInterfaceAOMDGeneral_INCLUDE_DIR}
  ${xDistMesh_INCLUDE_DIR}
  ${Trellis_INCLUDE_DIR}
65
  ${xQuadrature_INCLUDE_DIR}
66 67 68 69
  ${xSolverBase_INCLUDE_DIR}
  ${xInterfaceSuperLu_INCLUDE_DIR}
  ${xInterfaceTaucs_INCLUDE_DIR}
  ${xInterfaceLapack_INCLUDE_DIR}
70
  ${xInterfaceParMetis_INCLUDE_DIR}
71 72
  ${xFEM_INCLUDE_DIR}
  ${xExt_INCLUDE_DIR}
73 74
  ${xGeomTools_INCLUDE_DIR}
  ${xDistanceNearest_INCLUDE_DIR}
Kevin Moreau's avatar
Kevin Moreau committed
75
  ${xTLS_INCLUDE_DIR}
76
  ${PARMETIS_INCLUDE_DIR}
Kevin Moreau's avatar
Kevin Moreau committed
77
  src
78
  ${MPI_CXX_INCLUDE_PATH}
Kevin Moreau's avatar
Kevin Moreau committed
79
)
80

Kevin Moreau's avatar
Kevin Moreau committed
81
list(APPEND EXTERNAL_LIBRARIES
82
  TLSElementBased
83
  ${xTLS_LIBRARIES}
84
  ${xLegacySimpleCut_LIBRARIES}
85 86
  ${xDoubleCut_LIBRARIES}
  ${xExt_LIBRARIES}
87 88
  ${xGeomTools_LIBRARIES}
  ${xDistanceNearest_LIBRARIES}
89
  ${xFEM_LIBRARIES}
90
  ${xExport_LIBRARIES}
91
  ${Trellis_LIBRARIES}
92 93
  ${xMapping_LIBRARIES} 
  ${xQuadrature_LIBRARIES}
94
  ${xInterfaceAOMDGeneral_LIBRARIES}
95 96
  ${xSolverBase_LIBRARIES}
  ${xInterfaceLapack_LIBRARIES}
97 98
  ${LAPACK_LIBRARIES}
  ${BLAS_LIBRARIES}
99
  ${xInterfaceSuperLu_LIBRARIES}
Kevin Moreau's avatar
Kevin Moreau committed
100
  ${SUPERLU_LIBRARIES}
101
  ${xInterfaceTaucs_LIBRARIES}
102
  ${TAUCS_LIBRARIES}
103
  ${PARMETIS_LIBRARIES}
104
  ${METIS_LIBRARIES}
Kevin Moreau's avatar
Kevin Moreau committed
105
  ${ANN_LIBRARIES}
106 107
  ${xDistMesh_LIBRARIES}
  ${xTool_LIBRARIES}
108 109 110
  ${MPI_CXX_LIBRARIES} 
  ${CGAL_LIBRARIES}
  )
Kevin Moreau's avatar
Kevin Moreau committed
111

Kevin Moreau's avatar
Kevin Moreau committed
112 113
if(FASTMARCHINGINTERFACE)
  add_definitions(-DHAVE_FASTMARCHING)
114 115
  find_package(xFastMarching          REQUIRED )
  list(APPEND EXTERNAL_INCLUDES ${xFastMarching_INCLUDE_DIR})
116
  set(CXXFLAGS "${CXXFLAGS} -std=c++11")
Kevin Moreau's avatar
Kevin Moreau committed
117
endif(FASTMARCHINGINTERFACE)
118

119

120
add_library(TLSElementBased ${BUILD_LIBS} ${SOURCES})
121

Kevin Moreau's avatar
Kevin Moreau committed
122
include_directories(${EXTERNAL_INCLUDES})
123

124
set_target_properties(TLSElementBased PROPERTIES COMPILE_FLAGS "${CXXFLAGS}" LINKER_LANGUAGE CXX)
Kevin Moreau's avatar
Kevin Moreau committed
125

Kevin Moreau's avatar
Kevin Moreau committed
126
if(TLSDUCTILE_ATOMIC_TEST)
Kevin Moreau's avatar
Kevin Moreau committed
127
  add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/atomic_test)
Kevin Moreau's avatar
Kevin Moreau committed
128
endif(TLSDUCTILE_ATOMIC_TEST)
Kevin Moreau's avatar
Kevin Moreau committed
129

Kevin Moreau's avatar
Kevin Moreau committed
130
add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/test)