Skip to content

Commit 31876f0

Browse files
committed
Use CMake_jll instead of CMake.jl
CMake.jl is currently broken on 1.9 because the location of 7z.exe changed: - JuliaPackaging/CMake.jl#23 - JuliaLang/julia#48931 - JuliaInterop#458 (comment)
1 parent 3afee34 commit 31876f0

File tree

2 files changed

+12
-7
lines changed

2 files changed

+12
-7
lines changed

test/Project.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
[deps]
22
BinaryBuilder = "12aac903-9f7c-5d81-afc2-d9565ea332ae"
33
CEnum = "fa961155-64e5-5f13-b03f-caf6b980ea82"
4-
CMake = "631607c0-34d2-5d66-819e-eb0f9aa2061a"
4+
CMake_jll = "3f4e10e2-61f2-5801-8945-23b9d642d0e6"
55
Libdl = "8f399da3-3557-5675-b5ff-fb832c97cbdb"
6+
TOML = "fa267f1f-6049-4f14-aa54-33bafae1ed76"
67
Tar = "a4e569a6-e804-4fa4-b0f3-eef7a1d5b13e"
78
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"
89
p7zip_jll = "3f19e933-33d8-53b3-aaab-bd5110c3b7a0"
9-
TOML = "fa267f1f-6049-4f14-aa54-33bafae1ed76"

test/test_bitfield.jl

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
using CMake, p7zip_jll, Tar
1+
using CMake_jll, p7zip_jll, Tar
22
using Clang.Generators
33

44
function build_libbitfield_native()
@@ -8,7 +8,8 @@ function build_libbitfield_native()
88
src_dir = joinpath(@__DIR__, "bitfield")
99
build_dir = joinpath(@__DIR__, "build")
1010

11-
config_cmd = `$cmake -B $build_dir -S $src_dir`
11+
cmake_path = CMake_jll.get_cmake_path()
12+
config_cmd = `$cmake_path -B $build_dir -S $src_dir`
1213
if Sys.WORD_SIZE == 32
1314
if Sys.iswindows()
1415
config_cmd = `$config_cmd -A win32`
@@ -19,9 +20,13 @@ function build_libbitfield_native()
1920
build_cmd = `$cmake --build $build_dir --config Debug`
2021
install_cmd = `$cmake --install $build_dir --config Debug --prefix $build_dir`
2122

22-
run(config_cmd)
23-
run(build_cmd)
24-
run(install_cmd)
23+
# This will show a warning about the do-block method being deprecated,
24+
# but not using it throws an error about libssl not being found.
25+
cmake() do _
26+
run(config_cmd)
27+
run(build_cmd)
28+
run(install_cmd)
29+
end
2530
catch e
2631
@warn "Building libbitfield with native tools failed" exception=(e, catch_backtrace())
2732
success = false

0 commit comments

Comments
 (0)