File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 5757 MSYS2_PATH_TYPE=inherit
5858 CC=x86_64-w64-mingw32-gcc
5959 CXX=x86_64-w64-mingw32-g++
60- CFLAGS="-O3 -fopenmp "
61- LDFLAGS="-fopenmp "
60+ CFLAGS="-O3 -I{project}/src/scloop/utils/linear_algebra_gf2/include "
61+ LDFLAGS="-L{project}/src/scloop/utils/linear_algebra_gf2 "
6262 config_settings_windows : >
6363 --global-option=build_ext --global-option=--compiler=mingw32
6464
Original file line number Diff line number Diff line change 11import os
2+ import sys
23
34from Cython .Build import cythonize
45from setuptools import Extension , setup
78gf2_dir = os .path .join (project_root , "src/scloop/utils/linear_algebra_gf2" )
89gf2toolkit_srcs = os .path .join (gf2_dir , "GF2toolkit/srcs" )
910
11+ is_windows = sys .platform .startswith ("win" )
12+ if is_windows :
13+ openmp_compile = ["-fopenmp" ]
14+ openmp_link = ["-fopenmp" , "-static" ]
15+ else :
16+ openmp_compile = ["-fopenmp" ]
17+ openmp_link = ["-fopenmp" ]
18+
1019extensions = [
1120 Extension (
1221 "scloop.data.ripser_lib" ,
1928 sources = ["./src/scloop/utils/linear_algebra_gf2/m4ri_lib.pyx" ],
2029 include_dirs = [os .path .join (gf2_dir , "include" )],
2130 extra_objects = [os .path .join (gf2_dir , "libm4ri.a" )],
22- extra_compile_args = [ "-fopenmp" ] ,
23- extra_link_args = [ "-fopenmp" ] ,
31+ extra_compile_args = openmp_compile ,
32+ extra_link_args = openmp_link ,
2433 ),
2534 # Extension(
2635 # "scloop.utils.linear_algebra_gf2.gf2toolkit_lib",
You can’t perform that action at this time.
0 commit comments