Skip to content

Commit

Permalink
Merge pull request #29 from joezuntz/fix-class-cc
Browse files Browse the repository at this point in the history
Stop class assuming that CC=gcc
  • Loading branch information
joezuntz authored Aug 17, 2022
2 parents 66a58b4 + e129552 commit a689986
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions boltzmann/class/class_v3.2.0/python/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,17 @@
import subprocess as sbp
import os.path as osp

cc = os.environ.get("CC", "gcc")

# Recover the gcc compiler
GCCPATH_STRING = sbp.Popen(
['gcc', '-print-libgcc-file-name'],
[cc, '-print-libgcc-file-name'],
stdout=sbp.PIPE).communicate()[0]
GCCPATH = osp.normpath(osp.dirname(GCCPATH_STRING)).decode()

liblist = ["class"]
MVEC_STRING = sbp.Popen(
['gcc', '-lmvec'],
[cc, '-lmvec'],
stderr=sbp.PIPE).communicate()[1]
if b"mvec" not in MVEC_STRING:
liblist += ["mvec","m"]
Expand Down

0 comments on commit a689986

Please sign in to comment.