#============================================================================== # Copyright (c) 2002 Joel de Guzman # Copyright (c) 2003-2004 Martin Wille # http://spirit.sourceforge.net/ # # Use, modification and distribution is subject to the Boost Software # License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at # http://www.boost.org/LICENSE_1_0.txt) #============================================================================== # # Spirit regression test boost-jam file # Joel de Guzman [Sept 27, 2002] # subproject libs/spirit/test ; SPIRIT_HEADER_INCLUDE ?= ../../.. ; spirit-header-include = $(SPIRIT_HEADER_INCLUDE) ; spirit-src = ./ ; if $(SPIRIT_SRC_INCLUDE) { spirit-src = $(SPIRIT_SRC_INCLUDE)/ ; } ############################################################ # include testing.jam # extend testing.jam's functionality # SEARCH on testing.jam = $(BOOST_BUILD_PATH) ; include testing.jam ; rule spirit-run-debug ( sources + : args * : input-files * : requirements * : name ? : default-build * ) { local gRUN_TEST_ARGS = $(args) ; local gRUN_TEST_INPUT_FILES = $(input-files) ; SEARCH on $(input-files) = $(SEARCH_SOURCE) ; name ?= $(sources[1]:D=:S=) ; name = $(name)_debug ; return [ boost-test $(sources) : RUN : $(requirements) BOOST_SPIRIT_DEBUG=1 : $(name) : $(default-build) ] ; } rule spirit-run ( sources + : args * : input-files * : requirements * : name ? : default-build * ) { run $(sources) : $(args) : $(input-files) : $(requirements) : $(name) : $(default-build) ; spirit-run-debug $(sources) : $(args) : $(input-files) : $(requirements) : $(name) : $(default-build) ; } ############################################################ { template opt : : : <*>speed <*>on <*>speed $(spirit-header-include) ; template opt-metrowerks : : : <*>speed $(spirit-header-include) ; if ($(COMO_BASE)) # MT is not available on both Unix and Windows on Comeau { # no MT support available template multi-threading : : : $(spirit-header-include) ; } else { #template multi-threading : ../../thread/build/boost_thread : : template multi-threading : @boost/libs/thread/build/boost_thread : : multi BOOST_ALL_NO_LIB=1 $(spirit-header-include) ; } template normal : : : $(spirit-header-include) ; test-suite "spirit.core.kernel" : [ spirit-run $(spirit-src)match_tests.cpp