Details
-
Bug
-
Resolution: Incomplete
-
Not Evaluated
-
None
-
1.3.3
-
None
-
Windows 10.
QT-Creator IDE
QBS 1.3.3
Description
我想一个模块根据CPU的条件来选择其它三个模块中的一个。 但是如果模块不是第一个的话,就会报 error: Product dependency 'XXXXX' not found for profile 'XXXXX'. 错误。
[we want select one module from three base on CPU id, but got "error: Product dependency 'XXXXX' not found for profile 'XXXXX" error message if the module is not on first line code. ]
QBS脚本, 用Product项目:
[QBS script, use product Item :]
drivers : {
if (project.cpu.contains("STM32F415"))
{
return ["mesh-talk", "mesh-talk-serial", "mesh-stm32-hardware-crypto"];
}
else if (project.cpu.contains("STM32F103"))
{
return ["mesh-talk", "mesh-talk-serial", "mesh-tls-hardware"];
}
else
{
return ["mesh-talk", "mesh-talk-serial", "mesh-tls"];
}
}
如果CPU是STM32F415,那mesh-stm32-hardware-crypto就没问题, 但我换作其他 的话mesh-tls-hardware和mesh-tls 都会报错。
[if the CPU is STM32F415, the mesh-stm32-hardware-crypto module parse OK, if other CPU, the mesh-tls-hardware and mesh-tls module report error ]
如果我移动位置,修改QBS脚本如下:
[if i modify the qbs script for module position, like below:]
drivers : {
if (project.cpu.contains("STM32F103"))
{
return ["mesh-talk", "mesh-talk-serial", "mesh-tls-hardware"];
}
else if (project.cpu.contains("STM32F415"))
{
return ["mesh-talk", "mesh-talk-serial", "mesh-stm32-hardware-crypto"];
}
else
{
return ["mesh-talk", "mesh-talk-serial", "mesh-tls"];
}
}
那就换成了如果CPU是STM32F415, 那mesh-stm32-hardware-crypto就会报错。 只有CPU是STM32F103,mesh-tls-hardware没问题。
[this time if CPU still STM32F415, then mesh-stm32-hardware-crypto module report error, but if CPU is STM32F103, the mesh-tls-hardware module parse OK ]
当单独时,所有的三模块都是好的。
选择
drivers : ["mesh-talk", "mesh-talk-serial", "mesh-tls-hardware"]
或者
drivers : ["mesh-talk", "mesh-talk-serial", "mesh-tls"]
或者
drivers : ["mesh-talk", "mesh-talk-serial", "mesh-stm32-hardware-crypto"]
[when select module standalone, every module parse ok.
select
drivers :["mesh-talk", "mesh-talk-serial", "mesh-tls-hardware"]
or
drivers : ["mesh-talk", "mesh-talk-serial", "mesh-tls"]
or
drivers : ["mesh-talk", "mesh-talk-serial", "mesh-stm32-hardware-crypto"]
]