Skip to content

Commit

Permalink
[eclipse-iceoryx#439] Remove foreign_cc build
Browse files Browse the repository at this point in the history
  • Loading branch information
elBoberido committed Oct 11, 2024
1 parent 00c2f19 commit 2af4ed9
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 85 deletions.
11 changes: 1 addition & 10 deletions BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@
#
# SPDX-License-Identifier: Apache-2.0 OR MIT

load("@rules_foreign_cc//foreign_cc:defs.bzl", "cmake")

exports_files([
"LICENSE-APACHE",
"LICENSE-MIT",
Expand Down Expand Up @@ -61,14 +59,6 @@ alias(
visibility = ["//visibility:public"],
)

# NOTE: the following lines can be removed once 'rules_foreign_cc' is retired from building the C and C++ bindings

alias(
name = "iceoryx2-c",
actual = "//iceoryx2-ffi/c:iceoryx2-c-foreigncc",
visibility = ["//visibility:public"],
)

filegroup(
name = "all_srcs",
srcs = glob([
Expand All @@ -82,6 +72,7 @@ filegroup(
"iceoryx2-pal/**",
"iceoryx2/**",
"*.bazel",
"*.lock",
"*.toml",
"*.txt",
"*.md",
Expand Down
15 changes: 0 additions & 15 deletions WORKSPACE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -15,21 +15,6 @@ workspace(name = "org_eclipse_iceoryx_iceoryx2")
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive", "http_file")
load("@bazel_tools//tools/build_defs/repo:utils.bzl", "maybe")

maybe(
name = "rules_foreign_cc",
repo_rule = http_archive,
sha256 = "4b33d62cf109bcccf286b30ed7121129cc34cf4f4ed9d8a11f38d9108f40ba74",
strip_prefix = "rules_foreign_cc-0.11.1",
url = "https://github.com/bazelbuild/rules_foreign_cc/releases/download/0.11.1/rules_foreign_cc-0.11.1.tar.gz",
)

load("@rules_foreign_cc//foreign_cc:repositories.bzl", "rules_foreign_cc_dependencies")

# This sets up some common toolchains for building targets. For more details, please see
# https://bazelbuild.github.io/rules_foreign_cc/0.11.1/flatten.html#rules_foreign_cc_dependencies
rules_foreign_cc_dependencies()


# Setup gtest
GOOGLETEST_VERSION = "1.14.0"
maybe(
Expand Down
60 changes: 0 additions & 60 deletions iceoryx2-ffi/c/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -21,63 +21,3 @@ alias(
name = "iceoryx2-c-static",
actual = "//iceoryx2-ffi/ffi:iceoryx2-ffi-static",
)

# NOTE: the following lines can be removed once 'rules_foreign_cc' is retired from building the C and C++ bindings

load("@rules_foreign_cc//foreign_cc:defs.bzl", "cmake")


filegroup(
name = "cmake_srcs",
srcs = glob(["cmake/**"]),
)

cmake(
name = "iceoryx2-c-foreigncc",
cache_entries = {
"IOX2_VERSION_STRING": "0.4.1",
},
build_data = [
":cmake_srcs",
"//:all_srcs",
"//iceoryx2-ffi/ffi:all_srcs",
],
lib_source = "CMakeLists.txt",
out_static_libs = select({
"//:win-msvc": ["iceoryx2_ffi.lib"],
"//:win-gcc": ["libiceoryx2_ffi.a"],
"//conditions:default": ["libiceoryx2_ffi.a"],
}),
out_interface_libs = select({
"//:win-msvc": ["iceoryx2_ffi.dll.lib"],
"//:win-gcc": ["libiceoryx2_ffi.dll.a"],
"//conditions:default": [],
}),
out_shared_libs = select({
"//:win-msvc": ["iceoryx2_ffi.dll"],
"//:win-gcc": ["iceoryx2_ffi.dll"],
"//conditions:default": ["libiceoryx2_ffi.so"],
}),
out_dll_dir = select({
"//:win-msvc": "lib",
"//conditions:default": "",
}),
out_include_dir = "include/iceoryx2/v0.4.1/",
exec_properties = {
"requires-network": "true",
},
linkopts = select({
"//:win-msvc": [
"advapi32.lib",
"bcrypt.lib",
"ntdll.lib",
"psapi.lib",
"userenv.lib",
"synchronization.lib",
"ws2_32.lib",
"wsock32.lib",
],
"//:win-gcc": [],
"//conditions:default": [],
}),
)

0 comments on commit 2af4ed9

Please sign in to comment.