Skip to content

Commit

Permalink
Fix / Disable -Wstrict-prototypes warning during build
Browse files Browse the repository at this point in the history
  • Loading branch information
TheHolyRoger committed Mar 30, 2021
1 parent aeab025 commit 4f9e4f9
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#!/usr/bin/env python

from setuptools import setup
from setuptools.command.build_ext import build_ext
from Cython.Build import cythonize
import numpy as np
import os
Expand All @@ -17,6 +18,16 @@
os.environ["CFLAGS"] = "-std=c++11"


# Avoid a gcc warning below:
# cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid
# for C/ObjC but not for C++
class BuildExt(build_ext):
def build_extensions(self):
if '-Wstrict-prototypes' in self.compiler.compiler_so:
self.compiler.compiler_so.remove('-Wstrict-prototypes')
super().build_extensions()


def main():
cpu_count = os.cpu_count() or 8
version = "20210309"
Expand Down Expand Up @@ -165,6 +176,7 @@ def main():
"bin/hummingbot.py",
"bin/hummingbot_quickstart.py"
],
cmdclass={'build_ext': BuildExt},
)


Expand Down

0 comments on commit 4f9e4f9

Please sign in to comment.