We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent ce3b4cd commit c18a5d9Copy full SHA for c18a5d9
1 file changed
test/test_raffle.py
@@ -6,6 +6,7 @@
6
from ase import Atoms
7
import subprocess
8
9
+import platform
10
11
12
fc = os.getenv("FORTRAN_COMPILER")
@@ -15,6 +16,12 @@
15
16
etc_dir = os.path.join(dirname, "etc")
17
lib_dir = os.path.join(dirname, "lib")
18
19
+lib_ext = {
20
+ "Darwin": "dylib",
21
+ "Linux": "so"
22
+}[platform.system()]
23
+libraffle_path = os.path.join(lib_dir, f"libraffle.{lib_ext}")
24
+
25
with open("test/CMakeLists.txt", "r") as file:
26
lines = file.readlines()
27
@@ -44,7 +51,7 @@ def build_fortran_test(test_name):
44
51
# make using a fortran compiler
45
52
# point to raffle's pip install include and lib to include during compilation
46
53
47
- if uses_openmp(os.path.join(lib_dir, "libraffle.dylib")):
54
+ if uses_openmp(libraffle_path):
48
55
compile_args = ["-fopenmp", "-lgomp"]
49
56
else:
50
57
compile_args = []
0 commit comments