@@ -80,9 +80,9 @@ def install_sundials():
80
80
"-DCMAKE_INSTALL_NAME_DIR=" + KLU_LIBRARY_DIR ,
81
81
]
82
82
83
- # try to find OpenMP on mac
83
+ # try to find OpenMP on Mac
84
84
if platform .system () == "Darwin" :
85
- # flags to find OpenMP on mac
85
+ # flags to find OpenMP on Mac
86
86
if platform .processor () == "arm" :
87
87
OpenMP_C_FLAGS = (
88
88
"-Xpreprocessor -fopenmp -I/opt/homebrew/opt/libomp/include"
@@ -118,14 +118,9 @@ def install_sundials():
118
118
119
119
build_dir = pathlib .Path ("build_sundials" )
120
120
if not os .path .exists (build_dir ):
121
- print ("\n -" * 10 , "Creating build dir" , "-" * 40 )
122
121
os .makedirs (build_dir )
123
-
124
122
sundials_src = "../sundials"
125
- print ("-" * 10 , "Running CMake prepare" , "-" * 40 )
126
123
subprocess .run (["cmake" , sundials_src , * cmake_args ], cwd = build_dir , check = True )
127
-
128
- print ("-" * 10 , "Building SUNDIALS" , "-" * 40 )
129
124
make_cmd = ["make" , f"-j{ cpu_count ()} " , "install" ]
130
125
subprocess .run (make_cmd , cwd = build_dir , check = True )
131
126
@@ -147,6 +142,10 @@ def check_libraries_installed():
147
142
sundials_files = [file + ".so" for file in sundials_files ]
148
143
elif platform .system () == "Darwin" :
149
144
sundials_files = [file + ".dylib" for file in sundials_files ]
145
+ else :
146
+ raise NotImplementedError (
147
+ f"Unsupported operating system: { platform .system ()} . This script currently supports only Linux and macOS."
148
+ )
150
149
sundials_lib_found = True
151
150
# Check for SUNDIALS libraries in each directory
152
151
for lib_file in sundials_files :
0 commit comments