多个子工程通过环境变量或者 option 控制导入 #4009
Replies: 6 comments
-
Title: Multiple subprojects are imported through environment variables or options In what scenario do you need this function?Multiple sub-projects are imported through environment variables or options. For example, the number of projects imported under GPU and CPU is different. GPU key includes CPU, but CPU mode only has CPU describe possible solutionsFor example Describe what you think is a candidateFor example other informationNo response |
Beta Was this translation helpful? Give feedback.
-
? 不知道你要说什么 |
Beta Was this translation helpful? Give feedback.
-
? don't know what you're going to say |
Beta Was this translation helpful? Give feedback.
-
@waruqi 如何在 xmake.lua 当中依据一个 option 或者环境变量的配置动态includes() |
Beta Was this translation helpful? Give feedback.
-
if is_config("device", "gpu") then
includes("cpu", "gpu")
end |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
你在什么场景下需要该功能?
多个子工程通过环境变量或者 option 控制导入,例如 GPu 和 CPU 下导入的工程的数量是不一样的,GPU key 包含 CPU, 但是 CPU 模式仅仅只有 CPU
描述可能的解决方案
例如
// cpu 模式或 gpu 模式
includes("cpu/")
includes("cpu_test/")
//only GPU 模式
includes("gpu/")
描述你认为的候选方案
例如
// cpu 模式或 gpu 模式
includes("cpu/")
includes("cpu_test/")
//only GPU 模式
includes("gpu/")
其他信息
No response
Beta Was this translation helpful? Give feedback.
All reactions