Merge pull request #26 from grafikrobot/modular

Add support for modular build structure.
This commit is contained in:
Peter Dimov 2025-05-02 19:23:38 +03:00 committed by GitHub
commit d21b8660ce
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 34 additions and 8 deletions

22
build.jam Normal file
View File

@ -0,0 +1,22 @@
# Copyright René Ferdinand Rivera Morell 2023-2024
# Distributed under 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)
require-b2 5.2 ;
constant boost_dependencies :
/boost/config//boost_config ;
project /boost/typeof
;
explicit
[ alias boost_typeof : : :
: <include>include <library>$(boost_dependencies) ]
[ alias all : boost_typeof test ]
;
call-if : boost-library typeof
;

View File

@ -8,6 +8,10 @@
import testing ;
import set ;
project : requirements
<library>/boost/core//boost_core
;
# The special requirement is not ported yet.
#
#local rule special-requirements ( toolset variant : properties * )
@ -22,7 +26,7 @@ import set ;
# [ replace-properties $(properties) : <build>no ] ;
# }
# }
#
#
# return $(properties) ;
#}
@ -31,8 +35,8 @@ rule typeof-test ( source )
return [ compile $(source) : <define>BOOST_TYPEOF_NATIVE :
$(source:B)_native ]
[ compile $(source) : <define>BOOST_TYPEOF_EMULATION :
$(source:B)_emulation ]
;
$(source:B)_emulation ]
;
}
rule all-tests ( )
@ -46,12 +50,12 @@ rule all-tests ( )
all += [ run odr1.cpp odr2.cpp : : : <define>BOOST_TYPEOF_NATIVE :
odr_native ] ;
all += [ run odr1.cpp odr2.cpp : : : <define>BOOST_TYPEOF_EMULATION :
odr_emulation ] ;
all += [ run odr_no_uns1.cpp odr_no_uns2.cpp : : : <define>BOOST_TYPEOF_EMULATION :
odr_no_uns ] ;
return $(all) ;
odr_emulation ] ;
all += [ run odr_no_uns1.cpp odr_no_uns2.cpp : : : <define>BOOST_TYPEOF_EMULATION :
odr_no_uns ] ;
return $(all) ;
}
test-suite "typeof"
test-suite "typeof"
: [ all-tests ]
;