-
Notifications
You must be signed in to change notification settings - Fork 2
/
package.py
49 lines (44 loc) · 1.63 KB
/
package.py
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
# This program is a part of EASIFEM library.
# See. www.easifem.com
# Copyright (c) 2020-2021, All right reserved, Vikas Sharma, Ph.D.
#
import os
import platform
print("Detecting OS type...")
_os = platform.system()
if _os == "Windows":
print("ERROR: INSTALLATION on windows is work in progress")
exit
# print("Please use Windows Subsystem Linux(WSL) ")
# print("Installation DONE!!")
else:
cmake_def = ""
user_query = False
cmake_def = ""
cmake_def += ' -G "Ninja"'
cmake_def += " -D USE_OpenMP:BOOL=ON"
cmake_def += " -D CMAKE_BUILD_TYPE:STRING=Release"
cmake_def += " -D BUILD_SHARED_LIBS:BOOL=ON"
cmake_def += " -D USE_PLPLOT:BOOL=ON"
cmake_def += " -D CMAKE_INSTALL_PREFIX:PATH=${EASIFEM_BASE}"
cmake_def += " -D USE_BLAS95:BOOL=ON"
cmake_def += " -D USE_LAPACK95:BOOL=ON"
cmake_def += " -D USE_FFTW:BOOL=ON"
cmake_def += " -D USE_GTK:BOOL=ON"
cmake_def += " -D USE_ARPACK:BOOL=ON"
cmake_def += " -D USE_SUPERLU:BOOL=ON"
cmake_def += " -D USE_LIS:BOOL=ON"
cmake_def += " -D USE_PARPACK:BOOL=OFF"
cmake_def += " -D USE_METIS:BOOL=OFF"
cmake_def += " -D USE_Int32:BOOL=ON"
cmake_def += " -D USE_Real64:BOOL=ON"
print("CMAKE DEF : ", cmake_def)
_build0 = os.path.join(os.environ["HOME"], "temp")
build_dir = os.path.join(
os.environ.get("EASIFEM_BUILD_DIR", _build0), "base", "build"
)
# build_dir = os.environ["HOME"] + "/temp/easifem-base/build"
os.makedirs(build_dir, exist_ok=True)
os.system(f"cmake -S ./ -B {build_dir} {cmake_def}")
os.system(f"cmake --build {build_dir} --target package")
print("Installation DONE!!")