Integrate LBFGS++ with Bazel
masterLBFGS++ can be integrated into Bazel projects using Bzlmod.
- Add the dependency to your
MODULE.bazelfile:
bazel_dep(name = "lbfgspp", version = "4.0.0")
git_override(
module_name = "lbfgspp",
commit = "c524a407fb85b74807f53de5a3ca2ddbcc164e54",
remote = "https://github.com/yixuan/LBFGSpp.git",
)- Add
@lbfgsppto thedepsof yourcc_library,cc_binary, orcc_testtarget in yourBUILD.bazelfile. Bazel will automatically resolve the transitive dependency on@eigen.
# BUILD.bazel
cc_library(
name = "my_lib",
srcs = ["my_lib.cc"],
hdrs = ["my_lib.h"],
deps = ["@lbfgspp"],
)