-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathCMakeLists-chennalaptop.txt
executable file
·119 lines (75 loc) · 3.48 KB
/
CMakeLists-chennalaptop.txt
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
103
104
105
106
107
108
109
110
111
112
113
114
115
116
cmake_minimum_required(VERSION 3.10)
project(mpap VERSION 1.0)
message("\n CMAKE_PROJECT_NAME = ${CMAKE_PROJECT_NAME} \n")
enable_language(CXX Fortran)
configure_file(./src/program/ProjectConfig.h.in TutorialConfig.h)
##################################
# project directories
##################################
#PROJECT_BINARY_DIR
#PROJECT_SOURCE_DIR
##################################
# compiler options
##################################
# C++ compiler
set(CMAKE_C_COMPILER "/usr/bin/gcc")
set(CMAKE_CXX_COMPILER "/usr/bin/g++")
set(CMAKE_Fortran_COMPILER "/usr/bin/gfortran")
#option(PARDISO_SOLVER "Build with PARDISO solver" ON)
#option(_DOMAIN2D "Build the code for 2D problems" ON)
#message("PARDISO_SOLVER = " ${PARDISO_SOLVER})
#message("_DOMAIN2D = " ${_DOMAIN2D})
#target_compile_definitions(mpap PRIVATE "PARDISO_SOLVER")
#set(COPT "-std=c++17 -O3 -Wno-uninitialized -Wno-sign-compare -Wno-write-strings -Wno-unused -Wno-format -Wno-narrowing -Wno-ignored-attributes -Wno-reorder -Wreturn-type -fopenmp -fpermissive -frounding-math")
set(COPT "-std=c++17 -O3 -Wno-uninitialized -Wno-sign-compare -Wno-write-strings -Wno-unused -Wno-format -Wno-narrowing -Wno-ignored-attributes -Wno-reorder -Wreturn-type -D_DOMAIN2D -fopenmp -fpermissive -frounding-math -DPARDISO_SOLVER ")
#set(COPT "-w -std=c++17 -O3 -mavx2 -ftree-vectorize -ftree-vectorizer-verbose=1 -Wno-uninitialized -Wno-sign-compare -Wno-write-strings -Wno-deprecated -Wno-unused -Wno-format -Wno-narrowing -Wno-reorder -Wreturn-type -Wno-unused-parameter -fopenmp -fpermissive -frounding-math -D_DOMAIN2D ")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${COPT}")
set(FOPT "-O3 -Wargument-mismatch")
set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} ${FOPT}")
##################################
# include directories
##################################
include_directories(
/usr/include/eigen3
/usr/include/eigen3/unsupported
src/HBsplines
src/lib
src/myGeom
src/mySolvers
src/standardFEM
src/utilities
/usr/include/vtk-9.1
/usr/include/x86_64-linux-gnu/openmpi
/usr/include/petsc
/usr/include/
/usr/include/superlu
/usr/include/boost
/usr/include/vtk-9.1
/home/chenna/Documents/myCode/pardiso/panua-pardiso-20230908-linux/include
)
##################################
# lib directories
##################################
link_directories(
/usr/lib/gcc/x86_64-linux-gnu/7
/usr/lib/x86_64-linux-gnu
/usr/lib/libblas
/usr/lib/lapack
#/opt/petsc-3.6.4/arch-linux2-c-debug/lib
/usr/lib
/home/chenna/Documents/myCode/mpap/lib
/usr/lib/x86_64-linux-gnu
/usr/x86_64-linux-gnu/lib
/home/chenna/Documents/myCode/pardiso/panua-pardiso-20230908-linux/lib
)
##################################
# source files
##################################
file(GLOB sources1 src/*/*h)
file(GLOB sources2 src/*/*cpp)
file(GLOB sources3 src/*/*for)
##################################
##################################
add_executable(${CMAKE_PROJECT_NAME} src/program/main.cpp ${sources1} ${sources2} ${sources3})
target_link_libraries(${CMAKE_PROJECT_NAME} stdc++ gmp mpfr stdc++ gfortran gomp pthread m blas lapack pardiso metis parmetis petsc mpi mpi_cxx superlu vtkCommonCore-9.1 vtkIOCore-9.1 vtkIOGeometry-9.1 vtkIOXML-9.1 vtkIOExport-9.1 vtkFiltersCore-9.1 vtkFiltersGeneral-9.1 vtkFiltersModeling-9.1 vtkFiltersSources-9.1 vtkCommonExecutionModel-9.1 vtkCommonDataModel-9.1 vtkIOParallel-9.1 vtkIOParallelXML-9.1)
install(TARGETS ${CMAKE_PROJECT_NAME} RUNTIME DESTINATION /home/chenna/Documents/myCode/mpap/bin)