scons: fix duplicate environments with test flag (#23702)
* fix duplicate environments when built with --test * lib Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>pull/23718/head
parent
a195603f6d
commit
e5005b8f44
|
@ -1,13 +1,12 @@
|
|||
Import('env', 'arch', 'cereal', 'messaging', 'common', 'visionipc', 'gpucommon')
|
||||
|
||||
|
||||
logger_lib = env.Library('logger', ["logger.cc"])
|
||||
libs = [logger_lib, common, cereal, messaging, visionipc,
|
||||
libs = [common, cereal, messaging, visionipc,
|
||||
'zmq', 'capnp', 'kj', 'z',
|
||||
'avformat', 'avcodec', 'swscale', 'avutil',
|
||||
'yuv', 'bz2', 'OpenCL']
|
||||
|
||||
src = ['loggerd.cc']
|
||||
src = ['logger.cc', 'loggerd.cc']
|
||||
if arch in ["aarch64", "larch64"]:
|
||||
src += ['omx_encoder.cc']
|
||||
libs += ['OmxCore', 'gsl', 'CB'] + gpucommon
|
||||
|
@ -24,8 +23,11 @@ if arch == "Darwin":
|
|||
del libs[libs.index('OpenCL')]
|
||||
env['FRAMEWORKS'] = ['OpenCL']
|
||||
|
||||
env.Program('loggerd', ['main.cc'] + src, LIBS=libs)
|
||||
logger_lib = env.Library('logger', src)
|
||||
libs.insert(0, logger_lib)
|
||||
|
||||
env.Program('loggerd', ['main.cc'], LIBS=libs)
|
||||
env.Program('bootlog.cc', LIBS=libs)
|
||||
|
||||
if GetOption('test'):
|
||||
env.Program('tests/test_logger', ['tests/test_runner.cc', 'tests/test_loggerd.cc', 'tests/test_logger.cc', env.Object('logger_util', '#/selfdrive/ui/replay/util.cc')] + src, LIBS=[libs] + ['curl', 'crypto', 'bz2'])
|
||||
env.Program('tests/test_logger', ['tests/test_runner.cc', 'tests/test_loggerd.cc', 'tests/test_logger.cc', env.Object('logger_util', '#/selfdrive/ui/replay/util.cc')], LIBS=libs + ['curl', 'crypto'])
|
||||
|
|
|
@ -47,7 +47,7 @@ asset_obj = qt_env.Object("assets", assets)
|
|||
qt_env.Program("soundd/_soundd", ["soundd/main.cc", "soundd/sound.cc"], LIBS=qt_libs)
|
||||
if GetOption('test'):
|
||||
qt_env.Program("tests/playsound", "tests/playsound.cc", LIBS=base_libs)
|
||||
qt_env.Program('tests/test_sound', ['tests/test_runner.cc', 'soundd/sound.cc', 'tests/test_sound.cc'], LIBS=[base_libs])
|
||||
qt_env.Program('tests/test_sound', ['tests/test_runner.cc', 'soundd/sound.cc', 'tests/test_sound.cc'], LIBS=qt_libs)
|
||||
|
||||
qt_env.SharedLibrary("qt/python_helpers", ["qt/qt_window.cc"], LIBS=qt_libs)
|
||||
|
||||
|
|
Loading…
Reference in New Issue