Skip to content

Commit

Permalink
more compiler flags
Browse files Browse the repository at this point in the history
  • Loading branch information
david-cortes committed Dec 15, 2021
1 parent a6b115d commit f51959b
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ def build_extensions(self):
self.add_march_native()
self.add_openmp_linkage()
self.add_no_math_errno()
self.add_no_trapping_math()

for e in self.extensions:
# e.extra_compile_args = ['-fopenmp', '-O2', '-march=native', '-std=c99']
Expand All @@ -50,6 +51,13 @@ def add_no_math_errno(self):
e.extra_compile_args.append(arg_fnme)
e.extra_link_args.append(arg_fnme)

def add_no_trapping_math(self):
arg_fntm = "-fno-trapping-math"
if self.test_supports_compile_arg(arg_fntm):
for e in self.extensions:
e.extra_compile_args.append(arg_fntm)
e.extra_link_args.append(arg_fntm)

def add_openmp_linkage(self):
arg_omp1 = "-fopenmp"
arg_omp2 = "-qopenmp"
Expand Down Expand Up @@ -115,7 +123,7 @@ def test_supports_compile_arg(self, comm):
'scipy',
'cython'
],
version = '0.2.5-2',
version = '0.2.5-3',
description = 'Hierarchical Poisson matrix factorization for recommender systems',
author = 'David Cortes',
author_email = 'david.cortes.rivera@gmail.com',
Expand Down

0 comments on commit f51959b

Please sign in to comment.