mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-02-01 13:38:38 -04:00
waf: create program_dir directory
There's an upcoming patch that moves all static libraries to `build/<board>/lib/`. That way, the program directory won't be created automatically by the build system and that will cause problems for PX4 builds, since it builds ardupilot programs as static libraries and copies stuff to the program directory.
This commit is contained in:
parent
844222870c
commit
236a62f4b9
@ -5,6 +5,7 @@ from __future__ import print_function
|
||||
from waflib import Logs, Options, Utils
|
||||
from waflib.Build import BuildContext
|
||||
from waflib.Configure import conf
|
||||
from waflib.TaskGen import before_method, feature
|
||||
import os.path, os
|
||||
from collections import OrderedDict
|
||||
|
||||
@ -186,6 +187,17 @@ def ap_stlib(bld, **kw):
|
||||
|
||||
bld.stlib(**kw)
|
||||
|
||||
_created_program_dirs = set()
|
||||
@feature('cxxstlib', 'cxxprogram')
|
||||
@before_method('process_rule')
|
||||
def ap_create_program_dir(self):
|
||||
if not hasattr(self, 'program_dir'):
|
||||
return
|
||||
if self.program_dir in _created_program_dirs:
|
||||
return
|
||||
self.bld.bldnode.make_node(self.program_dir).mkdir()
|
||||
_created_program_dirs.add(self.program_dir)
|
||||
|
||||
@conf
|
||||
def ap_find_tests(bld, use=[]):
|
||||
if not bld.env.HAS_GTEST:
|
||||
|
Loading…
Reference in New Issue
Block a user