1# Copyright 2017 Google Inc. 2# 3# Copyright (c) 2018 ARM Limited 4# All rights reserved. 5# 6# Redistribution and use in source and binary forms, with or without 7# modification, are permitted provided that the following conditions are 8# met: redistributions of source code must retain the above copyright --- 29 unchanged lines hidden (view full) --- 38gmock_include = gmock_base.Dir('include') 39# Use source files from the build directory so build products end up there. 40gtest_src = Dir('googletest/src') 41gmock_src = Dir('googlemock/src') 42 43main.Append(CPPPATH=[gtest_include, gmock_include]) 44main.Append(LIBPATH=[build]) 45 |
46env = main.Clone(CPPFLAGS=['-g', '-Wall', '-Wextra', '-pthread', 47 '-Wno-undef', '-isystem', str(gtest_include), 48 '-isystem', str(gmock_include)]) |
49env.Append(CPPPATH=[gtest_base, gmock_base]) 50 51gtest_all = env.Object(gtest_src.File('gtest-all.cc')) 52gmock_all = env.Object(gmock_src.File('gmock-all.cc')) |
53gtest_main = env.StaticLibrary(target='libgtest', source=[ 54 gtest_all, gmock_all, gtest_src.File('gtest_main.cc')]) |
55 56main['GTEST_LIBS'] = ['libgtest', 'pthread'] |
57main['GTEST_CPPFLAGS'] = [ 58 '-pthread', '-DUSE_GMOCK', '-Wno-undef', '-isystem', gtest_include.abspath] |