Skip to content

Commit

Permalink
chore: add rt to the list of bwa linked libraries (#24)
Browse files Browse the repository at this point in the history
Also ignore many warnings when compiling bwa
  • Loading branch information
nh13 authored Jan 17, 2025
1 parent 4a1bdbf commit 4019e84
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions build.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import multiprocessing
import platform
from pathlib import Path
from typing import List

Expand All @@ -12,6 +13,8 @@
link_args = []
include_dirs = ["bwa", "pybwa"]
libraries = ['m', 'z', 'pthread']
if platform == 'Linux':
libraries.append("rt")
library_dirs=['pybwa', 'bwa']
extra_objects = []
h_files = []
Expand All @@ -20,6 +23,16 @@
h_files.extend(str(x) for x in Path(root_dir).rglob("*.h"))
c_files.extend(str(x) for x in Path(root_dir).rglob("*.c") if x.name not in ['example.c', 'main.c'])

if platform.system() != 'Windows':
compile_args = [
"-Wno-unreachable-code",
"-Wno-single-bit-bitfield-constant-conversion",
"-Wno-deprecated-declarations",
"-Wno-unused",
"-Wno-strict-prototypes",
"-Wno-sign-compare",
"-Wno-error=declaration-after-statement"]

libbwaindex_module = Extension(
name='pybwa.libbwaindex',
sources=['pybwa/libbwaindex.pyx'] + c_files,
Expand Down

0 comments on commit 4019e84

Please sign in to comment.