Skip to content

Commit

Permalink
Soplex v712 (bazelbuild#3512)
Browse files Browse the repository at this point in the history
Add soplex (a dependency of scip) to BCR

Please add the unstable url tag.

Thanks
  • Loading branch information
lperron authored Jan 1, 2025
1 parent 384ba85 commit adb3416
Show file tree
Hide file tree
Showing 9 changed files with 158 additions and 0 deletions.
25 changes: 25 additions & 0 deletions modules/soplex/7.1.2/MODULE.bazel
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
module(
name = "soplex",
version = "7.1.2",
compatibility_level = 1,
)

bazel_dep(
name = "platforms",
version = "0.0.10",
)

bazel_dep(
name = "fmt",
version = "11.1.1",
)

bazel_dep(
name = "boost.multiprecision",
version = "1.83.0.bcr.1",
)

bazel_dep(
name = "zlib",
version = "1.3.1.bcr.3",
)
38 changes: 38 additions & 0 deletions modules/soplex/7.1.2/overlay/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# Description:
# Soplex is a LP solver, a common tool in Operations Research.git

cc_library(
name = "zstr",
hdrs = glob(["src/soplex/external/zstr/*.hpp"]),
includes = ["src/soplex/external"],
visibility = ["//visibility:public"],
)

cc_library(
name = "libsoplex",
srcs = glob(
["src/soplex/*.cpp"],
exclude = ["src/git_hash.cpp"],
),
hdrs = glob(
[
"src/soplex/*.h",
"src/soplex/*.hpp",
],
) + [
"src/soplex.h",
"src/soplex.hpp",
"src/soplex/git_hash.cpp",
],
copts = select({
"@platforms//os:windows": ["-utf-8"],
"//conditions:default": [],
}),
includes = ["src"],
visibility = ["//visibility:public"],
implementation_deps = [":zstr"],
deps = [
"@boost.multiprecision",
"@fmt",
],
)
1 change: 1 addition & 0 deletions modules/soplex/7.1.2/overlay/MODULE.bazel
24 changes: 24 additions & 0 deletions modules/soplex/7.1.2/patches/add_config_dot_h.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
diff --git a/src/soplex/config.h b/src/soplex/config.h
new file mode 100644
index 00000000..e465106c
--- /dev/null
+++ b/src/soplex/config.h
@@ -0,0 +1,18 @@
+#ifndef __SPXCONFIG_H__
+#define __SPXCONFIG_H__
+
+#define CMAKE_BUILD_TYPE "Release"
+
+#define SOPLEX_VERSION_MAJOR 7
+#define SOPLEX_VERSION_MINOR 1
+#define SOPLEX_VERSION_PATCH 2
+#define SOPLEX_VERSION_SUB 0
+#define SOPLEX_WITH_BOOST
+/* #undef SOPLEX_WITH_CPPMPF */
+/* #undef SOPLEX_WITH_FLOAT128 */
+/* #undef SOPLEX_WITH_GMP */
+/* #undef SOPLEX_WITH_MPFR */
+/* #undef SOPLEX_WITH_PAPILO */
+#define SOPLEX_WITH_ZLIB
+
+#endif
7 changes: 7 additions & 0 deletions modules/soplex/7.1.2/patches/add_git_hash_dot_cpp.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
diff --git a/src/soplex/git_hash.cpp b/src/soplex/git_hash.cpp
new file mode 100644
index 00000000..bc2d689d
--- /dev/null
+++ b/src/soplex/git_hash.cpp
@@ -0,0 +1 @@
+#define SPX_GITHASH "NoGitInfo"
15 changes: 15 additions & 0 deletions modules/soplex/7.1.2/patches/fmt_dot_hpp.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
diff --git a/src/soplex/fmt.hpp b/src/soplex/fmt.hpp
index 934cb085..c3a31bb8 100644
--- a/src/soplex/fmt.hpp
+++ b/src/soplex/fmt.hpp
@@ -49,8 +49,8 @@

/* to provide backwards compatibility use fmt of PaPILO <= 2.3 due to breaking changes in fmt 7 */
#if !defined(SOPLEX_WITH_PAPILO) || PAPILO_VERSION_MAJOR > 2 || (PAPILO_VERSION_MAJOR == 2 && PAPILO_VERSION_MINOR > 3)
-#include "soplex/external/fmt/format.h"
-#include "soplex/external/fmt/ostream.h"
+#include "fmt/format.h"
+#include "fmt/ostream.h"
#else
#include "papilo/external/fmt/format.h"
#include "papilo/external/fmt/ostream.h"
17 changes: 17 additions & 0 deletions modules/soplex/7.1.2/presubmit.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
matrix:
platform:
- debian10
- ubuntu2004
- macos
- macos_arm64
- windows
bazel:
- 8.x
- 7.x
tasks:
verify_targets:
name: Verify build targets
platform: ${{ platform }}
bazel: ${{ bazel }}
build_targets:
- '@soplex//...'
15 changes: 15 additions & 0 deletions modules/soplex/7.1.2/source.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"url": "https://github.com/scipopt/soplex/archive/refs/tags/release-712.tar.gz",
"integrity": "sha256-oafX9+MNHbZVSLMvddby7ZvQvyifY560SB09FBxnozI=",
"strip_prefix": "soplex-release-712",
"patches": {
"add_config_dot_h.patch": "sha256-20flSvMwEdlhatYqBPzjfyBA4tjWvP8zsE7sexYXvAA=",
"add_git_hash_dot_cpp.patch": "sha256-QVgHvann6fzS5c58GflysP/vryBJT1C8wADUZ44dTWo=",
"fmt_dot_hpp.patch": "sha256-l3uQmHQOXJhsyGfBArkMIUI0n3t1BsvGD2r3d0CtVrc="
},
"patch_strip": 1,
"overlay": {
"BUILD.bazel": "sha256-IlXKRCOdkQV3i/WHliQsqWMNq3VO6HG3SL0tinNyOwg=",
"MODULE.bazel": "sha256-mN3i2PaEcxrCd1hTOR2uLF0mlzNKNlz2BQQ5kTah4aA="
}
}
16 changes: 16 additions & 0 deletions modules/soplex/metadata.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"homepage": "https://github.com/scipopt/soplex",
"maintainers": [
{
"email": "[email protected]",
"name": "No Maintainer Specified"
}
],
"repository": [
"github:scipopt/soplex"
],
"versions": [
"7.1.2"
],
"yanked_versions": {}
}

0 comments on commit adb3416

Please sign in to comment.