Skip to content

Commit

Permalink
[HiGHSstatic] remove Zlib dependency (#8409)
Browse files Browse the repository at this point in the history
Co-authored-by: Ian McInerney <i.mcinerney17@imperial.ac.uk>
  • Loading branch information
odow and imciner2 committed Apr 2, 2024
1 parent 2564d47 commit 3b07b3e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
3 changes: 2 additions & 1 deletion H/HiGHS/HiGHSstatic/build_tarballs.jl
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# To ensure a build, it isn't sufficient to modify highs_common.jl.
# You also need to update a line in this file:
# Last updated: 2024-03-07
# Last updated: 2024-04-02, bump 2

include("../highs_common.jl")

Expand All @@ -19,6 +19,7 @@ dependencies = [
# is a build-only dependency, in the other cases it's also a runtime one.
Dependency("CompilerSupportLibraries_jll"; platforms=filter(!Sys.iswindows, platforms)),
BuildDependency("CompilerSupportLibraries_jll"; platforms=filter(Sys.iswindows, platforms)),
HostBuildDependency(PackageSpec(; name="CMake_jll")),
Dependency("Zlib_jll"),
]

Expand Down
7 changes: 6 additions & 1 deletion H/HiGHS/highs_common.jl
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,13 @@ sources = [
platforms = supported_platforms()

function build_script(; shared_libs::String)
return "BUILD_SHARED=$(shared_libs)\n" * raw"""
build_static = shared_libs == "OFF" ? "ON" : "OFF"
return "BUILD_SHARED=$(shared_libs)\nBUILD_STATIC=$(build_static)\n" * raw"""
cd $WORKSPACE/srcdir/HiGHS
# Remove system CMake to use the jll version
apk del cmake
mkdir -p build
cd build
Expand All @@ -33,6 +37,7 @@ cmake -DCMAKE_INSTALL_PREFIX=${prefix} \
-DCMAKE_TOOLCHAIN_FILE=${CMAKE_TARGET_TOOLCHAIN} \
-DCMAKE_BUILD_TYPE=Release \
-DBUILD_SHARED_LIBS=${BUILD_SHARED} \
-DZLIB_USE_STATIC_LIBS=${BUILD_STATIC} \
-DFAST_BUILD=ON \
-DJULIA=ON ..
Expand Down

0 comments on commit 3b07b3e

Please sign in to comment.