CMakeLists.txt 3.65 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 39 40 41 42 43 44 45
find_package(xSolverBase             REQUIRED )
find_package(xInterfaceLapack        REQUIRED )
find_package(xInterfaceSuperLu       REQUIRED )
find_package(xInterfaceTaucs         REQUIRED )
find_package(xFEM                   REQUIRED )
find_package(xExt                   REQUIRED )
find_package(xGeom                   REQUIRED )
find_package(xTLS                   REQUIRED )
find_package(xDoubleCut             REQUIRED )     
46
find_package(xLegacySimpleCut       REQUIRED)
47 48 49 50 51
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
52

53

Kevin Moreau's avatar
Kevin Moreau committed
54
file(GLOB SOURCES src/*)
55

Kevin Moreau's avatar
Kevin Moreau committed
56
list(APPEND EXTERNAL_INCLUDES
57 58 59 60 61 62 63 64 65 66 67
  ${xTool_INCLUDE_DIR}
  ${xInterfaceAOMDGeneral_INCLUDE_DIR}
  ${xDistMesh_INCLUDE_DIR}
  ${Trellis_INCLUDE_DIR}
  ${xSolverBase_INCLUDE_DIR}
  ${xInterfaceSuperLu_INCLUDE_DIR}
  ${xInterfaceTaucs_INCLUDE_DIR}
  ${xInterfaceLapack_INCLUDE_DIR}
  ${xFEM_INCLUDE_DIR}
  ${xExt_INCLUDE_DIR}
  ${xGeom_INCLUDE_DIR}
Kevin Moreau's avatar
Kevin Moreau committed
68
  ${xTLS_INCLUDE_DIR}
69
  ${PARMETIS_INCLUDE_DIR}
Kevin Moreau's avatar
Kevin Moreau committed
70
  src
71
  ${MPI_CXX_INCLUDE_PATH}
Kevin Moreau's avatar
Kevin Moreau committed
72
)
73

Kevin Moreau's avatar
Kevin Moreau committed
74
list(APPEND EXTERNAL_LIBRARIES
75
  TLSElementBased
76
  ${xTLS_LIBRARIES}
77
  ${xLegacySimpleCut_LIBRARIES}
78 79
  ${xDoubleCut_LIBRARIES}
  ${xExt_LIBRARIES}
80 81
  ${xGeom_LIBRARIES}
  ${xFEM_LIBRARIES}
82
  ${xExport_LIBRARIES}
83
  ${Trellis_LIBRARIES}
84
  ${xInterfaceAOMDGeneral_LIBRARIES}
85 86
  ${xSolverBase_LIBRARIES}
  ${xInterfaceLapack_LIBRARIES}
87 88
  ${LAPACK_LIBRARIES}
  ${BLAS_LIBRARIES}
89
  ${xInterfaceSuperLu_LIBRARIES}
Kevin Moreau's avatar
Kevin Moreau committed
90
  ${SUPERLU_LIBRARIES}
91
  ${xInterfaceTaucs_LIBRARIES}
92
  ${TAUCS_LIBRARIES}
93
  ${PARMETIS_LIBRARIES}
94
  ${METIS_LIBRARIES}
Kevin Moreau's avatar
Kevin Moreau committed
95
  ${ANN_LIBRARIES}
96 97
  ${xDistMesh_LIBRARIES}
  ${xTool_LIBRARIES}
98 99 100
  ${MPI_CXX_LIBRARIES} 
  ${CGAL_LIBRARIES}
  )
Kevin Moreau's avatar
Kevin Moreau committed
101

Kevin Moreau's avatar
Kevin Moreau committed
102 103
if(FASTMARCHINGINTERFACE)
  add_definitions(-DHAVE_FASTMARCHING)
104 105
  find_package(xFastMarching          REQUIRED )
  list(APPEND EXTERNAL_INCLUDES ${xFastMarching_INCLUDE_DIR})
106
  set(CXXFLAGS "${CXXFLAGS} -std=c++11")
Kevin Moreau's avatar
Kevin Moreau committed
107
endif(FASTMARCHINGINTERFACE)
108

109

110
add_library(TLSElementBased ${BUILD_LIBS} ${SOURCES})
111

Kevin Moreau's avatar
Kevin Moreau committed
112
include_directories(${EXTERNAL_INCLUDES})
113

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

Kevin Moreau's avatar
Kevin Moreau committed
116
if(TLSDUCTILE_ATOMIC_TEST)
Kevin Moreau's avatar
Kevin Moreau committed
117
  add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/atomic_test)
Kevin Moreau's avatar
Kevin Moreau committed
118
endif(TLSDUCTILE_ATOMIC_TEST)
Kevin Moreau's avatar
Kevin Moreau committed
119

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