Skip to content

Commit

Permalink
Merge pull request #1754 from mmorel-35/bzlmod
Browse files Browse the repository at this point in the history
chore(bazel): add MODULE.bazel files for bzlmod
  • Loading branch information
galabovaa committed May 8, 2024
2 parents d43682a + 65f5af4 commit 96c3dd2
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 21 deletions.
45 changes: 24 additions & 21 deletions BUILD.bazel
@@ -1,5 +1,5 @@
load("@rules_cc//cc:defs.bzl", "cc_library", "cc_binary", "cc_test")
load("@bazel_skylib//rules:copy_file.bzl", "copy_file")
load("@rules_cc//cc:defs.bzl", "cc_library", "cc_binary", "cc_test")

copy_file(
name = "highs-config",
Expand All @@ -20,29 +20,30 @@ cc_library(
"extern/filereaderlp/*.cpp",
"extern/zlib/*.cpp",
"src/interfaces/highs_c_api.cpp",
"src/io/*.cpp",
"src/ipm/*.cpp",
"src/ipm/ipx/*.cc",
"src/ipm/basiclu/*.c",
"src/lp_data/*.cpp",
"src/mip/*.cpp",
"src/model/*.cpp",
"src/parallel/*.cpp",
"src/pdlp/*.cpp",
"src/pdlp/cupdlp/*.c",
"src/presolve/*.cpp",
"src/qpsolver/*.cpp",
"src/simplex/*.cpp",
"src/test/*.cpp",
"src/util/*.cpp",
"src/io/*.cpp",
"src/ipm/*.cpp",
"src/ipm/ipx/*.cc",
"src/ipm/basiclu/*.c",
"src/lp_data/*.cpp",
"src/mip/*.cpp",
"src/model/*.cpp",
"src/parallel/*.cpp",
"src/pdlp/*.cpp",
"src/pdlp/cupdlp/*.c",
"src/presolve/*.cpp",
"src/qpsolver/*.cpp",
"src/simplex/*.cpp",
"src/test/*.cpp",
"src/util/*.cpp",
]),
hdrs = glob([
"HConfig.h",
"**/*.h",
"src/qpsolver/*.hpp",
"src/Highs.h",
"extern/filereaderlp/*.hpp",
"extern/zstr/*.hpp"]),
"extern/zstr/*.hpp",
]),
copts = [
"-Wno-unused-variable",
"-Wno-unused-but-set-variable",
Expand All @@ -64,21 +65,23 @@ cc_library(
# "src/simplex",
# "src/test",
# "src/util",
"bazel-bin"],
"bazel-bin",
],
linkopts = ["-lpthread"],
visibility = ["//visibility:public"],
deps = [
deps = [
"//:config",
"@zlib",
],
)

cc_binary(
name = "call-highs-example",
srcs= ["examples/call_highs_from_cpp.cpp"],
srcs = ["examples/call_highs_from_cpp.cpp"],
visibility = ["//visibility:public"],
deps = [
"//:highs",
],
visibility = ["//visibility:public"]
)

## Add tests
Expand Down
17 changes: 17 additions & 0 deletions MODULE.bazel
@@ -0,0 +1,17 @@
module(
name = "highs",
version = "1.7.0",
)

bazel_dep(
name = "bazel_skylib",
version = "1.6.1",
)
bazel_dep(
name = "rules_cc",
version = "0.0.9",
)
bazel_dep(
name = "zlib",
version = "1.3.1.bcr.1",
)

0 comments on commit 96c3dd2

Please sign in to comment.