Skip to content

Commit

Permalink
Use CMake_jll instead of CMake.jl
Browse files Browse the repository at this point in the history
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)
  • Loading branch information
JamesWrigley committed Dec 23, 2023
1 parent f0def33 commit c7e31d4
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 7 deletions.
4 changes: 2 additions & 2 deletions test/Project.toml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
[deps]
BinaryBuilder = "12aac903-9f7c-5d81-afc2-d9565ea332ae"
CEnum = "fa961155-64e5-5f13-b03f-caf6b980ea82"
CMake = "631607c0-34d2-5d66-819e-eb0f9aa2061a"
CMake_jll = "3f4e10e2-61f2-5801-8945-23b9d642d0e6"
Libdl = "8f399da3-3557-5675-b5ff-fb832c97cbdb"
TOML = "fa267f1f-6049-4f14-aa54-33bafae1ed76"
Tar = "a4e569a6-e804-4fa4-b0f3-eef7a1d5b13e"
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"
p7zip_jll = "3f19e933-33d8-53b3-aaab-bd5110c3b7a0"
TOML = "fa267f1f-6049-4f14-aa54-33bafae1ed76"
15 changes: 10 additions & 5 deletions test/test_bitfield.jl
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using CMake, p7zip_jll, Tar
using CMake_jll, p7zip_jll, Tar
using Clang.Generators

function build_libbitfield_native()
Expand All @@ -8,7 +8,8 @@ function build_libbitfield_native()
src_dir = joinpath(@__DIR__, "bitfield")
build_dir = joinpath(@__DIR__, "build")

config_cmd = `$cmake -B $build_dir -S $src_dir`
cmake_path = CMake_jll.get_cmake_path()
config_cmd = `$cmake_path -B $build_dir -S $src_dir`
if Sys.WORD_SIZE == 32
if Sys.iswindows()
config_cmd = `$config_cmd -A win32`
Expand All @@ -19,9 +20,13 @@ function build_libbitfield_native()
build_cmd = `$cmake --build $build_dir --config Debug`
install_cmd = `$cmake --install $build_dir --config Debug --prefix $build_dir`

run(config_cmd)
run(build_cmd)
run(install_cmd)
# This will show a warning about the do-block method being deprecated,
# but not using it throws an error about libssl not being found.
cmake() do _
run(config_cmd)
run(build_cmd)
run(install_cmd)
end
catch e
@warn "Building libbitfield with native tools failed" exception=(e, catch_backtrace())
success = false
Expand Down

0 comments on commit c7e31d4

Please sign in to comment.