Skip to content
Snippets Groups Projects
Commit e1690dd4 authored by Max Howell's avatar Max Howell
Browse files

When not installed to /usr/local use -isystem

This means our include directory is prioritised above all -I but after all other system directories. This is how it should be.

Also helps fix Homebrew/homebrew#113.
parent 4cea6157
No related branches found
No related tags found
No related merge requests found
......@@ -35,8 +35,8 @@ module HomebrewEnvExtension
ENV['MAKEFLAGS']="-j#{Hardware.processor_count}"
unless HOMEBREW_PREFIX.to_s == '/usr/local'
# /usr/local is always in the build system path so only add other paths
ENV['CPPFLAGS'] = "-I#{HOMEBREW_PREFIX}/include"
# /usr/local is already an -isystem and -L directory so we skip it
ENV['CPPFLAGS'] = "-isystem #{HOMEBREW_PREFIX}/include"
ENV['LDFLAGS'] = "-L#{HOMEBREW_PREFIX}/lib"
else
# ignore existing build vars, thus we should have less bugs to deal with
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment