29 lines
1008 B
Diff
29 lines
1008 B
Diff
--- bazel-0.3.1/tools/cpp/cc_configure.bzl 2016-10-13 14:00:32.118358387 +0200
|
|
+++ bazel-0.3.1/tools/cpp/cc_configure.bzl 2016-10-13 13:52:45.342610147 +0200
|
|
@@ -173,8 +173,23 @@
|
|
else:
|
|
inc_dirs = result.stderr[index1 + 1:index2].strip()
|
|
|
|
- return [repository_ctx.path(_cxx_inc_convert(p))
|
|
- for p in inc_dirs.split("\n")]
|
|
+ default_inc_directories = [
|
|
+ repository_ctx.path(_cxx_inc_convert(p))
|
|
+ for p in inc_dirs.split("\n")
|
|
+ ]
|
|
+
|
|
+ env = repository_ctx.os.environ
|
|
+ if "SPACK_DEPENDENCIES" in env:
|
|
+ for dep in env["SPACK_DEPENDENCIES"].split(":"):
|
|
+ path = dep + "/include"
|
|
+ # path = repository_ctx.os.path.join(dep, "include")
|
|
+ # if not repository_ctx.os.path.exists(path):
|
|
+ # continue
|
|
+ default_inc_directories.append(
|
|
+ repository_ctx.path(_cxx_inc_convert(path))
|
|
+ )
|
|
+
|
|
+ return default_inc_directories
|
|
|
|
def _add_option_if_supported(repository_ctx, cc, option):
|
|
"""Checks that `option` is supported by the C compiler."""
|