Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add ninja dep to cmake #5222

Merged
merged 3 commits into from
Sep 13, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions packages/c/cmake/xmake.lua
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,14 @@ package("cmake")
add_extsources("brew::cmake")
end

on_load(function (package)
-- xmake v3.x will enable this ninja policy by default
import("core.project.project")
if project.policy("package.cmake_generator.ninja") then
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use xmake:version():ge("3.0.0")?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

不用,现在的版本也有 package.cmake_generator.ninja 而且 2.8.3 就已经存在这个了。。只是默认关着而已,不影响。。

还能提前体验和测试这个特性,等 3.0 再默认放开就行了。

package:add("deps", "ninja")
end
end)

on_install("@macosx", function (package)
os.cp("CMake.app/Contents/bin", package:installdir())
os.cp("CMake.app/Contents/share", package:installdir())
Expand Down
Loading