Created
May 17, 2021 11:20
-
-
Save SomeoneSerge/cc368e12b0789bd943e6bb6a1557cc69 to your computer and use it in GitHub Desktop.
Eigen in Bazel
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cc_library( | |
name="downstream", | |
srcs=[ | |
# ... | |
], | |
hdrs=[ | |
# ... | |
], | |
deps=[ | |
"@eigen//:eigen", | |
], | |
copts=[ | |
"-std=c++2a", | |
"-O3", | |
"-fopenmp", | |
], | |
include_prefix="downstream", | |
) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package( | |
default_visibility = ["//visibility:public"], | |
) | |
cc_library( | |
name="eigen", | |
hdrs = glob(["Eigen/**", "unsupported/Eigen/**"]), | |
includes = ["."], | |
) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") | |
# ... | |
# FIXME: not a release of Eigen, arbitrary commit from master | |
# needed because operator() supports arrays of indices only in 3.3.90+ | |
http_archive( | |
name = "eigen", | |
url = "https://github.com/SomeoneSerge/eigen/archive/b9a0ca84d86e735096f4264d75b0b06d4c18de51.zip", | |
sha256 = "80a32fbf385356ba81129c91d58c8d8e3e73aeb7af4e3683a656af6e9c0549aa", | |
build_file="@//:BUILD.eigen.bzl", | |
strip_prefix="eigen-b9a0ca84d86e735096f4264d75b0b06d4c18de51", | |
) | |
# ... |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment