scons: Use a different suffix for test object files.

These files are built with a different command line, and so should be
distinct build artifacts in the build directory.

Change-Id: Iec9403ad73fbdbcb1cd268d68716c3aa85a80b24
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/48137
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
This commit is contained in:
Gabe Black
2021-07-15 02:01:00 -07:00
parent 3094d42113
commit 4a20df608e

View File

@@ -556,6 +556,8 @@ class GTest(Executable):
@classmethod
def declare_all(cls, env):
env = env.Clone()
env['OBJSUFFIX'] = 't' + env['OBJSUFFIX']
env['SHOBJSUFFIX'] = 't' + env['SHOBJSUFFIX']
env.Append(LIBS=env['GTEST_LIBS'])
env.Append(CPPFLAGS=env['GTEST_CPPFLAGS'])
env['GTEST_LIB_SOURCES'] = Source.all.with_tag(env, 'gtest lib')