Skip to content

Commit

Permalink
more c compilers
Browse files Browse the repository at this point in the history
  • Loading branch information
teseoch committed Feb 8, 2022
1 parent 4f66dde commit 3b2a0ff
Showing 1 changed file with 10 additions and 8 deletions.
18 changes: 10 additions & 8 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,18 +68,20 @@ def build_extension(self, ext):
print("CXX compiler", tmp)
if tmp:
cmake_args += ["-DCMAKE_CXX_COMPILER={}".format(tmp)]
else:
tmp = os.getenv('CC_FOR_BUILD')
if tmp:
print("Setting c compiler to", tmp)
cmake_args += ["-DCMAKE_C_COMPILER=" + tmp]

tmp = os.getenv('CXX_FOR_BUILD')
if tmp:
print("Setting cxx compiler to", tmp)
cmake_args += ["-DCMAKE_CXX_COMPILER="+ tmp]

env = os.environ.copy()
env['CXXFLAGS'] = '{} -DVERSION_INFO=\\"{}\\"'.format(env.get('CXXFLAGS', ''),self.distribution.get_version())
tmp = os.getenv('CC_FOR_BUILD')
if tmp:
print("Setting c compiler to", tmp)
cmake_args += ["-DCMAKE_C_COMPILER=" + tmp]

tmp = os.getenv('CXX_FOR_BUILD')
if tmp:
print("Setting cxx compiler to", tmp)
cmake_args += ["-DCMAKE_CXX_COMPILER="+ tmp]


tmp = os.getenv("target_platform")
Expand Down

0 comments on commit 3b2a0ff

Please sign in to comment.