[examples-v2 commit] cxx: Add support for building with waf

Gedare Bloom gedare at rtems.org
Thu Dec 12 19:49:55 UTC 2013


Module:    examples-v2
Branch:    master
Commit:    c5e5f0da0eb44419dbc4eca52a5c55ad8911ecde
Changeset: http://git.rtems.org/examples-v2/commit/?id=c5e5f0da0eb44419dbc4eca52a5c55ad8911ecde

Author:    Chirayu Desai <cdesai at cyanogenmod.org>
Date:      Wed Dec  4 21:41:22 2013 +0530

cxx: Add support for building with waf

---

 cxx/cxx_throw/wscript |   15 +++++++++++++++
 cxx/libcpp/wscript    |   15 +++++++++++++++
 cxx/wscript           |   13 +++++++++++++
 wscript               |    1 +
 4 files changed, 44 insertions(+), 0 deletions(-)

diff --git a/cxx/cxx_throw/wscript b/cxx/cxx_throw/wscript
new file mode 100644
index 0000000..f694614
--- /dev/null
+++ b/cxx/cxx_throw/wscript
@@ -0,0 +1,15 @@
+# Copyright 2013 Gedare Bloom (gedare at rtems.org)
+#
+# This file's license is 2-clause BSD as in this distribution's LICENSE.2 file.
+#
+
+# Waf build script for an RTEMS Hello
+import rtems_waf.rtems as rtems
+
+def build(bld):
+    rtems.build(bld)
+
+    bld(features = 'cxx cxxprogram',
+        target = 'cxx_throw.exe',
+        source = ['init.cc'])
+
diff --git a/cxx/libcpp/wscript b/cxx/libcpp/wscript
new file mode 100644
index 0000000..77aa4fe
--- /dev/null
+++ b/cxx/libcpp/wscript
@@ -0,0 +1,15 @@
+# Copyright 2013 Gedare Bloom (gedare at rtems.org)
+#
+# This file's license is 2-clause BSD as in this distribution's LICENSE.2 file.
+#
+
+# Waf build script for an RTEMS Hello
+import rtems_waf.rtems as rtems
+
+def build(bld):
+    rtems.build(bld)
+
+    bld(features = 'cxx cxxstlib',
+        target = 'foo',
+        source = ['foo.cc', 'foo1.cpp'])
+
diff --git a/cxx/wscript b/cxx/wscript
new file mode 100644
index 0000000..874c130
--- /dev/null
+++ b/cxx/wscript
@@ -0,0 +1,13 @@
+# Copyright 2013 Gedare Bloom (gedare at rtems.org)
+#
+# This file's license is 2-clause BSD as in this distribution's LICENSE.2 file.
+#
+
+import rtems_waf.rtems as rtems
+
+def build(bld):
+    # These tests require C++
+    if bld.env['CXX'] is not None:
+        bld.recurse('libcpp')
+        bld.recurse('cxx_throw')
+
diff --git a/wscript b/wscript
index 7aa47a1..4a4362c 100644
--- a/wscript
+++ b/wscript
@@ -43,6 +43,7 @@ def build(bld):
     bld.recurse('benchmarks')
     bld.recurse('micromonitor')
     bld.recurse('posix_api')
+    bld.recurse('cxx')
 
 def rebuild(ctx):
     import waflib.Options




More information about the vc mailing list