summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2017-12-16 14:13:31 +0100
committerDavid Robillard <d@drobilla.net>2017-12-16 14:17:30 +0100
commit9836a9d43d0d0151715697865ac520d789893d05 (patch)
tree8423974b7845c79e16b998dfc87a07bb174ddb7c
parent370a92172b8dbf0fd514810a280b238ade733485 (diff)
downloadlilv-9836a9d43d0d0151715697865ac520d789893d05.tar.gz
lilv-9836a9d43d0d0151715697865ac520d789893d05.tar.bz2
lilv-9836a9d43d0d0151715697865ac520d789893d05.zip
Compile check C++ API
-rw-r--r--lilv/lilvmm.hpp1
-rw-r--r--test/lilv_cxx_test.cpp23
-rw-r--r--wscript17
3 files changed, 41 insertions, 0 deletions
diff --git a/lilv/lilvmm.hpp b/lilv/lilvmm.hpp
index b9b3a69..30ec274 100644
--- a/lilv/lilvmm.hpp
+++ b/lilv/lilvmm.hpp
@@ -27,6 +27,7 @@
namespace Lilv {
+LILV_DEPRECATED
static inline const char*
uri_to_path(const char* uri) {
return lilv_uri_to_path(uri);
diff --git a/test/lilv_cxx_test.cpp b/test/lilv_cxx_test.cpp
new file mode 100644
index 0000000..25f30bf
--- /dev/null
+++ b/test/lilv_cxx_test.cpp
@@ -0,0 +1,23 @@
+/*
+ Copyright 2017 David Robillard <http://drobilla.net>
+
+ Permission to use, copy, modify, and/or distribute this software for any
+ purpose with or without fee is hereby granted, provided that the above
+ copyright notice and this permission notice appear in all copies.
+
+ THIS SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+ WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+ MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+ ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+*/
+
+#include "lilv/lilvmm.hpp"
+
+int
+main()
+{
+ return 0;
+}
diff --git a/wscript b/wscript
index d4f8de8..966b497 100644
--- a/wscript
+++ b/wscript
@@ -62,6 +62,10 @@ def options(ctx):
def configure(conf):
conf.load('compiler_c')
+ try:
+ conf.load('compiler_cxx')
+ except:
+ pass
if Options.options.bindings:
try:
@@ -357,6 +361,19 @@ def build(bld):
linkflags = test_linkflags)
autowaf.use_lib(bld, obj, 'SERD SORD SRATOM LV2')
+ # C++ API test
+ if 'COMPILER_CXX' in bld.env:
+ obj = bld(features = 'cxx cxxprogram',
+ source = 'test/lilv_cxx_test.cpp',
+ includes = ['.', './src'],
+ use = 'liblilv_profiled',
+ lib = test_libs,
+ target = 'test/lilv_cxx_test',
+ install_path = None,
+ cxxflags = test_cflags,
+ linkflags = test_linkflags)
+ autowaf.use_lib(bld, obj, 'SERD SORD SRATOM LV2')
+
if bld.is_defined('LILV_PYTHON'):
# Copy Python unittest files
for i in [ 'test_api.py' ]: