0
나는 WAF + MSVC와 함께 두 개의 프로젝트를 구축하기 위해 노력하고있어 :Waf의 다른 환경 사이의 종속성?
top = '.'
out = 'build'
def configure(conf):
conf.setenv('x86')
conf.env['MSVC_TARGETS'] = 'x86'
conf.load('compiler_cxx')
conf.setenv('x64')
conf.env['MSVC_TARGETS'] = 'x86_amd64'
conf.load('compiler_cxx')
def options(opt):
opt.load('compiler_cxx')
def build(ctx):
ctx.env = ctx.all_envs['x86']
ctx.program(source='x86.cpp', target='x86', name='x86')
ctx.env = ctx.all_envs['x64']
ctx.program(source='x64.cpp', target='x64', name='x64')
당신은 내가 다른 환경을 사용하여 32 비트 및 64 비트 프로젝트를 빌드 볼 수 있듯이. 내 질문은 : "x64"와 "x86"프로젝트 간의 종속성을 어떻게 설정할 수 있습니까? "x64"가 완료된 후 "x86"프로젝트가 빌드되어야합니다.
수동 종속성을 설정하는 유일한 방법은 add_manual_dependency 메소드이지만, 단일 환경에서만 사용할 수있는 것으로 나타났습니다. "use = [ 'xxx']"메서드를 구현하는 방법을 알고있는 것도 좋겠지 만 정적 라이브러리에서는 좋지만 내 경우에는 그렇습니다. 그러한 방식으로 자동 종속성을 가질 가능성이 있습니까? 예 :
def build(ctx):
ctx.env = ctx.all_envs['x86']
ctx.program(source='x86.cpp', target='x86', name='x86', use='x64_from_x64_environment')
ctx.env = ctx.all_envs['x64']
ctx.program(source='x64.cpp', target='x64', name='x64')
정말 도움이됩니다. :)