From 4019e8411b03a2882db2626d6a07e095b55bced6 Mon Sep 17 00:00:00 2001 From: Nils Homer Date: Fri, 17 Jan 2025 09:54:56 -0800 Subject: [PATCH] chore: add rt to the list of bwa linked libraries (#24) Also ignore many warnings when compiling bwa --- build.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/build.py b/build.py index e825fcb..1525482 100644 --- a/build.py +++ b/build.py @@ -1,4 +1,5 @@ import multiprocessing +import platform from pathlib import Path from typing import List @@ -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 = [] @@ -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,