-
Notifications
You must be signed in to change notification settings - Fork 358
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix soplex deps; add boost dependency; add cc_binary target (#3515)
Fix soplex: - move zstr as a deps as it leaks on the client build file otherwise (not an issue as it is a header only library) - add missing multiprecision option - add cc_binary rule to build the soplex binary (and verify the compilation went well)
- Loading branch information
Showing
10 changed files
with
179 additions
and
3 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
module( | ||
name = "soplex", | ||
version = "7.1.2.bcr.1", | ||
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 = "boost.serialization", | ||
version = "1.83.0.bcr.1", | ||
) | ||
|
||
bazel_dep( | ||
name = "zlib", | ||
version = "1.3.1.bcr.3", | ||
) | ||
|
||
bazel_dep( | ||
name = "zstr", | ||
version = "1.0.7", | ||
) | ||
|
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
# Description: | ||
# Soplex is a LP solver, a common tool in Operations Research. | ||
|
||
cc_library( | ||
name = "soplex", | ||
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"], | ||
deps = [ | ||
"@boost.multiprecision", | ||
"@boost.serialization", | ||
"@fmt", | ||
"@zstr", | ||
], | ||
) | ||
|
||
cc_binary( | ||
name = "soplex_interactive", | ||
srcs = ["src/soplexmain.cpp"], | ||
copts = select({ | ||
"@platforms//os:windows": ["/utf-8"], | ||
"//conditions:default": [], | ||
}), | ||
deps = [ | ||
":soplex", | ||
"@boost.multiprecision", | ||
"@zlib", | ||
], | ||
) |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
../MODULE.bazel |
This file contains 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
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 | ||
+#define 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
7
modules/soplex/7.1.2.bcr.1/patches/add_git_hash_dot_cpp.patch
This file contains 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
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 "b040369c" |
This file contains 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
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" |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
diff --git a/src/soplex/spxfileio.h b/src/soplex/spxfileio.h | ||
index 035b30e0..4bff223c 100644 | ||
--- a/src/soplex/spxfileio.h | ||
+++ b/src/soplex/spxfileio.h | ||
@@ -41,7 +41,7 @@ | ||
*----------------------------------------------------------------------------- | ||
*/ | ||
#ifdef SOPLEX_WITH_ZLIB | ||
-#include "soplex/external/zstr/zstr.hpp" | ||
+#include "zstr.hpp" | ||
#endif // WITH_GSZSTREAM | ||
|
||
namespace soplex |
This file contains 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
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//...' |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
{ | ||
"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-b7x5Pyms8oDiaXQc1u7BLgo33kbDyAXJPsf0XGVfv6s=", | ||
"add_git_hash_dot_cpp.patch": "sha256-dr5ytJPP3IfeKS/F5fnGp37XRvb3HyADwp4TIx7aiXE=", | ||
"fmt_dot_hpp.patch": "sha256-l3uQmHQOXJhsyGfBArkMIUI0n3t1BsvGD2r3d0CtVrc=", | ||
"spxfileio_dot_h.patch": "sha256-g3qdN7pcA2Ef64Kx3vb2xjyNJrKRjLIPJCI6dLkj/N8=" | ||
}, | ||
"patch_strip": 1, | ||
"overlay": { | ||
"BUILD.bazel": "sha256-xFOmYj3tIpHXZOeEhuPEMYrKo8AEOZvgv0lYcKchBY0=", | ||
"MODULE.bazel": "sha256-JSEr3bYeVvq0K35PrwOYgKqGixoRZiH7pZQetttBs5M=" | ||
} | ||
} |
This file contains 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