polish swig_java bazel support
This commit is contained in:
@@ -158,7 +158,6 @@ python_configure(name = "local_config_python", python_version = "3")
|
||||
http_archive(
|
||||
name = "pcre2",
|
||||
build_file = "//bazel:pcre2.BUILD",
|
||||
patches = ["//bazel:pcre2.patch"],
|
||||
strip_prefix = "pcre2-10.42",
|
||||
urls = [
|
||||
"https://github.com/PCRE2Project/pcre2/releases/download/pcre2-10.42/pcre2-10.42.tar.gz",
|
||||
|
||||
@@ -27,9 +27,3 @@ exports_files([
|
||||
"archive_helper.bzl",
|
||||
"python_deps.txt",
|
||||
])
|
||||
|
||||
sh_binary(
|
||||
name = "run_swig",
|
||||
srcs = ["run_swig.sh"],
|
||||
visibility = ["//visibility:public"],
|
||||
)
|
||||
|
||||
@@ -1,13 +0,0 @@
|
||||
--- /dev/null 2022-12-31 10:33:36
|
||||
+++ WORKSPACE 2022-12-31 10:31:42
|
||||
@@ -0,0 +1,10 @@
|
||||
+load("@bazel_tools//tools/build_defs/repo:git.bzl", "git_repository", "new_git_repository")
|
||||
+
|
||||
+# Bazel Skylib rules.
|
||||
+git_repository(
|
||||
+ name = "bazel_skylib",
|
||||
+ tag = "1.2.1",
|
||||
+ remote = "https://github.com/bazelbuild/bazel-skylib.git",
|
||||
+)
|
||||
+load("@bazel_skylib//:workspace.bzl", "bazel_skylib_workspace")
|
||||
+bazel_skylib_workspace()
|
||||
@@ -1,22 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
# Copyright 2021 The Cross-Media Measurement Authors
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
|
||||
# Wrapper which creates the directory specified as $1, then executing the
|
||||
# command in $2 with the remaining arguments.
|
||||
#
|
||||
# This is to work around https://github.com/bazelbuild/bazel/issues/6393
|
||||
|
||||
exec swig "$@"
|
||||
@@ -107,7 +107,6 @@ cc_binary(
|
||||
"-fexceptions",
|
||||
],
|
||||
}),
|
||||
data = [":templates"],
|
||||
includes = [
|
||||
"Source/CParse",
|
||||
"Source/DOH",
|
||||
@@ -123,12 +122,24 @@ cc_binary(
|
||||
)
|
||||
|
||||
filegroup(
|
||||
name = "templates",
|
||||
name = "lib_java",
|
||||
srcs = glob([
|
||||
'Lib/*',
|
||||
'Lib/java/*',
|
||||
'Lib/std/*',
|
||||
'Lib/typemaps/*'
|
||||
]),
|
||||
licenses = ["notice"], # simple notice license for Lib/
|
||||
path = "Lib",
|
||||
visibility = ["//visibility:public"],
|
||||
)
|
||||
|
||||
filegroup(
|
||||
name = "lib_python",
|
||||
srcs = glob([
|
||||
'Lib/*',
|
||||
'Lib/python/*',
|
||||
'Lib/std/*',
|
||||
'Lib/java/*',
|
||||
'Lib/typemaps/*'
|
||||
]),
|
||||
licenses = ["notice"], # simple notice license for Lib/
|
||||
|
||||
@@ -1,10 +1,9 @@
|
||||
# Copyright 2020 The Cross-Media Measurement Authors
|
||||
#
|
||||
# Copyright 2010-2022 Google LLC
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
@@ -185,7 +184,7 @@ def ortools_java_wrap_cc(
|
||||
deps = deps,
|
||||
swig_opt = swig_opt,
|
||||
module = module,
|
||||
swig_includes = swig_includes,
|
||||
swig_includes = swig_includes + ["@swig//:lib_java"],
|
||||
use_directors = use_directors,
|
||||
visibility = ["//visibility:private"],
|
||||
**kwargs
|
||||
|
||||
Reference in New Issue
Block a user