分层标头安装 Scons
我正在将头文件“安装”到主包含目录中,以便所有额外的 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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
试试这个:
Try this: