diff options
author | Marco Poletti <poletti.marco@gmail.com> | 2019-06-09 14:41:42 -0700 |
---|---|---|
committer | Marco Poletti <poletti.marco@gmail.com> | 2019-06-09 14:41:42 -0700 |
commit | cfcfcabd71aa3ec54a5c62af6b5a375d74f26406 (patch) | |
tree | f251bad97140d72cb16430934b8d22c1124b9eb4 | |
parent | b8d0230f7d66f02a4a9a7e0a57f5233b623fa7bf (diff) | |
download | google-fruit-cfcfcabd71aa3ec54a5c62af6b5a375d74f26406.tar.gz |
Use Bazel's CC variable instead of hardcoding g++.
-rw-r--r-- | tests/BUILD | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/tests/BUILD b/tests/BUILD index 448d757..5d5d14f 100644 --- a/tests/BUILD +++ b/tests/BUILD @@ -55,7 +55,12 @@ genrule( "fruit_test_config.py", "libfruit.so" ], - toolchains = ["@bazel_tools//tools/cpp:cc_flags"], + toolchains = [ + # For $(CC_FLAGS) + "@bazel_tools//tools/cpp:cc_flags", + # for $(CC) + "@bazel_tools//tools/cpp:current_cc_toolchain", + ], visibility = ["//third_party/fruit/tests:__subpackages__"], cmd = "" + "FRUIT_HEADERS_LOCATION=`for f in $(locations //third_party/fruit:fruit_headers); do echo \"$$f\"; done | fgrep configuration/bazel/ | head -n 1 | sed 's|configuration/bazel/.*|./|'`;" @@ -67,7 +72,7 @@ genrule( + "LIBFRUIT_COPY_DIR_LOCATION=`dirname $(location libfruit.so) | sed 's|.*/genfiles/|./|'`;" + "LIBFRUIT_COPY_LOCATION=`echo $(location libfruit.so) | sed 's|.*/genfiles/|./|'`;" + "echo -e \"" - + "CXX='g++'\n" + + "CXX='$(CC)'\n" + "CXX_COMPILER_NAME='GNU'\n" + "CXX_COMPILER_VERSION='5.0.0'\n" + "FRUIT_COMPILE_FLAGS='$(CC_FLAGS) -std=c++0x -W -Wall -Wno-missing-braces -g -Werror'\n" |