From f3bb9b9c7a521e5d0eaa6b5a1726ca39b014d65b Mon Sep 17 00:00:00 2001 From: Ryan Burn Date: Thu, 16 Apr 2020 15:45:00 -0700 Subject: [PATCH] Add cmake depedency to bazel --- WORKSPACE | 1 + bazel/BUILD | 10 ++++++++++ 2 files changed, 11 insertions(+) diff --git a/WORKSPACE b/WORKSPACE index 8e0d1dc65b..1106def6af 100644 --- a/WORKSPACE +++ b/WORKSPACE @@ -55,6 +55,7 @@ http_archive( load("@rules_foreign_cc//:workspace_definitions.bzl", "rules_foreign_cc_dependencies") rules_foreign_cc_dependencies([ + "//bazel:built_cmake_toolchain", ]) http_archive( diff --git a/bazel/BUILD b/bazel/BUILD index 2d352a7d30..1b6c851733 100644 --- a/bazel/BUILD +++ b/bazel/BUILD @@ -4,3 +4,13 @@ config_setting( name = "windows", constraint_values = ["@bazel_tools//platforms:windows"], ) + +toolchain( + name = "built_cmake_toolchain", + exec_compatible_with = [ + "@bazel_tools//platforms:osx", + "@bazel_tools//platforms:x86_64", + ], + toolchain = "@rules_foreign_cc//tools/build_defs/native_tools:built_cmake", + toolchain_type = "@rules_foreign_cc//tools/build_defs:cmake_toolchain", +)