File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1818
1919lib_ext = {
2020 "Darwin" : "a" ,
21- "Linux" : "a "
21+ "Linux" : "so "
2222}[platform .system ()]
23- libraffle_path = os .path .join (lib_dir , f"libraffle.{ lib_ext } " )
23+ if platform .system () == "Darwin" :
24+ libraffle_path = os .path .join (lib_dir , f"libraffle.{ lib_ext } " )
25+ else :
26+ libraffle_path = raffle ._raffle .__file__
2427
2528with open ("test/CMakeLists.txt" , "r" ) as file :
2629 lines = file .readlines ()
4144
4245def uses_openmp (lib_path ):
4346 try :
44- out = subprocess .check_output (["nm" , "-g" , lib_path ], text = True )
45- return "_GOMP_parallel" in out
47+ if platform .system () == "Darwin" :
48+ out = subprocess .check_output (["nm" , "-g" , lib_path ], text = True )
49+ return "_GOMP_parallel" in out
50+ else :
51+ out = subprocess .check_output (["ldd" , lib_path ], text = True )
52+ return "libgomp" in out
4653 except Exception :
4754 return False
4855
You can’t perform that action at this time.
0 commit comments