-
-
Notifications
You must be signed in to change notification settings - Fork 849
add [conf] section to conan profile #6518
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
Conversation
for _, pair in ipairs(configs.conf) do | ||
local key, value = pair:match("([^=]+)=([^=]+)") | ||
if key and value then | ||
conf[key] = value |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use the same settings as settings, use parameters to set, and distinguish between build and host
xmake/xmake/modules/package/manager/conan/v2/install_package.lua
Lines 336 to 346 in f55d0e6
-- set custom host settings | |
for _, setting in ipairs(configs.settings or configs.settings_host) do | |
table.insert(argv, "-s") | |
table.insert(argv, setting) | |
end | |
-- set custom build settings | |
for _, setting in ipairs(configs.settings_build) do | |
table.insert(argv, "-s:b") | |
table.insert(argv, setting) | |
end |
-s, --settings SETTINGS
Apply the specified settings. By default, or if specifying -s:h (--settings:host), it applies to the host context. Use -s:b (--settings:build) to specify the build context,
or -s:a (--settings:all) to specify both contexts at once. Example: -s="compiler=gcc"
-s:b, --settings:build SETTINGS_BUILD
-s:h, --settings:host SETTINGS_HOST
-s:a, --settings:all SETTINGS_ALL
-c, --conf CONF Apply the specified conf. By default, or if specifying -c:h (--conf:host), it applies to the host context. Use -c:b (--conf:build) to specify the build context, or -c:a
(--conf:all) to specify both contexts at once. Example: -c="tools.cmake.cmaketoolchain:generator=Xcode"
-c:b, --conf:build CONF_BUILD
-c:h, --conf:host CONF_HOST
-c:a, --conf:all CONF_ALL
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use the same settings as settings, use parameters to set, and distinguish between build and host
xmake/xmake/modules/package/manager/conan/v2/install_package.lua
Lines 336 to 346 in f55d0e6
-- set custom host settings for _, setting in ipairs(configs.settings or configs.settings_host) do table.insert(argv, "-s") table.insert(argv, setting) end -- set custom build settings for _, setting in ipairs(configs.settings_build) do table.insert(argv, "-s:b") table.insert(argv, setting) end -s, --settings SETTINGS Apply the specified settings. By default, or if specifying -s:h (--settings:host), it applies to the host context. Use -s:b (--settings:build) to specify the build context, or -s:a (--settings:all) to specify both contexts at once. Example: -s="compiler=gcc" -s:b, --settings:build SETTINGS_BUILD -s:h, --settings:host SETTINGS_HOST -s:a, --settings:all SETTINGS_ALL -c, --conf CONF Apply the specified conf. By default, or if specifying -c:h (--conf:host), it applies to the host context. Use -c:b (--conf:build) to specify the build context, or -c:a (--conf:all) to specify both contexts at once. Example: -c="tools.cmake.cmaketoolchain:generator=Xcode" -c:b, --conf:build CONF_BUILD -c:h, --conf:host CONF_HOST -c:a, --conf:all CONF_ALL
I am curious why write conf
section to profile(build profile and host profile)
xmake/xmake/modules/package/manager/conan/v2/install_package.lua
Lines 264 to 269 in f55d0e6
profile:print("") | |
profile:print("[conf]") | |
for k, v in pairs(conf) do | |
profile:print("%s=%s", k, v) | |
end | |
end |
settings_build = {description = "Set the build settings for conan."}, | ||
imports = {description = "Set the imports for conan 1.x, it has been deprecated in conan 2.x."}, | ||
build_requires = {description = "Set the build requires for conan."}, | ||
configurations = {description = "Set the host configurations for conan, e.g. tools.microsoft.bash:subsystem=msys2"}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
use conan name, conf
#6510