Skip to content

Commit

Permalink
Merge pull request #446 from jacobkahn/fix_false_positive_compression…
Browse files Browse the repository at this point in the history
…_libs

Explicitly try to compile with header inclusion in Python setup
  • Loading branch information
kpu authored Feb 25, 2024
2 parents 35f1458 + 44b1451 commit e504a4d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
#Does gcc compile with this header and library?
def compile_test(header, library):
dummy_path = os.path.join(os.path.dirname(__file__), "dummy")
command = "bash -c \"g++ -include " + header + " -l" + library + " -x c++ - <<<'int main() {}' -o " + dummy_path + " >/dev/null 2>/dev/null && rm " + dummy_path + " 2>/dev/null\""
command = "bash -c \"g++ -include " + header + " -l" + library + " -x c++ - <<<'#include <" + header + ">\nint main() {}' -o " + dummy_path + " >/dev/null 2>/dev/null && rm " + dummy_path + " 2>/dev/null\""
return os.system(command) == 0

# Use an environment variable
Expand Down

0 comments on commit e504a4d

Please sign in to comment.