summaryrefslogtreecommitdiffstats
path: root/src/boost/libs/spirit/test/test_headers
diff options
context:
space:
mode:
Diffstat (limited to 'src/boost/libs/spirit/test/test_headers')
-rw-r--r--src/boost/libs/spirit/test/test_headers/Jamfile76
-rw-r--r--src/boost/libs/spirit/test/test_headers/main.cpp14
-rw-r--r--src/boost/libs/spirit/test/test_headers/test.cpp22
3 files changed, 112 insertions, 0 deletions
diff --git a/src/boost/libs/spirit/test/test_headers/Jamfile b/src/boost/libs/spirit/test/test_headers/Jamfile
new file mode 100644
index 00000000..cddbc19b
--- /dev/null
+++ b/src/boost/libs/spirit/test/test_headers/Jamfile
@@ -0,0 +1,76 @@
+# Jamfile
+#
+# Copyright (c) 2007-2008 Steven Watanabe
+# Copyright (c) 2009 Joel de Guzman
+# Copyright (c) 2009 Hartmut Kaiser
+# Copyright (c) 2009 Francois Barel
+#
+# Distributed under the Boost Software License, Version 1.0. (See
+# accompanying file LICENSE_1_0.txt or copy at
+# http://www.boost.org/LICENSE_1_0.txt
+
+import testing ;
+import path ;
+import regex ;
+import print ;
+import sequence ;
+import feature ;
+
+project boost/spirit/test/test_headers
+ : requirements
+ <include>$(BOOST_ROOT)
+ <include>../../../..
+ <c++-template-depth>300
+ ;
+
+headers =
+[
+ path.glob-tree ../../../../boost/spirit/include : *.hpp : classic* phoenix1*
+] ;
+
+for local file in $(headers)
+{
+ compile test.cpp
+ : # requirements
+ <define>BOOST_SPIRIT_HEADER_NAME=$(file)
+ <dependency>$(file)
+ : # test name
+ [ regex.replace [ path.relative-to ../../../../boost/spirit $(file) ] "/" "_" ]
+ ;
+}
+
+feature.feature <generate-include-all-order> : forward reverse : incidental ;
+
+rule generate-include-all ( target : sources * : properties * )
+{
+ print.output $(target) ;
+
+ if <generate-include-all-order>reverse in $(properties)
+ {
+ sources = [ sequence.reverse $(sources) ] ;
+ }
+
+ for local file in $(sources)
+ {
+ print.text "#include <$(file:G=)>
+" : overwrite ;
+ }
+
+}
+
+make auto_all1.cpp
+ : $(headers)
+ : @generate-include-all
+ ;
+
+make auto_all2.cpp
+ : $(headers)
+ : @generate-include-all
+ : <generate-include-all-order>reverse
+ ;
+
+# this ought to catch non-inlined functions and other duplicate definitions
+link auto_all1.cpp auto_all2.cpp main.cpp
+ : <include>.
+ : auto_all_headers
+ ;
diff --git a/src/boost/libs/spirit/test/test_headers/main.cpp b/src/boost/libs/spirit/test/test_headers/main.cpp
new file mode 100644
index 00000000..99aacc62
--- /dev/null
+++ b/src/boost/libs/spirit/test/test_headers/main.cpp
@@ -0,0 +1,14 @@
+// Copyright (c) 2003-2008 Matthias Christian Schabel
+// Copyright (c) 2007-2008 Steven Watanabe
+// Copyright (c) 2010 Joel de Guzman
+// Copyright (c) 2010 Hartmut Kaiser
+// Copyright (c) 2009 Francois Barel
+//
+// Distributed under the Boost Software License, Version 1.0. (See
+// accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+int main()
+{
+ return 0;
+}
diff --git a/src/boost/libs/spirit/test/test_headers/test.cpp b/src/boost/libs/spirit/test/test_headers/test.cpp
new file mode 100644
index 00000000..c6814198
--- /dev/null
+++ b/src/boost/libs/spirit/test/test_headers/test.cpp
@@ -0,0 +1,22 @@
+// Copyright (c) 2003-2008 Matthias Christian Schabel
+// Copyright (c) 2007-2008 Steven Watanabe
+// Copyright (c) 2010 Joel de Guzman
+// Copyright (c) 2010 Hartmut Kaiser
+// Copyright (c) 2009 Francois Barel
+//
+// Distributed under the Boost Software License, Version 1.0. (See
+// accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#define BOOST_SPIRIT_STRINGIZE_IMPL(x) #x
+#define BOOST_SPIRIT_STRINGIZE(x) BOOST_SPIRIT_STRINGIZE_IMPL(x)
+
+#define BOOST_SPIRIT_HEADER BOOST_SPIRIT_STRINGIZE(BOOST_SPIRIT_HEADER_NAME)
+
+#include BOOST_SPIRIT_HEADER
+#include BOOST_SPIRIT_HEADER
+
+int main()
+{
+ return 0;
+}