分层标头安装 Scons

发布于 2024-12-04 06:46:02 字数 804 浏览 0 评论 0原文

我正在将头文件“安装”到主包含目录中,以便所有额外的 scons 构建都可以访问它们。

像 Scons这样的东西

headers = ''' this.h that.h other.h dir1/other.h dir2/other.h'''.split()
include_path = Dir('cppunit', local_env['incinstall'])
hdr_inst = local_env.Install(include_path, headers)
env.Alias('install_cppunittest_headers', hdr_inst)

似乎会压平我的标头布局,然后崩溃,因为有多个 other.h

Install file: "tools\CppUnitTest\src\cppunit\TestRunner.h" as "include\cppunit\TestRunner.h"
scons: *** [include\cppunit\TestRunner.h] AssertionError : Installing source ['tools\\CppUnitTest\\src\\cppunit\\TestRunner.h', 'tools\\CppUnitTest\\src\\cppunit\\ui\\text\\TestRunner.h'] into target ['include\\cppunit\\TestRunner.h']: target and source lists must have same length.

有没有人有安装我的标头并保留其文件夹层次结构的方法?

I am 'installing' my header files to the main include directory for all the extra scons builds to have access to them.

something like

headers = ''' this.h that.h other.h dir1/other.h dir2/other.h'''.split()
include_path = Dir('cppunit', local_env['incinstall'])
hdr_inst = local_env.Install(include_path, headers)
env.Alias('install_cppunittest_headers', hdr_inst)

Scons seems to flatten my header layout and then crashes as there are multiple other.h's

Install file: "tools\CppUnitTest\src\cppunit\TestRunner.h" as "include\cppunit\TestRunner.h"
scons: *** [include\cppunit\TestRunner.h] AssertionError : Installing source ['tools\\CppUnitTest\\src\\cppunit\\TestRunner.h', 'tools\\CppUnitTest\\src\\cppunit\\ui\\text\\TestRunner.h'] into target ['include\\cppunit\\TestRunner.h']: target and source lists must have same length.

Does anyone have a recipe for installing my headers with their folder hierarchy preserved?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

把梦留给海 2024-12-11 06:46:02

试试这个:

headers = ''' this.h that.h other.h dir1/other.h dir2/other.h'''.split()
include_path = Dir('cppunit', local_env['incinstall'])
hdr_inst = [local_env.Install(include_path+'/'+h, h) for h in headers]
env.Alias('install_cppunittest_headers', hdr_inst)

Try this:

headers = ''' this.h that.h other.h dir1/other.h dir2/other.h'''.split()
include_path = Dir('cppunit', local_env['incinstall'])
hdr_inst = [local_env.Install(include_path+'/'+h, h) for h in headers]
env.Alias('install_cppunittest_headers', hdr_inst)
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文