aboutsummaryrefslogtreecommitdiffstats
path: root/Library/ENV
diff options
context:
space:
mode:
authorJack Nagel2014-04-21 10:40:26 -0500
committerJack Nagel2014-04-21 10:40:26 -0500
commitdde0b2d55df91d0631f728a8f92f19fbbf4a52a6 (patch)
tree3058b9869a0b805923edec364b29d365abdddc01 /Library/ENV
parentf1eb5128a47b910691b3591e001aacf67bc32b35 (diff)
downloadhomebrew-dde0b2d55df91d0631f728a8f92f19fbbf4a52a6.tar.bz2
Add some comments to the cc wrapper
Diffstat (limited to 'Library/ENV')
-rwxr-xr-xLibrary/ENV/4.3/cc7
1 files changed, 5 insertions, 2 deletions
diff --git a/Library/ENV/4.3/cc b/Library/ENV/4.3/cc
index 36dfcbbfc..034a1f64e 100755
--- a/Library/ENV/4.3/cc
+++ b/Library/ENV/4.3/cc
@@ -230,6 +230,7 @@ class Cmd
syspath.reject { |d| d == brewfix }.map! { |d| File.join(d, "lib") }
end
+ # Paths added as "-isystem<path>" and "-I<path>" flags
def cpath
cpath = path_split("CMAKE_PREFIX_PATH").map! { |d| File.join(d, "include") }
cpath += path_split("CMAKE_INCLUDE_PATH")
@@ -238,6 +239,7 @@ class Cmd
[sys, opt]
end
+ # Paths added as "-L<path>" flags
def libpath
libpath = path_split("CMAKE_PREFIX_PATH").map! { |d| File.join(d, "lib") }
libpath += path_split("CMAKE_LIBRARY_PATH")
@@ -258,10 +260,11 @@ class Cmd
args
end
+ # Keg-only opt paths get the "-I" treatment since it has higher priority that
+ # "-isystem", and we want them to be searched before system directories as
+ # well as any directories added by the build system.
def cppflags
sys, opt = cpath
- # we want our keg-only includes to be found before system includes *and*
- # before any other includes the build-system adds
path_flags("-isystem", sys) + path_flags("-I", opt)
end