diff options
author | arseny.kapoulkine <arseny.kapoulkine@99668b35-9821-0410-8761-19e4c4f06640> | 2010-06-27 11:58:24 +0000 |
---|---|---|
committer | arseny.kapoulkine <arseny.kapoulkine@99668b35-9821-0410-8761-19e4c4f06640> | 2010-06-27 11:58:24 +0000 |
commit | ee2a039d45b627db0f33dbf49cd09c85ab9fa620 (patch) | |
tree | b28ba5ecca93bde6db6b3256b85c740af5e1db33 /Jamfile.jam | |
parent | f70545253701a4b9e820bc638effa31f7941dd0c (diff) |
Added samples building target
git-svn-id: http://pugixml.googlecode.com/svn/trunk@542 99668b35-9821-0410-8761-19e4c4f06640
Diffstat (limited to 'Jamfile.jam')
-rw-r--r-- | Jamfile.jam | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/Jamfile.jam b/Jamfile.jam index 54326de..b636025 100644 --- a/Jamfile.jam +++ b/Jamfile.jam @@ -108,3 +108,28 @@ for CONFIG in $(CONFIGURATIONS) Documentation docs/manual.html : docs/manual.qbk ;
Alias docs : docs/manual.html ;
+
+# samples
+for SAMPLE in [ Glob docs/samples : *.cpp ]
+{
+ local CONFIG = "debug" ;
+ local DEFINES = "PUGIXML_STANDARD" ;
+
+ # build folder
+ local CFGBUILD = $(BUILD)/$(toolset)/$(DEFINES:J=_)/$(CONFIG) ;
+
+ # compilation options
+ local CFGFLAGS = $(CCFLAGS) [ GetCFlags $(CONFIG) : $(DEFINES) ] ;
+ CFGFLAGS += -I src ;
+
+ # build and run sample
+ local EXECUTABLE = $(CFGBUILD)/samples/$(SAMPLE:S=.exe) ;
+ local PUGIXML = $(CFGBUILD)/pugixml.lib ;
+
+ Application $(EXECUTABLE) : $(SAMPLE) : $(CFGFLAGS) : $(PUGIXML) ;
+
+ RunSampleAction $(EXECUTABLE)_run : $(EXECUTABLE) ;
+ Depends $(EXECUTABLE)_run : $(EXECUTABLE) ;
+
+ Depends samples : $(EXECUTABLE)_run ;
+}
|