mirror of
https://github.com/boostorg/build.git
synced 2026-02-15 13:02:11 +00:00
Add new example.
[SVN r21665]
This commit is contained in:
9
v2/example/variant/Jamfile
Normal file
9
v2/example/variant/Jamfile
Normal file
@@ -0,0 +1,9 @@
|
||||
|
||||
# By default, build the project with two variants
|
||||
# we've defined in project-root.jam
|
||||
project
|
||||
: default-build crazy super_release
|
||||
;
|
||||
|
||||
exe a : a.cpp libs//l ;
|
||||
|
||||
3
v2/example/variant/a.cpp
Normal file
3
v2/example/variant/a.cpp
Normal file
@@ -0,0 +1,3 @@
|
||||
|
||||
void l();
|
||||
int main() { l(); return 0; }
|
||||
2
v2/example/variant/libs/Jamfile
Normal file
2
v2/example/variant/libs/Jamfile
Normal file
@@ -0,0 +1,2 @@
|
||||
|
||||
lib l : l.cpp ;
|
||||
4
v2/example/variant/libs/l.cpp
Normal file
4
v2/example/variant/libs/l.cpp
Normal file
@@ -0,0 +1,4 @@
|
||||
#ifdef _WIN32
|
||||
__declspec(dllexport)
|
||||
#endif
|
||||
void l() {}
|
||||
10
v2/example/variant/project-root.jam
Normal file
10
v2/example/variant/project-root.jam
Normal file
@@ -0,0 +1,10 @@
|
||||
|
||||
# Define a build variant which is just combination
|
||||
# of four properties.
|
||||
variant crazy : <optimization>speed <inlining>off
|
||||
<debug-symbols>on <profiling>on ;
|
||||
|
||||
# Define a built variant inherited from 'release'.
|
||||
# It defines one new property and get all properties
|
||||
# from parent variant.
|
||||
variant super_release : release : <define>USE_ASM ;
|
||||
7
v2/example/variant/readme.txt
Normal file
7
v2/example/variant/readme.txt
Normal file
@@ -0,0 +1,7 @@
|
||||
|
||||
This example shows how user can create his own build variants.
|
||||
Two variants are defined: "crazy", which is just random combination
|
||||
of properties, and "super-release", which is inherited from "release",
|
||||
and differs by a single define.
|
||||
|
||||
See the project-root.jam for the definitions.
|
||||
Reference in New Issue
Block a user