# Copyright (C) 2002, Rene Rivera. Permission to copy, use, modify, sell and
# distribute this software is granted provided this copyright notice appears in
# all copies. This software is provided "as is" without express or implied
# warranty, and with no claim as to its suitability for any purpose.

# Example of how to select the targets included in a stage depending
# on the variant to build.
#
# This is for Boost.Build-V1

subproject tools/build/examples/stage_source_selection ;

# Simple executable.
#
exe simple0
    :
        # SOURCES
        simple.cpp
    :
        # REQUIREMENTS
    :
        # DEFAULT BUILDS
        debug
    ;

# Another simple executable. Here it's the same program source
# as the above, but this is only to simplify the example.
#
exe simple1
    :
        # SOURCES
        simple.cpp
    :
        # REQUIREMENTS
    :
        # DEFAULT BUILDS
        debug
    ;

# The stage that builds the two different targets into the
# single stage directory. Both debug and release builds are
# done by default. When soing a "debug" build only the
# "simple0" source is copied to the stage. And conversly
# on a "release" build only the "simple1" source is copied.
#
stage run
    :
        # SOURCES
        <debug><exe>simple0
        <release><exe>simple1
    :
        # TAGS
    :
        # DEFAULT BUILDS
        debug release
    ;
