danderson@11: # vim: set ts=2 sw=2 tw=99 noet ft=python: danderson@11: # danderson@11: # Copyright (C) 2004-2012 David Anderson danderson@11: # danderson@11: # This file is part of SourcePawn. danderson@11: # danderson@11: # SourcePawn is free software: you can redistribute it and/or modify it under danderson@11: # the terms of the GNU General Public License as published by the Free danderson@11: # Software Foundation, either version 3 of the License, or (at your option) danderson@11: # any later version. danderson@11: # danderson@11: # SourcePawn is distributed in the hope that it will be useful, but WITHOUT ANY danderson@11: # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS danderson@11: # FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. danderson@11: # danderson@11: # You should have received a copy of the GNU General Public License along with danderson@11: # SourcePawn. If not, see http://www.gnu.org/licenses/. danderson@11: # danderson@11: import os danderson@11: import os.path danderson@11: import ambuild.osutil as osutil danderson@11: danderson@11: compiler = KE.DefaultCompiler() danderson@11: compiler.AddToListVar('CXXINCLUDES', os.path.join(AMBuild.sourceFolder, 'include')) danderson@11: danderson@11: if compiler.cc.name == 'msvc': danderson@11: compiler.AddToListVar('POSTLINKFLAGS', '/SUBSYSTEM:CONSOLE') danderson@11: danderson@11: job = AMBuild.AddJob('testrun') danderson@11: binary = Cpp.ExecutableBuilder('testrun', AMBuild, job, compiler) danderson@11: files = [ danderson@11: 'main.cpp', danderson@12: 'test-hashmap.cpp', danderson@11: 'test-inlinelist.cpp', danderson@11: 'test-linkedlist.cpp', danderson@11: 'test-vector.cpp', danderson@11: 'test-refcounting.cpp', danderson@11: 'test-threadutils.cpp', danderson@11: ] danderson@11: danderson@11: binary.AddSourceFiles('tests', files) danderson@11: binary.SendToJob() danderson@11: