2
0
Fork 0
mirror of https://github.com/bazel-contrib/rules_foreign_cc synced 2024-11-27 02:43:28 +00:00
rules_foreign_cc/WORKSPACE
irengrig c51480261c
Extract shell fragments into a toolchain (#196)
* Extract shell fragments into a toolchain

Construct script in framework.bzl using special notation for calling
shell fragments, defining and referencing environment variables;
have the script converted from this special notation into a real script
(see README.md notes.)
The special notation is used to keep script construction in code still readable.

Tools scripts (cmake, ninja) were also converted.

* Fix reference to environment variables in examples

.. and reference it correctly $$var_name$$ so it is replaced further

* Review comments: documentation, explicitly mark functions from toolchain

- mark functions from shell toolchain as ##funname##, so that they
can not be mixed with usual shell functions

* Fix operating system name for windows in toolchain file

* Additional env vars for windows

* Correct cmake tool build

* Do not build ninja on Windows

* When run on Windows under msys, find utility from Window could "leak"...

into the script. Use heuristics to use /usr/bin/find if it exists.
Also, use pwd -W to get Windows-styled paths (for cmake)
2019-01-18 18:06:10 +01:00

42 lines
1,004 B
Python

workspace(name = "rules_foreign_cc")
load("//:workspace_definitions.bzl", "rules_foreign_cc_dependencies")
rules_foreign_cc_dependencies([
"@rules_foreign_cc_tests//:built_cmake_toolchain",
"@rules_foreign_cc_tests//:built_ninja_toolchain_osx",
"@rules_foreign_cc_tests//:built_ninja_toolchain_linux",
])
local_repository(
name = "rules_foreign_cc_tests",
path = "examples",
)
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
android_sdk_repository(
name = "androidsdk",
)
android_ndk_repository(
name = "androidndk",
)
# Google Maven Repository
GMAVEN_TAG = "20180625-1"
http_archive(
name = "gmaven_rules",
strip_prefix = "gmaven_rules-%s" % GMAVEN_TAG,
url = "https://github.com/bazelbuild/gmaven_rules/archive/%s.tar.gz" % GMAVEN_TAG,
)
load("@gmaven_rules//:gmaven.bzl", "gmaven_rules")
gmaven_rules()
load("@rules_foreign_cc_tests//:examples_repositories.bzl", "include_examples_repositories")
include_examples_repositories()