Skip to content

Commit

Permalink
nmslib: add -fno-finite-math-only to fix issues with glibc >= 2.31
Browse files Browse the repository at this point in the history
  • Loading branch information
valgur committed Oct 12, 2023
1 parent c529c73 commit 845aaed
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions recipes/nmslib/all/conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,10 @@ def generate(self):
tc.variables["WITHOUT_TESTS"] = True
# Relocatable shared libs on macOS
tc.cache_variables["CMAKE_POLICY_DEFAULT_CMP0042"] = "NEW"
# The finite-math-only optimization has no effect and can cause linking errors
# when linked against glibc >= 2.31
tc.variables["CMAKE_C_FLAGS"] = "-fno-finite-math-only"
tc.variables["CMAKE_CXX_FLAGS"] = "-fno-finite-math-only"
tc.generate()

def build(self):
Expand Down

0 comments on commit 845aaed

Please sign in to comment.