SConscript revision 12312:5c73feeac300
1955SN/A# Copyright 2017 Google Inc. 2955SN/A# 37816Ssteve.reinhardt@amd.com# Redistribution and use in source and binary forms, with or without 45871Snate@binkert.org# modification, are permitted provided that the following conditions are 51762SN/A# met: redistributions of source code must retain the above copyright 6955SN/A# notice, this list of conditions and the following disclaimer; 7955SN/A# redistributions in binary form must reproduce the above copyright 8955SN/A# notice, this list of conditions and the following disclaimer in the 9955SN/A# documentation and/or other materials provided with the distribution; 10955SN/A# neither the name of the copyright holders nor the names of its 11955SN/A# contributors may be used to endorse or promote products derived from 12955SN/A# this software without specific prior written permission. 13955SN/A# 14955SN/A# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 15955SN/A# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 16955SN/A# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 17955SN/A# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 18955SN/A# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 19955SN/A# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 20955SN/A# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 21955SN/A# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 22955SN/A# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 23955SN/A# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 24955SN/A# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25955SN/A 26955SN/AImport('main') 27955SN/A 28955SN/A# The root of the build directory. 29955SN/Abuild = Dir('.') 302665Ssaidi@eecs.umich.edu# The root of the original directory. 312665Ssaidi@eecs.umich.edubase = build.srcdir 325863Snate@binkert.org# Include files from the original directory. 33955SN/Ainclude = base.Dir('include') 34955SN/A# Use source files from the build directory so build products end up there. 35955SN/Asrc = Dir('src') 36955SN/A 37955SN/Amain.Append(CPPPATH=[include]) 388878Ssteve.reinhardt@amd.commain.Append(LIBPATH=[build]) 392632Sstever@eecs.umich.edu 408878Ssteve.reinhardt@amd.comenv = main.Clone(CPPFLAGS='-g -Wall -Wextra -pthread' 412632Sstever@eecs.umich.edu ' -Wno-undef -isystem %s' % include) 42955SN/Aenv.Append(CPPPATH=[base]) 438878Ssteve.reinhardt@amd.com 442632Sstever@eecs.umich.edugtest_all = env.Object(src.File('gtest-all.cc')) 452761Sstever@eecs.umich.edugtest_main = env.StaticLibrary( 462632Sstever@eecs.umich.edu target='gtest_main', source=[gtest_all, src.File('gtest_main.cc')]) 472632Sstever@eecs.umich.edu 482632Sstever@eecs.umich.edumain['GTEST_LIBS'] = ['gtest_main', 'pthread'] 492761Sstever@eecs.umich.edumain['GTEST_CPPFLAGS'] = '-pthread -Wno-undef -isystem %s' % include.abspath 502761Sstever@eecs.umich.edu