|
Boost-Build : |
From: Rene Perlberg (Perle5000_at_[hidden])
Date: 2008-03-13 05:35:33
Hello to everyone,
I'm new to Boost.Build and experiencing with an existing c++-project I designed myself.
The software is designed for Linux and Windows, using #defines inside the code.
#ifdef WIN32
// use this part of the code
#else
// Probably linux, so use this part of the code
#endif
My Jamroot file contains:
project : requirements <include>include ;
My Jamfile is located under src/ and contains:
project
: usage-requirements <include>../include
: build-dir ../lib
;
## Create release version
# on linux
lib libnatlib.linuxrelease
: [ glob *.cpp ]
: <variant>release
;
# on windows
lib libnatlib.windowsrelease
: [ glob *.cpp ]
: <find-shared-library>wsock32
: <variant>release
: <define>_WIN32
;
## Create debug version with #define NAT_DEBUG
# on linux
lib libnatlib.linuxdebug
: [ glob *.cpp ]
: <variant>debug
;
# on windows
lib libnatlib.windowsdebug
: [ glob *.cpp ]
: <find-shared-library>wsock32
: <variant>debug
: <define>NAT_DEBUG <define>_WIN32
;
So far I managed to compile the software either in debug or in release mode using the following command line (for release mode under windows):
bjam libnatlib.windowsrelease
That creates the release version of the library as expected in the root directory of the project in lib/ .
My question now is, if there is a way to compile debug and release version together, either in windows or in linux, using just one command line. When writing the Jamfile just for one OS, i.E. linux both versions were compiled using just the command line "bjam" .
Thanks in advance.
René.
-- Psst! Geheimtipp: Online Games kostenlos spielen bei den GMX Free Games! http://games.entertainment.gmx.net/de/entertainment/games/free
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