我正在将我的头文件'安装'到主包含目录中,以便所有额外的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)
Scons似乎压扁了我的标题布局然后崩溃,因为有多个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.
有没有人有一个配方来安装我的文件夹层次结构的头文件?
答案 0 :(得分:0)
试试这个:
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)