forked from OpenSees/OpenSees
-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathOpenSeesPy.pro
More file actions
77 lines (51 loc) · 1.79 KB
/
OpenSeesPy.pro
File metadata and controls
77 lines (51 loc) · 1.79 KB
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
# Created by Stevan Gavrilovic
# University of California Berkeley
# 01.27.2021
message("Building OpenSees with Python")
TEMPLATE = lib
TARGET = opensees
DESTDIR = ./Bin
include(./qmake.conf)
#use plugin so that only one library file gets built and turn off Qt
#CONFIG += staticlib
CONFIG += plugin
CONFIG -= app_bundle
CONFIG -= qt
DEFINES += _DLL
include(./OpenSees.pri)
include(./OpenSeesLibs.pri)
include(./OpenSeesPy.pri)
#Need to add the python libraries at the very end
#Do not use automatic config as on OS X it includes the python2 library as default
#PYTHON_INC=$$system(python-config --includes)
#PYTHON_LIBS=$$system(python-config --ldflags)
#PYTHON_CFLAGS=$$system(python-config --cflags)
#message( $$PYTHON_LIBS)
#message( $$PYTHON_INC)
#message( $$PYTHON_CFLAGS)
#Change these variables to match the location of your Python installation
macx: {
INCLUDEPATH += /usr/local/Cellar/python@3.9/3.9.9/Frameworks/Python.framework/Versions/3.9/include/python3.9 \
/usr/local/Cellar/python@3.9/3.9.9/Frameworks/Python.framework/Versions/3.9/include/python3.9/internal
}
# MPI Settings
contains (DEFINES, _WITHMPI){
QMAKE_CXX = mpicxx
QMAKE_CXX_RELEASE = $$QMAKE_CXX
QMAKE_CXX_DEBUG = $$QMAKE_CXX
QMAKE_LINK = $$QMAKE_CXX
QMAKE_CC = mpicc
QMAKE_CFLAGS += $$system(mpicc --showme:compile)
QMAKE_LFLAGS += $$system(mpicxx --showme:link)
QMAKE_CXXFLAGS += $$system(mpicxx --showme:compile) -DMPICH_IGNORE_CXX_SEEK
QMAKE_CXXFLAGS_RELEASE += $$system(mpicxx --showme:compile) -DMPICH_IGNORE_CXX_SEEK
}
QMAKE_LFLAGS_RELEASE -= -O1
QMAKE_CXXFLAGS_RELEASE -= -O2
QMAKE_CXXFLAGS_RELEASE += -O3
CONFIG(release, debug|release) {
CONFIG += optimize_full
}
QMAKE_CFLAGS += -fPIC
QMAKE_CXXFLAGS += -fPIC #-Xpreprocessor -fopenmp -undefined dynamic_lookup
QMAKE_LFLAGS += -Wl,-undefined,dynamic_lookup