-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt.mac
102 lines (87 loc) · 3.58 KB
/
CMakeLists.txt.mac
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
# Set the name of the project and target:
set(TARGET "A1")
set(DEAL_II_DIR "/Users/ali/MyLibs/deal_II/Install")
set(EIGEN_INC "/Users/ali/MyLibs/Eigen/eigen")
set(MTL4_INC "/Users/ali/MyLibs/mtl4/MTL-all-4.0.9555-Linux/usr/include")
# IMPORTANT : THIS PART CORRESPONDS TO GCC COMPILER. HOWEVER YOU CAN USE
# GCC WITH INTEL libiomp5.so
# set(MKLROOT "/opt/apps/sysnet/intel/12.1/mkl/10.3.12.361")
# set(COMPILER_LIB "/opt/apps/ossw/applications/gcc/gcc-4.8/sl6/lib64")
# IMPORTANT : THIS PART IS FOR INTEL COMPILER
#set(MKLROOT "/opt/apps/sysnet/intel/12.1/mkl/10.3.12.361")
#set(COMPILER_LIB "/opt/apps/sysnet/intel/12.1/lib/intel64")
# include_directories(${INCLUDE_DIRECTORIES} ${CMAKE_SOURCE_DIR} "${MKLROOT}/include" ${EIGEN_INC})
# link_directories(${LINK_DIRECTORIES} "${MKLROOT}/lib/intel64" ${COMPILER_LIB})
include_directories(${INCLUDE_DIRECTORIES} ${CMAKE_SOURCE_DIR} ${EIGEN_INC} ${MTL4_INC})
link_directories(${LINK_DIRECTORIES} ${COMPILER_LIB})
# Declare all source files the target consimts of. Here, this is only
# the one step-X.cc file, but as you expand your project you may wish
# to add other source files as well. If your project becomes much larger,
# you may want to either replace the following statement by something like
# FILE(GLOB_RECURSE TARGET_SRC "source/*.cc")
# FILE(GLOB_RECURSE TARGET_INC "include/*.h")
# SET(TARGET_SRC ${TARGET_SRC} ${TARGET_INC})
# or switch altogether to the large project CMakeLists.txt file discussed
# in the "CMake in user projects" page accessible from the "User info"
# page of the documentation.
SET(TARGET_SRC
cell_class.hpp
cell_class.tpp
diffusion_cell.hpp
diffusion_cell.tpp
flat_lin_wdisp_wave.hpp
flat_lin_wdisp_wave.tpp
generic_model.hpp
generic_model.tpp
input_data.hpp
jacobi_polynomial.hpp
jacobi_polynomial.tpp
lagrange_polynomial.hpp
lagrange_polynomial.tpp
lib_headers.hpp
solution_manager.hpp
solution_manager.tpp
poly_basis.hpp
poly_basis.tpp
support_classes.hpp
support_classes.tpp
main.cpp
)
# Usually, you will not need to modify anything beyond this point...
CMAKE_MINIMUM_REQUIRED(VERSION 2.8.8)
FIND_PACKAGE(deal.II 8.2 QUIET
HINTS ${deal.II_DIR} ${DEAL_II_DIR} ../ ../../ $ENV{DEAL_II_DIR}
)
IF(NOT ${deal.II_FOUND})
MESSAGE(FATAL_ERROR "\n"
"*** Could not locate a (sufficiently recent) version of deal.II. ***\n\n"
"You may want to either pass a flag -DDEAL_II_DIR=/path/to/deal.II to cmake\n"
"or set an environment variable \"DEAL_II_DIR\" that contains this path."
)
ENDIF()
#
# Are all dependencies fullfilled?
#
IF(NOT DEAL_II_WITH_PETSC OR NOT DEAL_II_WITH_P4EST)
MESSAGE(FATAL_ERROR "
Error! The deal.II library found at ${DEAL_II_PATH} was not configured with
DEAL_II_WITH_PETSC = ON
DEAL_II_WITH_P4EST = ON
One or all of these are OFF in your installation but are required for this tutorial step."
)
ENDIF()
DEAL_II_INITIALIZE_CACHED_VARIABLES()
PROJECT(${TARGET} CXX)
if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
message("Compiler is Clang")
elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
message("Compiler is GNU")
elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Intel")
message("Compiler is Intel")
endif()
DEAL_II_INVOKE_AUTOPILOT()
set(CMAKE_CXX_FLAGS " -O2 -m64 -Wall ${CMAKE_CXX_FLAGS}")
target_link_libraries(${TARGET} pthread m)
#set(CMAKE_CXX_FLAGS " -O2 -openmp -std=c++0x ${CMAKE_CXX_FLAGS}")
#target_link_libraries(${TARGET} mkl_intel_lp64 mkl_core iomp5 mkl_intel_thread pthread m)
#set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wno-long-long -pedantic")