<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On 19 December 2014 at 16:23, Mariusz Ceier <span dir="ltr"><<a href="mailto:mceier+wayland@gmail.com" target="_blank">mceier+wayland@gmail.com</a>></span> wrote:<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi,<br><div class="gmail_extra"><br><div class="gmail_quote"><div><div class="h5">On 19 December 2014 at 15:20, Marek Chalupa <span dir="ltr"><<a href="mailto:mchqwerty@gmail.com" target="_blank">mchqwerty@gmail.com</a>></span> wrote:<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr"><div>Hi,<br><br></div>git tells me that this patch adds white space error (new line before EOF) </div></blockquote><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr"><div><div><div class="gmail_extra"> <br></div></div></div></div></blockquote><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr"><div><div><div class="gmail_extra"><div class="gmail_quote"><div><div>On 15 December 2014 at 11:33, Mariusz Ceier <span dir="ltr"><<a href="mailto:mceier+wayland@gmail.com" target="_blank">mceier+wayland@gmail.com</a>></span> wrote:<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">This test includes one of wayland headers, which produced<br>
error with C++ compiler. C compiler can't be used for this test,<br>
because it issues only a warning[1] and only when wayland headers<br>
are not installed in system headers path (/usr/include).<br>
<br>
[1] wayland-server-protocol.h:201:2: warning: implicit declaration of function ‘wl_resource_post_event’<br>
<br>
Signed-off-by: Mariusz Ceier <<a href="mailto:mceier%2Bwayland@gmail.com" target="_blank">mceier+wayland@gmail.com</a>><br>
---<br>
Makefile.am | 4 +++-<br>
<a href="http://configure.ac" target="_blank">configure.ac</a> | 1 +<br>
tests/cpp-compile-test.cpp | 5 +++++<br>
3 files changed, 9 insertions(+), 1 deletion(-)<br>
create mode 100644 tests/cpp-compile-test.cpp<br>
<br>
diff --git a/Makefile.am b/Makefile.am<br>
index 1551762..ea9ffc1 100644<br>
--- a/Makefile.am<br>
+++ b/Makefile.am<br>
@@ -128,7 +128,8 @@ TESTS = \<br>
queue-test \<br>
signal-test \<br>
resources-test \<br>
- message-test<br>
+ message-test \<br>
+ cpp-compile-test<br>
<br>
check_PROGRAMS = \<br>
$(TESTS) \<br>
@@ -180,6 +181,7 @@ resources_test_SOURCES = tests/resources-test.c<br>
resources_test_LDADD = <a href="http://libtest-runner.la" target="_blank">libtest-runner.la</a><br>
message_test_SOURCES = tests/message-test.c<br>
message_test_LDADD = <a href="http://libtest-runner.la" target="_blank">libtest-runner.la</a><br>
+cpp_compile_test_SOURCES = tests/cpp-compile-test.cpp<br>
<br>
fixed_benchmark_SOURCES = tests/fixed-benchmark.c<br>
fixed_benchmark_LDADD = <a href="http://libtest-runner.la" target="_blank">libtest-runner.la</a><br>
diff --git a/<a href="http://configure.ac" target="_blank">configure.ac</a> b/<a href="http://configure.ac" target="_blank">configure.ac</a><br>
index 12dd94c..a5f7e61 100644<br>
--- a/<a href="http://configure.ac" target="_blank">configure.ac</a><br>
+++ b/<a href="http://configure.ac" target="_blank">configure.ac</a><br>
@@ -25,6 +25,7 @@ AM_INIT_AUTOMAKE([1.11 foreign no-dist-gzip dist-xz subdir-objects])<br>
AM_SILENT_RULES([yes])<br>
<br>
# Check for programs<br>
+AC_PROG_CXX<br></blockquote><div><br></div></div></div><div>I'm think Wayland should be capable to compile without errors even without C++ compiler.<br>Shouldn't we have some checks here (later in the code) to disable the cpp-test if the C++ compiler is not present in the environment?<br></div><span><div> </div></span></div></div></div></div></div></blockquote></div></div><div>I think that may be tricky, and I'm not sure how to do this properly.</div><div>This thread may be relevant: <a href="http://lists.gnu.org/archive/html/bug-autoconf/2010-05/msg00001.html" target="_blank">http://lists.gnu.org/archive/html/bug-autoconf/2010-05/msg00001.html</a></div><span class=""><div> <br></div></span></div></div></div></blockquote><div><br></div>Yeah, it looks like hard one to do it properly. The link helps :)<br></div><div class="gmail_quote">A little workaround works for me though, I'll send it as a follow-up patch.<br></div><div class="gmail_quote">Someone please comment on it... or should we just ignore it and hope that C++ compiler is present (which holds most of the time, but...)<br></div><div class="gmail_quote"><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><span class=""><div></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr"><div><div><div class="gmail_extra"><div class="gmail_quote"><span><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
AC_PROG_CC<br>
<br>
# Initialize libtool<br>
diff --git a/tests/cpp-compile-test.cpp b/tests/cpp-compile-test.cpp<br>
new file mode 100644<br>
index 0000000..1e84e63<br>
--- /dev/null<br>
+++ b/tests/cpp-compile-test.cpp<br>
@@ -0,0 +1,5 @@<br>
+/* This source should compile fine with C++ compiler */<br>
+#include "wayland-server-protocol.h"<br>
+<br>
+int main() { return 0; }<br></blockquote><div> </div></span><div>This should not be in-lined, but I think in this case it doesn't matter at all, so OK.<br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
+<br>
<span><font color="#888888">--<br>
2.1.3<br>
<br>
_______________________________________________<br>
wayland-devel mailing list<br>
<a href="mailto:wayland-devel@lists.freedesktop.org" target="_blank">wayland-devel@lists.freedesktop.org</a><br>
<a href="http://lists.freedesktop.org/mailman/listinfo/wayland-devel" target="_blank">http://lists.freedesktop.org/mailman/listinfo/wayland-devel</a><br></font></span></blockquote><div><br></div><div>Thanks,<br>Marek <br></div></div></div></div></div></div></blockquote></span></div></div></div></blockquote><div><br></div><div>Thanks,<br>Marek <br></div></div></div></div>