|
Boost-Build : |
From: Toon Knapen (toon.knapen_at_[hidden])
Date: 2004-12-14 11:21:57
I have a problem with the propagation of usage-requirements:
My Jamfile looks like this:
<Jamfile>
alias foo_dependencies : /user-config/some_external_lib ;
lib libfoo : foo.cpp foo_dependencies ;
exe bar : bar.cpp libfoo ;
</Jamfile>
and my user-config.jam looks like
<user-config.jam>
alias some_external_lib : : : <include>some_dir ;
</user-config.jam>
No I would expect that if I build 'bar', the 'some_dir' include
directory is also passed on to the compiler. This is necessary because
bar depends on foo and foo includes headers of the external library.
However only the 'some_dir' is searched for include files when compiling
foo.cpp but while compiling bar.cpp ;-(
test-case, user-config and error message in attachment
--------------090909000106070604030902 Content-Type: text/plain;
name="user-config.jam"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
filename="user-config.jam"
# Use the gcc compiler by default.
# Multiple compilers can be used and thus several 'using' statements
# may be added to user-config.jam. In this case all 'used' compilers
# will be used to build the requested targets unless a specific compiler
# is specified on the command-line
using gcc ;
using gfortran ;
# Create a local variable that contains all the
# following macro-definition that will be passed to the compiler
MPI_DEFINES = USE_STDARG HAVE_STDLIB_H=1 HAVE_STRING_H=1 HAVE_UNISTD_H=1 HAVE_STDARG_H=1 USE_STDARG=1 MALLOC_RET_VOID=1 ;
# some boiler-plate so that all targets specified in this file
# can be reference from anywhere using the syntax /user-config//<some target>
import project ;
project.initialize $(__name__) ;
project user-config ;
# Define a target that specifies the header-only MPI project.
# This is a header-only project because the corresponding sources
# can be the real or the fake-mpi lib.
alias mpiheaders
: # sources
: # requirements
: # default-build
: <define>$(MPI_DEFINES)
<include>/usr/local/mpich-1.2.5.2/include
;
# Define the real-mpi library target
lib libmpi
: # sources
mpiheaders
: # requirements
<file>/usr/local/mpich-1.2.5.2/lib/libmpich.a
: # default-build
: # usage-requirements
<use>/user-config//mpiheaders
;
# Define the fake-mpi library target
alias libfake_mpi : /home/tk/cvstop/fake_mpi//libfake_mpi ;
lib libf2c
: # sources
: # requirements
<name>g2c
: # default-build
: # usage-requirements
;
lib libatlas
: # sources
: # requirement
<file>/usr/local/lib/libatlas.a
: # default-build
: # usage-requirement
;
lib libf77atlas
: # sources
/user-config//libatlas # dependent on atlas kernel
: # requirement
<file>/usr/local/lib/libf77blas.a
: # default-build
: # usage-requirement
;
lib libcatlas
: # sources
/user-config//libatlas # dependent on atlas kernel
: # requirement
<file>/usr/local/lib/libcblas.a
: # default-build
: # usage-requirement
;
# Define the BLAS library target
alias libblas
: # sources
/user-config//libf77atlas
: # requirements
: # default-build
: # usage-requirements
;
# Define the netlib LAPACK library
lib liblapack_netlib
: # sources
/user-config//libf2c
/user-config//libblas
: # requirements
<file>/usr/lib/liblapack.a
: # default-build
: # usage-requirements
;
# Define the LAPACK library target
lib liblapack_atlas
: # sources
/user-config//libcatlas
/user-config//liblapack_netlib # dep to make sure lapack-atlas before lapack-netlib on link-line
: # requirements
<file>/usr/local/lib/liblapack_atlas.a
: # default-build
: # usage-requirements
;
alias liblapack
: # sources
# /user-config//liblapack_atlas
/user-config//liblapack_netlib
: # requirements
: # default-build
: # usage-requirements
;
lib libslatec : : <file>/usr/local/lib/libslatec.a ;
# Define the SuperLU library target
lib libsuperlu
: # sources
: # req
<file>/usr/local/SuperLU_3.0/libsuperlu_linux.a
: # default-build
: # usage-req
<include>/usr/local/SuperLU_3.0
;
# Define the METIS library target
lib libmetis
: # sources
: # req
<file>/usr/local/metis-4.0/libmetis.a
: # default-build
: # usage-req
<include>/usr/local/metis-4.0/Lib
;
lib libhmlib
:
: <file>/home/tk/cvstop/hypermesh/lib/linux/libhmlib.a
:
: <include>/home/tk/cvstop/hypermesh/include/linux
;
lib libhmreslib
: /user-config//libhmlib
: <file>/home/tk/cvstop/hypermesh/lib/linux/libhmreslib.a
:
: <include>/home/tk/cvstop/hypermesh/include/linux
;
lib libhmmodlib
: /user-config//libhmreslib
: <file>/home/tk/cvstop/hypermesh/lib/linux/libhmmodlib.a
:
: <include>/home/tk/cvstop/hypermesh/include/linux
;
lib libpython
:
: <file>/usr/local/python-2.3.4/lib/python2.3/config/libpython2.3.a
:
: <include>/usr/local/python-2.3.4/include/python2.3
;
lib libz : : <file>/usr/lib/libz.a ;
lib libjpeg : /user-config//libz : <file>/usr/lib/libjpeg.a ;
lib libdf : /user-config//libjpeg : <file>/usr/local/lib/libdf.a ;
lib libmfhdf : /user-config//libdf : <file>/usr/local/lib/libmfhdf.a ;
alias libhdf
: /user-config//libmfhdf
:
:
: <include>/usr/local/include
;
lib libflexlm_new
:
: <file>/usr/local/flexlm/v9.2/i86_r6-icc/liblm_new.a
;
lib libflexlmgr
: /user-config//libflexlm_new
: <file>/usr/local/flexlm/v9.2/i86_r6-icc/liblmgr.a
;
alias libflexlm
: /user-config//libflexlmgr
:
:
: <include>/usr/local/flexlm/v9.2/machind <threading>multi
;
alias libboost_filesystem : /home/tk/cvstop/boost/libs/filesystem/build//boost_filesystem ;
alias libboxpro : /home/tk/cvstop/boxpro/actran//boxpro_actran ;
--------------090909000106070604030902 Content-Type: text/plain;
name="bjam_error.txt"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
filename="bjam_error.txt"
...found 28 targets...
...updating 8 targets...
MkDir1 bin
mkdir "bin"
MkDir1 bin/gcc
mkdir "bin/gcc"
MkDir1 bin/gcc/debug
mkdir "bin/gcc/debug"
MkDir1 bin/gcc/debug/threading-multi
mkdir "bin/gcc/debug/threading-multi"
gcc.compile.c++ bin/gcc/debug/threading-multi/foo.o
"g++" -Wall -ftemplate-depth-100 -O0 -fno-inline -g -fPIC -pthread -I"/usr/local/flexlm/v9.2/machind" -c -o "bin/gcc/debug/threading-multi/foo.o" "foo.cpp"
gcc.link.dll bin/gcc/debug/threading-multi/libfoo.so
"g++" -o "bin/gcc/debug/threading-multi/libfoo.so" -Wl,-h -Wl,libfoo.so -shared "bin/gcc/debug/threading-multi/foo.o" "/usr/local/flexlm/v9.2/i86_r6-icc/liblmgr.a" "/usr/local/flexlm/v9.2/i86_r6-icc/liblm_new.a" -lrt -g -pthread
gcc.compile.c++ bin/gcc/debug/bar.o
"g++" -Wall -ftemplate-depth-100 -O0 -fno-inline -g -c -o "bin/gcc/debug/bar.o" "bar.cpp"
In file included from bar.cpp:1:
foo.hpp:1:22: lmclient.h: No such file or directory
...failed gcc.compile.c++ bin/gcc/debug/bar.o...
...skipped <pbin/gcc/debug>bar for lack of <pbin/gcc/debug>bar.o...
...failed updating 1 target...
...skipped 1 target...
...updated 6 targets...
--------------090909000106070604030902 Content-Type: application/octet-stream;
name="bjam_test.tgz"
Content-Transfer-Encoding: base64
Content-Disposition: attachment;
filename="bjam_test.tgz"
[Attachment content not displayed.] --------------090909000106070604030902--
Boost-Build list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk