diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-29 04:41:38 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-29 04:41:38 +0000 |
commit | 7b6e527f440cd7e6f8be2b07cee320ee6ca18786 (patch) | |
tree | 4a2738d69fa2814659fdadddf5826282e73d81f4 /test cases/frameworks | |
parent | Initial commit. (diff) | |
download | meson-upstream.tar.xz meson-upstream.zip |
Adding upstream version 1.0.1.upstream/1.0.1upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'test cases/frameworks')
332 files changed, 9682 insertions, 0 deletions
diff --git a/test cases/frameworks/1 boost/extralib.cpp b/test cases/frameworks/1 boost/extralib.cpp new file mode 100644 index 0000000..e5ab1b0 --- /dev/null +++ b/test cases/frameworks/1 boost/extralib.cpp @@ -0,0 +1,27 @@ +#define _XOPEN_SOURCE 500 + +#include <iostream> +#include <boost/log/trivial.hpp> +#include <boost/log/expressions.hpp> +#include <boost/log/utility/setup/console.hpp> +#include <boost/log/utility/setup/common_attributes.hpp> + +using namespace std; +namespace logging = boost::log; + +void InitLogger() { + logging::add_common_attributes(); + logging::register_simple_formatter_factory<logging::trivial::severity_level, char>("Severity"); + string log_format = "%TimeStamp% [%Severity%] - %Message%"; + + logging::add_console_log( + cout, + logging::keywords::format = log_format + ); +} + +int main(int argc, char **argv) { + InitLogger(); + BOOST_LOG_TRIVIAL(trace) << "SOMETHING"; + return 0; +} diff --git a/test cases/frameworks/1 boost/linkexe.cc b/test cases/frameworks/1 boost/linkexe.cc new file mode 100644 index 0000000..e00edee --- /dev/null +++ b/test cases/frameworks/1 boost/linkexe.cc @@ -0,0 +1,18 @@ +#define _XOPEN_SOURCE 500 + +#include<boost/thread.hpp> + +boost::recursive_mutex m; + +struct callable { + void operator()() { + boost::recursive_mutex::scoped_lock l(m); + }; +}; + +int main(int argc, char **argv) { + callable x; + boost::thread thr(x); + thr.join(); + return 0; +} diff --git a/test cases/frameworks/1 boost/meson.build b/test cases/frameworks/1 boost/meson.build new file mode 100644 index 0000000..821bb62 --- /dev/null +++ b/test cases/frameworks/1 boost/meson.build @@ -0,0 +1,74 @@ +# this test requires the following on Ubuntu: libboost-{system,python,log,thread,test}-dev +project('boosttest', 'cpp', + default_options : ['cpp_std=c++14']) + +s = get_option('static') + +dep = dependency('boost', static: s, required: false) +if not dep.found() + error('MESON_SKIP_TEST boost not found.') +endif + +# We want to have multiple separate configurations of Boost +# within one project. The need to be independent of each other. +# Use one without a library dependency and one with it. + +linkdep = dependency('boost', static: s, modules : ['thread', 'system', 'date_time']) +testdep = dependency('boost', static: s, modules : ['unit_test_framework']) +nomoddep = dependency('boost', static: s) +extralibdep = dependency('boost', static: s, modules : ['thread', 'system', 'date_time', 'log_setup', 'log', 'filesystem', 'regex']) +notfound = dependency('boost', static: s, modules : ['this_should_not_exist_on_any_systen'], required: false) + +assert(not notfound.found()) + +require_bp = host_machine.system() in ['linux', 'darwin'] +pymod = import('python') +python2 = pymod.find_installation('python2', required: false , disabler: true) +python3 = pymod.find_installation('python3', required: require_bp , disabler: true) +python2dep = python2.dependency(required: false , embed: true, disabler: true) +python3dep = python3.dependency(required: require_bp, embed: true, disabler: true) + +# compile python 2/3 modules only if we found a corresponding python version +if(python2dep.found() and require_bp and not s) + bpython2dep = dependency('boost', static: s, modules : ['python'], required: false, disabler: true) +else + python2dep = disabler() + bpython2dep = disabler() +endif + +if(python3dep.found() and require_bp and not s) + bpython3dep = dependency('boost', static: s, modules : ['python3']) +else + python3dep = disabler() + bpython3dep = disabler() +endif + +linkexe = executable('linkedexe', 'linkexe.cc', dependencies : linkdep) +unitexe = executable('utf', 'unit_test.cpp', dependencies: testdep) +nomodexe = executable('nomod', 'nomod.cpp', dependencies : nomoddep) +extralibexe = executable('extralibexe', 'extralib.cpp', dependencies : extralibdep) + +# python modules are shared libraries +python2module = python2.extension_module('python2_module', ['python_module.cpp'], dependencies: [python2dep, bpython2dep], cpp_args: ['-DMOD_NAME=python2_module']) +python3module = python3.extension_module('python3_module', ['python_module.cpp'], dependencies: [python3dep, bpython3dep], cpp_args: ['-DMOD_NAME=python3_module']) + + +test('Boost linktest', linkexe, timeout: 60) +test('Boost UTF test', unitexe, timeout: 60) +test('Boost nomod', nomodexe) +if host_machine.system() != 'darwin' or s + # Segfaults on macOS with dynamic linking since Boost 1.73 + # https://github.com/mesonbuild/meson/issues/7535 + test('Boost extralib test', extralibexe) +endif + +# explicitly use the correct python interpreter so that we don't have to provide two different python scripts that have different shebang lines +python2interpreter = find_program(python2.path(), required: false, disabler: true) +test('Boost Python2', python2interpreter, args: ['./test_python_module.py', meson.current_build_dir()], workdir: meson.current_source_dir(), depends: python2module) +python3interpreter = find_program(python3.path(), required: false, disabler: true) +test('Boost Python3', python3interpreter, args: ['./test_python_module.py', meson.current_build_dir()], workdir: meson.current_source_dir(), depends: python3module) + +subdir('partial_dep') + +# check we can apply a version constraint +dependency('boost', static: s, version: '>=@0@'.format(dep.version())) diff --git a/test cases/frameworks/1 boost/meson_options.txt b/test cases/frameworks/1 boost/meson_options.txt new file mode 100644 index 0000000..019feaf --- /dev/null +++ b/test cases/frameworks/1 boost/meson_options.txt @@ -0,0 +1 @@ +option('static', type: 'boolean', value: false) diff --git a/test cases/frameworks/1 boost/nomod.cpp b/test cases/frameworks/1 boost/nomod.cpp new file mode 100644 index 0000000..55c95b2 --- /dev/null +++ b/test cases/frameworks/1 boost/nomod.cpp @@ -0,0 +1,18 @@ +#include<boost/any.hpp> +#include<iostream> + +boost::any get_any() { + boost::any foobar = 3; + return foobar; +} + +int main(int argc, char **argv) { + boost::any result = get_any(); + if(boost::any_cast<int>(result) == 3) { + std::cout << "Everything is fine in the world.\n"; + return 0; + } else { + std::cout << "Mathematics stopped working.\n"; + return 1; + } +} diff --git a/test cases/frameworks/1 boost/partial_dep/foo.cpp b/test cases/frameworks/1 boost/partial_dep/foo.cpp new file mode 100644 index 0000000..da58703 --- /dev/null +++ b/test cases/frameworks/1 boost/partial_dep/foo.cpp @@ -0,0 +1,20 @@ +/* Copyright © 2018 Intel Corporation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include "foo.hpp" + +vec Foo::vector() { + return myvec; +} diff --git a/test cases/frameworks/1 boost/partial_dep/foo.hpp b/test cases/frameworks/1 boost/partial_dep/foo.hpp new file mode 100644 index 0000000..393d3f6 --- /dev/null +++ b/test cases/frameworks/1 boost/partial_dep/foo.hpp @@ -0,0 +1,27 @@ +/* Copyright © 2018 Intel Corporation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include <boost/fusion/container/vector.hpp> + +typedef boost::fusion::vector<int> vec; + + +class Foo { + public: + Foo() {}; + vec vector(); + private: + const vec myvec = vec(4); +}; diff --git a/test cases/frameworks/1 boost/partial_dep/main.cpp b/test cases/frameworks/1 boost/partial_dep/main.cpp new file mode 100644 index 0000000..b22ce3a --- /dev/null +++ b/test cases/frameworks/1 boost/partial_dep/main.cpp @@ -0,0 +1,27 @@ +/* Copyright © 2018 Intel Corporation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include <iostream> +#include <boost/fusion/include/at_c.hpp> +#include "foo.hpp" + + +int main(void) { + auto foo = Foo(); + vec v = foo.vector(); + std::cout << boost::fusion::at_c<0>(v) << std::endl; + + return 0; +} diff --git a/test cases/frameworks/1 boost/partial_dep/meson.build b/test cases/frameworks/1 boost/partial_dep/meson.build new file mode 100644 index 0000000..9d481bb --- /dev/null +++ b/test cases/frameworks/1 boost/partial_dep/meson.build @@ -0,0 +1,31 @@ +# Copyright © 2018 Intel Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +dep_boost = dependency('boost') +dep_boost_headers = dep_boost.partial_dependency(compile_args : true) + +libfoo = static_library( + 'foo', + 'foo.cpp', + dependencies : dep_boost_headers, +) + +exe_external_dep = executable( + 'external_dep', + 'main.cpp', + dependencies : dep_boost, + link_with : libfoo +) + +test('External Dependency', exe_external_dep) diff --git a/test cases/frameworks/1 boost/python_module.cpp b/test cases/frameworks/1 boost/python_module.cpp new file mode 100644 index 0000000..a0f010b --- /dev/null +++ b/test cases/frameworks/1 boost/python_module.cpp @@ -0,0 +1,22 @@ +#define PY_SSIZE_T_CLEAN +#include <Python.h> +#include <boost/python.hpp> + +struct World +{ + void set(std::string msg) { this->msg = msg; } + std::string greet() { return msg; } + std::string version() { return std::to_string(PY_MAJOR_VERSION) + "." + std::to_string(PY_MINOR_VERSION); } + std::string msg; +}; + + +BOOST_PYTHON_MODULE(MOD_NAME) +{ + using namespace boost::python; + class_<World>("World") + .def("greet", &World::greet) + .def("set", &World::set) + .def("version", &World::version) + ; +} diff --git a/test cases/frameworks/1 boost/test.json b/test cases/frameworks/1 boost/test.json new file mode 100644 index 0000000..2c5b857 --- /dev/null +++ b/test cases/frameworks/1 boost/test.json @@ -0,0 +1,22 @@ +{ + "matrix": { + "options": { + "static": [ + { "val": "true", "skip_on_env": [ "SKIP_STATIC_BOOST" ] }, + { "val": "false" } + ], + "b_vscrt": [ + { "val": null }, + { "val": "md", "compilers": { "cpp": "msvc" } }, + { "val": "mdd", "compilers": { "cpp": "msvc" } }, + { "val": "mt", "compilers": { "cpp": "msvc" } }, + { "val": "mtd", "compilers": { "cpp": "msvc" } } + ] + }, + "exclude": [ + { "static": "false", "b_vscrt": "mt" }, + { "static": "false", "b_vscrt": "mtd" } + ] + }, + "skip_on_jobname": ["azure", "msys2"] +} diff --git a/test cases/frameworks/1 boost/test_python_module.py b/test cases/frameworks/1 boost/test_python_module.py new file mode 100644 index 0000000..8ef96d2 --- /dev/null +++ b/test cases/frameworks/1 boost/test_python_module.py @@ -0,0 +1,27 @@ +import sys +sys.path.append(sys.argv[1]) + +# import compiled python module depending on version of python we are running with +if sys.version_info[0] == 2: + import python2_module + +if sys.version_info[0] == 3: + import python3_module + + +def run(): + msg = 'howdy' + if sys.version_info[0] == 2: + w = python2_module.World() + + if sys.version_info[0] == 3: + w = python3_module.World() + + w.set(msg) + + assert msg == w.greet() + version_string = str(sys.version_info[0]) + "." + str(sys.version_info[1]) + assert version_string == w.version() + +if __name__ == '__main__': + run() diff --git a/test cases/frameworks/1 boost/unit_test.cpp b/test cases/frameworks/1 boost/unit_test.cpp new file mode 100644 index 0000000..fa1fbaa --- /dev/null +++ b/test cases/frameworks/1 boost/unit_test.cpp @@ -0,0 +1,9 @@ +#define BOOST_TEST_MODULE "MesonTest" +#define BOOST_TEST_MAIN +#include <boost/test/unit_test.hpp> + +BOOST_AUTO_TEST_CASE(m_test) { + int x = 2+2; + BOOST_CHECK(true); + BOOST_CHECK_EQUAL(x, 4); +} diff --git a/test cases/frameworks/10 gtk-doc/doc/foobar-docs.sgml b/test cases/frameworks/10 gtk-doc/doc/foobar-docs.sgml new file mode 100644 index 0000000..3894317 --- /dev/null +++ b/test cases/frameworks/10 gtk-doc/doc/foobar-docs.sgml @@ -0,0 +1,41 @@ +<?xml version="1.0"?> +<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN" + "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd" [ +<!ENTITY version SYSTEM "version.xml"> +]> +<book id="index" xmlns:xi="http://www.w3.org/2003/XInclude"> + <bookinfo> + <title>Foolib Reference Manual</title> + <releaseinfo> + for Foobar &version; + </releaseinfo> + <authorgroup> + <author> + <firstname>Jonny</firstname> + <surname>Example</surname> + <affiliation> + <address> + <email>unknown@example.com</email> + </address> + </affiliation> + </author> + </authorgroup> + <copyright> + <year>2015</year> + <holder>Foobar corporation holdings ltd</holder> + </copyright> + </bookinfo> + + <reference id="foobar"> + <title>Foobar library</title> + <partintro> + <para> + This part documents Foobar libs. + </para> + </partintro> + <xi:include href="xml/foo.xml"/> + <xi:include href="../include/bar.xml"/> + <xi:include href="xml/foo-version.xml"/> + </reference> + +</book> diff --git a/test cases/frameworks/10 gtk-doc/doc/foobar1/baz.jpg b/test cases/frameworks/10 gtk-doc/doc/foobar1/baz.jpg new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/test cases/frameworks/10 gtk-doc/doc/foobar1/baz.jpg diff --git a/test cases/frameworks/10 gtk-doc/doc/foobar1/baz.png.in b/test cases/frameworks/10 gtk-doc/doc/foobar1/baz.png.in new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/test cases/frameworks/10 gtk-doc/doc/foobar1/baz.png.in diff --git a/test cases/frameworks/10 gtk-doc/doc/foobar1/foobar-docs.sgml b/test cases/frameworks/10 gtk-doc/doc/foobar1/foobar-docs.sgml new file mode 100644 index 0000000..6ccd087 --- /dev/null +++ b/test cases/frameworks/10 gtk-doc/doc/foobar1/foobar-docs.sgml @@ -0,0 +1,41 @@ +<?xml version="1.0"?> +<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN" + "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd" [ +<!ENTITY version SYSTEM "../version.xml"> +]> +<book id="index" xmlns:xi="http://www.w3.org/2003/XInclude"> + <bookinfo> + <title>Foolib Reference Manual</title> + <releaseinfo> + for Foobar &version; + </releaseinfo> + <authorgroup> + <author> + <firstname>Jonny</firstname> + <surname>Example</surname> + <affiliation> + <address> + <email>unknown@example.com</email> + </address> + </affiliation> + </author> + </authorgroup> + <copyright> + <year>2015</year> + <holder>Foobar corporation holdings ltd</holder> + </copyright> + </bookinfo> + + <reference id="foobar"> + <title>Foobar library</title> + <partintro> + <para> + This part documents Foobar libs. + </para> + </partintro> + <xi:include href="xml/foo.xml"/> + <xi:include href="../../include/bar.xml"/> + <xi:include href="xml/version.xml"/> + </reference> + +</book> diff --git a/test cases/frameworks/10 gtk-doc/doc/foobar1/foobar-sections.txt b/test cases/frameworks/10 gtk-doc/doc/foobar1/foobar-sections.txt new file mode 100644 index 0000000..e9ca2d6 --- /dev/null +++ b/test cases/frameworks/10 gtk-doc/doc/foobar1/foobar-sections.txt @@ -0,0 +1,15 @@ +<SECTION> +<FILE>foo</FILE> +<TITLE>FooObj</TITLE> +FooObj +FooObjClass +foo_do_something +</SECTION> + +<SECTION> +<FILE>version</FILE> +<TITLE>version</TITLE> +FOO_MAJOR_VERSION +FOO_MINOR_VERSION +FOO_MICRO_VERSION +</SECTION> diff --git a/test cases/frameworks/10 gtk-doc/doc/foobar1/foobar.types b/test cases/frameworks/10 gtk-doc/doc/foobar1/foobar.types new file mode 100644 index 0000000..0a9c046 --- /dev/null +++ b/test cases/frameworks/10 gtk-doc/doc/foobar1/foobar.types @@ -0,0 +1,4 @@ +% This include is useless it's a regression test for https://github.com/mesonbuild/meson/issues/8744 +#include <foo.h> + +foo_obj_get_type diff --git a/test cases/frameworks/10 gtk-doc/doc/foobar1/meson.build b/test cases/frameworks/10 gtk-doc/doc/foobar1/meson.build new file mode 100644 index 0000000..2af9670 --- /dev/null +++ b/test cases/frameworks/10 gtk-doc/doc/foobar1/meson.build @@ -0,0 +1,15 @@ +png = configure_file(input: 'baz.png.in', + output: 'baz.png', + copy: true) + +gnome.gtkdoc('foobar', + src_dir : [inc, '.'], + main_sgml : 'foobar-docs.sgml', + content_files : [docbook, version_xml], + dependencies: foo_dep, + html_assets: ['baz.jpg', png], + # Manually written types file for regression test: + # https://github.com/mesonbuild/meson/issues/8744 + gobject_typesfile: 'foobar.types', + install : true, + check: false) diff --git a/test cases/frameworks/10 gtk-doc/doc/foobar2/foobar-docs.sgml b/test cases/frameworks/10 gtk-doc/doc/foobar2/foobar-docs.sgml new file mode 100644 index 0000000..95f73ef --- /dev/null +++ b/test cases/frameworks/10 gtk-doc/doc/foobar2/foobar-docs.sgml @@ -0,0 +1,41 @@ +<?xml version="1.0"?> +<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN" + "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd" [ +<!ENTITY version SYSTEM "../version.xml"> +]> +<book id="index" xmlns:xi="http://www.w3.org/2003/XInclude"> + <bookinfo> + <title>Foolib Reference Manual</title> + <releaseinfo> + for Foobar &version; + </releaseinfo> + <authorgroup> + <author> + <firstname>Jonny</firstname> + <surname>Example</surname> + <affiliation> + <address> + <email>unknown@example.com</email> + </address> + </affiliation> + </author> + </authorgroup> + <copyright> + <year>2015</year> + <holder>Foobar corporation holdings ltd</holder> + </copyright> + </bookinfo> + + <reference id="foobar"> + <title>Foobar library</title> + <partintro> + <para> + This part documents Foobar libs. + </para> + </partintro> + <xi:include href="xml/foo.xml"/> + <xi:include href="../../include/bar.xml"/> + <xi:include href="xml/foo-version.xml"/> + </reference> + +</book> diff --git a/test cases/frameworks/10 gtk-doc/doc/foobar2/meson.build b/test cases/frameworks/10 gtk-doc/doc/foobar2/meson.build new file mode 100644 index 0000000..5f860ef --- /dev/null +++ b/test cases/frameworks/10 gtk-doc/doc/foobar2/meson.build @@ -0,0 +1,13 @@ +types = configure_file(input: '../foobar1/foobar.types', + output: 'foobar.types', + copy: true +) + +gnome.gtkdoc('foobar2', + src_dir : inc, + main_sgml : 'foobar-docs.sgml', + content_files : [docbook, version_xml], + gobject_typesfile: types, + dependencies: foo_dep, + install : true, + install_dir : 'foobar2') diff --git a/test cases/frameworks/10 gtk-doc/doc/foobar3/foobar-docs.sgml b/test cases/frameworks/10 gtk-doc/doc/foobar3/foobar-docs.sgml new file mode 100644 index 0000000..95f73ef --- /dev/null +++ b/test cases/frameworks/10 gtk-doc/doc/foobar3/foobar-docs.sgml @@ -0,0 +1,41 @@ +<?xml version="1.0"?> +<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN" + "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd" [ +<!ENTITY version SYSTEM "../version.xml"> +]> +<book id="index" xmlns:xi="http://www.w3.org/2003/XInclude"> + <bookinfo> + <title>Foolib Reference Manual</title> + <releaseinfo> + for Foobar &version; + </releaseinfo> + <authorgroup> + <author> + <firstname>Jonny</firstname> + <surname>Example</surname> + <affiliation> + <address> + <email>unknown@example.com</email> + </address> + </affiliation> + </author> + </authorgroup> + <copyright> + <year>2015</year> + <holder>Foobar corporation holdings ltd</holder> + </copyright> + </bookinfo> + + <reference id="foobar"> + <title>Foobar library</title> + <partintro> + <para> + This part documents Foobar libs. + </para> + </partintro> + <xi:include href="xml/foo.xml"/> + <xi:include href="../../include/bar.xml"/> + <xi:include href="xml/foo-version.xml"/> + </reference> + +</book> diff --git a/test cases/frameworks/10 gtk-doc/doc/foobar3/meson.build b/test cases/frameworks/10 gtk-doc/doc/foobar3/meson.build new file mode 100644 index 0000000..0dce2f8 --- /dev/null +++ b/test cases/frameworks/10 gtk-doc/doc/foobar3/meson.build @@ -0,0 +1,6 @@ +gnome.gtkdoc('foobar', + module_version : '3.0', + src_dir : inc, + main_sgml : 'foobar-docs.sgml', + content_files : [docbook, version_xml], + install : true) diff --git a/test cases/frameworks/10 gtk-doc/doc/foobar4/foobar-docs.sgml b/test cases/frameworks/10 gtk-doc/doc/foobar4/foobar-docs.sgml new file mode 100644 index 0000000..95f73ef --- /dev/null +++ b/test cases/frameworks/10 gtk-doc/doc/foobar4/foobar-docs.sgml @@ -0,0 +1,41 @@ +<?xml version="1.0"?> +<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN" + "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd" [ +<!ENTITY version SYSTEM "../version.xml"> +]> +<book id="index" xmlns:xi="http://www.w3.org/2003/XInclude"> + <bookinfo> + <title>Foolib Reference Manual</title> + <releaseinfo> + for Foobar &version; + </releaseinfo> + <authorgroup> + <author> + <firstname>Jonny</firstname> + <surname>Example</surname> + <affiliation> + <address> + <email>unknown@example.com</email> + </address> + </affiliation> + </author> + </authorgroup> + <copyright> + <year>2015</year> + <holder>Foobar corporation holdings ltd</holder> + </copyright> + </bookinfo> + + <reference id="foobar"> + <title>Foobar library</title> + <partintro> + <para> + This part documents Foobar libs. + </para> + </partintro> + <xi:include href="xml/foo.xml"/> + <xi:include href="../../include/bar.xml"/> + <xi:include href="xml/foo-version.xml"/> + </reference> + +</book> diff --git a/test cases/frameworks/10 gtk-doc/doc/foobar4/meson.build b/test cases/frameworks/10 gtk-doc/doc/foobar4/meson.build new file mode 100644 index 0000000..959e507 --- /dev/null +++ b/test cases/frameworks/10 gtk-doc/doc/foobar4/meson.build @@ -0,0 +1,7 @@ +gnome.gtkdoc('foobar2', + module_version : '3.0', + src_dir : inc, + main_sgml : 'foobar-docs.sgml', + content_files : [docbook, version_xml], + install : true, + install_dir : 'foobar3') diff --git a/test cases/frameworks/10 gtk-doc/doc/meson.build b/test cases/frameworks/10 gtk-doc/doc/meson.build new file mode 100644 index 0000000..c001f89 --- /dev/null +++ b/test cases/frameworks/10 gtk-doc/doc/meson.build @@ -0,0 +1,10 @@ +cdata = configuration_data() +cdata.set('VERSION', '1.0') +version_xml = configure_file(input : 'version.xml.in', + output : 'version.xml', + configuration : cdata) + +subdir('foobar1') +subdir('foobar2') +subdir('foobar3') +subdir('foobar4') diff --git a/test cases/frameworks/10 gtk-doc/doc/version.xml.in b/test cases/frameworks/10 gtk-doc/doc/version.xml.in new file mode 100644 index 0000000..d78bda9 --- /dev/null +++ b/test cases/frameworks/10 gtk-doc/doc/version.xml.in @@ -0,0 +1 @@ +@VERSION@ diff --git a/test cases/frameworks/10 gtk-doc/foo.c b/test cases/frameworks/10 gtk-doc/foo.c new file mode 100644 index 0000000..36c0639 --- /dev/null +++ b/test cases/frameworks/10 gtk-doc/foo.c @@ -0,0 +1,30 @@ +#include <foo.h> + + +struct _FooObj { + GObject parent; + int dummy; +}; + +G_DEFINE_TYPE(FooObj, foo_obj, G_TYPE_OBJECT) + +static void foo_obj_init (FooObj *self) +{ +} + +static void foo_obj_class_init (FooObjClass *klass) +{ +} + +/** + * foo_do_something: + * @self: self + * + * Useless function. + * + * Returns: 0. + */ +int foo_do_something(FooObj *self) +{ + return 0; +} diff --git a/test cases/frameworks/10 gtk-doc/include/foo-version.h.in b/test cases/frameworks/10 gtk-doc/include/foo-version.h.in new file mode 100644 index 0000000..30751cd --- /dev/null +++ b/test cases/frameworks/10 gtk-doc/include/foo-version.h.in @@ -0,0 +1,29 @@ +#pragma once + +/** + * SECTION:version + * @section_id: foo-version + * @short_description: <filename>foo-version.h</filename> + * @title: Foo Versioning + */ + +/** + * FOO_MAJOR_VERSION: + * + * The major version of foo. + */ +#define FOO_MAJOR_VERSION (@FOO_MAJOR_VERSION@) + +/** + * FOO_MINOR_VERSION: + * + * The minor version of foo. + */ +#define FOO_MINOR_VERSION (@FOO_MINOR_VERSION@) + +/** + * FOO_MICRO_VERSION: + * + * The micro version of foo. + */ +#define FOO_MICRO_VERSION (@FOO_MICRO_VERSION@) diff --git a/test cases/frameworks/10 gtk-doc/include/foo.h b/test cases/frameworks/10 gtk-doc/include/foo.h new file mode 100644 index 0000000..510f3d1 --- /dev/null +++ b/test cases/frameworks/10 gtk-doc/include/foo.h @@ -0,0 +1,33 @@ +#pragma once + +#include <glib-object.h> + +/** + * FooIndecision: + * @FOO_MAYBE: Something maybe + * @FOO_POSSIBLY: Something possible + * + * The indecision type. + **/ + +typedef enum { + FOO_MAYBE, + FOO_POSSIBLY, +} FooIndecision; + +/** + * FooObjClass: + * + * The class + */ + +/** + * FooObj: + * + * The instance + */ + +#define FOO_TYPE_OBJ foo_obj_get_type() +G_DECLARE_FINAL_TYPE(FooObj, foo_obj, FOO, OBJ, GObject) + +int foo_do_something(FooObj *self); diff --git a/test cases/frameworks/10 gtk-doc/include/generate-enums-docbook.py b/test cases/frameworks/10 gtk-doc/include/generate-enums-docbook.py new file mode 100644 index 0000000..41c6121 --- /dev/null +++ b/test cases/frameworks/10 gtk-doc/include/generate-enums-docbook.py @@ -0,0 +1,63 @@ +#!/usr/bin/env python3 + +import sys + +DOC_HEADER = '''<?xml version='1.0'?> +<?xml-stylesheet type="text/xsl" href="http://docbook.sourceforge.net/release/xsl/current/xhtml/docbook.xsl"?> +<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN" "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd"> + +<refentry id="{0}"> + <refmeta> + <refentrytitle role="top_of_page" id="{0}.top_of_page">{0}</refentrytitle> + <refmiscinfo>{0}</refmiscinfo> + </refmeta> + <refnamediv> + <refname>{0}</refname> + <refpurpose></refpurpose> + </refnamediv> + + <refsect2 id="{1}" role="enum"> + <title>enum {1}</title> + <indexterm zone="{1}"> + <primary>{1}</primary> + </indexterm> + <para><link linkend="{1}">{1}</link></para> + <refsect3 role="enum_members"> + <title>Values</title> + <informaltable role="enum_members_table" pgwide="1" frame="none"> + <tgroup cols="4"> + <colspec colname="enum_members_name" colwidth="300px" /> + <colspec colname="enum_members_value" colwidth="100px"/> + <colspec colname="enum_members_description" /> + <tbody> +''' + +DOC_ENUM = ''' <row role="constant"> + <entry role="enum_member_name"><para>{0}</para><para></para></entry> + <entry role="enum_member_value"><para>= <literal>{1}</literal></para><para></para></entry> + <entry role="enum_member_description"></entry> + </row>''' + +DOC_FOOTER = ''' + </tbody> + </tgroup> + </informaltable> + </refsect3> + </refsect2> +</refentry> +''' + +if __name__ == '__main__': + if len(sys.argv) >= 4: + with open(sys.argv[1], 'w') as doc_out: + enum_name = sys.argv[2] + enum_type = sys.argv[3] + + doc_out.write(DOC_HEADER.format(enum_name, enum_type)) + for i, enum in enumerate(sys.argv[4:]): + doc_out.write(DOC_ENUM.format(enum, i)) + doc_out.write(DOC_FOOTER) + else: + print('Use: ' + sys.argv[0] + ' out name type [enums]') + + sys.exit(0) diff --git a/test cases/frameworks/10 gtk-doc/include/meson.build b/test cases/frameworks/10 gtk-doc/include/meson.build new file mode 100644 index 0000000..aa32885 --- /dev/null +++ b/test cases/frameworks/10 gtk-doc/include/meson.build @@ -0,0 +1,17 @@ +cdata = configuration_data() +parts = meson.project_version().split('.') +cdata.set('FOO_MAJOR_VERSION', parts[0]) +cdata.set('FOO_MINOR_VERSION', parts[1]) +cdata.set('FOO_MICRO_VERSION', parts[2]) +configure_file(input : 'foo-version.h.in', + output : 'foo-version.h', + configuration : cdata, + install : true, + install_dir : get_option('includedir')) + +generate_enums_docbook = find_program('generate-enums-docbook.py') + +docbook = custom_target('enum-docbook', + output : 'bar.xml', + command : [generate_enums_docbook, '@OUTPUT@', 'BAR', 'BAR_TYPE', 'BAR_FOO'], + build_by_default : true) diff --git a/test cases/frameworks/10 gtk-doc/meson.build b/test cases/frameworks/10 gtk-doc/meson.build new file mode 100644 index 0000000..b49efc0 --- /dev/null +++ b/test cases/frameworks/10 gtk-doc/meson.build @@ -0,0 +1,45 @@ +project('gtkdoctest', 'c', version : '1.0.0') + +gtkdoc = find_program('gtkdoc-scan', required: false) +if not gtkdoc.found() + error('MESON_SKIP_TEST gtkdoc not found.') +endif + +gnome = import('gnome') + +assert(gnome.gtkdoc_html_dir('foobar') == 'share/gtk-doc/html/foobar', 'Gtkdoc install dir is incorrect.') + +inc = include_directories('include') + +subdir('include') + +# disable this test unless a bug fix for spaces in pathnames is present +# https://bugzilla.gnome.org/show_bug.cgi?id=753145 +result = run_command(gtkdoc, ['--version'], check: true) +gtkdoc_ver = result.stdout().strip() +if gtkdoc_ver == '' + gtkdoc_ver = result.stderr().strip() +endif +if gtkdoc_ver.version_compare('<1.26') + error('MESON_SKIP_TEST gtk-doc test requires gtkdoc >= 1.26.') +endif + +gobject = dependency('gobject-2.0') + +libfoo = shared_library('foo', 'foo.c', + include_directories: inc, + dependencies: gobject, +) + +deps = [] +if host_machine.system() == 'darwin' + deps += dependency('appleframeworks', modules : ['Foundation', 'CoreFoundation']) +endif + +foo_dep = declare_dependency( + link_with: libfoo, + include_directories: inc, + dependencies: deps, +) + +subdir('doc') diff --git a/test cases/frameworks/10 gtk-doc/test.json b/test cases/frameworks/10 gtk-doc/test.json new file mode 100644 index 0000000..1085b55 --- /dev/null +++ b/test cases/frameworks/10 gtk-doc/test.json @@ -0,0 +1,64 @@ +{ + "installed": [ + {"type": "file", "file": "usr/include/foo-version.h"}, + {"type": "file", "file": "usr/share/gtk-doc/html/foobar/BAR.html"}, + {"type": "file", "file": "usr/share/gtk-doc/html/foobar/baz.jpg"}, + {"type": "file", "file": "usr/share/gtk-doc/html/foobar/baz.png"}, + {"type": "file", "file": "usr/share/gtk-doc/html/foobar/foobar.devhelp2"}, + {"type": "file", "file": "usr/share/gtk-doc/html/foobar/foobar.html"}, + {"type": "file", "file": "usr/share/gtk-doc/html/foobar/FooObj.html"}, + {"type": "file", "file": "usr/share/gtk-doc/html/foobar/foo-version.html"}, + {"type": "file", "file": "usr/share/gtk-doc/html/foobar/home.png"}, + {"type": "file", "file": "usr/share/gtk-doc/html/foobar/index.html"}, + {"type": "file", "file": "usr/share/gtk-doc/html/foobar/left.png"}, + {"type": "file", "file": "usr/share/gtk-doc/html/foobar/left-insensitive.png"}, + {"type": "file", "file": "usr/share/gtk-doc/html/foobar/right.png"}, + {"type": "file", "file": "usr/share/gtk-doc/html/foobar/right-insensitive.png"}, + {"type": "file", "file": "usr/share/gtk-doc/html/foobar/style.css"}, + {"type": "file", "file": "usr/share/gtk-doc/html/foobar/up.png"}, + {"type": "file", "file": "usr/share/gtk-doc/html/foobar/up-insensitive.png"}, + {"type": "file", "file": "usr/share/gtk-doc/html/foobar2/BAR.html"}, + {"type": "file", "file": "usr/share/gtk-doc/html/foobar2/foobar2.devhelp2"}, + {"type": "file", "file": "usr/share/gtk-doc/html/foobar2/foobar.html"}, + {"type": "file", "file": "usr/share/gtk-doc/html/foobar2/foobar2-foo.html"}, + {"type": "file", "file": "usr/share/gtk-doc/html/foobar2/foobar2-foo-version.html"}, + {"type": "file", "file": "usr/share/gtk-doc/html/foobar2/home.png"}, + {"type": "file", "file": "usr/share/gtk-doc/html/foobar2/index.html"}, + {"type": "file", "file": "usr/share/gtk-doc/html/foobar2/left.png"}, + {"type": "file", "file": "usr/share/gtk-doc/html/foobar2/left-insensitive.png"}, + {"type": "file", "file": "usr/share/gtk-doc/html/foobar2/right.png"}, + {"type": "file", "file": "usr/share/gtk-doc/html/foobar2/right-insensitive.png"}, + {"type": "file", "file": "usr/share/gtk-doc/html/foobar2/style.css"}, + {"type": "file", "file": "usr/share/gtk-doc/html/foobar2/up.png"}, + {"type": "file", "file": "usr/share/gtk-doc/html/foobar2/up-insensitive.png"}, + {"type": "file", "file": "usr/share/gtk-doc/html/foobar-3.0/BAR.html"}, + {"type": "file", "file": "usr/share/gtk-doc/html/foobar-3.0/foobar-3.0.devhelp2"}, + {"type": "file", "file": "usr/share/gtk-doc/html/foobar-3.0/foobar.html"}, + {"type": "file", "file": "usr/share/gtk-doc/html/foobar-3.0/foobar-foo.html"}, + {"type": "file", "file": "usr/share/gtk-doc/html/foobar-3.0/foobar-foo-version.html"}, + {"type": "file", "file": "usr/share/gtk-doc/html/foobar-3.0/home.png"}, + {"type": "file", "file": "usr/share/gtk-doc/html/foobar-3.0/index.html"}, + {"type": "file", "file": "usr/share/gtk-doc/html/foobar-3.0/left.png"}, + {"type": "file", "file": "usr/share/gtk-doc/html/foobar-3.0/left-insensitive.png"}, + {"type": "file", "file": "usr/share/gtk-doc/html/foobar-3.0/right.png"}, + {"type": "file", "file": "usr/share/gtk-doc/html/foobar-3.0/right-insensitive.png"}, + {"type": "file", "file": "usr/share/gtk-doc/html/foobar-3.0/style.css"}, + {"type": "file", "file": "usr/share/gtk-doc/html/foobar-3.0/up.png"}, + {"type": "file", "file": "usr/share/gtk-doc/html/foobar-3.0/up-insensitive.png"}, + {"type": "file", "file": "usr/share/gtk-doc/html/foobar3/BAR.html"}, + {"type": "file", "file": "usr/share/gtk-doc/html/foobar3/foobar2-3.0.devhelp2"}, + {"type": "file", "file": "usr/share/gtk-doc/html/foobar3/foobar.html"}, + {"type": "file", "file": "usr/share/gtk-doc/html/foobar3/foobar2-foo.html"}, + {"type": "file", "file": "usr/share/gtk-doc/html/foobar3/foobar2-foo-version.html"}, + {"type": "file", "file": "usr/share/gtk-doc/html/foobar3/home.png"}, + {"type": "file", "file": "usr/share/gtk-doc/html/foobar3/index.html"}, + {"type": "file", "file": "usr/share/gtk-doc/html/foobar3/left.png"}, + {"type": "file", "file": "usr/share/gtk-doc/html/foobar3/left-insensitive.png"}, + {"type": "file", "file": "usr/share/gtk-doc/html/foobar3/right.png"}, + {"type": "file", "file": "usr/share/gtk-doc/html/foobar3/right-insensitive.png"}, + {"type": "file", "file": "usr/share/gtk-doc/html/foobar3/style.css"}, + {"type": "file", "file": "usr/share/gtk-doc/html/foobar3/up.png"}, + {"type": "file", "file": "usr/share/gtk-doc/html/foobar3/up-insensitive.png"} + ], + "skip_on_jobname": ["azure", "msys2"] +} diff --git a/test cases/frameworks/11 gir subproject/gir/meson-subsample.c b/test cases/frameworks/11 gir subproject/gir/meson-subsample.c new file mode 100644 index 0000000..2d58a10 --- /dev/null +++ b/test cases/frameworks/11 gir subproject/gir/meson-subsample.c @@ -0,0 +1,124 @@ +#include "meson-subsample.h" + +struct _MesonSubSample +{ + MesonSample parent_instance; + + gchar *msg; +}; + +G_DEFINE_TYPE (MesonSubSample, meson_sub_sample, MESON_TYPE_SAMPLE) + +enum { + PROP_0, + PROP_MSG, + LAST_PROP +}; + +static GParamSpec *gParamSpecs [LAST_PROP]; + +/** + * meson_sub_sample_new: + * @msg: The message to set. + * + * Allocates a new #MesonSubSample. + * + * Returns: (transfer full): a #MesonSubSample. + */ +MesonSubSample * +meson_sub_sample_new (const gchar *msg) +{ + g_return_val_if_fail (msg != NULL, NULL); + + return g_object_new (MESON_TYPE_SUB_SAMPLE, + "message", msg, + NULL); +} + +static void +meson_sub_sample_finalize (GObject *object) +{ + MesonSubSample *self = (MesonSubSample *)object; + + g_clear_pointer (&self->msg, g_free); + + G_OBJECT_CLASS (meson_sub_sample_parent_class)->finalize (object); +} + +static void +meson_sub_sample_get_property (GObject *object, + guint prop_id, + GValue *value, + GParamSpec *pspec) +{ + MesonSubSample *self = MESON_SUB_SAMPLE (object); + + switch (prop_id) + { + case PROP_MSG: + g_value_set_string (value, self->msg); + break; + default: + G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); + } +} + +static void +meson_sub_sample_set_property (GObject *object, + guint prop_id, + const GValue *value, + GParamSpec *pspec) +{ + MesonSubSample *self = MESON_SUB_SAMPLE (object); + + switch (prop_id) + { + case PROP_MSG: + self->msg = g_value_dup_string (value); + break; + default: + G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); + } +} + +static void +meson_sub_sample_class_init (MesonSubSampleClass *klass) +{ + GObjectClass *object_class = G_OBJECT_CLASS (klass); + + object_class->finalize = meson_sub_sample_finalize; + object_class->get_property = meson_sub_sample_get_property; + object_class->set_property = meson_sub_sample_set_property; + + gParamSpecs [PROP_MSG] = + g_param_spec_string ("message", + "Message", + "The message to print.", + NULL, + (G_PARAM_READWRITE | + G_PARAM_CONSTRUCT_ONLY | + G_PARAM_STATIC_STRINGS)); + + g_object_class_install_properties (object_class, LAST_PROP, gParamSpecs); +} + +static void +meson_sub_sample_init (MesonSubSample *self) +{ +} + +/** + * meson_sub_sample_print_message: + * @self: a #MesonSubSample. + * + * Prints the message. + * + * Returns: Nothing. + */ +void +meson_sub_sample_print_message (MesonSubSample *self) +{ + g_return_if_fail (MESON_IS_SUB_SAMPLE (self)); + + g_print ("Message: %s\n", self->msg); +} diff --git a/test cases/frameworks/11 gir subproject/gir/meson-subsample.h b/test cases/frameworks/11 gir subproject/gir/meson-subsample.h new file mode 100644 index 0000000..666d59f --- /dev/null +++ b/test cases/frameworks/11 gir subproject/gir/meson-subsample.h @@ -0,0 +1,21 @@ +#ifndef MESON_SUB_SAMPLE_H +#define MESON_SUB_SAMPLE_H + +#if !defined (MESON_TEST) +#error "MESON_TEST not defined." +#endif + +#include <glib-object.h> +#include <meson-sample.h> + +G_BEGIN_DECLS + +#define MESON_TYPE_SUB_SAMPLE (meson_sub_sample_get_type()) + +G_DECLARE_FINAL_TYPE (MesonSubSample, meson_sub_sample, MESON, SUB_SAMPLE, MesonSample) + +MesonSubSample *meson_sub_sample_new (const gchar *msg); + +G_END_DECLS + +#endif /* MESON_SUB_SAMPLE_H */ diff --git a/test cases/frameworks/11 gir subproject/gir/meson.build b/test cases/frameworks/11 gir subproject/gir/meson.build new file mode 100644 index 0000000..fe40dc6 --- /dev/null +++ b/test cases/frameworks/11 gir subproject/gir/meson.build @@ -0,0 +1,40 @@ +libsources = ['meson-subsample.c', 'meson-subsample.h'] + +girsubproject = shared_library( + 'girsubproject', + sources : libsources, + dependencies : [gobj, meson_gir], + install : true +) + +girexe = executable( + 'girprog', + sources : 'prog.c', + dependencies : [gobj, meson_gir], + link_with : girsubproject +) + +gnome.generate_gir( + girsubproject, + sources : libsources, + dependencies : [gobj, meson_gir], + nsversion : '1.0', + namespace : 'MesonSub', + symbol_prefix : 'meson_sub_', + identifier_prefix : 'MesonSub', + includes : ['GObject-2.0', 'Meson-1.0'], + install : true +) + +message('TEST: ' + girsubproject.outdir()) + +envdata = environment() +envdata.append('GI_TYPELIB_PATH', girsubproject.outdir(), 'subprojects/mesongir', separator : ':') +envdata.append('LD_LIBRARY_PATH', girsubproject.outdir(), 'subprojects/mesongir') +if ['windows', 'cygwin'].contains(host_machine.system()) + envdata.append('PATH', girsubproject.outdir(), 'subprojects/mesongir') +endif + +test('gobject introspection/subproject/c', girexe) +test('gobject introspection/subproject/py', find_program('prog.py'), + env : envdata) diff --git a/test cases/frameworks/11 gir subproject/gir/prog.c b/test cases/frameworks/11 gir subproject/gir/prog.c new file mode 100644 index 0000000..f25c9d8 --- /dev/null +++ b/test cases/frameworks/11 gir subproject/gir/prog.c @@ -0,0 +1,12 @@ +#include "meson-subsample.h" + +gint +main (gint argc, + gchar *argv[]) +{ + MesonSample * i = (MesonSample*) meson_sub_sample_new ("Hello, sub/meson/c!"); + meson_sample_print_message (i); + g_object_unref (i); + + return 0; +} diff --git a/test cases/frameworks/11 gir subproject/gir/prog.py b/test cases/frameworks/11 gir subproject/gir/prog.py new file mode 100755 index 0000000..ea4da5b --- /dev/null +++ b/test cases/frameworks/11 gir subproject/gir/prog.py @@ -0,0 +1,6 @@ +#!/usr/bin/env python3 +from gi.repository import MesonSub + +if __name__ == "__main__": + s = MesonSub.Sample.new("Hello, sub/meson/py!") + s.print_message() diff --git a/test cases/frameworks/11 gir subproject/meson.build b/test cases/frameworks/11 gir subproject/meson.build new file mode 100644 index 0000000..3714daa --- /dev/null +++ b/test cases/frameworks/11 gir subproject/meson.build @@ -0,0 +1,20 @@ +project('gobject-introspection-with-subproject', 'c') + +gir = find_program('g-ir-scanner', required: false) +if not gir.found() + error('MESON_SKIP_TEST g-ir-scanner not found.') +endif + +python3 = import('python3') +py3 = python3.find_python() +if run_command(py3, '-c', 'import gi;', check: false).returncode() != 0 + error('MESON_SKIP_TEST python3-gi not found') +endif + +gnome = import('gnome') +gobj = dependency('gobject-2.0') + +add_global_arguments('-DMESON_TEST', language : 'c') +meson_gir = dependency('meson-gir', fallback : ['mesongir', 'meson_gir']) + +subdir('gir') diff --git a/test cases/frameworks/11 gir subproject/subprojects/mesongir/meson-sample.c b/test cases/frameworks/11 gir subproject/subprojects/mesongir/meson-sample.c new file mode 100644 index 0000000..2e78b07 --- /dev/null +++ b/test cases/frameworks/11 gir subproject/subprojects/mesongir/meson-sample.c @@ -0,0 +1,127 @@ +#include "meson-sample.h" + +typedef struct _MesonSamplePrivate +{ + gchar *msg; +} MesonSamplePrivate; + + +G_DEFINE_TYPE_WITH_PRIVATE (MesonSample, meson_sample, G_TYPE_OBJECT) + +enum { + PROP_0, + PROP_MSG, + LAST_PROP +}; + +static GParamSpec *gParamSpecs [LAST_PROP]; + +/** + * meson_sample_new: + * @msg: The message to set. + * + * Allocates a new #MesonSample. + * + * Returns: (transfer full): a #MesonSample. + */ +MesonSample * +meson_sample_new (const gchar *msg) +{ + g_return_val_if_fail (msg != NULL, NULL); + + return g_object_new (MESON_TYPE_SAMPLE, + "message", msg, + NULL); +} + +static void +meson_sample_finalize (GObject *object) +{ + MesonSamplePrivate *priv = meson_sample_get_instance_private ((MesonSample *) object); + + g_clear_pointer (&priv->msg, g_free); + + G_OBJECT_CLASS (meson_sample_parent_class)->finalize (object); +} + +static void +meson_sample_get_property (GObject *object, + guint prop_id, + GValue *value, + GParamSpec *pspec) +{ + MesonSamplePrivate *priv = meson_sample_get_instance_private ((MesonSample *) object); + + switch (prop_id) + { + case PROP_MSG: + g_value_set_string (value, priv->msg); + break; + default: + G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); + } +} + +static void +meson_sample_set_property (GObject *object, + guint prop_id, + const GValue *value, + GParamSpec *pspec) +{ + MesonSamplePrivate *priv = meson_sample_get_instance_private ((MesonSample *) object); + + switch (prop_id) + { + case PROP_MSG: + priv->msg = g_value_dup_string (value); + break; + default: + G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); + } +} + +static void +meson_sample_class_init (MesonSampleClass *klass) +{ + GObjectClass *object_class = G_OBJECT_CLASS (klass); + + object_class->finalize = meson_sample_finalize; + object_class->get_property = meson_sample_get_property; + object_class->set_property = meson_sample_set_property; + + gParamSpecs [PROP_MSG] = + g_param_spec_string ("message", + "Message", + "The message to print.", + NULL, + (G_PARAM_READWRITE | + G_PARAM_CONSTRUCT_ONLY | + G_PARAM_STATIC_STRINGS)); + + g_object_class_install_properties (object_class, LAST_PROP, gParamSpecs); +} + +static void +meson_sample_init (MesonSample *self) +{ +} + +/** + * meson_sample_print_message: + * @self: a #MesonSample. + * + * Prints the message. + * + * Returns: Nothing. + */ +void +meson_sample_print_message (MesonSample *self) +{ + MesonSamplePrivate *priv; + + g_return_if_fail (MESON_IS_SAMPLE (self)); + + priv = meson_sample_get_instance_private (self); + + g_print ("Message: %s\n", priv->msg); +} diff --git a/test cases/frameworks/11 gir subproject/subprojects/mesongir/meson-sample.h b/test cases/frameworks/11 gir subproject/subprojects/mesongir/meson-sample.h new file mode 100644 index 0000000..e4c07a8 --- /dev/null +++ b/test cases/frameworks/11 gir subproject/subprojects/mesongir/meson-sample.h @@ -0,0 +1,26 @@ +#ifndef MESON_SAMPLE_H +#define MESON_SAMPLE_H + +#if !defined (MESON_TEST) +#error "MESON_TEST not defined." +#endif + +#include <glib-object.h> + +G_BEGIN_DECLS + +#define MESON_TYPE_SAMPLE (meson_sample_get_type()) + +G_DECLARE_DERIVABLE_TYPE (MesonSample, meson_sample, MESON, SAMPLE, GObject) + +struct _MesonSampleClass { + GObjectClass parent_class; +}; + + +MesonSample *meson_sample_new (const gchar *msg); +void meson_sample_print_message (MesonSample *self); + +G_END_DECLS + +#endif /* MESON_SAMPLE_H */ diff --git a/test cases/frameworks/11 gir subproject/subprojects/mesongir/meson.build b/test cases/frameworks/11 gir subproject/subprojects/mesongir/meson.build new file mode 100644 index 0000000..027b4ee --- /dev/null +++ b/test cases/frameworks/11 gir subproject/subprojects/mesongir/meson.build @@ -0,0 +1,31 @@ +project('gobject-introspection-subproject', 'c') + +gnome = import('gnome') +gobj = dependency('gobject-2.0') + +libsources = ['meson-sample.c', 'meson-sample.h'] + +girlib = shared_library( + 'girlib', + sources : libsources, + dependencies : gobj, + install : true +) + +girtarget = gnome.generate_gir( + girlib, + sources : libsources, + nsversion : '1.0', + namespace : 'Meson', + symbol_prefix : 'meson_', + identifier_prefix : 'Meson', + includes : ['GObject-2.0'], + install : true +) + +meson_gir = declare_dependency(link_with : girlib, + include_directories : [include_directories('.')], + dependencies : [gobj], + # Everything that uses libgst needs this built to compile + sources : girtarget, +) diff --git a/test cases/frameworks/11 gir subproject/test.json b/test cases/frameworks/11 gir subproject/test.json new file mode 100644 index 0000000..aed0a1c --- /dev/null +++ b/test cases/frameworks/11 gir subproject/test.json @@ -0,0 +1,13 @@ +{ + "installed": [ + {"type": "file", "file": "usr/lib/girepository-1.0/Meson-1.0.typelib"}, + {"type": "file", "file": "usr/lib/girepository-1.0/MesonSub-1.0.typelib"}, + {"type": "file", "file": "usr/share/gir-1.0/Meson-1.0.gir"}, + {"type": "file", "file": "usr/share/gir-1.0/MesonSub-1.0.gir"}, + {"type": "expr", "file": "usr/lib/?libgirsubproject.so"}, + {"type": "file", "platform": "cygwin", "file": "usr/lib/libgirlib.dll.a"}, + {"type": "expr", "file": "usr/lib/?libgirlib.so"}, + {"type": "file", "platform": "cygwin", "file": "usr/lib/libgirsubproject.dll.a"} + ], + "skip_on_jobname": ["azure", "cygwin", "macos", "msys2", "pypy"] +} diff --git a/test cases/frameworks/12 multiple gir/gir/meson-subsample.c b/test cases/frameworks/12 multiple gir/gir/meson-subsample.c new file mode 100644 index 0000000..2d58a10 --- /dev/null +++ b/test cases/frameworks/12 multiple gir/gir/meson-subsample.c @@ -0,0 +1,124 @@ +#include "meson-subsample.h" + +struct _MesonSubSample +{ + MesonSample parent_instance; + + gchar *msg; +}; + +G_DEFINE_TYPE (MesonSubSample, meson_sub_sample, MESON_TYPE_SAMPLE) + +enum { + PROP_0, + PROP_MSG, + LAST_PROP +}; + +static GParamSpec *gParamSpecs [LAST_PROP]; + +/** + * meson_sub_sample_new: + * @msg: The message to set. + * + * Allocates a new #MesonSubSample. + * + * Returns: (transfer full): a #MesonSubSample. + */ +MesonSubSample * +meson_sub_sample_new (const gchar *msg) +{ + g_return_val_if_fail (msg != NULL, NULL); + + return g_object_new (MESON_TYPE_SUB_SAMPLE, + "message", msg, + NULL); +} + +static void +meson_sub_sample_finalize (GObject *object) +{ + MesonSubSample *self = (MesonSubSample *)object; + + g_clear_pointer (&self->msg, g_free); + + G_OBJECT_CLASS (meson_sub_sample_parent_class)->finalize (object); +} + +static void +meson_sub_sample_get_property (GObject *object, + guint prop_id, + GValue *value, + GParamSpec *pspec) +{ + MesonSubSample *self = MESON_SUB_SAMPLE (object); + + switch (prop_id) + { + case PROP_MSG: + g_value_set_string (value, self->msg); + break; + default: + G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); + } +} + +static void +meson_sub_sample_set_property (GObject *object, + guint prop_id, + const GValue *value, + GParamSpec *pspec) +{ + MesonSubSample *self = MESON_SUB_SAMPLE (object); + + switch (prop_id) + { + case PROP_MSG: + self->msg = g_value_dup_string (value); + break; + default: + G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); + } +} + +static void +meson_sub_sample_class_init (MesonSubSampleClass *klass) +{ + GObjectClass *object_class = G_OBJECT_CLASS (klass); + + object_class->finalize = meson_sub_sample_finalize; + object_class->get_property = meson_sub_sample_get_property; + object_class->set_property = meson_sub_sample_set_property; + + gParamSpecs [PROP_MSG] = + g_param_spec_string ("message", + "Message", + "The message to print.", + NULL, + (G_PARAM_READWRITE | + G_PARAM_CONSTRUCT_ONLY | + G_PARAM_STATIC_STRINGS)); + + g_object_class_install_properties (object_class, LAST_PROP, gParamSpecs); +} + +static void +meson_sub_sample_init (MesonSubSample *self) +{ +} + +/** + * meson_sub_sample_print_message: + * @self: a #MesonSubSample. + * + * Prints the message. + * + * Returns: Nothing. + */ +void +meson_sub_sample_print_message (MesonSubSample *self) +{ + g_return_if_fail (MESON_IS_SUB_SAMPLE (self)); + + g_print ("Message: %s\n", self->msg); +} diff --git a/test cases/frameworks/12 multiple gir/gir/meson-subsample.h b/test cases/frameworks/12 multiple gir/gir/meson-subsample.h new file mode 100644 index 0000000..9d34a08 --- /dev/null +++ b/test cases/frameworks/12 multiple gir/gir/meson-subsample.h @@ -0,0 +1,17 @@ +#ifndef MESON_SUB_SAMPLE_H +#define MESON_SUB_SAMPLE_H + +#include <glib-object.h> +#include <meson-sample.h> + +G_BEGIN_DECLS + +#define MESON_TYPE_SUB_SAMPLE (meson_sub_sample_get_type()) + +G_DECLARE_FINAL_TYPE (MesonSubSample, meson_sub_sample, MESON, SUB_SAMPLE, MesonSample) + +MesonSubSample *meson_sub_sample_new (const gchar *msg); + +G_END_DECLS + +#endif /* MESON_SUB_SAMPLE_H */ diff --git a/test cases/frameworks/12 multiple gir/gir/meson.build b/test cases/frameworks/12 multiple gir/gir/meson.build new file mode 100644 index 0000000..5a52c9c --- /dev/null +++ b/test cases/frameworks/12 multiple gir/gir/meson.build @@ -0,0 +1,31 @@ +libsources = ['meson-subsample.c', 'meson-subsample.h'] + +girsubproject = shared_library( + 'girsubproject', + sources : libsources, + dependencies : [gobj, girlib_dep], + install : true +) + +girexe = executable( + 'girprog', + sources : 'prog.c', + dependencies : [gobj, girlib_dep], + link_with : girsubproject +) + +gnome.generate_gir( + girsubproject, + sources : libsources, + nsversion : '1.0', + namespace : 'MesonSub', + symbol_prefix : 'meson_sub_', + identifier_prefix : 'MesonSub', + includes : ['GObject-2.0', meson_gir], + install : true, + install_dir_gir: false, +) + +message('TEST: ' + girsubproject.outdir()) + +test('gobject introspection/subproject/c', girexe) diff --git a/test cases/frameworks/12 multiple gir/gir/prog.c b/test cases/frameworks/12 multiple gir/gir/prog.c new file mode 100644 index 0000000..f25c9d8 --- /dev/null +++ b/test cases/frameworks/12 multiple gir/gir/prog.c @@ -0,0 +1,12 @@ +#include "meson-subsample.h" + +gint +main (gint argc, + gchar *argv[]) +{ + MesonSample * i = (MesonSample*) meson_sub_sample_new ("Hello, sub/meson/c!"); + meson_sample_print_message (i); + g_object_unref (i); + + return 0; +} diff --git a/test cases/frameworks/12 multiple gir/meson.build b/test cases/frameworks/12 multiple gir/meson.build new file mode 100644 index 0000000..6391937 --- /dev/null +++ b/test cases/frameworks/12 multiple gir/meson.build @@ -0,0 +1,12 @@ +project('multiple-gobject-introspection', 'c', meson_version: '>=0.50.0') + +gir = find_program('g-ir-scanner', required: false) +if not gir.found() + error('MESON_SKIP_TEST g-ir-scanner not found.') +endif + +gnome = import('gnome') +gobj = dependency('gobject-2.0') + +subdir('mesongir') +subdir('gir') diff --git a/test cases/frameworks/12 multiple gir/mesongir/meson-sample.c b/test cases/frameworks/12 multiple gir/mesongir/meson-sample.c new file mode 100644 index 0000000..2ed9cdf --- /dev/null +++ b/test cases/frameworks/12 multiple gir/mesongir/meson-sample.c @@ -0,0 +1,126 @@ +#include "meson-sample.h" + +typedef struct _MesonSamplePrivate +{ + gchar *msg; +} MesonSamplePrivate; + + +G_DEFINE_TYPE_WITH_PRIVATE (MesonSample, meson_sample, G_TYPE_OBJECT) + +enum { + PROP_0, + PROP_MSG, + LAST_PROP +}; + +static GParamSpec *gParamSpecs [LAST_PROP]; + +/** + * meson_sample_new: + * @msg: The message to set. + * + * Allocates a new #MesonSample. + * + * Returns: (transfer full): a #MesonSample. + */ +MesonSample * +meson_sample_new (const gchar *msg) +{ + g_return_val_if_fail (msg != NULL, NULL); + + return g_object_new (MESON_TYPE_SAMPLE, + "message", msg, + NULL); +} + +static void +meson_sample_finalize (GObject *object) +{ + MesonSamplePrivate *priv = meson_sample_get_instance_private ((MesonSample *) object); + + g_clear_pointer (&priv->msg, g_free); + + G_OBJECT_CLASS (meson_sample_parent_class)->finalize (object); +} + +static void +meson_sample_get_property (GObject *object, + guint prop_id, + GValue *value, + GParamSpec *pspec) +{ + MesonSamplePrivate *priv = meson_sample_get_instance_private ((MesonSample *) object); + + switch (prop_id) + { + case PROP_MSG: + g_value_set_string (value, priv->msg); + break; + default: + G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); + } +} + +static void +meson_sample_set_property (GObject *object, + guint prop_id, + const GValue *value, + GParamSpec *pspec) +{ + MesonSamplePrivate *priv = meson_sample_get_instance_private ((MesonSample *) object); + + switch (prop_id) + { + case PROP_MSG: + priv->msg = g_value_dup_string (value); + break; + default: + G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); + } +} + +static void +meson_sample_class_init (MesonSampleClass *klass) +{ + GObjectClass *object_class = G_OBJECT_CLASS (klass); + + object_class->finalize = meson_sample_finalize; + object_class->get_property = meson_sample_get_property; + object_class->set_property = meson_sample_set_property; + + gParamSpecs [PROP_MSG] = + g_param_spec_string ("message", + "Message", + "The message to print.", + NULL, + (G_PARAM_READWRITE | + G_PARAM_CONSTRUCT_ONLY | + G_PARAM_STATIC_STRINGS)); + + g_object_class_install_properties (object_class, LAST_PROP, gParamSpecs); +} + +static void +meson_sample_init (MesonSample *self) +{ +} + +/** + * meson_sample_print_message: + * @self: a #MesonSample. + * + * Prints the message. + * + */ +void +meson_sample_print_message (MesonSample *self) +{ + MesonSamplePrivate *priv; + + g_return_if_fail (MESON_IS_SAMPLE (self)); + + priv = meson_sample_get_instance_private (self); + + g_print ("Message: %s\n", priv->msg); +} diff --git a/test cases/frameworks/12 multiple gir/mesongir/meson-sample.h.in b/test cases/frameworks/12 multiple gir/mesongir/meson-sample.h.in new file mode 100644 index 0000000..d0ab29e --- /dev/null +++ b/test cases/frameworks/12 multiple gir/mesongir/meson-sample.h.in @@ -0,0 +1,22 @@ +#ifndef MESON_SAMPLE_H +#define MESON_SAMPLE_H + +#include <@HEADER@> + +G_BEGIN_DECLS + +#define MESON_TYPE_SAMPLE (meson_sample_get_type()) + +G_DECLARE_DERIVABLE_TYPE (MesonSample, meson_sample, MESON, SAMPLE, GObject) + +struct _MesonSampleClass { + GObjectClass parent_class; +}; + + +MesonSample *meson_sample_new (const gchar *msg); +void meson_sample_print_message (MesonSample *self); + +G_END_DECLS + +#endif /* MESON_SAMPLE_H */ diff --git a/test cases/frameworks/12 multiple gir/mesongir/meson.build b/test cases/frameworks/12 multiple gir/mesongir/meson.build new file mode 100644 index 0000000..1ae3f03 --- /dev/null +++ b/test cases/frameworks/12 multiple gir/mesongir/meson.build @@ -0,0 +1,39 @@ +conf = configuration_data() +conf.set('HEADER', 'glib-object.h') + +meson_sample_header = configure_file( + input : 'meson-sample.h.in', + output : 'meson-sample.h', + configuration : conf) + +libsources = ['meson-sample.c', meson_sample_header] + +girlib = shared_library( + 'girlib', + sources : libsources, + dependencies : gobj, + install : true +) + +girtarget = gnome.generate_gir( + girlib, + sources : libsources, + nsversion : '1.0', + namespace : 'Meson', + symbol_prefix : 'meson_', + identifier_prefix : 'Meson', + includes : ['GObject-2.0'], + export_packages : 'meson', + install : true, + install_gir: false, +) +meson_gir = girtarget[0] +meson_typelib = girtarget[1] + +girlib_inc = include_directories('.') +girlib_dep = declare_dependency(link_with : girlib, + include_directories : [girlib_inc], + dependencies : [gobj], + # Everything that uses libgst needs this built to compile + sources : girtarget, +) diff --git a/test cases/frameworks/12 multiple gir/test.json b/test cases/frameworks/12 multiple gir/test.json new file mode 100644 index 0000000..e59c3e6 --- /dev/null +++ b/test cases/frameworks/12 multiple gir/test.json @@ -0,0 +1,17 @@ +{ + "installed": [ + {"type": "file", "file": "usr/lib/girepository-1.0/Meson-1.0.typelib"}, + {"type": "file", "file": "usr/lib/girepository-1.0/MesonSub-1.0.typelib"}, + {"type": "expr", "file": "usr/lib/?libgirlib.so"}, + {"type": "file", "platform": "cygwin", "file": "usr/lib/libgirlib.dll.a"}, + {"type": "expr", "file": "usr/lib/?libgirsubproject.so"}, + {"type": "file", "platform": "cygwin", "file": "usr/lib/libgirsubproject.dll.a"} + ], + "skip_on_jobname": ["azure", "macos", "msys2"], + "stdout": [ + { + "comment": "This will either match in the future-deprecated notice summary, or match the warning summary", + "line": " * 0.61.0: {'\"gnome.generate_gir\" keyword argument \"install_dir_gir\" value \"False\"'}" + } + ] +} diff --git a/test cases/frameworks/13 yelp/help/C/index.page b/test cases/frameworks/13 yelp/help/C/index.page new file mode 100644 index 0000000..1b367e6 --- /dev/null +++ b/test cases/frameworks/13 yelp/help/C/index.page @@ -0,0 +1,8 @@ +<page xmlns="http://projectmallard.org/1.0/" + xmlns:its="http://www.w3.org/2005/11/its" + type="guide" + id="index"> + <title> + Hello! + </title> +</page> diff --git a/test cases/frameworks/13 yelp/help/C/index2.page b/test cases/frameworks/13 yelp/help/C/index2.page new file mode 100644 index 0000000..14b6b51 --- /dev/null +++ b/test cases/frameworks/13 yelp/help/C/index2.page @@ -0,0 +1,8 @@ +<page xmlns="http://projectmallard.org/1.0/" + xmlns:its="http://www.w3.org/2005/11/its" + type="guide" + id="index2"> + <title> + Hello! + </title> +</page> diff --git a/test cases/frameworks/13 yelp/help/C/index3.page b/test cases/frameworks/13 yelp/help/C/index3.page new file mode 100644 index 0000000..c0c21c1 --- /dev/null +++ b/test cases/frameworks/13 yelp/help/C/index3.page @@ -0,0 +1,8 @@ +<page xmlns="http://projectmallard.org/1.0/" + xmlns:its="http://www.w3.org/2005/11/its" + type="guide" + id="index3"> + <title> + Hello! + </title> +</page> diff --git a/test cases/frameworks/13 yelp/help/C/media/test.txt b/test cases/frameworks/13 yelp/help/C/media/test.txt new file mode 100644 index 0000000..ce01362 --- /dev/null +++ b/test cases/frameworks/13 yelp/help/C/media/test.txt @@ -0,0 +1 @@ +hello diff --git a/test cases/frameworks/13 yelp/help/LINGUAS b/test cases/frameworks/13 yelp/help/LINGUAS new file mode 100644 index 0000000..173f978 --- /dev/null +++ b/test cases/frameworks/13 yelp/help/LINGUAS @@ -0,0 +1,2 @@ +de +es diff --git a/test cases/frameworks/13 yelp/help/de/de.po b/test cases/frameworks/13 yelp/help/de/de.po new file mode 100644 index 0000000..a54ce7f --- /dev/null +++ b/test cases/frameworks/13 yelp/help/de/de.po @@ -0,0 +1,13 @@ +msgid "" +msgstr "" +"Project-Id-Version: meson master\n" +"Language: de\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#. (itstool) path: page/title +#: C/index.page:5 +msgid "Hello!" +msgstr "Hallo!" diff --git a/test cases/frameworks/13 yelp/help/es/es.po b/test cases/frameworks/13 yelp/help/es/es.po new file mode 100644 index 0000000..b69ce7f --- /dev/null +++ b/test cases/frameworks/13 yelp/help/es/es.po @@ -0,0 +1,13 @@ +msgid "" +msgstr "" +"Project-Id-Version: meson master\n" +"Language: es\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#. (itstool) path: page/title +#: C/index.page:5 +msgid "Hello!" +msgstr "¡Hola!" diff --git a/test cases/frameworks/13 yelp/help/es/media/test.txt b/test cases/frameworks/13 yelp/help/es/media/test.txt new file mode 100644 index 0000000..3453b00 --- /dev/null +++ b/test cases/frameworks/13 yelp/help/es/media/test.txt @@ -0,0 +1 @@ +Hola. diff --git a/test cases/frameworks/13 yelp/help/meson.build b/test cases/frameworks/13 yelp/help/meson.build new file mode 100644 index 0000000..d6dbe10 --- /dev/null +++ b/test cases/frameworks/13 yelp/help/meson.build @@ -0,0 +1,21 @@ +gnome = import('gnome') + +gnome.yelp('meson', + sources: 'index.page', + media: 'media/test.txt', + symlink_media: false, + languages: ['de', 'es'], +) + +gnome.yelp('meson-symlink', + sources: 'index2.page', + media: 'media/test.txt', + symlink_media: true, + languages: ['de', 'es'], +) + +gnome.yelp('meson-linguas', + sources: 'index3.page', + media: 'media/test.txt', + symlink_media: false, +) diff --git a/test cases/frameworks/13 yelp/meson.build b/test cases/frameworks/13 yelp/meson.build new file mode 100644 index 0000000..9fdde25 --- /dev/null +++ b/test cases/frameworks/13 yelp/meson.build @@ -0,0 +1,8 @@ +project('yelp', 'c') + +itstool = find_program('itstool', required: false) +if not itstool.found() + error('MESON_SKIP_TEST itstool not found.') +endif + +subdir('help') diff --git a/test cases/frameworks/13 yelp/test.json b/test cases/frameworks/13 yelp/test.json new file mode 100644 index 0000000..22e34d2 --- /dev/null +++ b/test cases/frameworks/13 yelp/test.json @@ -0,0 +1,23 @@ +{ + "installed": [ + {"type": "file", "file": "usr/share/help/C/meson/index.page"}, + {"type": "file", "file": "usr/share/help/C/meson/media/test.txt"}, + {"type": "file", "file": "usr/share/help/es/meson/index.page"}, + {"type": "file", "file": "usr/share/help/es/meson/media/test.txt"}, + {"type": "file", "file": "usr/share/help/de/meson/index.page"}, + {"type": "file", "file": "usr/share/help/de/meson/media/test.txt"}, + {"type": "file", "file": "usr/share/help/C/meson-symlink/index2.page"}, + {"type": "file", "file": "usr/share/help/C/meson-symlink/media/test.txt"}, + {"type": "file", "file": "usr/share/help/es/meson-symlink/index2.page"}, + {"type": "file", "file": "usr/share/help/es/meson-symlink/media/test.txt"}, + {"type": "file", "file": "usr/share/help/de/meson-symlink/index2.page"}, + {"type": "file", "file": "usr/share/help/de/meson-symlink/media/test.txt"}, + {"type": "file", "file": "usr/share/help/C/meson-linguas/index3.page"}, + {"type": "file", "file": "usr/share/help/C/meson-linguas/media/test.txt"}, + {"type": "file", "file": "usr/share/help/es/meson-linguas/index3.page"}, + {"type": "file", "file": "usr/share/help/es/meson-linguas/media/test.txt"}, + {"type": "file", "file": "usr/share/help/de/meson-linguas/index3.page"}, + {"type": "file", "file": "usr/share/help/de/meson-linguas/media/test.txt"} + ], + "skip_on_jobname": ["azure", "cygwin", "macos", "msys2"] +} diff --git a/test cases/frameworks/14 doxygen/doc/Doxyfile.in b/test cases/frameworks/14 doxygen/doc/Doxyfile.in new file mode 100644 index 0000000..69fb4aa --- /dev/null +++ b/test cases/frameworks/14 doxygen/doc/Doxyfile.in @@ -0,0 +1,2473 @@ +# Doxyfile 1.8.13 + +# This file describes the settings to be used by the documentation system +# doxygen (www.doxygen.org) for a project. +# +# All text after a double hash (##) is considered a comment and is placed in +# front of the TAG it is preceding. +# +# All text after a single hash (#) is considered a comment and will be ignored. +# The format is: +# TAG = value [value, ...] +# For lists, items can also be appended using: +# TAG += value [value, ...] +# Values that contain spaces should be placed between quotes (\" \"). + +#--------------------------------------------------------------------------- +# Project related configuration options +#--------------------------------------------------------------------------- + +# This tag specifies the encoding used for all characters in the config file +# that follow. The default is UTF-8 which is also the encoding used for all text +# before the first occurrence of this tag. Doxygen uses libiconv (or the iconv +# built into libc) for the transcoding. See http://www.gnu.org/software/libiconv +# for the list of possible encodings. +# The default value is: UTF-8. + +DOXYFILE_ENCODING = UTF-8 + +# The PROJECT_NAME tag is a single word (or a sequence of words surrounded by +# double-quotes, unless you are using Doxywizard) that should identify the +# project for which the documentation is generated. This name is used in the +# title of most generated pages and in a few other places. +# The default value is: My Project. + +PROJECT_NAME = "The Vast Comedian Project" + +# The PROJECT_NUMBER tag can be used to enter a project or revision number. This +# could be handy for archiving the generated documentation or if some version +# control system is used. + +PROJECT_NUMBER = @VERSION@ + +# Using the PROJECT_BRIEF tag one can provide an optional one line description +# for a project that appears at the top of each page and should give viewer a +# quick idea about the purpose of the project. Keep the description short. + +PROJECT_BRIEF = Comedy generator + +# With the PROJECT_LOGO tag one can specify a logo or an icon that is included +# in the documentation. The maximum height of the logo should not exceed 55 +# pixels and the maximum width should not exceed 200 pixels. Doxygen will copy +# the logo to the output directory. + +PROJECT_LOGO = + +# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) path +# into which the generated documentation will be written. If a relative path is +# entered, it will be relative to the location where doxygen was started. If +# left blank the current directory will be used. + +OUTPUT_DIRECTORY = doc + +# If the CREATE_SUBDIRS tag is set to YES then doxygen will create 4096 sub- +# directories (in 2 levels) under the output directory of each output format and +# will distribute the generated files over these directories. Enabling this +# option can be useful when feeding doxygen a huge amount of source files, where +# putting all generated files in the same directory would otherwise causes +# performance problems for the file system. +# The default value is: NO. + +CREATE_SUBDIRS = NO + +# If the ALLOW_UNICODE_NAMES tag is set to YES, doxygen will allow non-ASCII +# characters to appear in the names of generated files. If set to NO, non-ASCII +# characters will be escaped, for example _xE3_x81_x84 will be used for Unicode +# U+3044. +# The default value is: NO. + +ALLOW_UNICODE_NAMES = YES + +# The OUTPUT_LANGUAGE tag is used to specify the language in which all +# documentation generated by doxygen is written. Doxygen will use this +# information to generate all constant output in the proper language. +# Possible values are: Afrikaans, Arabic, Armenian, Brazilian, Catalan, Chinese, +# Chinese-Traditional, Croatian, Czech, Danish, Dutch, English (United States), +# Esperanto, Farsi (Persian), Finnish, French, German, Greek, Hungarian, +# Indonesian, Italian, Japanese, Japanese-en (Japanese with English messages), +# Korean, Korean-en (Korean with English messages), Latvian, Lithuanian, +# Macedonian, Norwegian, Persian (Farsi), Polish, Portuguese, Romanian, Russian, +# Serbian, Serbian-Cyrillic, Slovak, Slovene, Spanish, Swedish, Turkish, +# Ukrainian and Vietnamese. +# The default value is: English. + +OUTPUT_LANGUAGE = English + +# If the BRIEF_MEMBER_DESC tag is set to YES, doxygen will include brief member +# descriptions after the members that are listed in the file and class +# documentation (similar to Javadoc). Set to NO to disable this. +# The default value is: YES. + +BRIEF_MEMBER_DESC = YES + +# If the REPEAT_BRIEF tag is set to YES, doxygen will prepend the brief +# description of a member or function before the detailed description +# +# Note: If both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the +# brief descriptions will be completely suppressed. +# The default value is: YES. + +REPEAT_BRIEF = YES + +# This tag implements a quasi-intelligent brief description abbreviator that is +# used to form the text in various listings. Each string in this list, if found +# as the leading text of the brief description, will be stripped from the text +# and the result, after processing the whole list, is used as the annotated +# text. Otherwise, the brief description is used as-is. If left blank, the +# following values are used ($name is automatically replaced with the name of +# the entity):The $name class, The $name widget, The $name file, is, provides, +# specifies, contains, represents, a, an and the. + +ABBREVIATE_BRIEF = "The $name class" \ + "The $name widget" \ + "The $name file" \ + is \ + provides \ + specifies \ + contains \ + represents \ + a \ + an \ + the + +# If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then +# doxygen will generate a detailed section even if there is only a brief +# description. +# The default value is: NO. + +ALWAYS_DETAILED_SEC = NO + +# If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all +# inherited members of a class in the documentation of that class as if those +# members were ordinary class members. Constructors, destructors and assignment +# operators of the base classes will not be shown. +# The default value is: NO. + +INLINE_INHERITED_MEMB = NO + +# If the FULL_PATH_NAMES tag is set to YES, doxygen will prepend the full path +# before files name in the file list and in the header files. If set to NO the +# shortest path that makes the file name unique will be used +# The default value is: YES. + +FULL_PATH_NAMES = YES + +# The STRIP_FROM_PATH tag can be used to strip a user-defined part of the path. +# Stripping is only done if one of the specified strings matches the left-hand +# part of the path. The tag can be used to show relative paths in the file list. +# If left blank the directory from which doxygen is run is used as the path to +# strip. +# +# Note that you can specify absolute paths here, but also relative paths, which +# will be relative from the directory where doxygen is started. +# This tag requires that the tag FULL_PATH_NAMES is set to YES. + +STRIP_FROM_PATH = + +# The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of the +# path mentioned in the documentation of a class, which tells the reader which +# header file to include in order to use a class. If left blank only the name of +# the header file containing the class definition is used. Otherwise one should +# specify the list of include paths that are normally passed to the compiler +# using the -I flag. + +STRIP_FROM_INC_PATH = + +# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter (but +# less readable) file names. This can be useful is your file systems doesn't +# support long names like on DOS, Mac, or CD-ROM. +# The default value is: NO. + +SHORT_NAMES = NO + +# If the JAVADOC_AUTOBRIEF tag is set to YES then doxygen will interpret the +# first line (until the first dot) of a Javadoc-style comment as the brief +# description. If set to NO, the Javadoc-style will behave just like regular Qt- +# style comments (thus requiring an explicit @brief command for a brief +# description.) +# The default value is: NO. + +JAVADOC_AUTOBRIEF = NO + +# If the QT_AUTOBRIEF tag is set to YES then doxygen will interpret the first +# line (until the first dot) of a Qt-style comment as the brief description. If +# set to NO, the Qt-style will behave just like regular Qt-style comments (thus +# requiring an explicit \brief command for a brief description.) +# The default value is: NO. + +QT_AUTOBRIEF = NO + +# The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make doxygen treat a +# multi-line C++ special comment block (i.e. a block of //! or /// comments) as +# a brief description. This used to be the default behavior. The new default is +# to treat a multi-line C++ comment block as a detailed description. Set this +# tag to YES if you prefer the old behavior instead. +# +# Note that setting this tag to YES also means that rational rose comments are +# not recognized any more. +# The default value is: NO. + +MULTILINE_CPP_IS_BRIEF = NO + +# If the INHERIT_DOCS tag is set to YES then an undocumented member inherits the +# documentation from any documented member that it re-implements. +# The default value is: YES. + +INHERIT_DOCS = YES + +# If the SEPARATE_MEMBER_PAGES tag is set to YES then doxygen will produce a new +# page for each member. If set to NO, the documentation of a member will be part +# of the file/class/namespace that contains it. +# The default value is: NO. + +SEPARATE_MEMBER_PAGES = NO + +# The TAB_SIZE tag can be used to set the number of spaces in a tab. Doxygen +# uses this value to replace tabs by spaces in code fragments. +# Minimum value: 1, maximum value: 16, default value: 4. + +TAB_SIZE = 4 + +# This tag can be used to specify a number of aliases that act as commands in +# the documentation. An alias has the form: +# name=value +# For example adding +# "sideeffect=@par Side Effects:\n" +# will allow you to put the command \sideeffect (or @sideeffect) in the +# documentation, which will result in a user-defined paragraph with heading +# "Side Effects:". You can put \n's in the value part of an alias to insert +# newlines. + +ALIASES = + +# This tag can be used to specify a number of word-keyword mappings (TCL only). +# A mapping has the form "name=value". For example adding "class=itcl::class" +# will allow you to use the command class in the itcl::class meaning. + +TCL_SUBST = + +# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C sources +# only. Doxygen will then generate output that is more tailored for C. For +# instance, some of the names that are used will be different. The list of all +# members will be omitted, etc. +# The default value is: NO. + +OPTIMIZE_OUTPUT_FOR_C = NO + +# Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java or +# Python sources only. Doxygen will then generate output that is more tailored +# for that language. For instance, namespaces will be presented as packages, +# qualified scopes will look different, etc. +# The default value is: NO. + +OPTIMIZE_OUTPUT_JAVA = NO + +# Set the OPTIMIZE_FOR_FORTRAN tag to YES if your project consists of Fortran +# sources. Doxygen will then generate output that is tailored for Fortran. +# The default value is: NO. + +OPTIMIZE_FOR_FORTRAN = NO + +# Set the OPTIMIZE_OUTPUT_VHDL tag to YES if your project consists of VHDL +# sources. Doxygen will then generate output that is tailored for VHDL. +# The default value is: NO. + +OPTIMIZE_OUTPUT_VHDL = NO + +# Doxygen selects the parser to use depending on the extension of the files it +# parses. With this tag you can assign which parser to use for a given +# extension. Doxygen has a built-in mapping, but you can override or extend it +# using this tag. The format is ext=language, where ext is a file extension, and +# language is one of the parsers supported by doxygen: IDL, Java, Javascript, +# C#, C, C++, D, PHP, Objective-C, Python, Fortran (fixed format Fortran: +# FortranFixed, free formatted Fortran: FortranFree, unknown formatted Fortran: +# Fortran. In the later case the parser tries to guess whether the code is fixed +# or free formatted code, this is the default for Fortran type files), VHDL. For +# instance to make doxygen treat .inc files as Fortran files (default is PHP), +# and .f files as C (default is Fortran), use: inc=Fortran f=C. +# +# Note: For files without extension you can use no_extension as a placeholder. +# +# Note that for custom extensions you also need to set FILE_PATTERNS otherwise +# the files are not read by doxygen. + +EXTENSION_MAPPING = + +# If the MARKDOWN_SUPPORT tag is enabled then doxygen pre-processes all comments +# according to the Markdown format, which allows for more readable +# documentation. See http://daringfireball.net/projects/markdown/ for details. +# The output of markdown processing is further processed by doxygen, so you can +# mix doxygen, HTML, and XML commands with Markdown formatting. Disable only in +# case of backward compatibilities issues. +# The default value is: YES. + +MARKDOWN_SUPPORT = YES + +# When the TOC_INCLUDE_HEADINGS tag is set to a non-zero value, all headings up +# to that level are automatically included in the table of contents, even if +# they do not have an id attribute. +# Note: This feature currently applies only to Markdown headings. +# Minimum value: 0, maximum value: 99, default value: 0. +# This tag requires that the tag MARKDOWN_SUPPORT is set to YES. + +TOC_INCLUDE_HEADINGS = 0 + +# When enabled doxygen tries to link words that correspond to documented +# classes, or namespaces to their corresponding documentation. Such a link can +# be prevented in individual cases by putting a % sign in front of the word or +# globally by setting AUTOLINK_SUPPORT to NO. +# The default value is: YES. + +AUTOLINK_SUPPORT = YES + +# If you use STL classes (i.e. std::string, std::vector, etc.) but do not want +# to include (a tag file for) the STL sources as input, then you should set this +# tag to YES in order to let doxygen match functions declarations and +# definitions whose arguments contain STL classes (e.g. func(std::string); +# versus func(std::string) {}). This also make the inheritance and collaboration +# diagrams that involve STL classes more complete and accurate. +# The default value is: NO. + +BUILTIN_STL_SUPPORT = NO + +# If you use Microsoft's C++/CLI language, you should set this option to YES to +# enable parsing support. +# The default value is: NO. + +CPP_CLI_SUPPORT = NO + +# Set the SIP_SUPPORT tag to YES if your project consists of sip (see: +# http://www.riverbankcomputing.co.uk/software/sip/intro) sources only. Doxygen +# will parse them like normal C++ but will assume all classes use public instead +# of private inheritance when no explicit protection keyword is present. +# The default value is: NO. + +SIP_SUPPORT = NO + +# For Microsoft's IDL there are propget and propput attributes to indicate +# getter and setter methods for a property. Setting this option to YES will make +# doxygen to replace the get and set methods by a property in the documentation. +# This will only work if the methods are indeed getting or setting a simple +# type. If this is not the case, or you want to show the methods anyway, you +# should set this option to NO. +# The default value is: YES. + +IDL_PROPERTY_SUPPORT = YES + +# If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC +# tag is set to YES then doxygen will reuse the documentation of the first +# member in the group (if any) for the other members of the group. By default +# all members of a group must be documented explicitly. +# The default value is: NO. + +DISTRIBUTE_GROUP_DOC = NO + +# If one adds a struct or class to a group and this option is enabled, then also +# any nested class or struct is added to the same group. By default this option +# is disabled and one has to add nested compounds explicitly via \ingroup. +# The default value is: NO. + +GROUP_NESTED_COMPOUNDS = NO + +# Set the SUBGROUPING tag to YES to allow class member groups of the same type +# (for instance a group of public functions) to be put as a subgroup of that +# type (e.g. under the Public Functions section). Set it to NO to prevent +# subgrouping. Alternatively, this can be done per class using the +# \nosubgrouping command. +# The default value is: YES. + +SUBGROUPING = YES + +# When the INLINE_GROUPED_CLASSES tag is set to YES, classes, structs and unions +# are shown inside the group in which they are included (e.g. using \ingroup) +# instead of on a separate page (for HTML and Man pages) or section (for LaTeX +# and RTF). +# +# Note that this feature does not work in combination with +# SEPARATE_MEMBER_PAGES. +# The default value is: NO. + +INLINE_GROUPED_CLASSES = NO + +# When the INLINE_SIMPLE_STRUCTS tag is set to YES, structs, classes, and unions +# with only public data fields or simple typedef fields will be shown inline in +# the documentation of the scope in which they are defined (i.e. file, +# namespace, or group documentation), provided this scope is documented. If set +# to NO, structs, classes, and unions are shown on a separate page (for HTML and +# Man pages) or section (for LaTeX and RTF). +# The default value is: NO. + +INLINE_SIMPLE_STRUCTS = NO + +# When TYPEDEF_HIDES_STRUCT tag is enabled, a typedef of a struct, union, or +# enum is documented as struct, union, or enum with the name of the typedef. So +# typedef struct TypeS {} TypeT, will appear in the documentation as a struct +# with name TypeT. When disabled the typedef will appear as a member of a file, +# namespace, or class. And the struct will be named TypeS. This can typically be +# useful for C code in case the coding convention dictates that all compound +# types are typedef'ed and only the typedef is referenced, never the tag name. +# The default value is: NO. + +TYPEDEF_HIDES_STRUCT = NO + +# The size of the symbol lookup cache can be set using LOOKUP_CACHE_SIZE. This +# cache is used to resolve symbols given their name and scope. Since this can be +# an expensive process and often the same symbol appears multiple times in the +# code, doxygen keeps a cache of pre-resolved symbols. If the cache is too small +# doxygen will become slower. If the cache is too large, memory is wasted. The +# cache size is given by this formula: 2^(16+LOOKUP_CACHE_SIZE). The valid range +# is 0..9, the default is 0, corresponding to a cache size of 2^16=65536 +# symbols. At the end of a run doxygen will report the cache usage and suggest +# the optimal cache size from a speed point of view. +# Minimum value: 0, maximum value: 9, default value: 0. + +LOOKUP_CACHE_SIZE = 0 + +#--------------------------------------------------------------------------- +# Build related configuration options +#--------------------------------------------------------------------------- + +# If the EXTRACT_ALL tag is set to YES, doxygen will assume all entities in +# documentation are documented, even if no documentation was available. Private +# class members and static file members will be hidden unless the +# EXTRACT_PRIVATE respectively EXTRACT_STATIC tags are set to YES. +# Note: This will also disable the warnings about undocumented members that are +# normally produced when WARNINGS is set to YES. +# The default value is: NO. + +EXTRACT_ALL = NO + +# If the EXTRACT_PRIVATE tag is set to YES, all private members of a class will +# be included in the documentation. +# The default value is: NO. + +EXTRACT_PRIVATE = NO + +# If the EXTRACT_PACKAGE tag is set to YES, all members with package or internal +# scope will be included in the documentation. +# The default value is: NO. + +EXTRACT_PACKAGE = NO + +# If the EXTRACT_STATIC tag is set to YES, all static members of a file will be +# included in the documentation. +# The default value is: NO. + +EXTRACT_STATIC = NO + +# If the EXTRACT_LOCAL_CLASSES tag is set to YES, classes (and structs) defined +# locally in source files will be included in the documentation. If set to NO, +# only classes defined in header files are included. Does not have any effect +# for Java sources. +# The default value is: YES. + +EXTRACT_LOCAL_CLASSES = YES + +# This flag is only useful for Objective-C code. If set to YES, local methods, +# which are defined in the implementation section but not in the interface are +# included in the documentation. If set to NO, only methods in the interface are +# included. +# The default value is: NO. + +EXTRACT_LOCAL_METHODS = NO + +# If this flag is set to YES, the members of anonymous namespaces will be +# extracted and appear in the documentation as a namespace called +# 'anonymous_namespace{file}', where file will be replaced with the base name of +# the file that contains the anonymous namespace. By default anonymous namespace +# are hidden. +# The default value is: NO. + +EXTRACT_ANON_NSPACES = NO + +# If the HIDE_UNDOC_MEMBERS tag is set to YES, doxygen will hide all +# undocumented members inside documented classes or files. If set to NO these +# members will be included in the various overviews, but no documentation +# section is generated. This option has no effect if EXTRACT_ALL is enabled. +# The default value is: NO. + +HIDE_UNDOC_MEMBERS = NO + +# If the HIDE_UNDOC_CLASSES tag is set to YES, doxygen will hide all +# undocumented classes that are normally visible in the class hierarchy. If set +# to NO, these classes will be included in the various overviews. This option +# has no effect if EXTRACT_ALL is enabled. +# The default value is: NO. + +HIDE_UNDOC_CLASSES = NO + +# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, doxygen will hide all friend +# (class|struct|union) declarations. If set to NO, these declarations will be +# included in the documentation. +# The default value is: NO. + +HIDE_FRIEND_COMPOUNDS = NO + +# If the HIDE_IN_BODY_DOCS tag is set to YES, doxygen will hide any +# documentation blocks found inside the body of a function. If set to NO, these +# blocks will be appended to the function's detailed documentation block. +# The default value is: NO. + +HIDE_IN_BODY_DOCS = NO + +# The INTERNAL_DOCS tag determines if documentation that is typed after a +# \internal command is included. If the tag is set to NO then the documentation +# will be excluded. Set it to YES to include the internal documentation. +# The default value is: NO. + +INTERNAL_DOCS = NO + +# If the CASE_SENSE_NAMES tag is set to NO then doxygen will only generate file +# names in lower-case letters. If set to YES, upper-case letters are also +# allowed. This is useful if you have classes or files whose names only differ +# in case and if your file system supports case sensitive file names. Windows +# and Mac users are advised to set this option to NO. +# The default value is: system dependent. + +CASE_SENSE_NAMES = YES + +# If the HIDE_SCOPE_NAMES tag is set to NO then doxygen will show members with +# their full class and namespace scopes in the documentation. If set to YES, the +# scope will be hidden. +# The default value is: NO. + +HIDE_SCOPE_NAMES = NO + +# If the HIDE_COMPOUND_REFERENCE tag is set to NO (default) then doxygen will +# append additional text to a page's title, such as Class Reference. If set to +# YES the compound reference will be hidden. +# The default value is: NO. + +HIDE_COMPOUND_REFERENCE= NO + +# If the SHOW_INCLUDE_FILES tag is set to YES then doxygen will put a list of +# the files that are included by a file in the documentation of that file. +# The default value is: YES. + +SHOW_INCLUDE_FILES = YES + +# If the SHOW_GROUPED_MEMB_INC tag is set to YES then Doxygen will add for each +# grouped member an include statement to the documentation, telling the reader +# which file to include in order to use the member. +# The default value is: NO. + +SHOW_GROUPED_MEMB_INC = NO + +# If the FORCE_LOCAL_INCLUDES tag is set to YES then doxygen will list include +# files with double quotes in the documentation rather than with sharp brackets. +# The default value is: NO. + +FORCE_LOCAL_INCLUDES = NO + +# If the INLINE_INFO tag is set to YES then a tag [inline] is inserted in the +# documentation for inline members. +# The default value is: YES. + +INLINE_INFO = YES + +# If the SORT_MEMBER_DOCS tag is set to YES then doxygen will sort the +# (detailed) documentation of file and class members alphabetically by member +# name. If set to NO, the members will appear in declaration order. +# The default value is: YES. + +SORT_MEMBER_DOCS = YES + +# If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the brief +# descriptions of file, namespace and class members alphabetically by member +# name. If set to NO, the members will appear in declaration order. Note that +# this will also influence the order of the classes in the class list. +# The default value is: NO. + +SORT_BRIEF_DOCS = NO + +# If the SORT_MEMBERS_CTORS_1ST tag is set to YES then doxygen will sort the +# (brief and detailed) documentation of class members so that constructors and +# destructors are listed first. If set to NO the constructors will appear in the +# respective orders defined by SORT_BRIEF_DOCS and SORT_MEMBER_DOCS. +# Note: If SORT_BRIEF_DOCS is set to NO this option is ignored for sorting brief +# member documentation. +# Note: If SORT_MEMBER_DOCS is set to NO this option is ignored for sorting +# detailed member documentation. +# The default value is: NO. + +SORT_MEMBERS_CTORS_1ST = NO + +# If the SORT_GROUP_NAMES tag is set to YES then doxygen will sort the hierarchy +# of group names into alphabetical order. If set to NO the group names will +# appear in their defined order. +# The default value is: NO. + +SORT_GROUP_NAMES = NO + +# If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be sorted by +# fully-qualified names, including namespaces. If set to NO, the class list will +# be sorted only by class name, not including the namespace part. +# Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES. +# Note: This option applies only to the class list, not to the alphabetical +# list. +# The default value is: NO. + +SORT_BY_SCOPE_NAME = NO + +# If the STRICT_PROTO_MATCHING option is enabled and doxygen fails to do proper +# type resolution of all parameters of a function it will reject a match between +# the prototype and the implementation of a member function even if there is +# only one candidate or it is obvious which candidate to choose by doing a +# simple string match. By disabling STRICT_PROTO_MATCHING doxygen will still +# accept a match between prototype and implementation in such cases. +# The default value is: NO. + +STRICT_PROTO_MATCHING = NO + +# The GENERATE_TODOLIST tag can be used to enable (YES) or disable (NO) the todo +# list. This list is created by putting \todo commands in the documentation. +# The default value is: YES. + +GENERATE_TODOLIST = YES + +# The GENERATE_TESTLIST tag can be used to enable (YES) or disable (NO) the test +# list. This list is created by putting \test commands in the documentation. +# The default value is: YES. + +GENERATE_TESTLIST = YES + +# The GENERATE_BUGLIST tag can be used to enable (YES) or disable (NO) the bug +# list. This list is created by putting \bug commands in the documentation. +# The default value is: YES. + +GENERATE_BUGLIST = YES + +# The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or disable (NO) +# the deprecated list. This list is created by putting \deprecated commands in +# the documentation. +# The default value is: YES. + +GENERATE_DEPRECATEDLIST= YES + +# The ENABLED_SECTIONS tag can be used to enable conditional documentation +# sections, marked by \if <section_label> ... \endif and \cond <section_label> +# ... \endcond blocks. + +ENABLED_SECTIONS = + +# The MAX_INITIALIZER_LINES tag determines the maximum number of lines that the +# initial value of a variable or macro / define can have for it to appear in the +# documentation. If the initializer consists of more lines than specified here +# it will be hidden. Use a value of 0 to hide initializers completely. The +# appearance of the value of individual variables and macros / defines can be +# controlled using \showinitializer or \hideinitializer command in the +# documentation regardless of this setting. +# Minimum value: 0, maximum value: 10000, default value: 30. + +MAX_INITIALIZER_LINES = 30 + +# Set the SHOW_USED_FILES tag to NO to disable the list of files generated at +# the bottom of the documentation of classes and structs. If set to YES, the +# list will mention the files that were used to generate the documentation. +# The default value is: YES. + +SHOW_USED_FILES = YES + +# Set the SHOW_FILES tag to NO to disable the generation of the Files page. This +# will remove the Files entry from the Quick Index and from the Folder Tree View +# (if specified). +# The default value is: YES. + +SHOW_FILES = YES + +# Set the SHOW_NAMESPACES tag to NO to disable the generation of the Namespaces +# page. This will remove the Namespaces entry from the Quick Index and from the +# Folder Tree View (if specified). +# The default value is: YES. + +SHOW_NAMESPACES = YES + +# The FILE_VERSION_FILTER tag can be used to specify a program or script that +# doxygen should invoke to get the current version for each file (typically from +# the version control system). Doxygen will invoke the program by executing (via +# popen()) the command command input-file, where command is the value of the +# FILE_VERSION_FILTER tag, and input-file is the name of an input file provided +# by doxygen. Whatever the program writes to standard output is used as the file +# version. For an example see the documentation. + +FILE_VERSION_FILTER = + +# The LAYOUT_FILE tag can be used to specify a layout file which will be parsed +# by doxygen. The layout file controls the global structure of the generated +# output files in an output format independent way. To create the layout file +# that represents doxygen's defaults, run doxygen with the -l option. You can +# optionally specify a file name after the option, if omitted DoxygenLayout.xml +# will be used as the name of the layout file. +# +# Note that if you run doxygen from a directory containing a file called +# DoxygenLayout.xml, doxygen will parse it automatically even if the LAYOUT_FILE +# tag is left empty. + +LAYOUT_FILE = + +# The CITE_BIB_FILES tag can be used to specify one or more bib files containing +# the reference definitions. This must be a list of .bib files. The .bib +# extension is automatically appended if omitted. This requires the bibtex tool +# to be installed. See also http://en.wikipedia.org/wiki/BibTeX for more info. +# For LaTeX the style of the bibliography can be controlled using +# LATEX_BIB_STYLE. To use this feature you need bibtex and perl available in the +# search path. See also \cite for info how to create references. + +CITE_BIB_FILES = + +#--------------------------------------------------------------------------- +# Configuration options related to warning and progress messages +#--------------------------------------------------------------------------- + +# The QUIET tag can be used to turn on/off the messages that are generated to +# standard output by doxygen. If QUIET is set to YES this implies that the +# messages are off. +# The default value is: NO. + +QUIET = NO + +# The WARNINGS tag can be used to turn on/off the warning messages that are +# generated to standard error (stderr) by doxygen. If WARNINGS is set to YES +# this implies that the warnings are on. +# +# Tip: Turn warnings on while writing the documentation. +# The default value is: YES. + +WARNINGS = YES + +# If the WARN_IF_UNDOCUMENTED tag is set to YES then doxygen will generate +# warnings for undocumented members. If EXTRACT_ALL is set to YES then this flag +# will automatically be disabled. +# The default value is: YES. + +WARN_IF_UNDOCUMENTED = YES + +# If the WARN_IF_DOC_ERROR tag is set to YES, doxygen will generate warnings for +# potential errors in the documentation, such as not documenting some parameters +# in a documented function, or documenting parameters that don't exist or using +# markup commands wrongly. +# The default value is: YES. + +WARN_IF_DOC_ERROR = YES + +# This WARN_NO_PARAMDOC option can be enabled to get warnings for functions that +# are documented, but have no documentation for their parameters or return +# value. If set to NO, doxygen will only warn about wrong or incomplete +# parameter documentation, but not about the absence of documentation. +# The default value is: NO. + +WARN_NO_PARAMDOC = NO + +# If the WARN_AS_ERROR tag is set to YES then doxygen will immediately stop when +# a warning is encountered. +# The default value is: NO. + +WARN_AS_ERROR = NO + +# The WARN_FORMAT tag determines the format of the warning messages that doxygen +# can produce. The string should contain the $file, $line, and $text tags, which +# will be replaced by the file and line number from which the warning originated +# and the warning text. Optionally the format may contain $version, which will +# be replaced by the version of the file (if it could be obtained via +# FILE_VERSION_FILTER) +# The default value is: $file:$line: $text. + +WARN_FORMAT = "$file:$line: $text" + +# The WARN_LOGFILE tag can be used to specify a file to which warning and error +# messages should be written. If left blank the output is written to standard +# error (stderr). + +WARN_LOGFILE = + +#--------------------------------------------------------------------------- +# Configuration options related to the input files +#--------------------------------------------------------------------------- + +# The INPUT tag is used to specify the files and/or directories that contain +# documented source files. You may enter file names like myfile.cpp or +# directories like /usr/src/myproject. Separate the files or directories with +# spaces. See also FILE_PATTERNS and EXTENSION_MAPPING +# Note: If this tag is empty the current directory is searched. + +INPUT = "@TOP_SRCDIR@/include" "@TOP_SRCDIR@/src" + +# This tag can be used to specify the character encoding of the source files +# that doxygen parses. Internally doxygen uses the UTF-8 encoding. Doxygen uses +# libiconv (or the iconv built into libc) for the transcoding. See the libiconv +# documentation (see: http://www.gnu.org/software/libiconv) for the list of +# possible encodings. +# The default value is: UTF-8. + +INPUT_ENCODING = UTF-8 + +# If the value of the INPUT tag contains directories, you can use the +# FILE_PATTERNS tag to specify one or more wildcard patterns (like *.cpp and +# *.h) to filter out the source-files in the directories. +# +# Note that for custom extensions or not directly supported extensions you also +# need to set EXTENSION_MAPPING for the extension otherwise the files are not +# read by doxygen. +# +# If left blank the following patterns are tested:*.c, *.cc, *.cxx, *.cpp, +# *.c++, *.java, *.ii, *.ixx, *.ipp, *.i++, *.inl, *.idl, *.ddl, *.odl, *.h, +# *.hh, *.hxx, *.hpp, *.h++, *.cs, *.d, *.php, *.php4, *.php5, *.phtml, *.inc, +# *.m, *.markdown, *.md, *.mm, *.dox, *.py, *.pyw, *.f90, *.f95, *.f03, *.f08, +# *.f, *.for, *.tcl, *.vhd, *.vhdl, *.ucf and *.qsf. + +FILE_PATTERNS = *.c \ + *.cc \ + *.cxx \ + *.cpp \ + *.c++ \ + *.java \ + *.ii \ + *.ixx \ + *.ipp \ + *.i++ \ + *.inl \ + *.idl \ + *.ddl \ + *.odl \ + *.h \ + *.hh \ + *.hxx \ + *.hpp \ + *.h++ \ + *.cs \ + *.d \ + *.php \ + *.php4 \ + *.php5 \ + *.phtml \ + *.inc \ + *.m \ + *.markdown \ + *.md \ + *.mm \ + *.dox \ + *.py \ + *.pyw \ + *.f90 \ + *.f95 \ + *.f03 \ + *.f08 \ + *.f \ + *.for \ + *.tcl \ + *.vhd \ + *.vhdl \ + *.ucf \ + *.qsf + +# The RECURSIVE tag can be used to specify whether or not subdirectories should +# be searched for input files as well. +# The default value is: NO. + +RECURSIVE = NO + +# The EXCLUDE tag can be used to specify files and/or directories that should be +# excluded from the INPUT source files. This way you can easily exclude a +# subdirectory from a directory tree whose root is specified with the INPUT tag. +# +# Note that relative paths are relative to the directory from which doxygen is +# run. + +EXCLUDE = + +# The EXCLUDE_SYMLINKS tag can be used to select whether or not files or +# directories that are symbolic links (a Unix file system feature) are excluded +# from the input. +# The default value is: NO. + +EXCLUDE_SYMLINKS = NO + +# If the value of the INPUT tag contains directories, you can use the +# EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude +# certain files from those directories. +# +# Note that the wildcards are matched against the file with absolute path, so to +# exclude all test directories for example use the pattern */test/* + +EXCLUDE_PATTERNS = + +# The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names +# (namespaces, classes, functions, etc.) that should be excluded from the +# output. The symbol name can be a fully qualified name, a word, or if the +# wildcard * is used, a substring. Examples: ANamespace, AClass, +# AClass::ANamespace, ANamespace::*Test +# +# Note that the wildcards are matched against the file with absolute path, so to +# exclude all test directories use the pattern */test/* + +EXCLUDE_SYMBOLS = + +# The EXAMPLE_PATH tag can be used to specify one or more files or directories +# that contain example code fragments that are included (see the \include +# command). + +EXAMPLE_PATH = + +# If the value of the EXAMPLE_PATH tag contains directories, you can use the +# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp and +# *.h) to filter out the source-files in the directories. If left blank all +# files are included. + +EXAMPLE_PATTERNS = * + +# If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be +# searched for input files to be used with the \include or \dontinclude commands +# irrespective of the value of the RECURSIVE tag. +# The default value is: NO. + +EXAMPLE_RECURSIVE = NO + +# The IMAGE_PATH tag can be used to specify one or more files or directories +# that contain images that are to be included in the documentation (see the +# \image command). + +IMAGE_PATH = + +# The INPUT_FILTER tag can be used to specify a program that doxygen should +# invoke to filter for each input file. Doxygen will invoke the filter program +# by executing (via popen()) the command: +# +# <filter> <input-file> +# +# where <filter> is the value of the INPUT_FILTER tag, and <input-file> is the +# name of an input file. Doxygen will then use the output that the filter +# program writes to standard output. If FILTER_PATTERNS is specified, this tag +# will be ignored. +# +# Note that the filter must not add or remove lines; it is applied before the +# code is scanned, but not when the output code is generated. If lines are added +# or removed, the anchors will not be placed correctly. +# +# Note that for custom extensions or not directly supported extensions you also +# need to set EXTENSION_MAPPING for the extension otherwise the files are not +# properly processed by doxygen. + +INPUT_FILTER = + +# The FILTER_PATTERNS tag can be used to specify filters on a per file pattern +# basis. Doxygen will compare the file name with each pattern and apply the +# filter if there is a match. The filters are a list of the form: pattern=filter +# (like *.cpp=my_cpp_filter). See INPUT_FILTER for further information on how +# filters are used. If the FILTER_PATTERNS tag is empty or if none of the +# patterns match the file name, INPUT_FILTER is applied. +# +# Note that for custom extensions or not directly supported extensions you also +# need to set EXTENSION_MAPPING for the extension otherwise the files are not +# properly processed by doxygen. + +FILTER_PATTERNS = + +# If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using +# INPUT_FILTER) will also be used to filter the input files that are used for +# producing the source files to browse (i.e. when SOURCE_BROWSER is set to YES). +# The default value is: NO. + +FILTER_SOURCE_FILES = NO + +# The FILTER_SOURCE_PATTERNS tag can be used to specify source filters per file +# pattern. A pattern will override the setting for FILTER_PATTERN (if any) and +# it is also possible to disable source filtering for a specific pattern using +# *.ext= (so without naming a filter). +# This tag requires that the tag FILTER_SOURCE_FILES is set to YES. + +FILTER_SOURCE_PATTERNS = + +# If the USE_MDFILE_AS_MAINPAGE tag refers to the name of a markdown file that +# is part of the input, its contents will be placed on the main page +# (index.html). This can be useful if you have a project on for instance GitHub +# and want to reuse the introduction page also for the doxygen output. + +USE_MDFILE_AS_MAINPAGE = + +#--------------------------------------------------------------------------- +# Configuration options related to source browsing +#--------------------------------------------------------------------------- + +# If the SOURCE_BROWSER tag is set to YES then a list of source files will be +# generated. Documented entities will be cross-referenced with these sources. +# +# Note: To get rid of all source code in the generated output, make sure that +# also VERBATIM_HEADERS is set to NO. +# The default value is: NO. + +SOURCE_BROWSER = NO + +# Setting the INLINE_SOURCES tag to YES will include the body of functions, +# classes and enums directly into the documentation. +# The default value is: NO. + +INLINE_SOURCES = NO + +# Setting the STRIP_CODE_COMMENTS tag to YES will instruct doxygen to hide any +# special comment blocks from generated source code fragments. Normal C, C++ and +# Fortran comments will always remain visible. +# The default value is: YES. + +STRIP_CODE_COMMENTS = YES + +# If the REFERENCED_BY_RELATION tag is set to YES then for each documented +# function all documented functions referencing it will be listed. +# The default value is: NO. + +REFERENCED_BY_RELATION = NO + +# If the REFERENCES_RELATION tag is set to YES then for each documented function +# all documented entities called/used by that function will be listed. +# The default value is: NO. + +REFERENCES_RELATION = NO + +# If the REFERENCES_LINK_SOURCE tag is set to YES and SOURCE_BROWSER tag is set +# to YES then the hyperlinks from functions in REFERENCES_RELATION and +# REFERENCED_BY_RELATION lists will link to the source code. Otherwise they will +# link to the documentation. +# The default value is: YES. + +REFERENCES_LINK_SOURCE = YES + +# If SOURCE_TOOLTIPS is enabled (the default) then hovering a hyperlink in the +# source code will show a tooltip with additional information such as prototype, +# brief description and links to the definition and documentation. Since this +# will make the HTML file larger and loading of large files a bit slower, you +# can opt to disable this feature. +# The default value is: YES. +# This tag requires that the tag SOURCE_BROWSER is set to YES. + +SOURCE_TOOLTIPS = YES + +# If the USE_HTAGS tag is set to YES then the references to source code will +# point to the HTML generated by the htags(1) tool instead of doxygen built-in +# source browser. The htags tool is part of GNU's global source tagging system +# (see http://www.gnu.org/software/global/global.html). You will need version +# 4.8.6 or higher. +# +# To use it do the following: +# - Install the latest version of global +# - Enable SOURCE_BROWSER and USE_HTAGS in the config file +# - Make sure the INPUT points to the root of the source tree +# - Run doxygen as normal +# +# Doxygen will invoke htags (and that will in turn invoke gtags), so these +# tools must be available from the command line (i.e. in the search path). +# +# The result: instead of the source browser generated by doxygen, the links to +# source code will now point to the output of htags. +# The default value is: NO. +# This tag requires that the tag SOURCE_BROWSER is set to YES. + +USE_HTAGS = NO + +# If the VERBATIM_HEADERS tag is set the YES then doxygen will generate a +# verbatim copy of the header file for each class for which an include is +# specified. Set to NO to disable this. +# See also: Section \class. +# The default value is: YES. + +VERBATIM_HEADERS = YES + +#--------------------------------------------------------------------------- +# Configuration options related to the alphabetical class index +#--------------------------------------------------------------------------- + +# If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index of all +# compounds will be generated. Enable this if the project contains a lot of +# classes, structs, unions or interfaces. +# The default value is: YES. + +ALPHABETICAL_INDEX = YES + +# The COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns in +# which the alphabetical index list will be split. +# Minimum value: 1, maximum value: 20, default value: 5. +# This tag requires that the tag ALPHABETICAL_INDEX is set to YES. + +COLS_IN_ALPHA_INDEX = 5 + +# In case all classes in a project start with a common prefix, all classes will +# be put under the same header in the alphabetical index. The IGNORE_PREFIX tag +# can be used to specify a prefix (or a list of prefixes) that should be ignored +# while generating the index headers. +# This tag requires that the tag ALPHABETICAL_INDEX is set to YES. + +IGNORE_PREFIX = + +#--------------------------------------------------------------------------- +# Configuration options related to the HTML output +#--------------------------------------------------------------------------- + +# If the GENERATE_HTML tag is set to YES, doxygen will generate HTML output +# The default value is: YES. + +GENERATE_HTML = YES + +# The HTML_OUTPUT tag is used to specify where the HTML docs will be put. If a +# relative path is entered the value of OUTPUT_DIRECTORY will be put in front of +# it. +# The default directory is: html. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_OUTPUT = html + +# The HTML_FILE_EXTENSION tag can be used to specify the file extension for each +# generated HTML page (for example: .htm, .php, .asp). +# The default value is: .html. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_FILE_EXTENSION = .html + +# The HTML_HEADER tag can be used to specify a user-defined HTML header file for +# each generated HTML page. If the tag is left blank doxygen will generate a +# standard header. +# +# To get valid HTML the header file that includes any scripts and style sheets +# that doxygen needs, which is dependent on the configuration options used (e.g. +# the setting GENERATE_TREEVIEW). It is highly recommended to start with a +# default header using +# doxygen -w html new_header.html new_footer.html new_stylesheet.css +# YourConfigFile +# and then modify the file new_header.html. See also section "Doxygen usage" +# for information on how to generate the default header that doxygen normally +# uses. +# Note: The header is subject to change so you typically have to regenerate the +# default header when upgrading to a newer version of doxygen. For a description +# of the possible markers and block names see the documentation. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_HEADER = + +# The HTML_FOOTER tag can be used to specify a user-defined HTML footer for each +# generated HTML page. If the tag is left blank doxygen will generate a standard +# footer. See HTML_HEADER for more information on how to generate a default +# footer and what special commands can be used inside the footer. See also +# section "Doxygen usage" for information on how to generate the default footer +# that doxygen normally uses. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_FOOTER = + +# The HTML_STYLESHEET tag can be used to specify a user-defined cascading style +# sheet that is used by each HTML page. It can be used to fine-tune the look of +# the HTML output. If left blank doxygen will generate a default style sheet. +# See also section "Doxygen usage" for information on how to generate the style +# sheet that doxygen normally uses. +# Note: It is recommended to use HTML_EXTRA_STYLESHEET instead of this tag, as +# it is more robust and this tag (HTML_STYLESHEET) will in the future become +# obsolete. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_STYLESHEET = + +# The HTML_EXTRA_STYLESHEET tag can be used to specify additional user-defined +# cascading style sheets that are included after the standard style sheets +# created by doxygen. Using this option one can overrule certain style aspects. +# This is preferred over using HTML_STYLESHEET since it does not replace the +# standard style sheet and is therefore more robust against future updates. +# Doxygen will copy the style sheet files to the output directory. +# Note: The order of the extra style sheet files is of importance (e.g. the last +# style sheet in the list overrules the setting of the previous ones in the +# list). For an example see the documentation. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_EXTRA_STYLESHEET = + +# The HTML_EXTRA_FILES tag can be used to specify one or more extra images or +# other source files which should be copied to the HTML output directory. Note +# that these files will be copied to the base HTML output directory. Use the +# $relpath^ marker in the HTML_HEADER and/or HTML_FOOTER files to load these +# files. In the HTML_STYLESHEET file, use the file name only. Also note that the +# files will be copied as-is; there are no commands or markers available. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_EXTRA_FILES = + +# The HTML_COLORSTYLE_HUE tag controls the color of the HTML output. Doxygen +# will adjust the colors in the style sheet and background images according to +# this color. Hue is specified as an angle on a colorwheel, see +# http://en.wikipedia.org/wiki/Hue for more information. For instance the value +# 0 represents red, 60 is yellow, 120 is green, 180 is cyan, 240 is blue, 300 +# purple, and 360 is red again. +# Minimum value: 0, maximum value: 359, default value: 220. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_COLORSTYLE_HUE = 220 + +# The HTML_COLORSTYLE_SAT tag controls the purity (or saturation) of the colors +# in the HTML output. For a value of 0 the output will use grayscales only. A +# value of 255 will produce the most vivid colors. +# Minimum value: 0, maximum value: 255, default value: 100. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_COLORSTYLE_SAT = 100 + +# The HTML_COLORSTYLE_GAMMA tag controls the gamma correction applied to the +# luminance component of the colors in the HTML output. Values below 100 +# gradually make the output lighter, whereas values above 100 make the output +# darker. The value divided by 100 is the actual gamma applied, so 80 represents +# a gamma of 0.8, The value 220 represents a gamma of 2.2, and 100 does not +# change the gamma. +# Minimum value: 40, maximum value: 240, default value: 80. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_COLORSTYLE_GAMMA = 80 + +# If the HTML_TIMESTAMP tag is set to YES then the footer of each generated HTML +# page will contain the date and time when the page was generated. Setting this +# to YES can help to show when doxygen was last run and thus if the +# documentation is up to date. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_TIMESTAMP = NO + +# If the HTML_DYNAMIC_SECTIONS tag is set to YES then the generated HTML +# documentation will contain sections that can be hidden and shown after the +# page has loaded. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_DYNAMIC_SECTIONS = NO + +# With HTML_INDEX_NUM_ENTRIES one can control the preferred number of entries +# shown in the various tree structured indices initially; the user can expand +# and collapse entries dynamically later on. Doxygen will expand the tree to +# such a level that at most the specified number of entries are visible (unless +# a fully collapsed tree already exceeds this amount). So setting the number of +# entries 1 will produce a full collapsed tree by default. 0 is a special value +# representing an infinite number of entries and will result in a full expanded +# tree by default. +# Minimum value: 0, maximum value: 9999, default value: 100. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_INDEX_NUM_ENTRIES = 100 + +# If the GENERATE_DOCSET tag is set to YES, additional index files will be +# generated that can be used as input for Apple's Xcode 3 integrated development +# environment (see: http://developer.apple.com/tools/xcode/), introduced with +# OSX 10.5 (Leopard). To create a documentation set, doxygen will generate a +# Makefile in the HTML output directory. Running make will produce the docset in +# that directory and running make install will install the docset in +# ~/Library/Developer/Shared/Documentation/DocSets so that Xcode will find it at +# startup. See http://developer.apple.com/tools/creatingdocsetswithdoxygen.html +# for more information. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTML is set to YES. + +GENERATE_DOCSET = NO + +# This tag determines the name of the docset feed. A documentation feed provides +# an umbrella under which multiple documentation sets from a single provider +# (such as a company or product suite) can be grouped. +# The default value is: Doxygen generated docs. +# This tag requires that the tag GENERATE_DOCSET is set to YES. + +DOCSET_FEEDNAME = "Doxygen generated docs" + +# This tag specifies a string that should uniquely identify the documentation +# set bundle. This should be a reverse domain-name style string, e.g. +# com.mycompany.MyDocSet. Doxygen will append .docset to the name. +# The default value is: org.doxygen.Project. +# This tag requires that the tag GENERATE_DOCSET is set to YES. + +DOCSET_BUNDLE_ID = org.doxygen.Project + +# The DOCSET_PUBLISHER_ID tag specifies a string that should uniquely identify +# the documentation publisher. This should be a reverse domain-name style +# string, e.g. com.mycompany.MyDocSet.documentation. +# The default value is: org.doxygen.Publisher. +# This tag requires that the tag GENERATE_DOCSET is set to YES. + +DOCSET_PUBLISHER_ID = org.doxygen.Publisher + +# The DOCSET_PUBLISHER_NAME tag identifies the documentation publisher. +# The default value is: Publisher. +# This tag requires that the tag GENERATE_DOCSET is set to YES. + +DOCSET_PUBLISHER_NAME = Publisher + +# If the GENERATE_HTMLHELP tag is set to YES then doxygen generates three +# additional HTML index files: index.hhp, index.hhc, and index.hhk. The +# index.hhp is a project file that can be read by Microsoft's HTML Help Workshop +# (see: http://www.microsoft.com/en-us/download/details.aspx?id=21138) on +# Windows. +# +# The HTML Help Workshop contains a compiler that can convert all HTML output +# generated by doxygen into a single compiled HTML file (.chm). Compiled HTML +# files are now used as the Windows 98 help format, and will replace the old +# Windows help format (.hlp) on all Windows platforms in the future. Compressed +# HTML files also contain an index, a table of contents, and you can search for +# words in the documentation. The HTML workshop also contains a viewer for +# compressed HTML files. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTML is set to YES. + +GENERATE_HTMLHELP = NO + +# The CHM_FILE tag can be used to specify the file name of the resulting .chm +# file. You can add a path in front of the file if the result should not be +# written to the html output directory. +# This tag requires that the tag GENERATE_HTMLHELP is set to YES. + +CHM_FILE = + +# The HHC_LOCATION tag can be used to specify the location (absolute path +# including file name) of the HTML help compiler (hhc.exe). If non-empty, +# doxygen will try to run the HTML help compiler on the generated index.hhp. +# The file has to be specified with full path. +# This tag requires that the tag GENERATE_HTMLHELP is set to YES. + +HHC_LOCATION = + +# The GENERATE_CHI flag controls if a separate .chi index file is generated +# (YES) or that it should be included in the master .chm file (NO). +# The default value is: NO. +# This tag requires that the tag GENERATE_HTMLHELP is set to YES. + +GENERATE_CHI = NO + +# The CHM_INDEX_ENCODING is used to encode HtmlHelp index (hhk), content (hhc) +# and project file content. +# This tag requires that the tag GENERATE_HTMLHELP is set to YES. + +CHM_INDEX_ENCODING = + +# The BINARY_TOC flag controls whether a binary table of contents is generated +# (YES) or a normal table of contents (NO) in the .chm file. Furthermore it +# enables the Previous and Next buttons. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTMLHELP is set to YES. + +BINARY_TOC = NO + +# The TOC_EXPAND flag can be set to YES to add extra items for group members to +# the table of contents of the HTML help documentation and to the tree view. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTMLHELP is set to YES. + +TOC_EXPAND = NO + +# If the GENERATE_QHP tag is set to YES and both QHP_NAMESPACE and +# QHP_VIRTUAL_FOLDER are set, an additional index file will be generated that +# can be used as input for Qt's qhelpgenerator to generate a Qt Compressed Help +# (.qch) of the generated HTML documentation. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTML is set to YES. + +GENERATE_QHP = NO + +# If the QHG_LOCATION tag is specified, the QCH_FILE tag can be used to specify +# the file name of the resulting .qch file. The path specified is relative to +# the HTML output folder. +# This tag requires that the tag GENERATE_QHP is set to YES. + +QCH_FILE = + +# The QHP_NAMESPACE tag specifies the namespace to use when generating Qt Help +# Project output. For more information please see Qt Help Project / Namespace +# (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#namespace). +# The default value is: org.doxygen.Project. +# This tag requires that the tag GENERATE_QHP is set to YES. + +QHP_NAMESPACE = org.doxygen.Project + +# The QHP_VIRTUAL_FOLDER tag specifies the namespace to use when generating Qt +# Help Project output. For more information please see Qt Help Project / Virtual +# Folders (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#virtual- +# folders). +# The default value is: doc. +# This tag requires that the tag GENERATE_QHP is set to YES. + +QHP_VIRTUAL_FOLDER = doc + +# If the QHP_CUST_FILTER_NAME tag is set, it specifies the name of a custom +# filter to add. For more information please see Qt Help Project / Custom +# Filters (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#custom- +# filters). +# This tag requires that the tag GENERATE_QHP is set to YES. + +QHP_CUST_FILTER_NAME = + +# The QHP_CUST_FILTER_ATTRS tag specifies the list of the attributes of the +# custom filter to add. For more information please see Qt Help Project / Custom +# Filters (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#custom- +# filters). +# This tag requires that the tag GENERATE_QHP is set to YES. + +QHP_CUST_FILTER_ATTRS = + +# The QHP_SECT_FILTER_ATTRS tag specifies the list of the attributes this +# project's filter section matches. Qt Help Project / Filter Attributes (see: +# http://qt-project.org/doc/qt-4.8/qthelpproject.html#filter-attributes). +# This tag requires that the tag GENERATE_QHP is set to YES. + +QHP_SECT_FILTER_ATTRS = + +# The QHG_LOCATION tag can be used to specify the location of Qt's +# qhelpgenerator. If non-empty doxygen will try to run qhelpgenerator on the +# generated .qhp file. +# This tag requires that the tag GENERATE_QHP is set to YES. + +QHG_LOCATION = + +# If the GENERATE_ECLIPSEHELP tag is set to YES, additional index files will be +# generated, together with the HTML files, they form an Eclipse help plugin. To +# install this plugin and make it available under the help contents menu in +# Eclipse, the contents of the directory containing the HTML and XML files needs +# to be copied into the plugins directory of eclipse. The name of the directory +# within the plugins directory should be the same as the ECLIPSE_DOC_ID value. +# After copying Eclipse needs to be restarted before the help appears. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTML is set to YES. + +GENERATE_ECLIPSEHELP = NO + +# A unique identifier for the Eclipse help plugin. When installing the plugin +# the directory name containing the HTML and XML files should also have this +# name. Each documentation set should have its own identifier. +# The default value is: org.doxygen.Project. +# This tag requires that the tag GENERATE_ECLIPSEHELP is set to YES. + +ECLIPSE_DOC_ID = org.doxygen.Project + +# If you want full control over the layout of the generated HTML pages it might +# be necessary to disable the index and replace it with your own. The +# DISABLE_INDEX tag can be used to turn on/off the condensed index (tabs) at top +# of each HTML page. A value of NO enables the index and the value YES disables +# it. Since the tabs in the index contain the same information as the navigation +# tree, you can set this option to YES if you also set GENERATE_TREEVIEW to YES. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTML is set to YES. + +DISABLE_INDEX = NO + +# The GENERATE_TREEVIEW tag is used to specify whether a tree-like index +# structure should be generated to display hierarchical information. If the tag +# value is set to YES, a side panel will be generated containing a tree-like +# index structure (just like the one that is generated for HTML Help). For this +# to work a browser that supports JavaScript, DHTML, CSS and frames is required +# (i.e. any modern browser). Windows users are probably better off using the +# HTML help feature. Via custom style sheets (see HTML_EXTRA_STYLESHEET) one can +# further fine-tune the look of the index. As an example, the default style +# sheet generated by doxygen has an example that shows how to put an image at +# the root of the tree instead of the PROJECT_NAME. Since the tree basically has +# the same information as the tab index, you could consider setting +# DISABLE_INDEX to YES when enabling this option. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTML is set to YES. + +GENERATE_TREEVIEW = NO + +# The ENUM_VALUES_PER_LINE tag can be used to set the number of enum values that +# doxygen will group on one line in the generated HTML documentation. +# +# Note that a value of 0 will completely suppress the enum values from appearing +# in the overview section. +# Minimum value: 0, maximum value: 20, default value: 4. +# This tag requires that the tag GENERATE_HTML is set to YES. + +ENUM_VALUES_PER_LINE = 4 + +# If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be used +# to set the initial width (in pixels) of the frame in which the tree is shown. +# Minimum value: 0, maximum value: 1500, default value: 250. +# This tag requires that the tag GENERATE_HTML is set to YES. + +TREEVIEW_WIDTH = 250 + +# If the EXT_LINKS_IN_WINDOW option is set to YES, doxygen will open links to +# external symbols imported via tag files in a separate window. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTML is set to YES. + +EXT_LINKS_IN_WINDOW = NO + +# Use this tag to change the font size of LaTeX formulas included as images in +# the HTML documentation. When you change the font size after a successful +# doxygen run you need to manually remove any form_*.png images from the HTML +# output directory to force them to be regenerated. +# Minimum value: 8, maximum value: 50, default value: 10. +# This tag requires that the tag GENERATE_HTML is set to YES. + +FORMULA_FONTSIZE = 10 + +# Use the FORMULA_TRANPARENT tag to determine whether or not the images +# generated for formulas are transparent PNGs. Transparent PNGs are not +# supported properly for IE 6.0, but are supported on all modern browsers. +# +# Note that when changing this option you need to delete any form_*.png files in +# the HTML output directory before the changes have effect. +# The default value is: YES. +# This tag requires that the tag GENERATE_HTML is set to YES. + +FORMULA_TRANSPARENT = YES + +# Enable the USE_MATHJAX option to render LaTeX formulas using MathJax (see +# http://www.mathjax.org) which uses client side Javascript for the rendering +# instead of using pre-rendered bitmaps. Use this if you do not have LaTeX +# installed or if you want to formulas look prettier in the HTML output. When +# enabled you may also need to install MathJax separately and configure the path +# to it using the MATHJAX_RELPATH option. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTML is set to YES. + +USE_MATHJAX = NO + +# When MathJax is enabled you can set the default output format to be used for +# the MathJax output. See the MathJax site (see: +# http://docs.mathjax.org/en/latest/output.html) for more details. +# Possible values are: HTML-CSS (which is slower, but has the best +# compatibility), NativeMML (i.e. MathML) and SVG. +# The default value is: HTML-CSS. +# This tag requires that the tag USE_MATHJAX is set to YES. + +MATHJAX_FORMAT = HTML-CSS + +# When MathJax is enabled you need to specify the location relative to the HTML +# output directory using the MATHJAX_RELPATH option. The destination directory +# should contain the MathJax.js script. For instance, if the mathjax directory +# is located at the same level as the HTML output directory, then +# MATHJAX_RELPATH should be ../mathjax. The default value points to the MathJax +# Content Delivery Network so you can quickly see the result without installing +# MathJax. However, it is strongly recommended to install a local copy of +# MathJax from http://www.mathjax.org before deployment. +# The default value is: http://cdn.mathjax.org/mathjax/latest. +# This tag requires that the tag USE_MATHJAX is set to YES. + +MATHJAX_RELPATH = http://cdn.mathjax.org/mathjax/latest + +# The MATHJAX_EXTENSIONS tag can be used to specify one or more MathJax +# extension names that should be enabled during MathJax rendering. For example +# MATHJAX_EXTENSIONS = TeX/AMSmath TeX/AMSsymbols +# This tag requires that the tag USE_MATHJAX is set to YES. + +MATHJAX_EXTENSIONS = + +# The MATHJAX_CODEFILE tag can be used to specify a file with javascript pieces +# of code that will be used on startup of the MathJax code. See the MathJax site +# (see: http://docs.mathjax.org/en/latest/output.html) for more details. For an +# example see the documentation. +# This tag requires that the tag USE_MATHJAX is set to YES. + +MATHJAX_CODEFILE = + +# When the SEARCHENGINE tag is enabled doxygen will generate a search box for +# the HTML output. The underlying search engine uses javascript and DHTML and +# should work on any modern browser. Note that when using HTML help +# (GENERATE_HTMLHELP), Qt help (GENERATE_QHP), or docsets (GENERATE_DOCSET) +# there is already a search function so this one should typically be disabled. +# For large projects the javascript based search engine can be slow, then +# enabling SERVER_BASED_SEARCH may provide a better solution. It is possible to +# search using the keyboard; to jump to the search box use <access key> + S +# (what the <access key> is depends on the OS and browser, but it is typically +# <CTRL>, <ALT>/<option>, or both). Inside the search box use the <cursor down +# key> to jump into the search results window, the results can be navigated +# using the <cursor keys>. Press <Enter> to select an item or <escape> to cancel +# the search. The filter options can be selected when the cursor is inside the +# search box by pressing <Shift>+<cursor down>. Also here use the <cursor keys> +# to select a filter and <Enter> or <escape> to activate or cancel the filter +# option. +# The default value is: YES. +# This tag requires that the tag GENERATE_HTML is set to YES. + +SEARCHENGINE = YES + +# When the SERVER_BASED_SEARCH tag is enabled the search engine will be +# implemented using a web server instead of a web client using Javascript. There +# are two flavors of web server based searching depending on the EXTERNAL_SEARCH +# setting. When disabled, doxygen will generate a PHP script for searching and +# an index file used by the script. When EXTERNAL_SEARCH is enabled the indexing +# and searching needs to be provided by external tools. See the section +# "External Indexing and Searching" for details. +# The default value is: NO. +# This tag requires that the tag SEARCHENGINE is set to YES. + +SERVER_BASED_SEARCH = NO + +# When EXTERNAL_SEARCH tag is enabled doxygen will no longer generate the PHP +# script for searching. Instead the search results are written to an XML file +# which needs to be processed by an external indexer. Doxygen will invoke an +# external search engine pointed to by the SEARCHENGINE_URL option to obtain the +# search results. +# +# Doxygen ships with an example indexer (doxyindexer) and search engine +# (doxysearch.cgi) which are based on the open source search engine library +# Xapian (see: http://xapian.org/). +# +# See the section "External Indexing and Searching" for details. +# The default value is: NO. +# This tag requires that the tag SEARCHENGINE is set to YES. + +EXTERNAL_SEARCH = NO + +# The SEARCHENGINE_URL should point to a search engine hosted by a web server +# which will return the search results when EXTERNAL_SEARCH is enabled. +# +# Doxygen ships with an example indexer (doxyindexer) and search engine +# (doxysearch.cgi) which are based on the open source search engine library +# Xapian (see: http://xapian.org/). See the section "External Indexing and +# Searching" for details. +# This tag requires that the tag SEARCHENGINE is set to YES. + +SEARCHENGINE_URL = + +# When SERVER_BASED_SEARCH and EXTERNAL_SEARCH are both enabled the unindexed +# search data is written to a file for indexing by an external tool. With the +# SEARCHDATA_FILE tag the name of this file can be specified. +# The default file is: searchdata.xml. +# This tag requires that the tag SEARCHENGINE is set to YES. + +SEARCHDATA_FILE = searchdata.xml + +# When SERVER_BASED_SEARCH and EXTERNAL_SEARCH are both enabled the +# EXTERNAL_SEARCH_ID tag can be used as an identifier for the project. This is +# useful in combination with EXTRA_SEARCH_MAPPINGS to search through multiple +# projects and redirect the results back to the right project. +# This tag requires that the tag SEARCHENGINE is set to YES. + +EXTERNAL_SEARCH_ID = + +# The EXTRA_SEARCH_MAPPINGS tag can be used to enable searching through doxygen +# projects other than the one defined by this configuration file, but that are +# all added to the same external search index. Each project needs to have a +# unique id set via EXTERNAL_SEARCH_ID. The search mapping then maps the id of +# to a relative location where the documentation can be found. The format is: +# EXTRA_SEARCH_MAPPINGS = tagname1=loc1 tagname2=loc2 ... +# This tag requires that the tag SEARCHENGINE is set to YES. + +EXTRA_SEARCH_MAPPINGS = + +#--------------------------------------------------------------------------- +# Configuration options related to the LaTeX output +#--------------------------------------------------------------------------- + +# If the GENERATE_LATEX tag is set to YES, doxygen will generate LaTeX output. +# The default value is: YES. + +GENERATE_LATEX = YES + +# The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put. If a +# relative path is entered the value of OUTPUT_DIRECTORY will be put in front of +# it. +# The default directory is: latex. +# This tag requires that the tag GENERATE_LATEX is set to YES. + +LATEX_OUTPUT = latex + +# The LATEX_CMD_NAME tag can be used to specify the LaTeX command name to be +# invoked. +# +# Note that when enabling USE_PDFLATEX this option is only used for generating +# bitmaps for formulas in the HTML output, but not in the Makefile that is +# written to the output directory. +# The default file is: latex. +# This tag requires that the tag GENERATE_LATEX is set to YES. + +LATEX_CMD_NAME = latex + +# The MAKEINDEX_CMD_NAME tag can be used to specify the command name to generate +# index for LaTeX. +# The default file is: makeindex. +# This tag requires that the tag GENERATE_LATEX is set to YES. + +MAKEINDEX_CMD_NAME = makeindex + +# If the COMPACT_LATEX tag is set to YES, doxygen generates more compact LaTeX +# documents. This may be useful for small projects and may help to save some +# trees in general. +# The default value is: NO. +# This tag requires that the tag GENERATE_LATEX is set to YES. + +COMPACT_LATEX = NO + +# The PAPER_TYPE tag can be used to set the paper type that is used by the +# printer. +# Possible values are: a4 (210 x 297 mm), letter (8.5 x 11 inches), legal (8.5 x +# 14 inches) and executive (7.25 x 10.5 inches). +# The default value is: a4. +# This tag requires that the tag GENERATE_LATEX is set to YES. + +PAPER_TYPE = a4 + +# The EXTRA_PACKAGES tag can be used to specify one or more LaTeX package names +# that should be included in the LaTeX output. The package can be specified just +# by its name or with the correct syntax as to be used with the LaTeX +# \usepackage command. To get the times font for instance you can specify : +# EXTRA_PACKAGES=times or EXTRA_PACKAGES={times} +# To use the option intlimits with the amsmath package you can specify: +# EXTRA_PACKAGES=[intlimits]{amsmath} +# If left blank no extra packages will be included. +# This tag requires that the tag GENERATE_LATEX is set to YES. + +EXTRA_PACKAGES = + +# The LATEX_HEADER tag can be used to specify a personal LaTeX header for the +# generated LaTeX document. The header should contain everything until the first +# chapter. If it is left blank doxygen will generate a standard header. See +# section "Doxygen usage" for information on how to let doxygen write the +# default header to a separate file. +# +# Note: Only use a user-defined header if you know what you are doing! The +# following commands have a special meaning inside the header: $title, +# $datetime, $date, $doxygenversion, $projectname, $projectnumber, +# $projectbrief, $projectlogo. Doxygen will replace $title with the empty +# string, for the replacement values of the other commands the user is referred +# to HTML_HEADER. +# This tag requires that the tag GENERATE_LATEX is set to YES. + +LATEX_HEADER = + +# The LATEX_FOOTER tag can be used to specify a personal LaTeX footer for the +# generated LaTeX document. The footer should contain everything after the last +# chapter. If it is left blank doxygen will generate a standard footer. See +# LATEX_HEADER for more information on how to generate a default footer and what +# special commands can be used inside the footer. +# +# Note: Only use a user-defined footer if you know what you are doing! +# This tag requires that the tag GENERATE_LATEX is set to YES. + +LATEX_FOOTER = + +# The LATEX_EXTRA_STYLESHEET tag can be used to specify additional user-defined +# LaTeX style sheets that are included after the standard style sheets created +# by doxygen. Using this option one can overrule certain style aspects. Doxygen +# will copy the style sheet files to the output directory. +# Note: The order of the extra style sheet files is of importance (e.g. the last +# style sheet in the list overrules the setting of the previous ones in the +# list). +# This tag requires that the tag GENERATE_LATEX is set to YES. + +LATEX_EXTRA_STYLESHEET = + +# The LATEX_EXTRA_FILES tag can be used to specify one or more extra images or +# other source files which should be copied to the LATEX_OUTPUT output +# directory. Note that the files will be copied as-is; there are no commands or +# markers available. +# This tag requires that the tag GENERATE_LATEX is set to YES. + +LATEX_EXTRA_FILES = + +# If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated is +# prepared for conversion to PDF (using ps2pdf or pdflatex). The PDF file will +# contain links (just like the HTML output) instead of page references. This +# makes the output suitable for online browsing using a PDF viewer. +# The default value is: YES. +# This tag requires that the tag GENERATE_LATEX is set to YES. + +PDF_HYPERLINKS = YES + +# If the USE_PDFLATEX tag is set to YES, doxygen will use pdflatex to generate +# the PDF file directly from the LaTeX files. Set this option to YES, to get a +# higher quality PDF documentation. +# The default value is: YES. +# This tag requires that the tag GENERATE_LATEX is set to YES. + +USE_PDFLATEX = YES + +# If the LATEX_BATCHMODE tag is set to YES, doxygen will add the \batchmode +# command to the generated LaTeX files. This will instruct LaTeX to keep running +# if errors occur, instead of asking the user for help. This option is also used +# when generating formulas in HTML. +# The default value is: NO. +# This tag requires that the tag GENERATE_LATEX is set to YES. + +LATEX_BATCHMODE = NO + +# If the LATEX_HIDE_INDICES tag is set to YES then doxygen will not include the +# index chapters (such as File Index, Compound Index, etc.) in the output. +# The default value is: NO. +# This tag requires that the tag GENERATE_LATEX is set to YES. + +LATEX_HIDE_INDICES = NO + +# If the LATEX_SOURCE_CODE tag is set to YES then doxygen will include source +# code with syntax highlighting in the LaTeX output. +# +# Note that which sources are shown also depends on other settings such as +# SOURCE_BROWSER. +# The default value is: NO. +# This tag requires that the tag GENERATE_LATEX is set to YES. + +LATEX_SOURCE_CODE = NO + +# The LATEX_BIB_STYLE tag can be used to specify the style to use for the +# bibliography, e.g. plainnat, or ieeetr. See +# http://en.wikipedia.org/wiki/BibTeX and \cite for more info. +# The default value is: plain. +# This tag requires that the tag GENERATE_LATEX is set to YES. + +LATEX_BIB_STYLE = plain + +# If the LATEX_TIMESTAMP tag is set to YES then the footer of each generated +# page will contain the date and time when the page was generated. Setting this +# to NO can help when comparing the output of multiple runs. +# The default value is: NO. +# This tag requires that the tag GENERATE_LATEX is set to YES. + +LATEX_TIMESTAMP = NO + +#--------------------------------------------------------------------------- +# Configuration options related to the RTF output +#--------------------------------------------------------------------------- + +# If the GENERATE_RTF tag is set to YES, doxygen will generate RTF output. The +# RTF output is optimized for Word 97 and may not look too pretty with other RTF +# readers/editors. +# The default value is: NO. + +GENERATE_RTF = NO + +# The RTF_OUTPUT tag is used to specify where the RTF docs will be put. If a +# relative path is entered the value of OUTPUT_DIRECTORY will be put in front of +# it. +# The default directory is: rtf. +# This tag requires that the tag GENERATE_RTF is set to YES. + +RTF_OUTPUT = rtf + +# If the COMPACT_RTF tag is set to YES, doxygen generates more compact RTF +# documents. This may be useful for small projects and may help to save some +# trees in general. +# The default value is: NO. +# This tag requires that the tag GENERATE_RTF is set to YES. + +COMPACT_RTF = NO + +# If the RTF_HYPERLINKS tag is set to YES, the RTF that is generated will +# contain hyperlink fields. The RTF file will contain links (just like the HTML +# output) instead of page references. This makes the output suitable for online +# browsing using Word or some other Word compatible readers that support those +# fields. +# +# Note: WordPad (write) and others do not support links. +# The default value is: NO. +# This tag requires that the tag GENERATE_RTF is set to YES. + +RTF_HYPERLINKS = NO + +# Load stylesheet definitions from file. Syntax is similar to doxygen's config +# file, i.e. a series of assignments. You only have to provide replacements, +# missing definitions are set to their default value. +# +# See also section "Doxygen usage" for information on how to generate the +# default style sheet that doxygen normally uses. +# This tag requires that the tag GENERATE_RTF is set to YES. + +RTF_STYLESHEET_FILE = + +# Set optional variables used in the generation of an RTF document. Syntax is +# similar to doxygen's config file. A template extensions file can be generated +# using doxygen -e rtf extensionFile. +# This tag requires that the tag GENERATE_RTF is set to YES. + +RTF_EXTENSIONS_FILE = + +# If the RTF_SOURCE_CODE tag is set to YES then doxygen will include source code +# with syntax highlighting in the RTF output. +# +# Note that which sources are shown also depends on other settings such as +# SOURCE_BROWSER. +# The default value is: NO. +# This tag requires that the tag GENERATE_RTF is set to YES. + +RTF_SOURCE_CODE = NO + +#--------------------------------------------------------------------------- +# Configuration options related to the man page output +#--------------------------------------------------------------------------- + +# If the GENERATE_MAN tag is set to YES, doxygen will generate man pages for +# classes and files. +# The default value is: NO. + +GENERATE_MAN = NO + +# The MAN_OUTPUT tag is used to specify where the man pages will be put. If a +# relative path is entered the value of OUTPUT_DIRECTORY will be put in front of +# it. A directory man3 will be created inside the directory specified by +# MAN_OUTPUT. +# The default directory is: man. +# This tag requires that the tag GENERATE_MAN is set to YES. + +MAN_OUTPUT = man + +# The MAN_EXTENSION tag determines the extension that is added to the generated +# man pages. In case the manual section does not start with a number, the number +# 3 is prepended. The dot (.) at the beginning of the MAN_EXTENSION tag is +# optional. +# The default value is: .3. +# This tag requires that the tag GENERATE_MAN is set to YES. + +MAN_EXTENSION = .3 + +# The MAN_SUBDIR tag determines the name of the directory created within +# MAN_OUTPUT in which the man pages are placed. If defaults to man followed by +# MAN_EXTENSION with the initial . removed. +# This tag requires that the tag GENERATE_MAN is set to YES. + +MAN_SUBDIR = + +# If the MAN_LINKS tag is set to YES and doxygen generates man output, then it +# will generate one additional man file for each entity documented in the real +# man page(s). These additional files only source the real man page, but without +# them the man command would be unable to find the correct page. +# The default value is: NO. +# This tag requires that the tag GENERATE_MAN is set to YES. + +MAN_LINKS = NO + +#--------------------------------------------------------------------------- +# Configuration options related to the XML output +#--------------------------------------------------------------------------- + +# If the GENERATE_XML tag is set to YES, doxygen will generate an XML file that +# captures the structure of the code including all documentation. +# The default value is: NO. + +GENERATE_XML = NO + +# The XML_OUTPUT tag is used to specify where the XML pages will be put. If a +# relative path is entered the value of OUTPUT_DIRECTORY will be put in front of +# it. +# The default directory is: xml. +# This tag requires that the tag GENERATE_XML is set to YES. + +XML_OUTPUT = xml + +# If the XML_PROGRAMLISTING tag is set to YES, doxygen will dump the program +# listings (including syntax highlighting and cross-referencing information) to +# the XML output. Note that enabling this will significantly increase the size +# of the XML output. +# The default value is: YES. +# This tag requires that the tag GENERATE_XML is set to YES. + +XML_PROGRAMLISTING = YES + +#--------------------------------------------------------------------------- +# Configuration options related to the DOCBOOK output +#--------------------------------------------------------------------------- + +# If the GENERATE_DOCBOOK tag is set to YES, doxygen will generate Docbook files +# that can be used to generate PDF. +# The default value is: NO. + +GENERATE_DOCBOOK = NO + +# The DOCBOOK_OUTPUT tag is used to specify where the Docbook pages will be put. +# If a relative path is entered the value of OUTPUT_DIRECTORY will be put in +# front of it. +# The default directory is: docbook. +# This tag requires that the tag GENERATE_DOCBOOK is set to YES. + +DOCBOOK_OUTPUT = docbook + +# If the DOCBOOK_PROGRAMLISTING tag is set to YES, doxygen will include the +# program listings (including syntax highlighting and cross-referencing +# information) to the DOCBOOK output. Note that enabling this will significantly +# increase the size of the DOCBOOK output. +# The default value is: NO. +# This tag requires that the tag GENERATE_DOCBOOK is set to YES. + +DOCBOOK_PROGRAMLISTING = NO + +#--------------------------------------------------------------------------- +# Configuration options for the AutoGen Definitions output +#--------------------------------------------------------------------------- + +# If the GENERATE_AUTOGEN_DEF tag is set to YES, doxygen will generate an +# AutoGen Definitions (see http://autogen.sf.net) file that captures the +# structure of the code including all documentation. Note that this feature is +# still experimental and incomplete at the moment. +# The default value is: NO. + +GENERATE_AUTOGEN_DEF = NO + +#--------------------------------------------------------------------------- +# Configuration options related to the Perl module output +#--------------------------------------------------------------------------- + +# If the GENERATE_PERLMOD tag is set to YES, doxygen will generate a Perl module +# file that captures the structure of the code including all documentation. +# +# Note that this feature is still experimental and incomplete at the moment. +# The default value is: NO. + +GENERATE_PERLMOD = NO + +# If the PERLMOD_LATEX tag is set to YES, doxygen will generate the necessary +# Makefile rules, Perl scripts and LaTeX code to be able to generate PDF and DVI +# output from the Perl module output. +# The default value is: NO. +# This tag requires that the tag GENERATE_PERLMOD is set to YES. + +PERLMOD_LATEX = NO + +# If the PERLMOD_PRETTY tag is set to YES, the Perl module output will be nicely +# formatted so it can be parsed by a human reader. This is useful if you want to +# understand what is going on. On the other hand, if this tag is set to NO, the +# size of the Perl module output will be much smaller and Perl will parse it +# just the same. +# The default value is: YES. +# This tag requires that the tag GENERATE_PERLMOD is set to YES. + +PERLMOD_PRETTY = YES + +# The names of the make variables in the generated doxyrules.make file are +# prefixed with the string contained in PERLMOD_MAKEVAR_PREFIX. This is useful +# so different doxyrules.make files included by the same Makefile don't +# overwrite each other's variables. +# This tag requires that the tag GENERATE_PERLMOD is set to YES. + +PERLMOD_MAKEVAR_PREFIX = + +#--------------------------------------------------------------------------- +# Configuration options related to the preprocessor +#--------------------------------------------------------------------------- + +# If the ENABLE_PREPROCESSING tag is set to YES, doxygen will evaluate all +# C-preprocessor directives found in the sources and include files. +# The default value is: YES. + +ENABLE_PREPROCESSING = YES + +# If the MACRO_EXPANSION tag is set to YES, doxygen will expand all macro names +# in the source code. If set to NO, only conditional compilation will be +# performed. Macro expansion can be done in a controlled way by setting +# EXPAND_ONLY_PREDEF to YES. +# The default value is: NO. +# This tag requires that the tag ENABLE_PREPROCESSING is set to YES. + +MACRO_EXPANSION = NO + +# If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES then +# the macro expansion is limited to the macros specified with the PREDEFINED and +# EXPAND_AS_DEFINED tags. +# The default value is: NO. +# This tag requires that the tag ENABLE_PREPROCESSING is set to YES. + +EXPAND_ONLY_PREDEF = NO + +# If the SEARCH_INCLUDES tag is set to YES, the include files in the +# INCLUDE_PATH will be searched if a #include is found. +# The default value is: YES. +# This tag requires that the tag ENABLE_PREPROCESSING is set to YES. + +SEARCH_INCLUDES = YES + +# The INCLUDE_PATH tag can be used to specify one or more directories that +# contain include files that are not input files but should be processed by the +# preprocessor. +# This tag requires that the tag SEARCH_INCLUDES is set to YES. + +INCLUDE_PATH = "@TOP_SRCDIR@/include" "@TOP_BUILDDIR@/include" + +# You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard +# patterns (like *.h and *.hpp) to filter out the header-files in the +# directories. If left blank, the patterns specified with FILE_PATTERNS will be +# used. +# This tag requires that the tag ENABLE_PREPROCESSING is set to YES. + +INCLUDE_FILE_PATTERNS = + +# The PREDEFINED tag can be used to specify one or more macro names that are +# defined before the preprocessor is started (similar to the -D option of e.g. +# gcc). The argument of the tag is a list of macros of the form: name or +# name=definition (no spaces). If the definition and the "=" are omitted, "=1" +# is assumed. To prevent a macro definition from being undefined via #undef or +# recursively expanded use the := operator instead of the = operator. +# This tag requires that the tag ENABLE_PREPROCESSING is set to YES. + +PREDEFINED = + +# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then this +# tag can be used to specify a list of macro names that should be expanded. The +# macro definition that is found in the sources will be used. Use the PREDEFINED +# tag if you want to use a different macro definition that overrules the +# definition found in the source code. +# This tag requires that the tag ENABLE_PREPROCESSING is set to YES. + +EXPAND_AS_DEFINED = + +# If the SKIP_FUNCTION_MACROS tag is set to YES then doxygen's preprocessor will +# remove all references to function-like macros that are alone on a line, have +# an all uppercase name, and do not end with a semicolon. Such function macros +# are typically used for boiler-plate code, and will confuse the parser if not +# removed. +# The default value is: YES. +# This tag requires that the tag ENABLE_PREPROCESSING is set to YES. + +SKIP_FUNCTION_MACROS = YES + +#--------------------------------------------------------------------------- +# Configuration options related to external references +#--------------------------------------------------------------------------- + +# The TAGFILES tag can be used to specify one or more tag files. For each tag +# file the location of the external documentation should be added. The format of +# a tag file without this location is as follows: +# TAGFILES = file1 file2 ... +# Adding location for the tag files is done as follows: +# TAGFILES = file1=loc1 "file2 = loc2" ... +# where loc1 and loc2 can be relative or absolute paths or URLs. See the +# section "Linking to external documentation" for more information about the use +# of tag files. +# Note: Each tag file must have a unique name (where the name does NOT include +# the path). If a tag file is not located in the directory in which doxygen is +# run, you must also specify the path to the tagfile here. + +TAGFILES = + +# When a file name is specified after GENERATE_TAGFILE, doxygen will create a +# tag file that is based on the input files it reads. See section "Linking to +# external documentation" for more information about the usage of tag files. + +GENERATE_TAGFILE = + +# If the ALLEXTERNALS tag is set to YES, all external class will be listed in +# the class index. If set to NO, only the inherited external classes will be +# listed. +# The default value is: NO. + +ALLEXTERNALS = NO + +# If the EXTERNAL_GROUPS tag is set to YES, all external groups will be listed +# in the modules index. If set to NO, only the current project's groups will be +# listed. +# The default value is: YES. + +EXTERNAL_GROUPS = YES + +# If the EXTERNAL_PAGES tag is set to YES, all external pages will be listed in +# the related pages index. If set to NO, only the current project's pages will +# be listed. +# The default value is: YES. + +EXTERNAL_PAGES = YES + +# The PERL_PATH should be the absolute path and name of the perl script +# interpreter (i.e. the result of 'which perl'). +# The default file (with absolute path) is: /usr/bin/perl. + +PERL_PATH = /usr/bin/perl + +#--------------------------------------------------------------------------- +# Configuration options related to the dot tool +#--------------------------------------------------------------------------- + +# If the CLASS_DIAGRAMS tag is set to YES, doxygen will generate a class diagram +# (in HTML and LaTeX) for classes with base or super classes. Setting the tag to +# NO turns the diagrams off. Note that this option also works with HAVE_DOT +# disabled, but it is recommended to install and use dot, since it yields more +# powerful graphs. +# The default value is: YES. + +CLASS_DIAGRAMS = YES + +# You can define message sequence charts within doxygen comments using the \msc +# command. Doxygen will then run the mscgen tool (see: +# http://www.mcternan.me.uk/mscgen/)) to produce the chart and insert it in the +# documentation. The MSCGEN_PATH tag allows you to specify the directory where +# the mscgen tool resides. If left empty the tool is assumed to be found in the +# default search path. + +MSCGEN_PATH = + +# You can include diagrams made with dia in doxygen documentation. Doxygen will +# then run dia to produce the diagram and insert it in the documentation. The +# DIA_PATH tag allows you to specify the directory where the dia binary resides. +# If left empty dia is assumed to be found in the default search path. + +DIA_PATH = + +# If set to YES the inheritance and collaboration graphs will hide inheritance +# and usage relations if the target is undocumented or is not a class. +# The default value is: YES. + +HIDE_UNDOC_RELATIONS = YES + +# If you set the HAVE_DOT tag to YES then doxygen will assume the dot tool is +# available from the path. This tool is part of Graphviz (see: +# http://www.graphviz.org/), a graph visualization toolkit from AT&T and Lucent +# Bell Labs. The other options in this section have no effect if this option is +# set to NO +# The default value is: NO. + +HAVE_DOT = @HAVE_DOT@ + +# The DOT_NUM_THREADS specifies the number of dot invocations doxygen is allowed +# to run in parallel. When set to 0 doxygen will base this on the number of +# processors available in the system. You can set it explicitly to a value +# larger than 0 to get control over the balance between CPU load and processing +# speed. +# Minimum value: 0, maximum value: 32, default value: 0. +# This tag requires that the tag HAVE_DOT is set to YES. + +DOT_NUM_THREADS = 0 + +# When you want a differently looking font in the dot files that doxygen +# generates you can specify the font name using DOT_FONTNAME. You need to make +# sure dot is able to find the font, which can be done by putting it in a +# standard location or by setting the DOTFONTPATH environment variable or by +# setting DOT_FONTPATH to the directory containing the font. +# The default value is: Helvetica. +# This tag requires that the tag HAVE_DOT is set to YES. + +DOT_FONTNAME = Helvetica + +# The DOT_FONTSIZE tag can be used to set the size (in points) of the font of +# dot graphs. +# Minimum value: 4, maximum value: 24, default value: 10. +# This tag requires that the tag HAVE_DOT is set to YES. + +DOT_FONTSIZE = 10 + +# By default doxygen will tell dot to use the default font as specified with +# DOT_FONTNAME. If you specify a different font using DOT_FONTNAME you can set +# the path where dot can find it using this tag. +# This tag requires that the tag HAVE_DOT is set to YES. + +DOT_FONTPATH = + +# If the CLASS_GRAPH tag is set to YES then doxygen will generate a graph for +# each documented class showing the direct and indirect inheritance relations. +# Setting this tag to YES will force the CLASS_DIAGRAMS tag to NO. +# The default value is: YES. +# This tag requires that the tag HAVE_DOT is set to YES. + +CLASS_GRAPH = YES + +# If the COLLABORATION_GRAPH tag is set to YES then doxygen will generate a +# graph for each documented class showing the direct and indirect implementation +# dependencies (inheritance, containment, and class references variables) of the +# class with other documented classes. +# The default value is: YES. +# This tag requires that the tag HAVE_DOT is set to YES. + +COLLABORATION_GRAPH = YES + +# If the GROUP_GRAPHS tag is set to YES then doxygen will generate a graph for +# groups, showing the direct groups dependencies. +# The default value is: YES. +# This tag requires that the tag HAVE_DOT is set to YES. + +GROUP_GRAPHS = YES + +# If the UML_LOOK tag is set to YES, doxygen will generate inheritance and +# collaboration diagrams in a style similar to the OMG's Unified Modeling +# Language. +# The default value is: NO. +# This tag requires that the tag HAVE_DOT is set to YES. + +UML_LOOK = NO + +# If the UML_LOOK tag is enabled, the fields and methods are shown inside the +# class node. If there are many fields or methods and many nodes the graph may +# become too big to be useful. The UML_LIMIT_NUM_FIELDS threshold limits the +# number of items for each type to make the size more manageable. Set this to 0 +# for no limit. Note that the threshold may be exceeded by 50% before the limit +# is enforced. So when you set the threshold to 10, up to 15 fields may appear, +# but if the number exceeds 15, the total amount of fields shown is limited to +# 10. +# Minimum value: 0, maximum value: 100, default value: 10. +# This tag requires that the tag HAVE_DOT is set to YES. + +UML_LIMIT_NUM_FIELDS = 10 + +# If the TEMPLATE_RELATIONS tag is set to YES then the inheritance and +# collaboration graphs will show the relations between templates and their +# instances. +# The default value is: NO. +# This tag requires that the tag HAVE_DOT is set to YES. + +TEMPLATE_RELATIONS = NO + +# If the INCLUDE_GRAPH, ENABLE_PREPROCESSING and SEARCH_INCLUDES tags are set to +# YES then doxygen will generate a graph for each documented file showing the +# direct and indirect include dependencies of the file with other documented +# files. +# The default value is: YES. +# This tag requires that the tag HAVE_DOT is set to YES. + +INCLUDE_GRAPH = YES + +# If the INCLUDED_BY_GRAPH, ENABLE_PREPROCESSING and SEARCH_INCLUDES tags are +# set to YES then doxygen will generate a graph for each documented file showing +# the direct and indirect include dependencies of the file with other documented +# files. +# The default value is: YES. +# This tag requires that the tag HAVE_DOT is set to YES. + +INCLUDED_BY_GRAPH = YES + +# If the CALL_GRAPH tag is set to YES then doxygen will generate a call +# dependency graph for every global function or class method. +# +# Note that enabling this option will significantly increase the time of a run. +# So in most cases it will be better to enable call graphs for selected +# functions only using the \callgraph command. Disabling a call graph can be +# accomplished by means of the command \hidecallgraph. +# The default value is: NO. +# This tag requires that the tag HAVE_DOT is set to YES. + +CALL_GRAPH = NO + +# If the CALLER_GRAPH tag is set to YES then doxygen will generate a caller +# dependency graph for every global function or class method. +# +# Note that enabling this option will significantly increase the time of a run. +# So in most cases it will be better to enable caller graphs for selected +# functions only using the \callergraph command. Disabling a caller graph can be +# accomplished by means of the command \hidecallergraph. +# The default value is: NO. +# This tag requires that the tag HAVE_DOT is set to YES. + +CALLER_GRAPH = NO + +# If the GRAPHICAL_HIERARCHY tag is set to YES then doxygen will graphical +# hierarchy of all classes instead of a textual one. +# The default value is: YES. +# This tag requires that the tag HAVE_DOT is set to YES. + +GRAPHICAL_HIERARCHY = YES + +# If the DIRECTORY_GRAPH tag is set to YES then doxygen will show the +# dependencies a directory has on other directories in a graphical way. The +# dependency relations are determined by the #include relations between the +# files in the directories. +# The default value is: YES. +# This tag requires that the tag HAVE_DOT is set to YES. + +DIRECTORY_GRAPH = YES + +# The DOT_IMAGE_FORMAT tag can be used to set the image format of the images +# generated by dot. For an explanation of the image formats see the section +# output formats in the documentation of the dot tool (Graphviz (see: +# http://www.graphviz.org/)). +# Note: If you choose svg you need to set HTML_FILE_EXTENSION to xhtml in order +# to make the SVG files visible in IE 9+ (other browsers do not have this +# requirement). +# Possible values are: png, jpg, gif, svg, png:gd, png:gd:gd, png:cairo, +# png:cairo:gd, png:cairo:cairo, png:cairo:gdiplus, png:gdiplus and +# png:gdiplus:gdiplus. +# The default value is: png. +# This tag requires that the tag HAVE_DOT is set to YES. + +DOT_IMAGE_FORMAT = png + +# If DOT_IMAGE_FORMAT is set to svg, then this option can be set to YES to +# enable generation of interactive SVG images that allow zooming and panning. +# +# Note that this requires a modern browser other than Internet Explorer. Tested +# and working are Firefox, Chrome, Safari, and Opera. +# Note: For IE 9+ you need to set HTML_FILE_EXTENSION to xhtml in order to make +# the SVG files visible. Older versions of IE do not have SVG support. +# The default value is: NO. +# This tag requires that the tag HAVE_DOT is set to YES. + +INTERACTIVE_SVG = NO + +# The DOT_PATH tag can be used to specify the path where the dot tool can be +# found. If left blank, it is assumed the dot tool can be found in the path. +# This tag requires that the tag HAVE_DOT is set to YES. + +DOT_PATH = + +# The DOTFILE_DIRS tag can be used to specify one or more directories that +# contain dot files that are included in the documentation (see the \dotfile +# command). +# This tag requires that the tag HAVE_DOT is set to YES. + +DOTFILE_DIRS = + +# The MSCFILE_DIRS tag can be used to specify one or more directories that +# contain msc files that are included in the documentation (see the \mscfile +# command). + +MSCFILE_DIRS = + +# The DIAFILE_DIRS tag can be used to specify one or more directories that +# contain dia files that are included in the documentation (see the \diafile +# command). + +DIAFILE_DIRS = + +# When using plantuml, the PLANTUML_JAR_PATH tag should be used to specify the +# path where java can find the plantuml.jar file. If left blank, it is assumed +# PlantUML is not used or called during a preprocessing step. Doxygen will +# generate a warning when it encounters a \startuml command in this case and +# will not generate output for the diagram. + +PLANTUML_JAR_PATH = + +# When using plantuml, the PLANTUML_CFG_FILE tag can be used to specify a +# configuration file for plantuml. + +PLANTUML_CFG_FILE = + +# When using plantuml, the specified paths are searched for files specified by +# the !include statement in a plantuml block. + +PLANTUML_INCLUDE_PATH = + +# The DOT_GRAPH_MAX_NODES tag can be used to set the maximum number of nodes +# that will be shown in the graph. If the number of nodes in a graph becomes +# larger than this value, doxygen will truncate the graph, which is visualized +# by representing a node as a red box. Note that doxygen if the number of direct +# children of the root node in a graph is already larger than +# DOT_GRAPH_MAX_NODES then the graph will not be shown at all. Also note that +# the size of a graph can be further restricted by MAX_DOT_GRAPH_DEPTH. +# Minimum value: 0, maximum value: 10000, default value: 50. +# This tag requires that the tag HAVE_DOT is set to YES. + +DOT_GRAPH_MAX_NODES = 50 + +# The MAX_DOT_GRAPH_DEPTH tag can be used to set the maximum depth of the graphs +# generated by dot. A depth value of 3 means that only nodes reachable from the +# root by following a path via at most 3 edges will be shown. Nodes that lay +# further from the root node will be omitted. Note that setting this option to 1 +# or 2 may greatly reduce the computation time needed for large code bases. Also +# note that the size of a graph can be further restricted by +# DOT_GRAPH_MAX_NODES. Using a depth of 0 means no depth restriction. +# Minimum value: 0, maximum value: 1000, default value: 0. +# This tag requires that the tag HAVE_DOT is set to YES. + +MAX_DOT_GRAPH_DEPTH = 0 + +# Set the DOT_TRANSPARENT tag to YES to generate images with a transparent +# background. This is disabled by default, because dot on Windows does not seem +# to support this out of the box. +# +# Warning: Depending on the platform used, enabling this option may lead to +# badly anti-aliased labels on the edges of a graph (i.e. they become hard to +# read). +# The default value is: NO. +# This tag requires that the tag HAVE_DOT is set to YES. + +DOT_TRANSPARENT = NO + +# Set the DOT_MULTI_TARGETS tag to YES to allow dot to generate multiple output +# files in one run (i.e. multiple -o and -T options on the command line). This +# makes dot run faster, but since only newer versions of dot (>1.8.10) support +# this, this feature is disabled by default. +# The default value is: NO. +# This tag requires that the tag HAVE_DOT is set to YES. + +DOT_MULTI_TARGETS = NO + +# If the GENERATE_LEGEND tag is set to YES doxygen will generate a legend page +# explaining the meaning of the various boxes and arrows in the dot generated +# graphs. +# The default value is: YES. +# This tag requires that the tag HAVE_DOT is set to YES. + +GENERATE_LEGEND = YES + +# If the DOT_CLEANUP tag is set to YES, doxygen will remove the intermediate dot +# files that are used to generate the various graphs. +# The default value is: YES. +# This tag requires that the tag HAVE_DOT is set to YES. + +DOT_CLEANUP = YES diff --git a/test cases/frameworks/14 doxygen/doc/meson.build b/test cases/frameworks/14 doxygen/doc/meson.build new file mode 100644 index 0000000..bde2d7c --- /dev/null +++ b/test cases/frameworks/14 doxygen/doc/meson.build @@ -0,0 +1,16 @@ +cdata.set('TOP_SRCDIR', meson.source_root()) +cdata.set('TOP_BUILDDIR', meson.build_root()) + +doxyfile = configure_file(input: 'Doxyfile.in', + output: 'Doxyfile', + configuration: cdata, + install: false) + +datadir = join_paths(get_option('datadir'), 'doc', 'spede') + +html_target = custom_target('spede-docs', + input: doxyfile, + output: 'html', + command: [doxygen, doxyfile], + install: true, + install_dir: datadir) diff --git a/test cases/frameworks/14 doxygen/include/comedian.h b/test cases/frameworks/14 doxygen/include/comedian.h new file mode 100644 index 0000000..d62b283 --- /dev/null +++ b/test cases/frameworks/14 doxygen/include/comedian.h @@ -0,0 +1,17 @@ +#pragma once + +namespace Comedy { + + /** + * Interface for a funnyperson. + */ + class Comedian { + public: + /** + * Do the thing people want to happen. + */ + virtual void tell_joke() = 0; + virtual ~Comedian(){}; + }; + +} diff --git a/test cases/frameworks/14 doxygen/include/spede.h b/test cases/frameworks/14 doxygen/include/spede.h new file mode 100644 index 0000000..380708a --- /dev/null +++ b/test cases/frameworks/14 doxygen/include/spede.h @@ -0,0 +1,35 @@ +#pragma once +#include<comedian.h> +#include<stdexcept> + +/** + * \file spede.h + * + * Spede definition. + */ + +namespace Comedy { + + /** + * Spede is the funniest person in the world. + */ + class Spede : public Comedian { + public: + /** + * Creates a new spede. + */ + Spede(); + + /** + * Make him do the funny thing he is known for. + */ + void slap_forehead(); + + virtual void tell_joke() { + throw std::runtime_error("Not implemented"); + } + + private: + int num_movies; ///< How many movies has he done. + }; +} diff --git a/test cases/frameworks/14 doxygen/meson.build b/test cases/frameworks/14 doxygen/meson.build new file mode 100644 index 0000000..517cef2 --- /dev/null +++ b/test cases/frameworks/14 doxygen/meson.build @@ -0,0 +1,27 @@ +project('doxygen test', 'cpp', version : '0.1.0') + +spede_inc = include_directories('include') + +spede_src = [ 'src/spede.cpp' ] + +spede_lib = library('spede', spede_src, include_directories: spede_inc) + +doxygen = find_program('doxygen', required : false) +if not doxygen.found() + error('MESON_SKIP_TEST doxygen not found.') +endif + +cdata = configuration_data() +cdata.set('VERSION', meson.project_version()) + +if find_program('dot', required : false).found() + # In the real world this would set the variable + # to YES. However we set it to NO so that the + # list of generated files is always the same + # so tests always pass. + cdata.set('HAVE_DOT', 'NO') +else + cdata.set('HAVE_DOT', 'NO') +endif + +subdir('doc') diff --git a/test cases/frameworks/14 doxygen/src/spede.cpp b/test cases/frameworks/14 doxygen/src/spede.cpp new file mode 100644 index 0000000..d382902 --- /dev/null +++ b/test cases/frameworks/14 doxygen/src/spede.cpp @@ -0,0 +1,49 @@ +#include<spede.h> + +/** + * \file spede.cpp + * + * This file contains the implementation of the king of comedy. + */ + +/** + * \mainpage The Vast Comedian Project + * + * \section intro Introduction + * + * The purpose of this project is to model every single comedian + * who has ever lived. + * + * \section sched Project schedule + * + * There is no real estimate on when this will be finished. + */ + +/** + * \namespace Comedy + * + * This contains everything that is funny. + */ + +namespace Comedy { + +/** + * Do all the delicate movements that lead to a comical sound + * emanating from a person. + * + * \param force how hard to move the hand. + * \return something or another + */ +int gesticulate(int force) { + // FIXME add implementation. + return 0; +} + +Spede::Spede() : num_movies(100) { +} + +void Spede::slap_forehead() { + gesticulate(42); +} + +} diff --git a/test cases/frameworks/14 doxygen/test.json b/test cases/frameworks/14 doxygen/test.json new file mode 100644 index 0000000..c8c4fb0 --- /dev/null +++ b/test cases/frameworks/14 doxygen/test.json @@ -0,0 +1,6 @@ +{ + "installed": [ + {"type": "dir", "file": "usr/share/doc/spede/html"} + ], + "skip_on_jobname": ["azure", "cygwin", "macos", "msys2"] +} diff --git a/test cases/frameworks/15 llvm/meson.build b/test cases/frameworks/15 llvm/meson.build new file mode 100644 index 0000000..3855fae --- /dev/null +++ b/test cases/frameworks/15 llvm/meson.build @@ -0,0 +1,51 @@ +project('llvmtest', ['c', 'cpp'], default_options : ['c_std=c99']) + +method = get_option('method') +static = get_option('link-static') +d = dependency('llvm', required : false, method : method, static : static) +if not d.found() + error('MESON_SKIP_TEST llvm not found.') +endif + +d = dependency('llvm', modules : 'not-found', required : false, static : static, method : method) +assert(d.found() == false, 'not-found llvm module found') + +d = dependency('llvm', version : '<0.1', required : false, static : static, method : method) +assert(d.found() == false, 'ancient llvm module found') + +d = dependency('llvm', optional_modules : 'not-found', required : false, static : static, method : method) +assert(d.found() == true, 'optional module stopped llvm from being found.') + +# Check we can apply a version constraint +d = dependency('llvm', version : ['< 500', '>=@0@'.format(d.version())], required: false, static : static, method : method) +assert(d.found() == true, 'Cannot set version constraints') + +dep_tinfo = dependency('tinfo', required : false) +if not dep_tinfo.found() + cpp = meson.get_compiler('cpp') + dep_tinfo = cpp.find_library('tinfo', required: false) +endif + +llvm_dep = dependency( + 'llvm', + modules : ['bitwriter', 'asmprinter', 'executionengine', 'target', + 'mcjit', 'nativecodegen', 'amdgpu'], + required : false, + static : static, + method : method, +) + +if not llvm_dep.found() + error('MESON_SKIP_TEST required llvm modules not found.') +endif + +executable( + 'sum', + 'sum.c', + dependencies : [ + llvm_dep, dep_tinfo, + # zlib will be statically linked on windows + dependency('zlib', required : host_machine.system() != 'windows'), + meson.get_compiler('c').find_library('dl', required : false), + ] + ) diff --git a/test cases/frameworks/15 llvm/meson_options.txt b/test cases/frameworks/15 llvm/meson_options.txt new file mode 100644 index 0000000..de3d172 --- /dev/null +++ b/test cases/frameworks/15 llvm/meson_options.txt @@ -0,0 +1,10 @@ +option( + 'method', + type : 'combo', + choices : ['config-tool', 'cmake'] +) +option( + 'link-static', + type : 'boolean', + value : false, +) diff --git a/test cases/frameworks/15 llvm/sum.c b/test cases/frameworks/15 llvm/sum.c new file mode 100644 index 0000000..e35fe95 --- /dev/null +++ b/test cases/frameworks/15 llvm/sum.c @@ -0,0 +1,76 @@ +/** This code is public domain, and taken from + * https://github.com/paulsmith/getting-started-llvm-c-api/blob/master/sum.c + */ +/** + * LLVM equivalent of: + * + * int sum(int a, int b) { + * return a + b; + * } + */ + +#include <llvm-c/Core.h> +#include <llvm-c/ExecutionEngine.h> +#include <llvm-c/Target.h> +#include <llvm-c/Analysis.h> +#include <llvm-c/BitWriter.h> + +#include <inttypes.h> +#include <stdio.h> +#include <stdlib.h> + +int main(int argc, char const *argv[]) { + LLVMModuleRef mod = LLVMModuleCreateWithName("my_module"); + + LLVMTypeRef param_types[] = { LLVMInt32Type(), LLVMInt32Type() }; + LLVMTypeRef ret_type = LLVMFunctionType(LLVMInt32Type(), param_types, 2, 0); + LLVMValueRef sum = LLVMAddFunction(mod, "sum", ret_type); + + LLVMBasicBlockRef entry = LLVMAppendBasicBlock(sum, "entry"); + + LLVMBuilderRef builder = LLVMCreateBuilder(); + LLVMPositionBuilderAtEnd(builder, entry); + LLVMValueRef tmp = LLVMBuildAdd(builder, LLVMGetParam(sum, 0), LLVMGetParam(sum, 1), "tmp"); + LLVMBuildRet(builder, tmp); + + char *error = NULL; + LLVMVerifyModule(mod, LLVMAbortProcessAction, &error); + LLVMDisposeMessage(error); + + LLVMExecutionEngineRef engine; + error = NULL; + LLVMLinkInMCJIT(); + LLVMInitializeNativeAsmPrinter(); + LLVMInitializeNativeTarget(); + if (LLVMCreateExecutionEngineForModule(&engine, mod, &error) != 0) { + fprintf(stderr, "failed to create execution engine\n"); + abort(); + } + if (error) { + fprintf(stderr, "error: %s\n", error); + LLVMDisposeMessage(error); + exit(EXIT_FAILURE); + } + + if (argc < 3) { + fprintf(stderr, "usage: %s x y\n", argv[0]); + exit(EXIT_FAILURE); + } + long long x = strtoll(argv[1], NULL, 10); + long long y = strtoll(argv[2], NULL, 10); + + LLVMGenericValueRef args[] = { + LLVMCreateGenericValueOfInt(LLVMInt32Type(), x, 0), + LLVMCreateGenericValueOfInt(LLVMInt32Type(), y, 0) + }; + LLVMGenericValueRef res = LLVMRunFunction(engine, sum, 2, args); + printf("%d\n", (int)LLVMGenericValueToInt(res, 0)); + + // Write out bitcode to file + if (LLVMWriteBitcodeToFile(mod, "sum.bc") != 0) { + fprintf(stderr, "error writing bitcode to file, skipping\n"); + } + + LLVMDisposeBuilder(builder); + LLVMDisposeExecutionEngine(engine); +} diff --git a/test cases/frameworks/15 llvm/test.json b/test cases/frameworks/15 llvm/test.json new file mode 100644 index 0000000..e70edd5 --- /dev/null +++ b/test cases/frameworks/15 llvm/test.json @@ -0,0 +1,18 @@ +{ + "matrix": { + "options": { + "method": [ + { "val": "config-tool", "skip_on_jobname": ["msys2-gcc"]}, + { "val": "cmake", "skip_on_jobname": ["msys2-gcc"] } + ], + "link-static": [ + { "val": true, "skip_on_jobname": ["opensuse"] }, + { "val": false } + ] + }, + "exclude": [ + { "method": "cmake", "link-static": false } + ] + }, + "skip_on_jobname": ["azure", "cygwin"] +} diff --git a/test cases/frameworks/16 sdl2/meson.build b/test cases/frameworks/16 sdl2/meson.build new file mode 100644 index 0000000..fc98010 --- /dev/null +++ b/test cases/frameworks/16 sdl2/meson.build @@ -0,0 +1,13 @@ +project('sdl2 test', 'c') + +method = get_option('method') + +sdl2_dep = dependency('sdl2', version : '>=2.0.0', required : false, method : method) + +if not sdl2_dep.found() + error('MESON_SKIP_TEST sdl2 not found.') +endif + +e = executable('sdl2prog', 'sdl2prog.c', dependencies : sdl2_dep) + +test('sdl2test', e) diff --git a/test cases/frameworks/16 sdl2/meson_options.txt b/test cases/frameworks/16 sdl2/meson_options.txt new file mode 100644 index 0000000..176af17 --- /dev/null +++ b/test cases/frameworks/16 sdl2/meson_options.txt @@ -0,0 +1,6 @@ +option( + 'method', + type : 'combo', + choices : ['auto', 'pkg-config', 'config-tool', 'sdlconfig', 'extraframework'], + value : 'auto', +) diff --git a/test cases/frameworks/16 sdl2/sdl2prog.c b/test cases/frameworks/16 sdl2/sdl2prog.c new file mode 100644 index 0000000..b67aab4 --- /dev/null +++ b/test cases/frameworks/16 sdl2/sdl2prog.c @@ -0,0 +1,33 @@ +/* vim: set sts=4 sw=4 et : */ + +#include <stdio.h> +#include <SDL_version.h> + +int main(int argc, char *argv[]) { + SDL_version compiled; + SDL_version linked; + + SDL_VERSION(&compiled); + SDL_GetVersion(&linked); + + if (compiled.major != linked.major) { + fprintf(stderr, "Compiled major '%u' != linked major '%u'", + compiled.major, linked.major); + return -1; + } + + if (compiled.minor != linked.minor) { + fprintf(stderr, "Compiled minor '%u' != linked minor '%u'", + compiled.minor, linked.minor); + return -2; + } +#if 0 + /* Disabled because sometimes this is 'micro' and sometimes 'patch' */ + if (compiled.micro != linked.micro) { + fprintf(stderr, "Compiled micro '%u' != linked micro '%u'", + compiled.micro, linked.micro); + return -3; + } +#endif + return 0; +} diff --git a/test cases/frameworks/16 sdl2/test.json b/test cases/frameworks/16 sdl2/test.json new file mode 100644 index 0000000..57a3f21 --- /dev/null +++ b/test cases/frameworks/16 sdl2/test.json @@ -0,0 +1,14 @@ +{ + "matrix": { + "options": { + "method": [ + { "val": "auto" }, + { "val": "pkg-config" }, + { "val": "config-tool" }, + { "val": "sdlconfig" }, + { "val": "extraframework", "skip_on_os": ["!darwin"], "skip_on_jobname": ["macos"] } + ] + } + }, + "skip_on_jobname": ["azure", "cygwin", "msys2"] +} diff --git a/test cases/frameworks/17 mpi/main.c b/test cases/frameworks/17 mpi/main.c new file mode 100644 index 0000000..e44357a --- /dev/null +++ b/test cases/frameworks/17 mpi/main.c @@ -0,0 +1,27 @@ +#include <stdio.h> +#include <mpi.h> + +int main(int argc, char **argv) +{ + int ier, flag; + ier = MPI_Init(&argc, &argv); + if (ier) { + printf("Unable to initialize MPI: %d\n", ier); + return 1; + } + ier = MPI_Initialized(&flag); + if (ier) { + printf("Unable to check MPI initialization state: %d\n", ier); + return 1; + } + if (!flag) { + printf("MPI did not initialize!\n"); + return 1; + } + ier = MPI_Finalize(); + if (ier) { + printf("Unable to finalize MPI: %d\n", ier); + return 1; + } + return 0; +} diff --git a/test cases/frameworks/17 mpi/main.cpp b/test cases/frameworks/17 mpi/main.cpp new file mode 100644 index 0000000..199d913 --- /dev/null +++ b/test cases/frameworks/17 mpi/main.cpp @@ -0,0 +1,12 @@ +#include <mpi.h> +#include <stdio.h> + +int main(int argc, char **argv) +{ + MPI::Init(argc, argv); + if (!MPI::Is_initialized()) { + printf("MPI did not initialize!\n"); + return 1; + } + MPI::Finalize(); +} diff --git a/test cases/frameworks/17 mpi/main.f90 b/test cases/frameworks/17 mpi/main.f90 new file mode 100644 index 0000000..b5666e8 --- /dev/null +++ b/test cases/frameworks/17 mpi/main.f90 @@ -0,0 +1,30 @@ +use, intrinsic :: iso_fortran_env, only: stderr=>error_unit +use mpi + +implicit none + +logical :: flag +integer :: ier + +call MPI_Init(ier) + +if (ier /= 0) then + write(stderr,*) 'Unable to initialize MPI', ier + stop 1 +endif + +call MPI_Initialized(flag, ier) +if (ier /= 0) then + write(stderr,*) 'Unable to check MPI initialization state: ', ier + stop 1 +endif + +call MPI_Finalize(ier) +if (ier /= 0) then + write(stderr,*) 'Unable to finalize MPI: ', ier + stop 1 +endif + +print *, "OK: Fortran MPI" + +end program diff --git a/test cases/frameworks/17 mpi/meson.build b/test cases/frameworks/17 mpi/meson.build new file mode 100644 index 0000000..d1d8991 --- /dev/null +++ b/test cases/frameworks/17 mpi/meson.build @@ -0,0 +1,52 @@ +project('mpi', 'c', 'cpp', default_options: ['b_asneeded=false']) + +method = get_option('method') + +cc = meson.get_compiler('c') +mpic = dependency('mpi', language : 'c', required : false, method : method) +if not mpic.found() + error('MESON_SKIP_TEST: MPI not found, skipping.') +endif +exec = executable('exec', + 'main.c', + dependencies : [mpic]) + +test('MPI C', exec, timeout: 20) + + +# C++ MPI not supported by MS-MPI +cpp = meson.get_compiler('cpp') +mpicpp = dependency('mpi', language : 'cpp', required: false, method : method) +if not cpp.links(''' +#include <mpi.h> +#include <stdio.h> +int main(int argc, char **argv) {MPI::Init(argc, argv);} +''', dependencies: mpicpp, name: 'C++ MPI') + mpicpp = disabler() +endif +execpp = executable('execpp', + 'main.cpp', + dependencies : [mpicpp]) + +test('MPI C++', execpp, timeout: 20) + + +if add_languages('fortran', required : false) + fc = meson.get_compiler('fortran') + mpif = dependency('mpi', language : 'fortran', required: false, method : method) + if not fc.links('use mpi; end', dependencies: mpif, name: 'Fortran MPI') + mpif = disabler() + endif + + exef = executable('exef', + 'main.f90', + dependencies : mpif) + + test('MPI Fortran', exef, timeout: 20) +endif + + +# Check we can apply a version constraint +if mpic.version() != 'unknown' + dependency('mpi', version: '>=@0@'.format(mpic.version()), method : method) +endif diff --git a/test cases/frameworks/17 mpi/meson_options.txt b/test cases/frameworks/17 mpi/meson_options.txt new file mode 100644 index 0000000..7e9363e --- /dev/null +++ b/test cases/frameworks/17 mpi/meson_options.txt @@ -0,0 +1,6 @@ +option( + 'method', + type : 'combo', + choices : ['auto', 'pkg-config', 'config-tool', 'system'], + value : 'auto', +) diff --git a/test cases/frameworks/17 mpi/test.json b/test cases/frameworks/17 mpi/test.json new file mode 100644 index 0000000..115f6f6 --- /dev/null +++ b/test cases/frameworks/17 mpi/test.json @@ -0,0 +1,17 @@ +{ + "matrix": { + "options": { + "method": [ + { "val": "auto" }, + { "val": "pkg-config" }, + { "val": "config-tool", + "skip_on_jobname": ["fedora"] }, + { + "val": "system", + "compilers": { "c" :"msvc", "cpp": "msvc" } + } + ] + } + }, + "skip_on_jobname": ["azure", "cygwin", "msys2", "opensuse"] +} diff --git a/test cases/frameworks/18 vulkan/meson.build b/test cases/frameworks/18 vulkan/meson.build new file mode 100644 index 0000000..5cfe89f --- /dev/null +++ b/test cases/frameworks/18 vulkan/meson.build @@ -0,0 +1,13 @@ +project('vulkan test', 'c') + +vulkan_dep = dependency('vulkan', required : false) +if not vulkan_dep.found() + error('MESON_SKIP_TEST: vulkan not found.') +endif + +e = executable('vulkanprog', 'vulkanprog.c', dependencies : vulkan_dep) + +test('vulkantest', e) + +# Check we can apply a version constraint +dependency('vulkan', version: '>=@0@'.format(vulkan_dep.version())) diff --git a/test cases/frameworks/18 vulkan/test.json b/test cases/frameworks/18 vulkan/test.json new file mode 100644 index 0000000..6ace9de --- /dev/null +++ b/test cases/frameworks/18 vulkan/test.json @@ -0,0 +1,3 @@ +{ + "skip_on_jobname": ["azure", "cygwin", "macos", "msys2"] +} diff --git a/test cases/frameworks/18 vulkan/vulkanprog.c b/test cases/frameworks/18 vulkan/vulkanprog.c new file mode 100644 index 0000000..c6b8803 --- /dev/null +++ b/test cases/frameworks/18 vulkan/vulkanprog.c @@ -0,0 +1,26 @@ +#include <vulkan/vulkan.h> +#include <stdio.h> + +int main(void) +{ + VkInstanceCreateInfo instance_create_info = { + VK_STRUCTURE_TYPE_INSTANCE_CREATE_INFO, + NULL, + 0, + NULL, + 0, + NULL, + 0, + NULL, + }; + + // we don't actually require instance creation to succeed since + // we cannot expect test environments to have a vulkan driver installed. + // As long as this does not produce as segmentation fault or similar, + // everything's alright. + VkInstance instance; + if(vkCreateInstance(&instance_create_info, NULL, &instance) == VK_SUCCESS) + vkDestroyInstance(instance, NULL); + + return 0; +} diff --git a/test cases/frameworks/19 pcap/meson.build b/test cases/frameworks/19 pcap/meson.build new file mode 100644 index 0000000..051e49e --- /dev/null +++ b/test cases/frameworks/19 pcap/meson.build @@ -0,0 +1,22 @@ +project('pcap test', 'c') + +pcap_dep = dependency('pcap', version : '>=1.0', required: false) + +if not pcap_dep.found() + error('MESON_SKIP_TEST pcap not found.') +endif + +pcap_ver = pcap_dep.version() +assert(pcap_ver.split('.').length() > 1, 'pcap version is "@0@"'.format(pcap_ver)) + +e = executable('pcap_prog', 'pcap_prog.c', dependencies : pcap_dep) + +test('pcaptest', e) + +# Ensure discovery via the configuration tools work also +pcap_dep = dependency('pcap', version : '>=1.0', method : 'pcap-config') +pcap_dep = dependency('pcap', version : '>=1.0', method : 'config-tool') + +# Check we can apply a version constraint +dependency('pcap', version: '>=@0@'.format(pcap_dep.version()), method: 'pkg-config', required: false) +dependency('pcap', version: '>=@0@'.format(pcap_dep.version()), method: 'config-tool') diff --git a/test cases/frameworks/19 pcap/pcap_prog.c b/test cases/frameworks/19 pcap/pcap_prog.c new file mode 100644 index 0000000..0fca16c --- /dev/null +++ b/test cases/frameworks/19 pcap/pcap_prog.c @@ -0,0 +1,15 @@ +#include <pcap/pcap.h> + +int +main() +{ + char errbuf[PCAP_ERRBUF_SIZE]; +#ifdef __APPLE__ + // source = NULL for "any" doesn't work on macOS (linux only?) + char *source = "en0"; +#else + char *source = NULL; +#endif + pcap_t *p = pcap_create(source, errbuf); + return p == NULL; +} diff --git a/test cases/frameworks/19 pcap/test.json b/test cases/frameworks/19 pcap/test.json new file mode 100644 index 0000000..8ee026a --- /dev/null +++ b/test cases/frameworks/19 pcap/test.json @@ -0,0 +1,3 @@ +{ + "skip_on_jobname": ["azure", "cygwin", "msys2"] +} diff --git a/test cases/frameworks/2 gtest/meson.build b/test cases/frameworks/2 gtest/meson.build new file mode 100644 index 0000000..ea3ef48 --- /dev/null +++ b/test cases/frameworks/2 gtest/meson.build @@ -0,0 +1,14 @@ +# on Ubuntu this test requires libgtest-dev +project('gtest', 'cpp') + +gtest = dependency('gtest', main : true, required : false) +if not gtest.found() + error('MESON_SKIP_TEST: gtest not installed.') +endif +gtest_nomain = dependency('gtest', main : false, method : 'system') + +e = executable('testprog', 'test.cc', dependencies : gtest) +test('gtest test', e, protocol : 'gtest') + +e = executable('testprog_nomain', 'test_nomain.cc', dependencies : gtest_nomain) +test('gtest nomain test', e, protocol : 'gtest') diff --git a/test cases/frameworks/2 gtest/test.cc b/test cases/frameworks/2 gtest/test.cc new file mode 100644 index 0000000..21efd68 --- /dev/null +++ b/test cases/frameworks/2 gtest/test.cc @@ -0,0 +1,9 @@ +#include<gtest/gtest.h> + +TEST(basic_test, eq_works) { + ASSERT_EQ(0, 1-1) << "Equality is broken. Mass panic!"; +} + +TEST(basic_test, neq_works) { + ASSERT_NE(15, 106) << "Inequal is equal. The foundations of space and time are in jeopardy."; +} diff --git a/test cases/frameworks/2 gtest/test.json b/test cases/frameworks/2 gtest/test.json new file mode 100644 index 0000000..6ace9de --- /dev/null +++ b/test cases/frameworks/2 gtest/test.json @@ -0,0 +1,3 @@ +{ + "skip_on_jobname": ["azure", "cygwin", "macos", "msys2"] +} diff --git a/test cases/frameworks/2 gtest/test_nomain.cc b/test cases/frameworks/2 gtest/test_nomain.cc new file mode 100644 index 0000000..bd0bcfe --- /dev/null +++ b/test cases/frameworks/2 gtest/test_nomain.cc @@ -0,0 +1,14 @@ +#include<gtest/gtest.h> + +TEST(basic_test, eq_works) { + ASSERT_EQ(0, 1-1) << "Equality is broken. Mass panic!"; +} + +TEST(basic_test, neq_works) { + ASSERT_NE(15, 106) << "Inequal is equal. The foundations of space and time are in jeopardy."; +} + +int main(int argc, char **argv) { + ::testing::InitGoogleTest(&argc, argv); + return RUN_ALL_TESTS(); +} diff --git a/test cases/frameworks/20 cups/cups_prog.c b/test cases/frameworks/20 cups/cups_prog.c new file mode 100644 index 0000000..d6b6dcc --- /dev/null +++ b/test cases/frameworks/20 cups/cups_prog.c @@ -0,0 +1,8 @@ +#include <cups/cups.h> + +int +main() +{ + cupsGetDefault(); + return 0; +} diff --git a/test cases/frameworks/20 cups/meson.build b/test cases/frameworks/20 cups/meson.build new file mode 100644 index 0000000..c533980 --- /dev/null +++ b/test cases/frameworks/20 cups/meson.build @@ -0,0 +1,21 @@ +project('cups test', 'c') + +cups_dep = dependency('cups', version : '>=1.4', required: false) + +if not cups_dep.found() + error('MESON_SKIP_TEST cups not found.') +endif + +e = executable('cups_prog', 'cups_prog.c', dependencies : cups_dep) + +test('cupstest', e) + +# ensure we can find the cups dependency via the legacy and modern config-tool +# options +depCC = dependency('cups', version : '>=1.4', method : 'cups-config') +depCT = dependency('cups', version : '>=1.4', method : 'config-tool') +depCM = dependency('cups', version : '>=1.4', method : 'cmake') + +# check we can apply a version constraint +dependency('cups', version: '>=@0@'.format(depCT.version()), method: 'pkg-config', required: false) +dependency('cups', version: '>=@0@'.format(depCT.version()), method: 'config-tool') diff --git a/test cases/frameworks/20 cups/test.json b/test cases/frameworks/20 cups/test.json new file mode 100644 index 0000000..8ee026a --- /dev/null +++ b/test cases/frameworks/20 cups/test.json @@ -0,0 +1,3 @@ +{ + "skip_on_jobname": ["azure", "cygwin", "msys2"] +} diff --git a/test cases/frameworks/21 libwmf/libwmf_prog.c b/test cases/frameworks/21 libwmf/libwmf_prog.c new file mode 100644 index 0000000..4e6294c --- /dev/null +++ b/test cases/frameworks/21 libwmf/libwmf_prog.c @@ -0,0 +1,8 @@ +#include <libwmf/api.h> + +int +main() +{ + wmf_help(); + return 0; +} diff --git a/test cases/frameworks/21 libwmf/meson.build b/test cases/frameworks/21 libwmf/meson.build new file mode 100644 index 0000000..9dbab6a --- /dev/null +++ b/test cases/frameworks/21 libwmf/meson.build @@ -0,0 +1,27 @@ +project('libwmf test', 'c') + +wm = find_program('libwmf-config', required : false) +if not wm.found() or meson.is_cross_build() + error('MESON_SKIP_TEST: libwmf-config not installed') +endif + +libwmf_dep = dependency('libwmf', version : '>= 0.2.8') +libwmf_ver = libwmf_dep.version() +assert(libwmf_ver.split('.').length() > 1, 'libwmf version is "@0@"'.format(libwmf_ver)) +message('libwmf version is "@0@"'.format(libwmf_ver)) +# Workaround for Debian bug 912563 where libwmf-devel returns cflags +# that do not not have Freetype include paths but their headers +# use them unconditionally. +ft_dep = dependency('freetype2') +e = executable('libwmf_prog', 'libwmf_prog.c', dependencies : [libwmf_dep, ft_dep]) + +test('libwmftest', e) + +# Test using the method keyword: + +dependency('libwmf', method : 'config-tool') +dependency('libwmf', method : 'libwmf-config') + +# Check we can apply a version constraint +dependency('libwmf', version: '>=@0@'.format(libwmf_dep.version()), method: 'pkg-config', required: false) +dependency('libwmf', version: '>=@0@'.format(libwmf_dep.version()), method: 'config-tool') diff --git a/test cases/frameworks/21 libwmf/test.json b/test cases/frameworks/21 libwmf/test.json new file mode 100644 index 0000000..6ace9de --- /dev/null +++ b/test cases/frameworks/21 libwmf/test.json @@ -0,0 +1,3 @@ +{ + "skip_on_jobname": ["azure", "cygwin", "macos", "msys2"] +} diff --git a/test cases/frameworks/22 gir link order/fake-gthread/fake-gthread.c b/test cases/frameworks/22 gir link order/fake-gthread/fake-gthread.c new file mode 100644 index 0000000..fae9c38 --- /dev/null +++ b/test cases/frameworks/22 gir link order/fake-gthread/fake-gthread.c @@ -0,0 +1,6 @@ +#include "fake-gthread.h" + +int fake_gthread_fake_function (void) +{ + return 7; +} diff --git a/test cases/frameworks/22 gir link order/fake-gthread/fake-gthread.h b/test cases/frameworks/22 gir link order/fake-gthread/fake-gthread.h new file mode 100644 index 0000000..52b5472 --- /dev/null +++ b/test cases/frameworks/22 gir link order/fake-gthread/fake-gthread.h @@ -0,0 +1,6 @@ +#ifndef FAKE_GTHREAD_H +#define FAKE_GTHREAD_H + +int fake_gthread_fake_function (void); + +#endif /* FAKE_GTHREAD_H */ diff --git a/test cases/frameworks/22 gir link order/fake-gthread/meson.build b/test cases/frameworks/22 gir link order/fake-gthread/meson.build new file mode 100644 index 0000000..693e8e0 --- /dev/null +++ b/test cases/frameworks/22 gir link order/fake-gthread/meson.build @@ -0,0 +1,12 @@ +fake_gthread_sources = ['fake-gthread.c', 'fake-gthread.h'] +fake_gthread_lib = shared_library( + 'gthread-2.0', + sources : fake_gthread_sources, + install : false, +) + +fake_gthread_includes = include_directories('.') +fake_gthread = declare_dependency( + include_directories : fake_gthread_includes, + link_with : fake_gthread_lib, +) diff --git a/test cases/frameworks/22 gir link order/get-prgname/get-prgname.c b/test cases/frameworks/22 gir link order/get-prgname/get-prgname.c new file mode 100644 index 0000000..356b45e --- /dev/null +++ b/test cases/frameworks/22 gir link order/get-prgname/get-prgname.c @@ -0,0 +1,8 @@ +#include "get-prgname.h" + +#include <glib.h> + +const char *get_prgname_get_name (void) +{ + return g_get_prgname (); +} diff --git a/test cases/frameworks/22 gir link order/get-prgname/get-prgname.h b/test cases/frameworks/22 gir link order/get-prgname/get-prgname.h new file mode 100644 index 0000000..cb5118e --- /dev/null +++ b/test cases/frameworks/22 gir link order/get-prgname/get-prgname.h @@ -0,0 +1,6 @@ +#ifndef GET_PRGNAME_H +#define GET_PRGNAME_H + +const char *get_prgname_get_name (void); + +#endif /* GET_PRGNAME_H */ diff --git a/test cases/frameworks/22 gir link order/get-prgname/meson.build b/test cases/frameworks/22 gir link order/get-prgname/meson.build new file mode 100644 index 0000000..6a7489d --- /dev/null +++ b/test cases/frameworks/22 gir link order/get-prgname/meson.build @@ -0,0 +1,13 @@ +get_prgname_sources = ['get-prgname.c', 'get-prgname.h'] +get_prgname_lib = shared_library( + 'get-prgname', + sources : get_prgname_sources, + dependencies : [glib], + install : false, +) + +get_prgname_includes = include_directories('.') +get_prgname = declare_dependency( + include_directories : get_prgname_includes, + link_with : get_prgname_lib, +) diff --git a/test cases/frameworks/22 gir link order/meson-sample.c b/test cases/frameworks/22 gir link order/meson-sample.c new file mode 100644 index 0000000..7c6442a --- /dev/null +++ b/test cases/frameworks/22 gir link order/meson-sample.c @@ -0,0 +1,48 @@ +#include "meson-sample.h" + +#include "get-prgname.h" +#include "fake-gthread.h" + +struct _MesonSample { + GObject parent_instance; +}; + +G_DEFINE_TYPE (MesonSample, meson_sample, G_TYPE_OBJECT) + +/** + * meson_sample_new: + * + * Allocates a new #MesonSample. + * + * Returns: (transfer full): a #MesonSample. + */ +MesonSample * +meson_sample_new (void) +{ + return g_object_new (MESON_TYPE_SAMPLE, NULL); +} + +static void +meson_sample_class_init (MesonSampleClass *klass) +{ +} + +static void +meson_sample_init (MesonSample *self) +{ +} + +/** + * meson_sample_print_message: + * @self: a #MesonSample. + * + * Prints a message. + */ +void +meson_sample_print_message (MesonSample *self) +{ + g_return_if_fail (MESON_IS_SAMPLE (self)); + + g_print ("Message: %s\n", get_prgname_get_name ()); + g_print ("Message: %d\n", fake_gthread_fake_function ()); +} diff --git a/test cases/frameworks/22 gir link order/meson-sample.h b/test cases/frameworks/22 gir link order/meson-sample.h new file mode 100644 index 0000000..2c28401 --- /dev/null +++ b/test cases/frameworks/22 gir link order/meson-sample.h @@ -0,0 +1,17 @@ +#ifndef MESON_SAMPLE_H +#define MESON_SAMPLE_H + +#include <glib-object.h> + +G_BEGIN_DECLS + +#define MESON_TYPE_SAMPLE (meson_sample_get_type()) + +G_DECLARE_FINAL_TYPE (MesonSample, meson_sample, MESON, SAMPLE, GObject) + +MesonSample *meson_sample_new (void); +void meson_sample_print_message (MesonSample *self); + +G_END_DECLS + +#endif /* MESON_SAMPLE_H */ diff --git a/test cases/frameworks/22 gir link order/meson.build b/test cases/frameworks/22 gir link order/meson.build new file mode 100644 index 0000000..8a714b5 --- /dev/null +++ b/test cases/frameworks/22 gir link order/meson.build @@ -0,0 +1,41 @@ +project('gir link order', 'c') + +if not dependency('glib-2.0', required : false).found() or not find_program('g-ir-scanner', required: false).found() + error('MESON_SKIP_TEST glib not found.') +endif + +gnome = import('gnome') +glib = dependency('glib-2.0') +gobject = dependency('gobject-2.0') + +# get-prgname is a shared library which uses a function from glib-2.0. It is +# used to introduce external -L flags which may cause -L order problems. +subdir('get-prgname') + +# fake-gthread is a shared library which has the same name as gthread-2.0 from +# GLib. This is used to simulate the case where an older or unrelated version +# of a library is already installed on the system. Our meson sample library +# defined below uses a function from fake-gthread. If meson messes up -L order, +# the linker will find libgthread-2.0.so installed on the system and fail to +# find the symbol our meson sample library uses. +subdir('fake-gthread') + +meson_sample_sources = ['meson-sample.c', 'meson-sample.h'] +meson_sample_lib = shared_library( + 'sample', + sources : meson_sample_sources, + dependencies : [gobject, get_prgname, fake_gthread], + install : false, +) + +gnome.generate_gir( + meson_sample_lib, + sources : meson_sample_sources, + nsversion : '1.0', + namespace : 'Meson', + symbol_prefix : 'meson', + identifier_prefix : 'Meson', + includes : ['GObject-2.0'], + install : false, + build_by_default: true, +) diff --git a/test cases/frameworks/22 gir link order/test.json b/test cases/frameworks/22 gir link order/test.json new file mode 100644 index 0000000..a9d74fb --- /dev/null +++ b/test cases/frameworks/22 gir link order/test.json @@ -0,0 +1,3 @@ +{ + "skip_on_jobname": ["azure", "macos", "msys2"] +} diff --git a/test cases/frameworks/23 hotdoc/doc/index.md b/test cases/frameworks/23 hotdoc/doc/index.md new file mode 100644 index 0000000..ea5eeb1 --- /dev/null +++ b/test cases/frameworks/23 hotdoc/doc/index.md @@ -0,0 +1 @@ +# Hello world! diff --git a/test cases/frameworks/23 hotdoc/doc/meson.build b/test cases/frameworks/23 hotdoc/doc/meson.build new file mode 100644 index 0000000..a09bff0 --- /dev/null +++ b/test cases/frameworks/23 hotdoc/doc/meson.build @@ -0,0 +1,19 @@ +hotdoc = import('hotdoc') + +target = hotdoc.generate_doc( + 'foobar', + c_smart_index: true, + project_version: '0.1', + sitemap: 'sitemap.txt', + index: 'index.md', + c_sources: files('../../10 gtk-doc/include/foo.h'), + languages: ['c'], + install: true, +) + +assert(target.config_path() == target.full_path() + '.json', + 'Hotdoc config paths do not match.' +) + +assert(hotdoc.has_extensions('search') == true, + 'Extension "search" provided by hotdoc core should always be found') diff --git a/test cases/frameworks/23 hotdoc/doc/sitemap.txt b/test cases/frameworks/23 hotdoc/doc/sitemap.txt new file mode 100644 index 0000000..ba96be1 --- /dev/null +++ b/test cases/frameworks/23 hotdoc/doc/sitemap.txt @@ -0,0 +1,2 @@ +index.md + c-index diff --git a/test cases/frameworks/23 hotdoc/meson.build b/test cases/frameworks/23 hotdoc/meson.build new file mode 100644 index 0000000..64cd6da --- /dev/null +++ b/test cases/frameworks/23 hotdoc/meson.build @@ -0,0 +1,14 @@ +project('hotdoc', 'c') + +hotdoc = find_program('hotdoc', required: false) +if not hotdoc.found() + error('MESON_SKIP_TEST hotdoc not found.') +endif + +subdir('doc') + +assert(hotdoc.has_extensions(['gi-extension']) == true, + 'GI extension should always be found.') + +assert(hotdoc.has_extensions(['gi-extension', 'no-way-you-exist-extension']) == false, + 'A hotdoc extension called "no-way-you-exist-extension" should never be found.') diff --git a/test cases/frameworks/23 hotdoc/test.json b/test cases/frameworks/23 hotdoc/test.json new file mode 100644 index 0000000..e13971e --- /dev/null +++ b/test cases/frameworks/23 hotdoc/test.json @@ -0,0 +1,9 @@ +{ + "installed": [ + {"type": "dir", "file": "usr/share/doc/foobar/html"} + ], + "tools": { + "hotdoc": ">=0.1.0" + }, + "skip_on_jobname": ["msys2"] +} diff --git a/test cases/frameworks/24 libgcrypt/libgcrypt_prog.c b/test cases/frameworks/24 libgcrypt/libgcrypt_prog.c new file mode 100644 index 0000000..f131359 --- /dev/null +++ b/test cases/frameworks/24 libgcrypt/libgcrypt_prog.c @@ -0,0 +1,8 @@ +#include <gcrypt.h> + +int +main() +{ + gcry_check_version(NULL); + return 0; +} diff --git a/test cases/frameworks/24 libgcrypt/meson.build b/test cases/frameworks/24 libgcrypt/meson.build new file mode 100644 index 0000000..5aadb13 --- /dev/null +++ b/test cases/frameworks/24 libgcrypt/meson.build @@ -0,0 +1,23 @@ +project('libgcrypt test', 'c') + +wm = find_program('libgcrypt-config', required : false) +if not wm.found() + error('MESON_SKIP_TEST: libgcrypt-config not installed') +endif + +libgcrypt_dep = dependency('libgcrypt', version : '>= 1.0') +libgcrypt_ver = libgcrypt_dep.version() +assert(libgcrypt_ver.split('.').length() > 1, 'libgcrypt version is "@0@"'.format(libgcrypt_ver)) +message('libgcrypt version is "@0@"'.format(libgcrypt_ver)) +e = executable('libgcrypt_prog', 'libgcrypt_prog.c', dependencies : libgcrypt_dep) + +test('libgcrypttest', e) + +# Test using the method keyword: + +dependency('libgcrypt', method : 'config-tool') +dependency('libgcrypt', method : 'pkg-config', required: false) + +# Check we can apply a version constraint +dependency('libgcrypt', version: '>=@0@'.format(libgcrypt_dep.version()), method: 'pkg-config', required: false) +dependency('libgcrypt', version: '>=@0@'.format(libgcrypt_dep.version()), method: 'config-tool') diff --git a/test cases/frameworks/24 libgcrypt/test.json b/test cases/frameworks/24 libgcrypt/test.json new file mode 100644 index 0000000..77b68c0 --- /dev/null +++ b/test cases/frameworks/24 libgcrypt/test.json @@ -0,0 +1,3 @@ +{ + "skip_on_jobname": ["azure", "msys2"] +} diff --git a/test cases/frameworks/25 hdf5/main.c b/test cases/frameworks/25 hdf5/main.c new file mode 100644 index 0000000..4c46310 --- /dev/null +++ b/test cases/frameworks/25 hdf5/main.c @@ -0,0 +1,30 @@ +#include <stdio.h> +#include <stdlib.h> + +#include "hdf5.h" + +int main(void) +{ +herr_t ier; +unsigned maj, min, rel; + +ier = H5open(); +if (ier) { + fprintf(stderr,"Unable to initialize HDF5: %d\n", ier); + return EXIT_FAILURE; +} + +ier = H5get_libversion(&maj, &min, &rel); +if (ier) { + fprintf(stderr,"HDF5 did not initialize!\n"); + return EXIT_FAILURE; +} +printf("C HDF5 version %d.%d.%d\n", maj, min, rel); + +ier = H5close(); +if (ier) { + fprintf(stderr,"Unable to close HDF5: %d\n", ier); + return EXIT_FAILURE; +} +return EXIT_SUCCESS; +} diff --git a/test cases/frameworks/25 hdf5/main.cpp b/test cases/frameworks/25 hdf5/main.cpp new file mode 100644 index 0000000..477e76b --- /dev/null +++ b/test cases/frameworks/25 hdf5/main.cpp @@ -0,0 +1,29 @@ +#include <iostream> +#include "hdf5.h" + + +int main(void) +{ +herr_t ier; +unsigned maj, min, rel; + +ier = H5open(); +if (ier) { + std::cerr << "Unable to initialize HDF5: " << ier << std::endl; + return EXIT_FAILURE; +} + +ier = H5get_libversion(&maj, &min, &rel); +if (ier) { + std::cerr << "HDF5 did not initialize!" << std::endl; + return EXIT_FAILURE; +} +std::cout << "C++ HDF5 version " << maj << "." << min << "." << rel << std::endl; + +ier = H5close(); +if (ier) { + std::cerr << "Unable to close HDF5: " << ier << std::endl; + return EXIT_FAILURE; +} +return EXIT_SUCCESS; +} diff --git a/test cases/frameworks/25 hdf5/main.f90 b/test cases/frameworks/25 hdf5/main.f90 new file mode 100644 index 0000000..45be146 --- /dev/null +++ b/test cases/frameworks/25 hdf5/main.f90 @@ -0,0 +1,17 @@ +use hdf5 + +implicit none + +integer :: ier, major, minor, rel + +call h5open_f(ier) +if (ier /= 0) error stop 'Unable to initialize HDF5' + +call h5get_libversion_f(major, minor, rel, ier) +if (ier /= 0) error stop 'Unable to check HDF5 version' +print '(A,I1,A1,I0.2,A1,I1)','Fortran HDF5 version ',major,'.',minor,'.',rel + +call h5close_f(ier) +if (ier /= 0) error stop 'Unable to close HDF5 library' + +end program diff --git a/test cases/frameworks/25 hdf5/meson.build b/test cases/frameworks/25 hdf5/meson.build new file mode 100644 index 0000000..0df2ffd --- /dev/null +++ b/test cases/frameworks/25 hdf5/meson.build @@ -0,0 +1,47 @@ +project('hdf5_framework', 'c') + +# NOTE: all HDF5 languages must have HDF5 C library working. + +method = get_option('method') + +# --- C tests +h5c = dependency('hdf5', language : 'c', required : false, method : method) +if not h5c.found() + error('MESON_SKIP_TEST: HDF5 C library not found.') +endif +exec = executable('exec', 'main.c', dependencies : h5c) +test('HDF5 C', exec, timeout: 30) + +# --- C++ tests +if add_languages('cpp', required: false) + h5cpp = dependency('hdf5', language : 'cpp', required : false, disabler: true, method : method) + execpp = executable('execpp', 'main.cpp', dependencies : h5cpp) + test('HDF5 C++', execpp, timeout: 30) +endif + +test_fortran = add_languages('fortran', required: false) + +if test_fortran + cpp = meson.get_compiler('cpp') + fc = meson.get_compiler('fortran') + + if host_machine.system() == 'darwin' and cpp.get_id() == 'clang' and fc.get_id() == 'gcc' + # Search paths don't work correctly here and -lgfortran doesn't work + test_fortran = false + elif host_machine.system() == 'windows' and cpp.get_id() != 'gcc' and fc.get_id() == 'gcc' + # mixing gfotran with non-gcc doesn't work on windows + test_fortran = false + endif + + # --- Fortran tests + if test_fortran + h5f = dependency('hdf5', language : 'fortran', required : false, disabler: true, method : method) + exef = executable('exef', 'main.f90', dependencies : h5f) + test('HDF5 Fortran', exef, timeout: 30) + endif +endif + +# Check we can apply a version constraint +if h5c.version() != 'unknown' + dependency('hdf5', version: '>=@0@'.format(h5c.version())) +endif diff --git a/test cases/frameworks/25 hdf5/meson_options.txt b/test cases/frameworks/25 hdf5/meson_options.txt new file mode 100644 index 0000000..741f58e --- /dev/null +++ b/test cases/frameworks/25 hdf5/meson_options.txt @@ -0,0 +1,6 @@ +option( + 'method', + type : 'combo', + choices : ['pkg-config', 'config-tool'], + value : 'pkg-config' +) diff --git a/test cases/frameworks/25 hdf5/test.json b/test cases/frameworks/25 hdf5/test.json new file mode 100644 index 0000000..dd073ec --- /dev/null +++ b/test cases/frameworks/25 hdf5/test.json @@ -0,0 +1,11 @@ +{ + "matrix": { + "options": { + "method": [ + { "val": "pkg-config", "skip_on_jobname": ["macos"] }, + { "val": "config-tool" } + ] + } + }, + "skip_on_jobname": ["azure", "cygwin", "fedora", "msys2", "opensuse"] +} diff --git a/test cases/frameworks/26 netcdf/main.c b/test cases/frameworks/26 netcdf/main.c new file mode 100644 index 0000000..e592585 --- /dev/null +++ b/test cases/frameworks/26 netcdf/main.c @@ -0,0 +1,14 @@ +#include "netcdf.h" + +int main(void) +{ +int ret, ncid; + +if ((ret = nc_create("foo.nc", NC_CLOBBER, &ncid))) + return ret; + +if ((ret = nc_close(ncid))) + return ret; + +return 0; +} diff --git a/test cases/frameworks/26 netcdf/main.cpp b/test cases/frameworks/26 netcdf/main.cpp new file mode 100644 index 0000000..a3c98ef --- /dev/null +++ b/test cases/frameworks/26 netcdf/main.cpp @@ -0,0 +1,15 @@ +#include <iostream> +#include "netcdf.h" + +int main(void) +{ +int ret, ncid; + +if ((ret = nc_create("foo.nc", NC_CLOBBER, &ncid))) + return ret; + +if ((ret = nc_close(ncid))) + return ret; + +return EXIT_SUCCESS; +} diff --git a/test cases/frameworks/26 netcdf/main.f90 b/test cases/frameworks/26 netcdf/main.f90 new file mode 100644 index 0000000..3872298 --- /dev/null +++ b/test cases/frameworks/26 netcdf/main.f90 @@ -0,0 +1,19 @@ +use netcdf + +implicit none + +integer :: ncid + +call check( nf90_create("foo.nc", NF90_CLOBBER, ncid) ) + +call check( nf90_close(ncid) ) + +contains + + subroutine check(status) + integer, intent (in) :: status + + if(status /= nf90_noerr) error stop trim(nf90_strerror(status)) +end subroutine check + +end program diff --git a/test cases/frameworks/26 netcdf/meson.build b/test cases/frameworks/26 netcdf/meson.build new file mode 100644 index 0000000..0adc5e9 --- /dev/null +++ b/test cases/frameworks/26 netcdf/meson.build @@ -0,0 +1,36 @@ +project('netcdf_test', 'c') + +cc = meson.get_compiler('c') +c_code = '''#include <netcdf.h> +int main(void) { return 0; }''' +# --- C +nc_c = dependency('netcdf', language : 'c', required : false, disabler: true) +if not cc.links(c_code, dependencies: nc_c, name: 'NetCDF C') + nc_c = disabler() +endif +if not nc_c.found() + error('MESON_SKIP_TEST: NetCDF C library not found, skipping NetCDF framework tests.') +endif +exec = executable('exec', 'main.c', dependencies : nc_c) +test('NetCDF C', exec, timeout: 15) + +# --- C++ +if add_languages('cpp', required: false) + nc_cpp = dependency('netcdf', language : 'cpp', required : false, disabler: true) + execpp = executable('execpp', 'main.cpp', dependencies : nc_cpp) + test('NetCDF C++', execpp, timeout: 15) +endif + +# --- Fortran +if build_machine.system() != 'windows' and build_machine.system() != 'darwin' + if add_languages('fortran', required: false) + nc_f = dependency('netcdf', language : 'fortran', required : false, disabler: true) + exef = executable('exef', 'main.f90', dependencies : nc_f) + test('NetCDF Fortran', exef, timeout: 15) + endif +endif + +# Check we can apply a version constraint +if nc_c.version() != 'unknown' + dependency('netcdf', version: '>=@0@'.format(nc_c.version())) +endif diff --git a/test cases/frameworks/26 netcdf/test.json b/test cases/frameworks/26 netcdf/test.json new file mode 100644 index 0000000..83c6291 --- /dev/null +++ b/test cases/frameworks/26 netcdf/test.json @@ -0,0 +1,3 @@ +{ + "skip_on_jobname": ["azure", "bionic", "cygwin", "fedora", "macos", "msys2", "opensuse", "ubuntu"] +} diff --git a/test cases/frameworks/27 gpgme/gpgme_prog.c b/test cases/frameworks/27 gpgme/gpgme_prog.c new file mode 100644 index 0000000..594f685 --- /dev/null +++ b/test cases/frameworks/27 gpgme/gpgme_prog.c @@ -0,0 +1,8 @@ +#include <gpgme.h> + +int +main() +{ + printf("gpgme-v%s", gpgme_check_version(NULL)); + return 0; +} diff --git a/test cases/frameworks/27 gpgme/meson.build b/test cases/frameworks/27 gpgme/meson.build new file mode 100644 index 0000000..91b1aaa --- /dev/null +++ b/test cases/frameworks/27 gpgme/meson.build @@ -0,0 +1,27 @@ +project('gpgme test', 'c') + +wm = find_program('gpgme-config', required: false) +if not wm.found() + error('MESON_SKIP_TEST: gpgme-config not installed') +endif + +gpgme_dep = dependency('gpgme', version: '>= 1.0') +gpgme_ver = gpgme_dep.version() +assert(gpgme_ver.split('.').length() > 1, 'gpgme version is "@0@"'.format(gpgme_ver)) +message('gpgme version is "@0@"'.format(gpgme_ver)) +e = executable('gpgme_prog', 'gpgme_prog.c', dependencies: gpgme_dep) + +test('gpgmetest', e) + +# Test using the method keyword: + +dependency('gpgme', method: 'config-tool') + +# Check we can apply a version constraint +dependency('gpgme', version: '>=@0@'.format(gpgme_dep.version()), method: 'config-tool') + +# If gpgme is new enough, make sure it picks up pkg-config by default: + +if gpgme_ver.version_compare('>=1.13.0') + assert(gpgme_dep.type_name() == 'pkgconfig', 'dependency found via pkg-config') +endif diff --git a/test cases/frameworks/27 gpgme/test.json b/test cases/frameworks/27 gpgme/test.json new file mode 100644 index 0000000..aa7d932 --- /dev/null +++ b/test cases/frameworks/27 gpgme/test.json @@ -0,0 +1,3 @@ +{ + "skip_on_jobname": ["azure", "cygwin", "macos", "msys2", "linux-arch"] +} diff --git a/test cases/frameworks/28 gir link order 2/meson-sample.c b/test cases/frameworks/28 gir link order 2/meson-sample.c new file mode 100644 index 0000000..d743b2d --- /dev/null +++ b/test cases/frameworks/28 gir link order 2/meson-sample.c @@ -0,0 +1,42 @@ +#include "meson-sample.h" + +struct _MesonSample { + GObject parent_instance; +}; + +G_DEFINE_TYPE (MesonSample, meson_sample, G_TYPE_OBJECT) + +/** + * meson_sample_new: + * + * Allocates a new #MesonSample. + * + * Returns: (transfer full): a #MesonSample. + */ +MesonSample * +meson_sample_new (void) +{ + return g_object_new (MESON_TYPE_SAMPLE, NULL); +} + +static void +meson_sample_class_init (MesonSampleClass *klass) +{ +} + +static void +meson_sample_init (MesonSample *self) +{ +} + +/** + * meson_sample_print_message: + * @self: a #MesonSample. + * + * Prints a message. + */ +void +meson_sample_print_message (MesonSample *self) +{ + g_return_if_fail (MESON_IS_SAMPLE (self)); +} diff --git a/test cases/frameworks/28 gir link order 2/meson-sample.h b/test cases/frameworks/28 gir link order 2/meson-sample.h new file mode 100644 index 0000000..2c28401 --- /dev/null +++ b/test cases/frameworks/28 gir link order 2/meson-sample.h @@ -0,0 +1,17 @@ +#ifndef MESON_SAMPLE_H +#define MESON_SAMPLE_H + +#include <glib-object.h> + +G_BEGIN_DECLS + +#define MESON_TYPE_SAMPLE (meson_sample_get_type()) + +G_DECLARE_FINAL_TYPE (MesonSample, meson_sample, MESON, SAMPLE, GObject) + +MesonSample *meson_sample_new (void); +void meson_sample_print_message (MesonSample *self); + +G_END_DECLS + +#endif /* MESON_SAMPLE_H */ diff --git a/test cases/frameworks/28 gir link order 2/meson.build b/test cases/frameworks/28 gir link order 2/meson.build new file mode 100644 index 0000000..a26531b --- /dev/null +++ b/test cases/frameworks/28 gir link order 2/meson.build @@ -0,0 +1,35 @@ +project('gir link order 2', 'c') + +if not dependency('gobject-2.0', required : false).found() or not find_program('g-ir-scanner', required: false).found() + error('MESON_SKIP_TEST gobject not found.') +endif + +gnome = import('gnome') +gobject = dependency('gobject-2.0') + +# This builds a dummy libsample under samelibname that's not really used +subdir('samelibname') + +# This builds the real libsample +meson_sample_sources = ['meson-sample.c', 'meson-sample.h'] +meson_sample_lib = shared_library( + 'sample', + sources : meson_sample_sources, + dependencies : [gobject], + link_with: [samelibname], + install : false, +) + +# g-ir-scanner should get the linker paths in the right order so it links first +# against the target libsample and not the dummy one that's just a dependency +# https://github.com/mesonbuild/meson/pull/5423 +gnome.generate_gir( + meson_sample_lib, + sources : meson_sample_sources, + nsversion : '1.0', + namespace : 'Meson', + symbol_prefix : 'meson', + identifier_prefix : 'Meson', + install : false, + build_by_default: true, +) diff --git a/test cases/frameworks/28 gir link order 2/samelibname/dummy.c b/test cases/frameworks/28 gir link order 2/samelibname/dummy.c new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/test cases/frameworks/28 gir link order 2/samelibname/dummy.c diff --git a/test cases/frameworks/28 gir link order 2/samelibname/meson.build b/test cases/frameworks/28 gir link order 2/samelibname/meson.build new file mode 100644 index 0000000..dd923d7 --- /dev/null +++ b/test cases/frameworks/28 gir link order 2/samelibname/meson.build @@ -0,0 +1,5 @@ +samelibname = shared_library( + 'sample', + sources : 'dummy.c', + install : false, +) diff --git a/test cases/frameworks/28 gir link order 2/test.json b/test cases/frameworks/28 gir link order 2/test.json new file mode 100644 index 0000000..a9d74fb --- /dev/null +++ b/test cases/frameworks/28 gir link order 2/test.json @@ -0,0 +1,3 @@ +{ + "skip_on_jobname": ["azure", "macos", "msys2"] +} diff --git a/test cases/frameworks/29 blocks/main.c b/test cases/frameworks/29 blocks/main.c new file mode 100644 index 0000000..e5ae589 --- /dev/null +++ b/test cases/frameworks/29 blocks/main.c @@ -0,0 +1,6 @@ +int main(int argc, char **argv) +{ + int (^callback)(void) = ^ int (void) { return 0; }; + + return callback(); +} diff --git a/test cases/frameworks/29 blocks/meson.build b/test cases/frameworks/29 blocks/meson.build new file mode 100644 index 0000000..398c92c --- /dev/null +++ b/test cases/frameworks/29 blocks/meson.build @@ -0,0 +1,12 @@ +project('blocks-dependency', 'c') + +id = meson.get_compiler('c').get_id() +if id != 'clang' or build_machine.system() == 'windows' + error('MESON_SKIP_TEST: Only clang on unix-like systems supports the blocks extension.') +endif + +exe = executable('main', 'main.c', + dependencies: dependency('blocks') +) + +test('test-blocks', exe) diff --git a/test cases/frameworks/29 blocks/test.json b/test cases/frameworks/29 blocks/test.json new file mode 100644 index 0000000..34a8c41 --- /dev/null +++ b/test cases/frameworks/29 blocks/test.json @@ -0,0 +1,3 @@ +{ + "skip_on_jobname": ["azure", "gcc", "msys2"] +} diff --git a/test cases/frameworks/3 gmock/gmocktest.cc b/test cases/frameworks/3 gmock/gmocktest.cc new file mode 100644 index 0000000..a8bd2d3 --- /dev/null +++ b/test cases/frameworks/3 gmock/gmocktest.cc @@ -0,0 +1,27 @@ +#include<gtest/gtest.h> +#include<gmock/gmock.h> + +using ::testing::Return; + +class Foo { +public: + Foo() { x = 42; } + virtual ~Foo() {}; + + virtual int getValue() const { return x; } + +private: + int x; +}; + +class MockFoo : public Foo { +public: + MOCK_CONST_METHOD0(getValue, int()); +}; + +TEST(counttest, once) { + MockFoo f; + EXPECT_CALL(f, getValue()).Times(1).WillOnce(Return(42)); + + EXPECT_EQ(f.getValue(), 42) << "Got wrong value"; +} diff --git a/test cases/frameworks/3 gmock/meson.build b/test cases/frameworks/3 gmock/meson.build new file mode 100644 index 0000000..58591ae --- /dev/null +++ b/test cases/frameworks/3 gmock/meson.build @@ -0,0 +1,16 @@ +project('gmock test', 'cpp') + +# Using gmock without gtest is a pain so just +# don't support that then. + +gtest = dependency('gtest', main : true, required : false, method : 'system') +if not gtest.found() + error('MESON_SKIP_TEST: gtest not installed.') +endif +gmock = dependency('gmock', required : false) +if not gmock.found() + error('MESON_SKIP_TEST: gmock not installed.') +endif + +e = executable('gmocktest', 'gmocktest.cc', dependencies : [gtest, gmock]) +test('gmock test', e) diff --git a/test cases/frameworks/3 gmock/test.json b/test cases/frameworks/3 gmock/test.json new file mode 100644 index 0000000..6ace9de --- /dev/null +++ b/test cases/frameworks/3 gmock/test.json @@ -0,0 +1,3 @@ +{ + "skip_on_jobname": ["azure", "cygwin", "macos", "msys2"] +} diff --git a/test cases/frameworks/30 scalapack/cmake/FindSCALAPACK.cmake b/test cases/frameworks/30 scalapack/cmake/FindSCALAPACK.cmake new file mode 100644 index 0000000..17f4b3b --- /dev/null +++ b/test cases/frameworks/30 scalapack/cmake/FindSCALAPACK.cmake @@ -0,0 +1,220 @@ +# Distributed under the OSI-approved BSD 3-Clause License. See accompanying +# file Copyright.txt or https://cmake.org/licensing for details. + +#[=======================================================================[.rst: + +FindSCALAPACK +------------- + +* Michael Hirsch, Ph.D. www.scivision.dev + +Let Michael know if there are more MKL / Lapack / compiler combination you want. +Refer to https://software.intel.com/en-us/articles/intel-mkl-link-line-advisor + +Finds SCALAPACK libraries for MKL, OpenMPI and MPICH. +Intel MKL relies on having environment variable MKLROOT set, typically by sourcing +mklvars.sh beforehand. + +Parameters +^^^^^^^^^^ + +``MKL`` + Intel MKL for MSVC, ICL, ICC, GCC and PGCC. Working with IntelMPI (default Window, Linux), MPICH (default Mac) or OpenMPI (Linux only). + +``IntelMPI`` + MKL BLACS IntelMPI + +``MKL64`` + MKL only: 64-bit integers (default is 32-bit integers) + +``OpenMPI`` + SCALAPACK + OpenMPI + +``MPICH`` + SCALAPACK + MPICH + + +Result Variables +^^^^^^^^^^^^^^^^ + +``SCALAPACK_FOUND`` + SCALapack libraries were found +``SCALAPACK_<component>_FOUND`` + SCALAPACK <component> specified was found +``SCALAPACK_LIBRARIES`` + SCALapack library files +``SCALAPACK_INCLUDE_DIRS`` + SCALapack include directories + + +References +^^^^^^^^^^ + +* Pkg-Config and MKL: https://software.intel.com/en-us/articles/intel-math-kernel-library-intel-mkl-and-pkg-config-tool +* MKL for Windows: https://software.intel.com/en-us/mkl-windows-developer-guide-static-libraries-in-the-lib-intel64-win-directory +* MKL Windows directories: https://software.intel.com/en-us/mkl-windows-developer-guide-high-level-directory-structure +#]=======================================================================] + +#===== functions +function(mkl_scala) + +set(_mkl_libs ${ARGV}) + +foreach(s ${_mkl_libs}) + find_library(SCALAPACK_${s}_LIBRARY + NAMES ${s} + PATHS ENV MKLROOT ENV I_MPI_ROOT ENV TBBROOT + PATH_SUFFIXES + lib/intel64 lib/intel64_win + intel64/lib/release + lib/intel64/gcc4.7 ../tbb/lib/intel64/gcc4.7 + lib/intel64/vc_mt ../tbb/lib/intel64/vc_mt + ../compiler/lib/intel64 + HINTS ${MKL_LIBRARY_DIRS} ${MKL_LIBDIR} + NO_DEFAULT_PATH) + if(NOT SCALAPACK_${s}_LIBRARY) + message(WARNING "MKL component not found: " ${s}) + return() + endif() + + list(APPEND SCALAPACK_LIB ${SCALAPACK_${s}_LIBRARY}) +endforeach() + + +find_path(SCALAPACK_INCLUDE_DIR + NAMES mkl_scalapack.h + PATHS ENV MKLROOT ENV I_MPI_ROOT ENV TBBROOT + PATH_SUFFIXES + include + include/intel64/${_mkl_bitflag}lp64 + HINTS ${MKL_INCLUDE_DIRS}) + +if(NOT SCALAPACK_INCLUDE_DIR) + message(WARNING "MKL Include Dir not found") + return() +endif() + +list(APPEND SCALAPACK_INCLUDE_DIR + ${MKL_INCLUDE_DIRS}) + +set(SCALAPACK_LIBRARY ${SCALAPACK_LIB} PARENT_SCOPE) +set(SCALAPACK_INCLUDE_DIR ${SCALAPACK_INCLUDE_DIR} PARENT_SCOPE) + +endfunction(mkl_scala) + +#==== main program + +cmake_policy(VERSION 3.11) + +if(CMAKE_VERSION VERSION_GREATER_EQUAL 3.12) + cmake_policy(SET CMP0074 NEW) + cmake_policy(SET CMP0075 NEW) +endif() + +if(NOT (OpenMPI IN_LIST SCALAPACK_FIND_COMPONENTS + OR MPICH IN_LIST SCALAPACK_FIND_COMPONENTS + OR MKL IN_LIST SCALAPACK_FIND_COMPONENTS)) + if(DEFINED ENV{MKLROOT}) + if(APPLE) + list(APPEND SCALAPACK_FIND_COMPONENTS MKL MPICH) + else() + list(APPEND SCALAPACK_FIND_COMPONENTS MKL IntelMPI) + endif() + else() + list(APPEND SCALAPACK_FIND_COMPONENTS OpenMPI) + endif() +endif() + +find_package(PkgConfig) + +if(NOT WIN32) + find_package(Threads) # not required--for example Flang +endif() + +if(MKL IN_LIST SCALAPACK_FIND_COMPONENTS) + + if(BUILD_SHARED_LIBS) + set(_mkltype dynamic) + else() + set(_mkltype static) + endif() + + if(MKL64 IN_LIST SCALAPACK_FIND_COMPONENTS) + set(_mkl_bitflag i) + else() + set(_mkl_bitflag) + endif() + + + if(WIN32) + set(_impi impi) + else() + unset(_impi) + endif() + + + pkg_check_modules(MKL mkl-${_mkltype}-${_mkl_bitflag}lp64-iomp) + + if(OpenMPI IN_LIST SCALAPACK_FIND_COMPONENTS) + mkl_scala(mkl_scalapack_${_mkl_bitflag}lp64 mkl_blacs_openmpi_${_mkl_bitflag}lp64) + if(SCALAPACK_LIBRARY) + set(SCALAPACK_OpenMPI_FOUND true) + endif() + elseif(MPICH IN_LIST SCALAPACK_FIND_COMPONENTS) + if(APPLE) + mkl_scala(mkl_scalapack_${_mkl_bitflag}lp64 mkl_blacs_mpich_${_mkl_bitflag}lp64) + elseif(WIN32) + mkl_scala(mkl_scalapack_${_mkl_bitflag}lp64 mkl_blacs_mpich2_${_mkl_bitflag}lp64.lib mpi.lib fmpich2.lib) + else() # linux, yes it's just like IntelMPI + mkl_scala(mkl_scalapack_${_mkl_bitflag}lp64 mkl_blacs_intelmpi_${_mkl_bitflag}lp64) + endif() + if(SCALAPACK_LIBRARY) + set(SCALAPACK_MPICH_FOUND true) + endif() + else() # IntelMPI + mkl_scala(mkl_scalapack_${_mkl_bitflag}lp64 mkl_blacs_intelmpi_${_mkl_bitflag}lp64 ${_impi}) + if(SCALAPACK_LIBRARY) + set(SCALAPACK_IntelMPI_FOUND true) + endif() + endif() + + if(SCALAPACK_LIBRARY) + set(SCALAPACK_MKL_FOUND true) + endif() + +elseif(OpenMPI IN_LIST SCALAPACK_FIND_COMPONENTS) + + pkg_check_modules(SCALAPACK scalapack-openmpi) + + find_library(SCALAPACK_LIBRARY + NAMES scalapack scalapack-openmpi + HINTS ${SCALAPACK_LIBRARY_DIRS} ${SCALAPACK_LIBDIR}) + + if(SCALAPACK_LIBRARY) + set(SCALAPACK_OpenMPI_FOUND true) + endif() + +elseif(MPICH IN_LIST SCALAPACK_FIND_COMPONENTS) + find_library(SCALAPACK_LIBRARY + NAMES scalapack-mpich scalapack-mpich2) + + if(SCALAPACK_LIBRARY) + set(SCALAPACK_MPICH_FOUND true) + endif() + +endif() + +# Finalize + +include(FindPackageHandleStandardArgs) +find_package_handle_standard_args( + SCALAPACK + REQUIRED_VARS SCALAPACK_LIBRARY + HANDLE_COMPONENTS) + +if(SCALAPACK_FOUND) + set(SCALAPACK_LIBRARIES ${SCALAPACK_LIBRARY}) + set(SCALAPACK_INCLUDE_DIRS ${SCALAPACK_INCLUDE_DIR}) +endif() + +mark_as_advanced(SCALAPACK_LIBRARY SCALAPACK_INCLUDE_DIR) diff --git a/test cases/frameworks/30 scalapack/main.c b/test cases/frameworks/30 scalapack/main.c new file mode 100644 index 0000000..ca01977 --- /dev/null +++ b/test cases/frameworks/30 scalapack/main.c @@ -0,0 +1,34 @@ +#include <stdio.h> + +// #include <mkl.h> +// #include <mkl_scalapack.h> +// #include <mkl_blacs.h> + +extern float pslamch_(const int *, const char *); +extern void blacs_pinfo_(int *, int *); +extern void blacs_get_(const int *, const int *, int *); +extern void blacs_gridinit_(int *, const char *, const int *, const int *); +extern void blacs_gridinfo_(const int *, int *, int *, int *, int *); +extern void blacs_gridexit_(const int *); +extern void blacs_exit_(const int *); + +int main(void){ + +int myid, nprocs, ictxt, mycol, myrow, npcol=2, nprow=2; +const int i0=0, i1=1, in1=-1; + +blacs_pinfo_(&myid, &nprocs); +blacs_get_(&in1, &i0, &ictxt); +blacs_gridinit_(&ictxt, "C", &nprocs, &i1); + +blacs_gridinfo_(&ictxt, &nprow, &npcol, &myrow, &mycol); + +float eps = pslamch_(&ictxt, "E"); + +if (myrow == mycol) printf("OK: Scalapack C: eps= %f\n", eps); + +blacs_gridexit_(&ictxt); +blacs_exit_(&i0); + +return 0; +}
\ No newline at end of file diff --git a/test cases/frameworks/30 scalapack/main.f90 b/test cases/frameworks/30 scalapack/main.f90 new file mode 100644 index 0000000..53b5fb9 --- /dev/null +++ b/test cases/frameworks/30 scalapack/main.f90 @@ -0,0 +1,25 @@ +! minimal Scalapack demo +implicit none + +integer :: ictxt, myid, nprocs, mycol, myrow, npcol, nprow +real :: eps +real, external :: pslamch + +! arbitrary test parameters +npcol = 2 +nprow = 2 + +call blacs_pinfo(myid, nprocs) +call blacs_get(-1, 0, ictxt) +call blacs_gridinit(ictxt, "C", nprocs, 1) + +call blacs_gridinfo(ictxt, nprow, npcol, myrow, mycol) + +eps = pslamch(ictxt, 'E') + +if(myrow == mycol) print '(A, F10.6)', "OK: Scalapack Fortran eps=", eps + +call blacs_gridexit(ictxt) +call blacs_exit(0) + +end program diff --git a/test cases/frameworks/30 scalapack/meson.build b/test cases/frameworks/30 scalapack/meson.build new file mode 100644 index 0000000..165cb30 --- /dev/null +++ b/test cases/frameworks/30 scalapack/meson.build @@ -0,0 +1,26 @@ +project('test scalapack', 'c') + +mpi_c = dependency('mpi', language: 'c', required: false) +if not mpi_c.found() + error('MESON_SKIP_TEST: MPI library not available') +endif + +scalapack = dependency('scalapack', required: false) +if not scalapack.found() + error('MESON_SKIP_TEST: scalapack library not available') +endif + +c_exe = executable('scalapack_c', 'main.c', + dependencies: [scalapack, mpi_c]) +test('scalapack_c', c_exe, timeout: 30) + +if add_languages('fortran', required: false) + mpi_f = dependency('mpi', language: 'fortran', required: false) + if not mpi_f.found() + error('MESON_SKIP_TEST: MPI Fortran library not available') + endif + + f_exe = executable('scalapack_fortran', 'main.f90', + dependencies: [scalapack, mpi_f]) + test('scalapack_fortran', f_exe, timeout: 30) +endif diff --git a/test cases/frameworks/30 scalapack/test.json b/test cases/frameworks/30 scalapack/test.json new file mode 100644 index 0000000..0c40573 --- /dev/null +++ b/test cases/frameworks/30 scalapack/test.json @@ -0,0 +1,3 @@ +{ + "skip_on_jobname": ["azure", "bionic", "cygwin", "fedora", "msys2", "opensuse"] +} diff --git a/test cases/frameworks/31 curses/main.c b/test cases/frameworks/31 curses/main.c new file mode 100644 index 0000000..07d73f5 --- /dev/null +++ b/test cases/frameworks/31 curses/main.c @@ -0,0 +1,7 @@ +#include "curses.h" + +int main(void) { +initscr(); +endwin(); +return 0; +}
\ No newline at end of file diff --git a/test cases/frameworks/31 curses/meson.build b/test cases/frameworks/31 curses/meson.build new file mode 100644 index 0000000..796a0d8 --- /dev/null +++ b/test cases/frameworks/31 curses/meson.build @@ -0,0 +1,13 @@ +project('curses', 'c') + +curses = dependency('curses', required: false, method : get_option('method'), version : '>= 0') +if not curses.found() + error('MESON_SKIP_TEST: Curses library not found') +endif + +exec = executable('basic', 'main.c', dependencies: curses) +# didn't run the test because in general graphics fail on CI + +# this should fail +not_found = dependency('curses', required: false, method : get_option('method'), version : '> 1000000') +assert(not_found.found() == false) diff --git a/test cases/frameworks/31 curses/meson_options.txt b/test cases/frameworks/31 curses/meson_options.txt new file mode 100644 index 0000000..e294e83 --- /dev/null +++ b/test cases/frameworks/31 curses/meson_options.txt @@ -0,0 +1,6 @@ +option( + 'method', + type : 'combo', + choices : ['pkg-config', 'config-tool', 'system'], + value : 'pkg-config', +) diff --git a/test cases/frameworks/31 curses/test.json b/test cases/frameworks/31 curses/test.json new file mode 100644 index 0000000..03ed3a2 --- /dev/null +++ b/test cases/frameworks/31 curses/test.json @@ -0,0 +1,12 @@ +{ + "matrix": { + "options": { + "method": [ + { "val": "pkg-config" }, + { "val": "config-tool", "skip_on_jobname": ["msys2"] }, + { "val": "system", "skip_on_os": ["windows"] } + ] + } + }, + "skip_on_jobname": ["azure", "cygwin"] +} diff --git a/test cases/frameworks/32 boost root/boost/include/boost/version.hpp b/test cases/frameworks/32 boost root/boost/include/boost/version.hpp new file mode 100644 index 0000000..65e4fab --- /dev/null +++ b/test cases/frameworks/32 boost root/boost/include/boost/version.hpp @@ -0,0 +1,3 @@ +#define BOOST_VERSION 100 + +#error This is not a real version of boost diff --git a/test cases/frameworks/32 boost root/boost/lib/boost_regex-vc142-mt-gd-x32-0_1.lib b/test cases/frameworks/32 boost root/boost/lib/boost_regex-vc142-mt-gd-x32-0_1.lib new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/test cases/frameworks/32 boost root/boost/lib/boost_regex-vc142-mt-gd-x32-0_1.lib diff --git a/test cases/frameworks/32 boost root/boost/lib/boost_regex-vc142-mt-gd-x64-0_1.lib b/test cases/frameworks/32 boost root/boost/lib/boost_regex-vc142-mt-gd-x64-0_1.lib new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/test cases/frameworks/32 boost root/boost/lib/boost_regex-vc142-mt-gd-x64-0_1.lib diff --git a/test cases/frameworks/32 boost root/boost/lib/libboost_regex.so.0.1.0 b/test cases/frameworks/32 boost root/boost/lib/libboost_regex.so.0.1.0 new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/test cases/frameworks/32 boost root/boost/lib/libboost_regex.so.0.1.0 diff --git a/test cases/frameworks/32 boost root/meson.build b/test cases/frameworks/32 boost root/meson.build new file mode 100644 index 0000000..50d2f0d --- /dev/null +++ b/test cases/frameworks/32 boost root/meson.build @@ -0,0 +1,6 @@ +project('boosttest', 'cpp') + +dep = dependency('boost', modules : 'regex', required: false) + +assert(dep.found(), 'expected to find a fake version of boost') +assert(dep.version() == '0.1.0', 'expected to find version 0.1.0') diff --git a/test cases/frameworks/32 boost root/nativefile.ini.in b/test cases/frameworks/32 boost root/nativefile.ini.in new file mode 100644 index 0000000..54510d7 --- /dev/null +++ b/test cases/frameworks/32 boost root/nativefile.ini.in @@ -0,0 +1,2 @@ +[properties] +boost_root = '@MESON_TEST_ROOT@/boost' diff --git a/test cases/frameworks/33 boost split root/boost/extra-dir/include/boost/version.hpp b/test cases/frameworks/33 boost split root/boost/extra-dir/include/boost/version.hpp new file mode 100644 index 0000000..3ba19ee --- /dev/null +++ b/test cases/frameworks/33 boost split root/boost/extra-dir/include/boost/version.hpp @@ -0,0 +1,3 @@ +#define BOOST_VERSION 200 + +#error This is not a real version of boost diff --git a/test cases/frameworks/33 boost split root/boost/lib/boost_regex-vc142-mt-gd-x32-0_2.lib b/test cases/frameworks/33 boost split root/boost/lib/boost_regex-vc142-mt-gd-x32-0_2.lib new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/test cases/frameworks/33 boost split root/boost/lib/boost_regex-vc142-mt-gd-x32-0_2.lib diff --git a/test cases/frameworks/33 boost split root/boost/lib/boost_regex-vc142-mt-gd-x64-0_2.lib b/test cases/frameworks/33 boost split root/boost/lib/boost_regex-vc142-mt-gd-x64-0_2.lib new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/test cases/frameworks/33 boost split root/boost/lib/boost_regex-vc142-mt-gd-x64-0_2.lib diff --git a/test cases/frameworks/33 boost split root/boost/lib/libboost_regex.so.0.2.0 b/test cases/frameworks/33 boost split root/boost/lib/libboost_regex.so.0.2.0 new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/test cases/frameworks/33 boost split root/boost/lib/libboost_regex.so.0.2.0 diff --git a/test cases/frameworks/33 boost split root/meson.build b/test cases/frameworks/33 boost split root/meson.build new file mode 100644 index 0000000..a2353bb --- /dev/null +++ b/test cases/frameworks/33 boost split root/meson.build @@ -0,0 +1,6 @@ +project('boosttest', 'cpp') + +dep = dependency('boost', modules : 'regex', required: false) + +assert(dep.found(), 'expected to find a fake version of boost') +assert(dep.version() == '0.2.0', 'expected to find version 0.2.0') diff --git a/test cases/frameworks/33 boost split root/nativefile.ini.in b/test cases/frameworks/33 boost split root/nativefile.ini.in new file mode 100644 index 0000000..7bd5ac2 --- /dev/null +++ b/test cases/frameworks/33 boost split root/nativefile.ini.in @@ -0,0 +1,3 @@ +[properties] +boost_includedir = '@MESON_TEST_ROOT@/boost/extra-dir/include' +boost_librarydir = '@MESON_TEST_ROOT@/boost/lib' diff --git a/test cases/frameworks/34 gir static lib/meson.build b/test cases/frameworks/34 gir static lib/meson.build new file mode 100644 index 0000000..d7ab9bf --- /dev/null +++ b/test cases/frameworks/34 gir static lib/meson.build @@ -0,0 +1,18 @@ +project('gobject-introspection-static-helper', 'c') + +gir = find_program('g-ir-scanner', required: false) +if not gir.found() + error('MESON_SKIP_TEST g-ir-scanner not found.') +endif + +gobject_introspection = dependency('gobject-introspection-1.0') +# This won't work without https://gitlab.gnome.org/GNOME/gobject-introspection/merge_requests/72 +if gobject_introspection.version().version_compare('< 1.58.1') + error('MESON_SKIP_TEST gobject-introspection is too old to support static libraries') +endif + +gnome = import('gnome') +gobj = dependency('gobject-2.0') + +subdir('statichelper') +subdir('subdir/gir') diff --git a/test cases/frameworks/34 gir static lib/statichelper/meson-sample.c b/test cases/frameworks/34 gir static lib/statichelper/meson-sample.c new file mode 100644 index 0000000..2ed9cdf --- /dev/null +++ b/test cases/frameworks/34 gir static lib/statichelper/meson-sample.c @@ -0,0 +1,126 @@ +#include "meson-sample.h" + +typedef struct _MesonSamplePrivate +{ + gchar *msg; +} MesonSamplePrivate; + + +G_DEFINE_TYPE_WITH_PRIVATE (MesonSample, meson_sample, G_TYPE_OBJECT) + +enum { + PROP_0, + PROP_MSG, + LAST_PROP +}; + +static GParamSpec *gParamSpecs [LAST_PROP]; + +/** + * meson_sample_new: + * @msg: The message to set. + * + * Allocates a new #MesonSample. + * + * Returns: (transfer full): a #MesonSample. + */ +MesonSample * +meson_sample_new (const gchar *msg) +{ + g_return_val_if_fail (msg != NULL, NULL); + + return g_object_new (MESON_TYPE_SAMPLE, + "message", msg, + NULL); +} + +static void +meson_sample_finalize (GObject *object) +{ + MesonSamplePrivate *priv = meson_sample_get_instance_private ((MesonSample *) object); + + g_clear_pointer (&priv->msg, g_free); + + G_OBJECT_CLASS (meson_sample_parent_class)->finalize (object); +} + +static void +meson_sample_get_property (GObject *object, + guint prop_id, + GValue *value, + GParamSpec *pspec) +{ + MesonSamplePrivate *priv = meson_sample_get_instance_private ((MesonSample *) object); + + switch (prop_id) + { + case PROP_MSG: + g_value_set_string (value, priv->msg); + break; + default: + G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); + } +} + +static void +meson_sample_set_property (GObject *object, + guint prop_id, + const GValue *value, + GParamSpec *pspec) +{ + MesonSamplePrivate *priv = meson_sample_get_instance_private ((MesonSample *) object); + + switch (prop_id) + { + case PROP_MSG: + priv->msg = g_value_dup_string (value); + break; + default: + G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); + } +} + +static void +meson_sample_class_init (MesonSampleClass *klass) +{ + GObjectClass *object_class = G_OBJECT_CLASS (klass); + + object_class->finalize = meson_sample_finalize; + object_class->get_property = meson_sample_get_property; + object_class->set_property = meson_sample_set_property; + + gParamSpecs [PROP_MSG] = + g_param_spec_string ("message", + "Message", + "The message to print.", + NULL, + (G_PARAM_READWRITE | + G_PARAM_CONSTRUCT_ONLY | + G_PARAM_STATIC_STRINGS)); + + g_object_class_install_properties (object_class, LAST_PROP, gParamSpecs); +} + +static void +meson_sample_init (MesonSample *self) +{ +} + +/** + * meson_sample_print_message: + * @self: a #MesonSample. + * + * Prints the message. + * + */ +void +meson_sample_print_message (MesonSample *self) +{ + MesonSamplePrivate *priv; + + g_return_if_fail (MESON_IS_SAMPLE (self)); + + priv = meson_sample_get_instance_private (self); + + g_print ("Message: %s\n", priv->msg); +} diff --git a/test cases/frameworks/34 gir static lib/statichelper/meson-sample.h.in b/test cases/frameworks/34 gir static lib/statichelper/meson-sample.h.in new file mode 100644 index 0000000..d0ab29e --- /dev/null +++ b/test cases/frameworks/34 gir static lib/statichelper/meson-sample.h.in @@ -0,0 +1,22 @@ +#ifndef MESON_SAMPLE_H +#define MESON_SAMPLE_H + +#include <@HEADER@> + +G_BEGIN_DECLS + +#define MESON_TYPE_SAMPLE (meson_sample_get_type()) + +G_DECLARE_DERIVABLE_TYPE (MesonSample, meson_sample, MESON, SAMPLE, GObject) + +struct _MesonSampleClass { + GObjectClass parent_class; +}; + + +MesonSample *meson_sample_new (const gchar *msg); +void meson_sample_print_message (MesonSample *self); + +G_END_DECLS + +#endif /* MESON_SAMPLE_H */ diff --git a/test cases/frameworks/34 gir static lib/statichelper/meson.build b/test cases/frameworks/34 gir static lib/statichelper/meson.build new file mode 100644 index 0000000..a815372 --- /dev/null +++ b/test cases/frameworks/34 gir static lib/statichelper/meson.build @@ -0,0 +1,22 @@ +conf = configuration_data() +conf.set('HEADER', 'glib-object.h') + +meson_sample_header = configure_file( + input : 'meson-sample.h.in', + output : 'meson-sample.h', + configuration : conf) + +statichelper_sources = files('meson-sample.c') + [meson_sample_header] + +statichelper_lib = static_library( + 'statichelper', + sources : statichelper_sources, + dependencies : gobj, +) + +statichelper_inc = include_directories('.') +statichelper_dep = declare_dependency( + link_with: statichelper_lib, + dependencies : gobj, + include_directories : [statichelper_inc], +) diff --git a/test cases/frameworks/34 gir static lib/subdir/gir/meson-subsample.c b/test cases/frameworks/34 gir static lib/subdir/gir/meson-subsample.c new file mode 100644 index 0000000..2d58a10 --- /dev/null +++ b/test cases/frameworks/34 gir static lib/subdir/gir/meson-subsample.c @@ -0,0 +1,124 @@ +#include "meson-subsample.h" + +struct _MesonSubSample +{ + MesonSample parent_instance; + + gchar *msg; +}; + +G_DEFINE_TYPE (MesonSubSample, meson_sub_sample, MESON_TYPE_SAMPLE) + +enum { + PROP_0, + PROP_MSG, + LAST_PROP +}; + +static GParamSpec *gParamSpecs [LAST_PROP]; + +/** + * meson_sub_sample_new: + * @msg: The message to set. + * + * Allocates a new #MesonSubSample. + * + * Returns: (transfer full): a #MesonSubSample. + */ +MesonSubSample * +meson_sub_sample_new (const gchar *msg) +{ + g_return_val_if_fail (msg != NULL, NULL); + + return g_object_new (MESON_TYPE_SUB_SAMPLE, + "message", msg, + NULL); +} + +static void +meson_sub_sample_finalize (GObject *object) +{ + MesonSubSample *self = (MesonSubSample *)object; + + g_clear_pointer (&self->msg, g_free); + + G_OBJECT_CLASS (meson_sub_sample_parent_class)->finalize (object); +} + +static void +meson_sub_sample_get_property (GObject *object, + guint prop_id, + GValue *value, + GParamSpec *pspec) +{ + MesonSubSample *self = MESON_SUB_SAMPLE (object); + + switch (prop_id) + { + case PROP_MSG: + g_value_set_string (value, self->msg); + break; + default: + G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); + } +} + +static void +meson_sub_sample_set_property (GObject *object, + guint prop_id, + const GValue *value, + GParamSpec *pspec) +{ + MesonSubSample *self = MESON_SUB_SAMPLE (object); + + switch (prop_id) + { + case PROP_MSG: + self->msg = g_value_dup_string (value); + break; + default: + G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); + } +} + +static void +meson_sub_sample_class_init (MesonSubSampleClass *klass) +{ + GObjectClass *object_class = G_OBJECT_CLASS (klass); + + object_class->finalize = meson_sub_sample_finalize; + object_class->get_property = meson_sub_sample_get_property; + object_class->set_property = meson_sub_sample_set_property; + + gParamSpecs [PROP_MSG] = + g_param_spec_string ("message", + "Message", + "The message to print.", + NULL, + (G_PARAM_READWRITE | + G_PARAM_CONSTRUCT_ONLY | + G_PARAM_STATIC_STRINGS)); + + g_object_class_install_properties (object_class, LAST_PROP, gParamSpecs); +} + +static void +meson_sub_sample_init (MesonSubSample *self) +{ +} + +/** + * meson_sub_sample_print_message: + * @self: a #MesonSubSample. + * + * Prints the message. + * + * Returns: Nothing. + */ +void +meson_sub_sample_print_message (MesonSubSample *self) +{ + g_return_if_fail (MESON_IS_SUB_SAMPLE (self)); + + g_print ("Message: %s\n", self->msg); +} diff --git a/test cases/frameworks/34 gir static lib/subdir/gir/meson-subsample.h b/test cases/frameworks/34 gir static lib/subdir/gir/meson-subsample.h new file mode 100644 index 0000000..9d34a08 --- /dev/null +++ b/test cases/frameworks/34 gir static lib/subdir/gir/meson-subsample.h @@ -0,0 +1,17 @@ +#ifndef MESON_SUB_SAMPLE_H +#define MESON_SUB_SAMPLE_H + +#include <glib-object.h> +#include <meson-sample.h> + +G_BEGIN_DECLS + +#define MESON_TYPE_SUB_SAMPLE (meson_sub_sample_get_type()) + +G_DECLARE_FINAL_TYPE (MesonSubSample, meson_sub_sample, MESON, SUB_SAMPLE, MesonSample) + +MesonSubSample *meson_sub_sample_new (const gchar *msg); + +G_END_DECLS + +#endif /* MESON_SUB_SAMPLE_H */ diff --git a/test cases/frameworks/34 gir static lib/subdir/gir/meson.build b/test cases/frameworks/34 gir static lib/subdir/gir/meson.build new file mode 100644 index 0000000..b26f04e --- /dev/null +++ b/test cases/frameworks/34 gir static lib/subdir/gir/meson.build @@ -0,0 +1,28 @@ +libsources = ['meson-subsample.c', 'meson-subsample.h'] + +girlib = shared_library( + 'girlib', + sources : libsources, + dependencies : [gobj, statichelper_dep], + install : true +) + +girexe = executable( + 'girprog', + sources : 'prog.c', + dependencies : [gobj, statichelper_dep], + link_with : girlib +) + +gnome.generate_gir( + girlib, statichelper_lib, + sources : [ libsources, statichelper_sources ], + nsversion : '1.0', + namespace : 'Meson', + symbol_prefix : 'meson_', + identifier_prefix : 'Meson', + includes : ['GObject-2.0'], + install : true +) + +test('gobject introspection/subproject/c', girexe) diff --git a/test cases/frameworks/34 gir static lib/subdir/gir/prog.c b/test cases/frameworks/34 gir static lib/subdir/gir/prog.c new file mode 100644 index 0000000..f25c9d8 --- /dev/null +++ b/test cases/frameworks/34 gir static lib/subdir/gir/prog.c @@ -0,0 +1,12 @@ +#include "meson-subsample.h" + +gint +main (gint argc, + gchar *argv[]) +{ + MesonSample * i = (MesonSample*) meson_sub_sample_new ("Hello, sub/meson/c!"); + meson_sample_print_message (i); + g_object_unref (i); + + return 0; +} diff --git a/test cases/frameworks/34 gir static lib/test.json b/test cases/frameworks/34 gir static lib/test.json new file mode 100644 index 0000000..8d7f707 --- /dev/null +++ b/test cases/frameworks/34 gir static lib/test.json @@ -0,0 +1,9 @@ +{ + "installed": [ + {"type": "file", "file": "usr/lib/girepository-1.0/Meson-1.0.typelib"}, + {"type": "expr", "file": "usr/lib/?libgirlib.so"}, + {"type": "file", "platform": "cygwin", "file": "usr/lib/libgirlib.dll.a"}, + {"type": "file", "file": "usr/share/gir-1.0/Meson-1.0.gir"} + ], + "skip_on_jobname": ["azure", "bionic", "cygwin", "macos", "msys2"] +} diff --git a/test cases/frameworks/35 boost symlinks/boost/Cellar/boost-python/0.3.0/lib/boost_python-vc142-mt-gd-x32-0_3.lib b/test cases/frameworks/35 boost symlinks/boost/Cellar/boost-python/0.3.0/lib/boost_python-vc142-mt-gd-x32-0_3.lib new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/test cases/frameworks/35 boost symlinks/boost/Cellar/boost-python/0.3.0/lib/boost_python-vc142-mt-gd-x32-0_3.lib diff --git a/test cases/frameworks/35 boost symlinks/boost/Cellar/boost-python/0.3.0/lib/boost_python-vc142-mt-gd-x64-0_3.lib b/test cases/frameworks/35 boost symlinks/boost/Cellar/boost-python/0.3.0/lib/boost_python-vc142-mt-gd-x64-0_3.lib new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/test cases/frameworks/35 boost symlinks/boost/Cellar/boost-python/0.3.0/lib/boost_python-vc142-mt-gd-x64-0_3.lib diff --git a/test cases/frameworks/35 boost symlinks/boost/Cellar/boost-python/0.3.0/lib/libboost_python.so.0.3.0 b/test cases/frameworks/35 boost symlinks/boost/Cellar/boost-python/0.3.0/lib/libboost_python.so.0.3.0 new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/test cases/frameworks/35 boost symlinks/boost/Cellar/boost-python/0.3.0/lib/libboost_python.so.0.3.0 diff --git a/test cases/frameworks/35 boost symlinks/boost/Cellar/boost/0.3.0/include/boost/version.hpp b/test cases/frameworks/35 boost symlinks/boost/Cellar/boost/0.3.0/include/boost/version.hpp new file mode 100644 index 0000000..77d9948 --- /dev/null +++ b/test cases/frameworks/35 boost symlinks/boost/Cellar/boost/0.3.0/include/boost/version.hpp @@ -0,0 +1,3 @@ +#define BOOST_VERSION 300 + +#error This is not a real version of boost diff --git a/test cases/frameworks/35 boost symlinks/boost/Cellar/boost/0.3.0/lib/boost_regex-vc142-mt-gd-x32-0_3.lib b/test cases/frameworks/35 boost symlinks/boost/Cellar/boost/0.3.0/lib/boost_regex-vc142-mt-gd-x32-0_3.lib new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/test cases/frameworks/35 boost symlinks/boost/Cellar/boost/0.3.0/lib/boost_regex-vc142-mt-gd-x32-0_3.lib diff --git a/test cases/frameworks/35 boost symlinks/boost/Cellar/boost/0.3.0/lib/boost_regex-vc142-mt-gd-x64-0_3.lib b/test cases/frameworks/35 boost symlinks/boost/Cellar/boost/0.3.0/lib/boost_regex-vc142-mt-gd-x64-0_3.lib new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/test cases/frameworks/35 boost symlinks/boost/Cellar/boost/0.3.0/lib/boost_regex-vc142-mt-gd-x64-0_3.lib diff --git a/test cases/frameworks/35 boost symlinks/boost/Cellar/boost/0.3.0/lib/libboost_regex.so.0.3.0 b/test cases/frameworks/35 boost symlinks/boost/Cellar/boost/0.3.0/lib/libboost_regex.so.0.3.0 new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/test cases/frameworks/35 boost symlinks/boost/Cellar/boost/0.3.0/lib/libboost_regex.so.0.3.0 diff --git a/test cases/frameworks/35 boost symlinks/boost/include/boost/version.hpp b/test cases/frameworks/35 boost symlinks/boost/include/boost/version.hpp new file mode 100644 index 0000000..77d9948 --- /dev/null +++ b/test cases/frameworks/35 boost symlinks/boost/include/boost/version.hpp @@ -0,0 +1,3 @@ +#define BOOST_VERSION 300 + +#error This is not a real version of boost diff --git a/test cases/frameworks/35 boost symlinks/boost/lib/boost_python-vc142-mt-gd-x32-0_3.lib b/test cases/frameworks/35 boost symlinks/boost/lib/boost_python-vc142-mt-gd-x32-0_3.lib new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/test cases/frameworks/35 boost symlinks/boost/lib/boost_python-vc142-mt-gd-x32-0_3.lib diff --git a/test cases/frameworks/35 boost symlinks/boost/lib/boost_python-vc142-mt-gd-x64-0_3.lib b/test cases/frameworks/35 boost symlinks/boost/lib/boost_python-vc142-mt-gd-x64-0_3.lib new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/test cases/frameworks/35 boost symlinks/boost/lib/boost_python-vc142-mt-gd-x64-0_3.lib diff --git a/test cases/frameworks/35 boost symlinks/boost/lib/boost_regex-vc142-mt-gd-x32-0_3.lib b/test cases/frameworks/35 boost symlinks/boost/lib/boost_regex-vc142-mt-gd-x32-0_3.lib new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/test cases/frameworks/35 boost symlinks/boost/lib/boost_regex-vc142-mt-gd-x32-0_3.lib diff --git a/test cases/frameworks/35 boost symlinks/boost/lib/boost_regex-vc142-mt-gd-x64-0_3.lib b/test cases/frameworks/35 boost symlinks/boost/lib/boost_regex-vc142-mt-gd-x64-0_3.lib new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/test cases/frameworks/35 boost symlinks/boost/lib/boost_regex-vc142-mt-gd-x64-0_3.lib diff --git a/test cases/frameworks/35 boost symlinks/boost/lib/libboost_python.so.0.3.0 b/test cases/frameworks/35 boost symlinks/boost/lib/libboost_python.so.0.3.0 new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/test cases/frameworks/35 boost symlinks/boost/lib/libboost_python.so.0.3.0 diff --git a/test cases/frameworks/35 boost symlinks/boost/lib/libboost_regex.so.0.3.0 b/test cases/frameworks/35 boost symlinks/boost/lib/libboost_regex.so.0.3.0 new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/test cases/frameworks/35 boost symlinks/boost/lib/libboost_regex.so.0.3.0 diff --git a/test cases/frameworks/35 boost symlinks/meson.build b/test cases/frameworks/35 boost symlinks/meson.build new file mode 100644 index 0000000..b49a143 --- /dev/null +++ b/test cases/frameworks/35 boost symlinks/meson.build @@ -0,0 +1,6 @@ +project('boosttestsymlinks', 'cpp') + +dep = dependency('boost', modules : ['regex', 'python'], required: false) + +assert(dep.found(), 'expected to find a fake version of boost') +assert(dep.version() == '0.3.0', 'expected to find version 0.3.0') diff --git a/test cases/frameworks/35 boost symlinks/nativefile.ini.in b/test cases/frameworks/35 boost symlinks/nativefile.ini.in new file mode 100644 index 0000000..54510d7 --- /dev/null +++ b/test cases/frameworks/35 boost symlinks/nativefile.ini.in @@ -0,0 +1,2 @@ +[properties] +boost_root = '@MESON_TEST_ROOT@/boost' diff --git a/test cases/frameworks/4 qt/main.cpp b/test cases/frameworks/4 qt/main.cpp new file mode 100644 index 0000000..3c141b9 --- /dev/null +++ b/test cases/frameworks/4 qt/main.cpp @@ -0,0 +1,55 @@ +#include <QApplication> +#include <QTranslator> +#include <QDebug> +#include "mainWindow.h" + +#if QT_VERSION > 0x050000 +// include some random private headers +// As you're not supposed to use it, your system may miss +// qobject_p.h. To locate it try one of these commands: +// - dnf provides */private/qobject_p.h +// - apt-file search qobject_p.h + #include <private/qobject_p.h> +#endif + +int main(int argc, char **argv) { + #ifndef UNITY_BUILD + Q_INIT_RESOURCE(stuff); + Q_INIT_RESOURCE(stuff2); + #endif + QApplication app(argc, argv); + + auto *translator = new QTranslator; + if (translator->load(QLocale(), QT "embedded", "_", ":/lang")) + qApp->installTranslator(translator); + + qDebug() << QObject::tr("Translate me!"); + + MainWindow *win = new MainWindow(); + QImage qi(":/thing.png"); + if(qi.width() != 640) { + return 1; + } + QImage qi2(":/thing2.png"); + if(qi2.width() != 640) { + return 1; + } + win->setWindowTitle("Meson Qt5 build test"); + QLabel *label_stuff = win->findChild<QLabel *>("label_stuff"); + if(label_stuff == nullptr) { + return 1; + } + int w = label_stuff->width(); + int h = label_stuff->height(); + label_stuff->setPixmap(QPixmap::fromImage(qi).scaled(w,h,Qt::KeepAspectRatio)); + QLabel *label_stuff2 = win->findChild<QLabel *>("label_stuff2"); + if(label_stuff2 == nullptr) { + return 1; + } + w = label_stuff2->width(); + h = label_stuff2->height(); + label_stuff2->setPixmap(QPixmap::fromImage(qi2).scaled(w,h,Qt::KeepAspectRatio)); + win->show(); + return app.exec(); + return 0; +} diff --git a/test cases/frameworks/4 qt/mainWindow.cpp b/test cases/frameworks/4 qt/mainWindow.cpp new file mode 100644 index 0000000..cc82c4f --- /dev/null +++ b/test cases/frameworks/4 qt/mainWindow.cpp @@ -0,0 +1,8 @@ +#include "mainWindow.h" + +MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent) { + setupUi(this); +} + +MainWindow::~MainWindow() { +} diff --git a/test cases/frameworks/4 qt/mainWindow.h b/test cases/frameworks/4 qt/mainWindow.h new file mode 100644 index 0000000..7f6d906 --- /dev/null +++ b/test cases/frameworks/4 qt/mainWindow.h @@ -0,0 +1,20 @@ +#ifndef MES_MAINWINDOW +#define MES_MAINWINDOW + +#include <QObject> +#include <QMainWindow> +#include "ui_mainWindow.h" + +class NotificationModel; + +class MainWindow : public QMainWindow, private Ui_MainWindow { + Q_OBJECT + +public: + explicit MainWindow(QWidget *parent=0); + ~MainWindow(); + +private: +}; + +#endif diff --git a/test cases/frameworks/4 qt/mainWindow.ui b/test cases/frameworks/4 qt/mainWindow.ui new file mode 100644 index 0000000..c01b8bf --- /dev/null +++ b/test cases/frameworks/4 qt/mainWindow.ui @@ -0,0 +1,54 @@ +<?xml version="1.0" encoding="UTF-8"?> +<ui version="4.0"> + <class>MainWindow</class> + <widget class="QMainWindow" name="MainWindow"> + <property name="geometry"> + <rect> + <x>0</x> + <y>0</y> + <width>260</width> + <height>313</height> + </rect> + </property> + <property name="windowTitle"> + <string>MainWindow</string> + </property> + <widget class="QWidget" name="centralwidget"> + <widget class="QPushButton" name="pushButton"> + <property name="geometry"> + <rect> + <x>10</x> + <y>10</y> + <width>241</width> + <height>91</height> + </rect> + </property> + <property name="text"> + <string>I am a button</string> + </property> + </widget> + <widget class="QLabel" name="label_stuff"> + <property name="geometry"> + <rect> + <x>10</x> + <y>112</y> + <width>241</width> + <height>91</height> + </rect> + </property> + </widget> + <widget class="QLabel" name="label_stuff2"> + <property name="geometry"> + <rect> + <x>10</x> + <y>212</y> + <width>241</width> + <height>91</height> + </rect> + </property> + </widget> + </widget> + </widget> + <resources/> + <connections/> +</ui> diff --git a/test cases/frameworks/4 qt/manualinclude.cpp b/test cases/frameworks/4 qt/manualinclude.cpp new file mode 100644 index 0000000..60b94e5 --- /dev/null +++ b/test cases/frameworks/4 qt/manualinclude.cpp @@ -0,0 +1,26 @@ +#include"manualinclude.h" +#include<QCoreApplication> + +#include<QObject> + +ManualInclude::ManualInclude() { +} + +void ManualInclude::myslot(void) { + ; +} + +class MocClass : public QObject { + Q_OBJECT +}; + +int main(int argc, char **argv) { + ManualInclude mi; + MocClass mc; + QObject::connect(&mi, SIGNAL(mysignal(void)), + &mi, SLOT(myslot(void))); + emit mi.mysignal(); + return 0; +} + +#include"manualinclude.moc" diff --git a/test cases/frameworks/4 qt/manualinclude.h b/test cases/frameworks/4 qt/manualinclude.h new file mode 100644 index 0000000..44bb7a7 --- /dev/null +++ b/test cases/frameworks/4 qt/manualinclude.h @@ -0,0 +1,22 @@ +#ifndef MANUALINCLUDE_H_ +#define MANUALINCLUDE_H_ + +#include<QObject> + +class ManualInclude : public QObject { + Q_OBJECT + +public: + ManualInclude(); +#if defined(MOC_EXTRA_FLAG) +public slots: +#endif + void myslot(void); + +#if defined(MOC_EXTRA_FLAG) +signals: +#endif + int mysignal(); +}; + +#endif diff --git a/test cases/frameworks/4 qt/meson.build b/test cases/frameworks/4 qt/meson.build new file mode 100644 index 0000000..735b3f9 --- /dev/null +++ b/test cases/frameworks/4 qt/meson.build @@ -0,0 +1,158 @@ +project('qt4, qt5, and qt6 build test', 'cpp', + # Qt6 requires C++ 17 support + default_options : ['cpp_std=c++17']) + +qt5_modules = ['Widgets'] +qt6_modules = ['Widgets'] +foreach qt : ['qt4', 'qt5', 'qt6'] + qt_modules = ['Core', 'Gui'] + if qt == 'qt5' + qt_modules += qt5_modules + elif qt == 'qt6' + qt_modules += qt6_modules + endif + + # Test that invalid modules are indeed not found + fakeqtdep = dependency(qt, modules : ['DefinitelyNotFound'], required : false, method : get_option('method')) + if fakeqtdep.found() + error('Invalid qt dep incorrectly found!') + endif + + # Test that partially-invalid modules are indeed not found + fakeqtdep = dependency(qt, modules : ['Core', 'DefinitelyNotFound'], required : false, method : get_option('method')) + if fakeqtdep.found() + error('Invalid qt dep incorrectly found!') + endif + + # This test should be skipped if the required version of Qt isn't found + # + # (In the CI environment, the specified version of Qt is definitely present. + # An unexpected skip here is treated as a failure, so we are testing that the + # detection mechanism is able to find Qt.) + needed_qt = get_option('required').to_lower() + required = (qt == needed_qt) + if required + dep = dependency(qt, modules : ['Core'], required : false, method : get_option('method')) + if not dep.found() + error('MESON_SKIP_TEST @0@ not found.'.format(needed_qt)) + endif + endif + + # Ensure that the "no-Core-module-specified" code branch is hit + nocoredep = dependency(qt, modules : ['Gui'], required : required, method : get_option('method')) + + # If 'qt' modules are found, test that. + qtdep = dependency(qt, modules : qt_modules, main : true, private_headers: true, required : required, method : get_option('method')) + if qtdep.found() + qtmodule = import(qt) + assert(qtmodule.has_tools()) + + # The following has two resource files because having two in one target + # requires you to do it properly or you get linker symbol clashes. + + prep = qtmodule.preprocess( + moc_headers : ['mainWindow.h'], # These need to be fed through the moc tool before use. + method : get_option('method') + ) + # XML files that need to be compiled with the uic tol. + prep += qtmodule.compile_ui(sources : 'mainWindow.ui', method: get_option('method')) + + qtmodule.preprocess( + ui_files : 'mainWindow.ui', + method: get_option('method')) + + # Resource file(s) for rcc compiler + extra_cpp_args = [] + if meson.is_unity() + extra_cpp_args += '-DUNITY_BUILD' + prep_rcc = qtmodule.preprocess(qt + '_unity_ressource', qresources : ['stuff.qrc', 'stuff2.qrc'], method : get_option('method')) + else + prep_rcc = qtmodule.preprocess(qresources : ['stuff.qrc', 'stuff2.qrc'], method : get_option('method')) + endif + + # Test that setting a unique name with a positional argument works + qtmodule.compile_resources( + name : qt + 'teststuff', + sources : files(['stuff.qrc', 'stuff2.qrc']), + method : get_option('method') + ) + + # Test that passing extra arguments to rcc works + # qt4-rcc and qt5-rcc take different arguments, for example qt4: ['-compress', '3']; qt5: '--compress=3' + qtmodule.preprocess(qt + 'testrccarg', qresources : files(['stuff.qrc', 'stuff2.qrc']), rcc_extra_arguments : '--compress=3', method : get_option('method')) + + translations_cpp = qtmodule.compile_translations(qresource: qt+'_lang.qrc') + # unity builds suck and definitely cannot handle two qrc embeds in one compilation unit + unityproof_translations = static_library(qt+'unityproof_translations', translations_cpp, dependencies: qtdep) + + extra_cpp_args += '-DQT="@0@"'.format(qt) + qexe = executable(qt + 'app', + sources : ['main.cpp', 'mainWindow.cpp', # Sources that don't need preprocessing. + prep, prep_rcc], + dependencies : qtdep, + link_with: unityproof_translations, + cpp_args: extra_cpp_args, + gui_app : true) + + # We need a console test application because some test environments + # do not have an X server. + + translations = qtmodule.compile_translations(ts_files : qt+'core_fr.ts', build_by_default : true) + + qtcore = dependency(qt, modules : 'Core', method : get_option('method')) + + qtcoreapp = executable(qt + 'core', 'q5core.cpp', + cpp_args: '-DQT="@0@"'.format(qt), + dependencies : qtcore) + + test(qt + 'test', qtcoreapp) + + # The build system needs to include the cpp files from + # headers but the user must manually include moc + # files from sources. + qtmodule.preprocess( + moc_extra_arguments : ['-DMOC_EXTRA_FLAG'], # This is just a random macro to test `extra_arguments` + moc_sources : 'manualinclude.cpp', + moc_headers : 'manualinclude.h', + method : get_option('method')) + + manpreprocessed = qtmodule.compile_moc( + extra_args : ['-DMOC_EXTRA_FLAG'], # This is just a random macro to test `extra_arguments` + sources : 'manualinclude.cpp', + headers : 'manualinclude.h', + method : get_option('method')) + + qtmaninclude = executable(qt + 'maninclude', + sources : ['manualinclude.cpp', manpreprocessed], + dependencies : qtcore) + + test(qt + 'maninclude', qtmaninclude) + + # building Qt plugins implies to give include path to moc + plugin_includes = include_directories('pluginInterface', 'plugin') + pluginpreprocess = qtmodule.preprocess( + moc_headers : 'plugin/plugin.h', + include_directories : plugin_includes + ) + plugin = library(qt + 'plugin', 'plugin/plugin.cpp', pluginpreprocess, + include_directories : plugin_includes, + dependencies : qtcore) + + # implementing Qt interfaces requires passing Qt include paths to moc + qtinterfacepreprocess = qtmodule.preprocess( + moc_sources : 'qtinterface.cpp', + dependencies : qtdep + ) + qtinterface = library(qt + 'qtinterface', + sources : ['qtinterface.cpp', qtinterfacepreprocess], + dependencies : qtdep) + + if qt == 'qt5' + subdir('subfolder') + endif + + # Check we can apply a version constraint + dependency(qt, modules: qt_modules, version: '>=@0@'.format(qtdep.version()), method : get_option('method')) + + endif +endforeach diff --git a/test cases/frameworks/4 qt/meson_options.txt b/test cases/frameworks/4 qt/meson_options.txt new file mode 100644 index 0000000..223f4fb --- /dev/null +++ b/test cases/frameworks/4 qt/meson_options.txt @@ -0,0 +1,2 @@ +option('method', type : 'string', value : 'auto', description : 'The method to use to find Qt') +option('required', type : 'string', value : 'qt5', description : 'The version of Qt which is required to be present') diff --git a/test cases/frameworks/4 qt/plugin/plugin.cpp b/test cases/frameworks/4 qt/plugin/plugin.cpp new file mode 100644 index 0000000..2c013fe --- /dev/null +++ b/test cases/frameworks/4 qt/plugin/plugin.cpp @@ -0,0 +1,12 @@ +#include "plugin.h" +#include <QFile> + +QString plugin1::getResource() +{ + return "hello world"; +} + + +#if QT_VERSION < 0x050000 + Q_EXPORT_PLUGIN2(Plugin1, plugin1) +#endif
\ No newline at end of file diff --git a/test cases/frameworks/4 qt/plugin/plugin.h b/test cases/frameworks/4 qt/plugin/plugin.h new file mode 100644 index 0000000..c8e14e4 --- /dev/null +++ b/test cases/frameworks/4 qt/plugin/plugin.h @@ -0,0 +1,14 @@ +#pragma once +#include <plugin_if.h> + +class plugin1:public QObject,public PluginInterface +{ + Q_OBJECT + Q_INTERFACES(PluginInterface) +#if QT_VERSION >= 0x050000 + Q_PLUGIN_METADATA(IID "demo.PluginInterface" FILE "plugin.json") +#endif + +public: + QString getResource() override; +}; diff --git a/test cases/frameworks/4 qt/plugin/plugin.json b/test cases/frameworks/4 qt/plugin/plugin.json new file mode 100644 index 0000000..6c6a011 --- /dev/null +++ b/test cases/frameworks/4 qt/plugin/plugin.json @@ -0,0 +1,3 @@ +{ + "name" : "Plugin1" +} diff --git a/test cases/frameworks/4 qt/pluginInterface/plugin_if.h b/test cases/frameworks/4 qt/pluginInterface/plugin_if.h new file mode 100644 index 0000000..97d2800 --- /dev/null +++ b/test cases/frameworks/4 qt/pluginInterface/plugin_if.h @@ -0,0 +1,21 @@ +#ifndef PLUGIN_IF_H +#define PLUGIN_IF_H + +#include <QString> +#include <QtPlugin> + +/** + * @brief Interface for a plugin + */ +class PluginInterface +{ +public: + virtual ~PluginInterface() = default; + + /// Initializes the plugin + virtual QString getResource() = 0; +}; + +Q_DECLARE_INTERFACE(PluginInterface, "demo.PluginInterface") + +#endif diff --git a/test cases/frameworks/4 qt/q5core.cpp b/test cases/frameworks/4 qt/q5core.cpp new file mode 100644 index 0000000..44581a6 --- /dev/null +++ b/test cases/frameworks/4 qt/q5core.cpp @@ -0,0 +1,28 @@ +#include <QCoreApplication> +#include <QtGlobal> +#include <QString> +#include <QTranslator> +#include <QLocale> +#include <QLibraryInfo> +#include <QDebug> + +int main(int argc, char **argv) { + QCoreApplication app(argc, argv); + + QTranslator qtTranslator; + qtTranslator.load("qt_" + QLocale::system().name(), + QLibraryInfo::location(QLibraryInfo::TranslationsPath)); + app.installTranslator(&qtTranslator); + + QTranslator myappTranslator; + if(!myappTranslator.load(QT "core_fr") ) + return 1; + + app.installTranslator(&myappTranslator); + + qDebug() << QObject::tr("Translate me!"); + // Don't actually start the main loop so this + // can be run as a unit test. + //return app.exec(); + return 0; +} diff --git a/test cases/frameworks/4 qt/qt4_lang.qrc b/test cases/frameworks/4 qt/qt4_lang.qrc new file mode 100644 index 0000000..a6d2b54 --- /dev/null +++ b/test cases/frameworks/4 qt/qt4_lang.qrc @@ -0,0 +1,6 @@ +<RCC> + <qresource prefix="/lang"> + <file>qt4embedded_fr.qm</file> + </qresource> +</RCC> + diff --git a/test cases/frameworks/4 qt/qt4core_fr.ts b/test cases/frameworks/4 qt/qt4core_fr.ts new file mode 100644 index 0000000..0638bd5 --- /dev/null +++ b/test cases/frameworks/4 qt/qt4core_fr.ts @@ -0,0 +1,12 @@ +<?xml version="1.0" encoding="utf-8"?> +<!DOCTYPE TS> +<TS version="2.0" language="fr_FR"> +<context> + <name>QObject</name> + <message> + <location filename="q5core.cpp" line="23"/> + <source>Translate me!</source> + <translation>Traduisez moi!</translation> + </message> +</context> +</TS> diff --git a/test cases/frameworks/4 qt/qt4embedded_fr.ts b/test cases/frameworks/4 qt/qt4embedded_fr.ts new file mode 100644 index 0000000..0638bd5 --- /dev/null +++ b/test cases/frameworks/4 qt/qt4embedded_fr.ts @@ -0,0 +1,12 @@ +<?xml version="1.0" encoding="utf-8"?> +<!DOCTYPE TS> +<TS version="2.0" language="fr_FR"> +<context> + <name>QObject</name> + <message> + <location filename="q5core.cpp" line="23"/> + <source>Translate me!</source> + <translation>Traduisez moi!</translation> + </message> +</context> +</TS> diff --git a/test cases/frameworks/4 qt/qt5_lang.qrc b/test cases/frameworks/4 qt/qt5_lang.qrc new file mode 100644 index 0000000..cf4ddc6 --- /dev/null +++ b/test cases/frameworks/4 qt/qt5_lang.qrc @@ -0,0 +1,6 @@ +<RCC> + <qresource prefix="/lang"> + <file>qt5embedded_fr.qm</file> + </qresource> +</RCC> + diff --git a/test cases/frameworks/4 qt/qt5core_fr.ts b/test cases/frameworks/4 qt/qt5core_fr.ts new file mode 100644 index 0000000..4e3116b --- /dev/null +++ b/test cases/frameworks/4 qt/qt5core_fr.ts @@ -0,0 +1,12 @@ +<?xml version="1.0" encoding="utf-8"?> +<!DOCTYPE TS> +<TS version="2.1" language="fr_FR"> +<context> + <name>QObject</name> + <message> + <location filename="q5core.cpp" line="23"/> + <source>Translate me!</source> + <translation>Traduisez moi!</translation> + </message> +</context> +</TS> diff --git a/test cases/frameworks/4 qt/qt5embedded_fr.ts b/test cases/frameworks/4 qt/qt5embedded_fr.ts new file mode 100644 index 0000000..4e3116b --- /dev/null +++ b/test cases/frameworks/4 qt/qt5embedded_fr.ts @@ -0,0 +1,12 @@ +<?xml version="1.0" encoding="utf-8"?> +<!DOCTYPE TS> +<TS version="2.1" language="fr_FR"> +<context> + <name>QObject</name> + <message> + <location filename="q5core.cpp" line="23"/> + <source>Translate me!</source> + <translation>Traduisez moi!</translation> + </message> +</context> +</TS> diff --git a/test cases/frameworks/4 qt/qt6_lang.qrc b/test cases/frameworks/4 qt/qt6_lang.qrc new file mode 100644 index 0000000..12cc25a --- /dev/null +++ b/test cases/frameworks/4 qt/qt6_lang.qrc @@ -0,0 +1,6 @@ +<RCC> + <qresource prefix="/lang"> + <file>qt6embedded_fr.qm</file> + </qresource> +</RCC> + diff --git a/test cases/frameworks/4 qt/qt6core_fr.ts b/test cases/frameworks/4 qt/qt6core_fr.ts new file mode 100644 index 0000000..4e3116b --- /dev/null +++ b/test cases/frameworks/4 qt/qt6core_fr.ts @@ -0,0 +1,12 @@ +<?xml version="1.0" encoding="utf-8"?> +<!DOCTYPE TS> +<TS version="2.1" language="fr_FR"> +<context> + <name>QObject</name> + <message> + <location filename="q5core.cpp" line="23"/> + <source>Translate me!</source> + <translation>Traduisez moi!</translation> + </message> +</context> +</TS> diff --git a/test cases/frameworks/4 qt/qt6embedded_fr.ts b/test cases/frameworks/4 qt/qt6embedded_fr.ts new file mode 100644 index 0000000..4e3116b --- /dev/null +++ b/test cases/frameworks/4 qt/qt6embedded_fr.ts @@ -0,0 +1,12 @@ +<?xml version="1.0" encoding="utf-8"?> +<!DOCTYPE TS> +<TS version="2.1" language="fr_FR"> +<context> + <name>QObject</name> + <message> + <location filename="q5core.cpp" line="23"/> + <source>Translate me!</source> + <translation>Traduisez moi!</translation> + </message> +</context> +</TS> diff --git a/test cases/frameworks/4 qt/qtinterface.cpp b/test cases/frameworks/4 qt/qtinterface.cpp new file mode 100644 index 0000000..b2da99f --- /dev/null +++ b/test cases/frameworks/4 qt/qtinterface.cpp @@ -0,0 +1,8 @@ +#include <QGraphicsLayout> + +class Foo : public QGraphicsLayout +{ + Q_INTERFACES(QGraphicsLayout) +}; + +#include "qtinterface.moc" diff --git a/test cases/frameworks/4 qt/stuff.qrc b/test cases/frameworks/4 qt/stuff.qrc new file mode 100644 index 0000000..fdfb58e --- /dev/null +++ b/test cases/frameworks/4 qt/stuff.qrc @@ -0,0 +1,6 @@ +<!DOCTYPE RCC> +<RCC version="1.0"> + <qresource> + <file>thing.png</file> + </qresource> +</RCC> diff --git a/test cases/frameworks/4 qt/stuff2.qrc b/test cases/frameworks/4 qt/stuff2.qrc new file mode 100644 index 0000000..910e2fb --- /dev/null +++ b/test cases/frameworks/4 qt/stuff2.qrc @@ -0,0 +1,6 @@ +<!DOCTYPE RCC> +<RCC version="1.0"> + <qresource> + <file>thing2.png</file> + </qresource> +</RCC> diff --git a/test cases/frameworks/4 qt/subfolder/generator.py b/test cases/frameworks/4 qt/subfolder/generator.py new file mode 100644 index 0000000..045d99a --- /dev/null +++ b/test cases/frameworks/4 qt/subfolder/generator.py @@ -0,0 +1,6 @@ +#!/usr/bin/env python3 +import sys + +if len(sys.argv) > 1: + with open(sys.argv[1], "w") as output: + output.write("Hello World") diff --git a/test cases/frameworks/4 qt/subfolder/main.cpp b/test cases/frameworks/4 qt/subfolder/main.cpp new file mode 100644 index 0000000..9661811 --- /dev/null +++ b/test cases/frameworks/4 qt/subfolder/main.cpp @@ -0,0 +1,29 @@ +#include <QImage> +#include <QFile> +#include <QString> + +int main(int argc, char **argv) { + #ifndef UNITY_BUILD + Q_INIT_RESOURCE(stuff3); + Q_INIT_RESOURCE(stuff4); + #endif + + for(auto fname:{":/thing.png", ":/thing4.png"}) + { + QImage img1(fname); + if(img1.width() != 640) { + return 1; + } + } + + for(auto fname:{":/txt_resource.txt",":/txt_resource2.txt"}) + { + QFile file(fname); + if (!file.open(QIODevice::ReadOnly | QIODevice::Text)) + return 1; + QString line = file.readLine(); + if(line.compare("Hello World")) + return 1; + } + return 0; +}
\ No newline at end of file diff --git a/test cases/frameworks/4 qt/subfolder/meson.build b/test cases/frameworks/4 qt/subfolder/meson.build new file mode 100644 index 0000000..f1b84e6 --- /dev/null +++ b/test cases/frameworks/4 qt/subfolder/meson.build @@ -0,0 +1,32 @@ + +simple_gen = find_program('generator.py', required : true) + +txt_resource = custom_target('txt_resource', + output : 'txt_resource.txt', + command : [simple_gen, '@OUTPUT@'], +) + +cfg = configuration_data() + +cfg.set('filepath', meson.current_source_dir()+'/../thing2.png') +cfg.set('txt_resource', txt_resource.full_path()) +# here we abuse the system by guessing build dir layout +cfg.set('txt_resource2', 'txt_resource.txt') + + +rc_file = configure_file( + configuration : cfg, + input : 'resources/stuff4.qrc.in', + output : 'stuff4.qrc', +) + +extra_cpp_args = [] +if meson.is_unity() + extra_cpp_args += '-DUNITY_BUILD' + qresources = qtmodule.preprocess(qt + '_subfolder_unity_ressource',qresources : ['resources/stuff3.qrc', rc_file]) +else + qresources = qtmodule.preprocess(qresources : ['resources/stuff3.qrc', rc_file]) +endif + +app = executable('subfolder', 'main.cpp', qresources, dependencies : qtdep, cpp_args: extra_cpp_args) +test(qt + 'subfolder', app) diff --git a/test cases/frameworks/4 qt/subfolder/resources/stuff3.qrc b/test cases/frameworks/4 qt/subfolder/resources/stuff3.qrc new file mode 100644 index 0000000..fdfb58e --- /dev/null +++ b/test cases/frameworks/4 qt/subfolder/resources/stuff3.qrc @@ -0,0 +1,6 @@ +<!DOCTYPE RCC> +<RCC version="1.0"> + <qresource> + <file>thing.png</file> + </qresource> +</RCC> diff --git a/test cases/frameworks/4 qt/subfolder/resources/stuff4.qrc.in b/test cases/frameworks/4 qt/subfolder/resources/stuff4.qrc.in new file mode 100644 index 0000000..c30a358 --- /dev/null +++ b/test cases/frameworks/4 qt/subfolder/resources/stuff4.qrc.in @@ -0,0 +1,8 @@ +<!DOCTYPE RCC> +<RCC version="1.0"> + <qresource> + <file alias="thing4.png">@filepath@</file> + <file alias="txt_resource.txt">@txt_resource@</file> + <file alias="txt_resource2.txt">@txt_resource2@</file> + </qresource> +</RCC> diff --git a/test cases/frameworks/4 qt/subfolder/resources/thing.png b/test cases/frameworks/4 qt/subfolder/resources/thing.png Binary files differnew file mode 100644 index 0000000..4b001bd --- /dev/null +++ b/test cases/frameworks/4 qt/subfolder/resources/thing.png diff --git a/test cases/frameworks/4 qt/test.json b/test cases/frameworks/4 qt/test.json new file mode 100644 index 0000000..4df0b49 --- /dev/null +++ b/test cases/frameworks/4 qt/test.json @@ -0,0 +1,12 @@ +{ + "matrix": { + "options": { + "method": [ + { "val": "config-tool" }, + { "val": "qmake" }, + { "val": "pkg-config" } + ] + } + }, + "skip_on_jobname": ["cygwin", "msys2", "azure"] +} diff --git a/test cases/frameworks/4 qt/thing.png b/test cases/frameworks/4 qt/thing.png Binary files differnew file mode 100644 index 0000000..4b001bd --- /dev/null +++ b/test cases/frameworks/4 qt/thing.png diff --git a/test cases/frameworks/4 qt/thing2.png b/test cases/frameworks/4 qt/thing2.png Binary files differnew file mode 100644 index 0000000..4b001bd --- /dev/null +++ b/test cases/frameworks/4 qt/thing2.png diff --git a/test cases/frameworks/5 protocol buffers/asubdir/defs.proto b/test cases/frameworks/5 protocol buffers/asubdir/defs.proto new file mode 100644 index 0000000..dad5754 --- /dev/null +++ b/test cases/frameworks/5 protocol buffers/asubdir/defs.proto @@ -0,0 +1,5 @@ +syntax = "proto3"; + +message Dummy { + string text = 1; +} diff --git a/test cases/frameworks/5 protocol buffers/asubdir/main.cpp b/test cases/frameworks/5 protocol buffers/asubdir/main.cpp new file mode 100644 index 0000000..f6566d5 --- /dev/null +++ b/test cases/frameworks/5 protocol buffers/asubdir/main.cpp @@ -0,0 +1,9 @@ +#include "defs.pb.h" + +int main(int argc, char **argv) { + GOOGLE_PROTOBUF_VERIFY_VERSION; + Dummy *d = new Dummy; + delete d; + google::protobuf::ShutdownProtobufLibrary(); + return 0; +} diff --git a/test cases/frameworks/5 protocol buffers/asubdir/meson.build b/test cases/frameworks/5 protocol buffers/asubdir/meson.build new file mode 100644 index 0000000..9727165 --- /dev/null +++ b/test cases/frameworks/5 protocol buffers/asubdir/meson.build @@ -0,0 +1,8 @@ +subdirgen = generator(protoc, \ + output : ['@BASENAME@.pb.cc', '@BASENAME@.pb.h'], + arguments : ['--proto_path=@CURRENT_SOURCE_DIR@', '--cpp_out=@BUILD_DIR@', '@INPUT@']) + +generated = subdirgen.process('defs.proto') +e = executable('subdir-prog', 'main.cpp', generated, + dependencies : dep) +test('subdir-prototest', e) diff --git a/test cases/frameworks/5 protocol buffers/defs.proto b/test cases/frameworks/5 protocol buffers/defs.proto new file mode 100644 index 0000000..dad5754 --- /dev/null +++ b/test cases/frameworks/5 protocol buffers/defs.proto @@ -0,0 +1,5 @@ +syntax = "proto3"; + +message Dummy { + string text = 1; +} diff --git a/test cases/frameworks/5 protocol buffers/main.cpp b/test cases/frameworks/5 protocol buffers/main.cpp new file mode 100644 index 0000000..f6566d5 --- /dev/null +++ b/test cases/frameworks/5 protocol buffers/main.cpp @@ -0,0 +1,9 @@ +#include "defs.pb.h" + +int main(int argc, char **argv) { + GOOGLE_PROTOBUF_VERIFY_VERSION; + Dummy *d = new Dummy; + delete d; + google::protobuf::ShutdownProtobufLibrary(); + return 0; +} diff --git a/test cases/frameworks/5 protocol buffers/meson.build b/test cases/frameworks/5 protocol buffers/meson.build new file mode 100644 index 0000000..046847a --- /dev/null +++ b/test cases/frameworks/5 protocol buffers/meson.build @@ -0,0 +1,22 @@ +project('protocol buffer test', 'cpp', default_options: ['cpp_std=c++11']) + +protoc = find_program('protoc', required : false) +dep = dependency('protobuf', required : false) + +if not protoc.found() or not dep.found() + error('MESON_SKIP_TEST: protoc tool and/or protobuf pkg-config dependency not found') +endif + + +gen = generator(protoc, \ + output : ['@BASENAME@.pb.cc', '@BASENAME@.pb.h'], + arguments : ['--proto_path=@CURRENT_SOURCE_DIR@', '--cpp_out=@BUILD_DIR@', '@INPUT@']) + +generated = gen.process('defs.proto') +e = executable('prog', 'main.cpp', generated, + dependencies : dep) +test('prototest', e) + +subdir('asubdir') +subdir('withpath') +subdir('sidedir') diff --git a/test cases/frameworks/5 protocol buffers/sidedir/meson.build b/test cases/frameworks/5 protocol buffers/sidedir/meson.build new file mode 100644 index 0000000..ce9b7be --- /dev/null +++ b/test cases/frameworks/5 protocol buffers/sidedir/meson.build @@ -0,0 +1,7 @@ +# Generated source defined in one directory but +# used in another. + +e = executable('sideprog', 'sideprog.cpp', generated, + override_options : ['unity=off'], + dependencies : dep) +test('sideprog', e) diff --git a/test cases/frameworks/5 protocol buffers/sidedir/sideprog.cpp b/test cases/frameworks/5 protocol buffers/sidedir/sideprog.cpp new file mode 100644 index 0000000..83af4b2 --- /dev/null +++ b/test cases/frameworks/5 protocol buffers/sidedir/sideprog.cpp @@ -0,0 +1,16 @@ +#include"com/mesonbuild/simple.pb.h" +#include"com/mesonbuild/subsite/complex.pb.h" + +#include<memory> + +int main(int argc, char **argv) { + GOOGLE_PROTOBUF_VERIFY_VERSION; + { + subdirectorial::SimpleMessage *s = new subdirectorial::SimpleMessage(); + s->set_the_integer(3); + subdirectorial::ComplexMessage c; + c.set_allocated_sm(s); + } + google::protobuf::ShutdownProtobufLibrary(); + return 0; +} diff --git a/test cases/frameworks/5 protocol buffers/test.json b/test cases/frameworks/5 protocol buffers/test.json new file mode 100644 index 0000000..6ace9de --- /dev/null +++ b/test cases/frameworks/5 protocol buffers/test.json @@ -0,0 +1,3 @@ +{ + "skip_on_jobname": ["azure", "cygwin", "macos", "msys2"] +} diff --git a/test cases/frameworks/5 protocol buffers/withpath/com/mesonbuild/simple.proto b/test cases/frameworks/5 protocol buffers/withpath/com/mesonbuild/simple.proto new file mode 100644 index 0000000..336779f --- /dev/null +++ b/test cases/frameworks/5 protocol buffers/withpath/com/mesonbuild/simple.proto @@ -0,0 +1,7 @@ +syntax = "proto3"; + +package subdirectorial; + +message SimpleMessage { + int32 the_integer = 1; +} diff --git a/test cases/frameworks/5 protocol buffers/withpath/com/mesonbuild/subsite/complex.proto b/test cases/frameworks/5 protocol buffers/withpath/com/mesonbuild/subsite/complex.proto new file mode 100644 index 0000000..8dc32c2 --- /dev/null +++ b/test cases/frameworks/5 protocol buffers/withpath/com/mesonbuild/subsite/complex.proto @@ -0,0 +1,10 @@ +syntax = "proto3"; + +package subdirectorial; + +import "com/mesonbuild/simple.proto"; + +message ComplexMessage { + string a_message = 1; + SimpleMessage sm = 2; +} diff --git a/test cases/frameworks/5 protocol buffers/withpath/meson.build b/test cases/frameworks/5 protocol buffers/withpath/meson.build new file mode 100644 index 0000000..68a7381 --- /dev/null +++ b/test cases/frameworks/5 protocol buffers/withpath/meson.build @@ -0,0 +1,13 @@ +# Testing protobuf files that are deeply hierarchical +# and must preserve their path segments in output files +# because protoc will always put it in there. + +generated = gen.process('com/mesonbuild/simple.proto', + 'com/mesonbuild/subsite/complex.proto', + preserve_path_from : meson.current_source_dir(), + ) + +e = executable('pathprog', 'pathprog.cpp', generated, + override_options : ['unity=off'], + dependencies : dep) +test('pathprog', e) diff --git a/test cases/frameworks/5 protocol buffers/withpath/pathprog.cpp b/test cases/frameworks/5 protocol buffers/withpath/pathprog.cpp new file mode 100644 index 0000000..83af4b2 --- /dev/null +++ b/test cases/frameworks/5 protocol buffers/withpath/pathprog.cpp @@ -0,0 +1,16 @@ +#include"com/mesonbuild/simple.pb.h" +#include"com/mesonbuild/subsite/complex.pb.h" + +#include<memory> + +int main(int argc, char **argv) { + GOOGLE_PROTOBUF_VERIFY_VERSION; + { + subdirectorial::SimpleMessage *s = new subdirectorial::SimpleMessage(); + s->set_the_integer(3); + subdirectorial::ComplexMessage c; + c.set_allocated_sm(s); + } + google::protobuf::ShutdownProtobufLibrary(); + return 0; +} diff --git a/test cases/frameworks/6 gettext/data/data3/meson.build b/test cases/frameworks/6 gettext/data/data3/meson.build new file mode 100644 index 0000000..044b498 --- /dev/null +++ b/test cases/frameworks/6 gettext/data/data3/meson.build @@ -0,0 +1,9 @@ +# Target name will contain a path separator +i18n.merge_file( + input: 'test.desktop.in', + output: 'test4.desktop', + type: 'desktop', + po_dir: '../../po', + install: true, + install_dir: join_paths(get_option('datadir'), 'applications') +) diff --git a/test cases/frameworks/6 gettext/data/data3/test.desktop.in b/test cases/frameworks/6 gettext/data/data3/test.desktop.in new file mode 100644 index 0000000..35edf07 --- /dev/null +++ b/test cases/frameworks/6 gettext/data/data3/test.desktop.in @@ -0,0 +1,5 @@ +[Desktop Entry] +Name=Test +GenericName=Application +Comment=Test Application +Type=Application diff --git a/test cases/frameworks/6 gettext/data/meson.build b/test cases/frameworks/6 gettext/data/meson.build new file mode 100644 index 0000000..698eeec --- /dev/null +++ b/test cases/frameworks/6 gettext/data/meson.build @@ -0,0 +1,59 @@ +# Use filename substitution +i18n.merge_file( + input: 'test.desktop.in', + output: '@BASENAME@', + type: 'desktop', + po_dir: '../po', + data_dirs: '../po', + install: true, + install_dir: join_paths(get_option('datadir'), 'applications') +) + +# Use filename substitution for another file +i18n.merge_file( + input: files('test2.desktop.in'), + output: '@BASENAME@', + type: 'desktop', + po_dir: '../po', + install: true, + install_dir: join_paths(get_option('datadir'), 'applications') +) + +i18n.merge_file( + input: 'test.desktop.in', + output: 'test3.desktop', + type: 'desktop', + po_dir: '../po', + install: true, + install_dir: join_paths(get_option('datadir'), 'applications') +) + +# Regression test when passing File object as input and '@BASENAME@' as output +# in multiple i18n.merge_file() calls. It used to make target name collision. +# https://github.com/mesonbuild/meson/issues/9022 +i18n.merge_file( + input: configure_file( + input: 'test5.desktop.in.in', + output: '@BASENAME@', + configuration: { 'NAME': 'Application' }, + ), + output: '@BASENAME@', + type: 'desktop', + po_dir: '../po', + install: true, + install_dir: join_paths(get_option('datadir'), 'applications') +) +i18n.merge_file( + input: configure_file( + input: 'test6.desktop.in.in', + output: '@BASENAME@', + configuration: { 'NAME': 'Application' }, + ), + output: '@BASENAME@', + type: 'desktop', + po_dir: '../po', + install: true, + install_dir: join_paths(get_option('datadir'), 'applications') +) + +subdir('data3') diff --git a/test cases/frameworks/6 gettext/data/test.desktop.in b/test cases/frameworks/6 gettext/data/test.desktop.in new file mode 100644 index 0000000..35edf07 --- /dev/null +++ b/test cases/frameworks/6 gettext/data/test.desktop.in @@ -0,0 +1,5 @@ +[Desktop Entry] +Name=Test +GenericName=Application +Comment=Test Application +Type=Application diff --git a/test cases/frameworks/6 gettext/data/test2.desktop.in b/test cases/frameworks/6 gettext/data/test2.desktop.in new file mode 100644 index 0000000..23be0a4 --- /dev/null +++ b/test cases/frameworks/6 gettext/data/test2.desktop.in @@ -0,0 +1,5 @@ +[Desktop Entry] +Name=Test 2 +GenericName=Application +Comment=Test Application +Type=Application diff --git a/test cases/frameworks/6 gettext/data/test5.desktop.in.in b/test cases/frameworks/6 gettext/data/test5.desktop.in.in new file mode 100644 index 0000000..a401e36 --- /dev/null +++ b/test cases/frameworks/6 gettext/data/test5.desktop.in.in @@ -0,0 +1,5 @@ +[Desktop Entry] +Name=Test 2 +GenericName=@NAME@ +Comment=Test Application +Type=Application diff --git a/test cases/frameworks/6 gettext/data/test6.desktop.in.in b/test cases/frameworks/6 gettext/data/test6.desktop.in.in new file mode 100644 index 0000000..a401e36 --- /dev/null +++ b/test cases/frameworks/6 gettext/data/test6.desktop.in.in @@ -0,0 +1,5 @@ +[Desktop Entry] +Name=Test 2 +GenericName=@NAME@ +Comment=Test Application +Type=Application diff --git a/test cases/frameworks/6 gettext/data2/meson.build b/test cases/frameworks/6 gettext/data2/meson.build new file mode 100644 index 0000000..9a992c9 --- /dev/null +++ b/test cases/frameworks/6 gettext/data2/meson.build @@ -0,0 +1,10 @@ +i18n.merge_file( + input: 'test.desktop.in', + output: 'test.plugin', + type: 'desktop', + po_dir: '../po', + data_dirs: '../po', + args: ['--keyword=Description'], + install: true, + install_dir: join_paths(get_option('datadir'), 'applications') +) diff --git a/test cases/frameworks/6 gettext/data2/test.desktop.in b/test cases/frameworks/6 gettext/data2/test.desktop.in new file mode 100644 index 0000000..b57ba21 --- /dev/null +++ b/test cases/frameworks/6 gettext/data2/test.desktop.in @@ -0,0 +1,5 @@ +[Desktop Entry] +Name=Test +GenericName=Application +Description=Test Application +Type=Application diff --git a/test cases/frameworks/6 gettext/data3/com.mesonbuild.test.intlprog.metainfo.xml b/test cases/frameworks/6 gettext/data3/com.mesonbuild.test.intlprog.metainfo.xml new file mode 100644 index 0000000..7fb4d1f --- /dev/null +++ b/test cases/frameworks/6 gettext/data3/com.mesonbuild.test.intlprog.metainfo.xml @@ -0,0 +1,33 @@ +<?xml version="1.0" encoding="UTF-8"?> +<component type="console-application"> + <id>com.mesonbuild.test.intlprog</id> + + <name>Test</name> + <summary>Application</summary> + + <metadata_license>FSFAP</metadata_license> + <project_license>FSFAP</project_license> + + <description> + <p> + Test Application + </p> + <p> + International greeting. + </p> + <p> + This is <code>text</code> with <em>embedded XML tags</em>. Nice! + </p> + </description> + + <icon type="stock">meson-unittest-intlprog</icon> + + <categories> + <category>Development</category> + <category>Building</category> + </categories> + + <provides> + <binary>intlprog</binary> + </provides> +</component> diff --git a/test cases/frameworks/6 gettext/data3/meson.build b/test cases/frameworks/6 gettext/data3/meson.build new file mode 100644 index 0000000..2be2e89 --- /dev/null +++ b/test cases/frameworks/6 gettext/data3/meson.build @@ -0,0 +1,33 @@ + +if itstool.found() + + mi_translated = i18n.itstool_join( + input: 'com.mesonbuild.test.intlprog.metainfo.xml', + output: 'com.mesonbuild.test.intlprog.metainfo.xml', + mo_targets: mo_targets, + its_files: ['metainfo.its'], + install: true, + install_dir: get_option('datadir') / 'metainfo', + ) + + # older versions of itstool have a bug where ITS rules specified on the command-line + # are not read when joining files. Since we don't install appstream in the Meson CI + # environment, the to-be-tested entry will be untranslated and the test would fail, so + # we just skip verification if the installed itstool is too old. + r = run_command(itstool, '-v', check: true) + itstool_v = r.stdout().strip().split() + if itstool_v[1].version_compare('>=2.0.6') + verify_exe = find_program('verify.py') + test('test xml translation', + verify_exe, + args: [mi_translated, + '<p xml:lang="de">Dies ist <code>Text</code> mit <em>eingebetteten XML Tags</em>. Toll!</p>'] + ) + else + message('Skipping translation verification: Itstool too old.') + endif + +else + install_data('com.mesonbuild.test.intlprog.metainfo.xml', + install_dir: get_option('datadir') / 'metainfo') +endif diff --git a/test cases/frameworks/6 gettext/data3/metainfo.its b/test cases/frameworks/6 gettext/data3/metainfo.its new file mode 100644 index 0000000..0852a0f --- /dev/null +++ b/test cases/frameworks/6 gettext/data3/metainfo.its @@ -0,0 +1,33 @@ +<?xml version="1.0"?> +<!-- + Copyright (C) 2015-2021 Matthias Klumpp <matthias@tenstral.net> + Copyright (C) 2019 Takao Fujiwara <takao.fujiwara1@gmail.com> + SPDX-License-Identifier: FSFAP +--> +<its:rules xmlns:its="http://www.w3.org/2005/11/its" + version="2.0"> + + <its:withinTextRule withinText="yes" selector="/component//description//em | + /component//description//code"/> + + <its:translateRule selector="/component" translate="no"/> + <its:translateRule selector="/component/name | + /component/summary | + /component/description | + /component/developer_name | + /component/name_variant_suffix | + /component/screenshots/screenshot/caption | + /component/releases/release/description | + /component/agreement/agreement_section/name | + /component/agreement/agreement_section/description" + translate="yes"/> + + <its:translateRule selector="/component/name[@translatable = 'no']" + translate="no"/> + <its:translateRule selector="/component/developer_name[@translatable = 'no']" + translate="no"/> + <its:translateRule selector="/component/name_variant_suffix[@translatable = 'no']" + translate="no"/> + <its:translateRule selector="/component/releases/release/description[@translatable = 'no']" + translate="no"/> +</its:rules> diff --git a/test cases/frameworks/6 gettext/data3/verify.py b/test cases/frameworks/6 gettext/data3/verify.py new file mode 100755 index 0000000..aff2f2e --- /dev/null +++ b/test cases/frameworks/6 gettext/data3/verify.py @@ -0,0 +1,13 @@ +#!/usr/bin/env python3 + +import os +import sys + +assert len(sys.argv) == 3 + +fname = sys.argv[1] +check_str = sys.argv[2] + +assert os.path.isfile(fname) +with open(fname, 'r', encoding='utf-8') as f: + assert check_str in f.read() diff --git a/test cases/frameworks/6 gettext/generated/desktopgenerator.py b/test cases/frameworks/6 gettext/generated/desktopgenerator.py new file mode 100644 index 0000000..e49c2d6 --- /dev/null +++ b/test cases/frameworks/6 gettext/generated/desktopgenerator.py @@ -0,0 +1,13 @@ +#!/usr/bin/env python3 + +import os, sys, shutil + +ifile = sys.argv[1] +ofile = sys.argv[2] + +try: + os.unlink(ofile) +except FileNotFoundError: + pass + +shutil.copy(ifile, ofile) diff --git a/test cases/frameworks/6 gettext/generated/meson.build b/test cases/frameworks/6 gettext/generated/meson.build new file mode 100644 index 0000000..5ed9205 --- /dev/null +++ b/test cases/frameworks/6 gettext/generated/meson.build @@ -0,0 +1,16 @@ +dgen = find_program('desktopgenerator.py') + +desktop_in_file = custom_target('something.desktop.in', + input : ['something.desktop.in.in'], + output : 'something.desktop.in', + command : [dgen, '@INPUT@', '@OUTPUT@'], +) + +i18n.merge_file( + input : desktop_in_file, + output : 'something.desktop', + type : 'desktop', + po_dir : '../po', + install: true, + install_dir: join_paths(get_option('datadir'), 'applications'), +) diff --git a/test cases/frameworks/6 gettext/generated/something.desktop.in.in b/test cases/frameworks/6 gettext/generated/something.desktop.in.in new file mode 100644 index 0000000..e2094fd --- /dev/null +++ b/test cases/frameworks/6 gettext/generated/something.desktop.in.in @@ -0,0 +1,15 @@ +[Desktop Entry] +Name=Something doer +Comment=Do something +# Translators: Search terms to find this application. Do NOT translate or localize the semicolons! The list MUST also end with a semicolon! +Keywords=zip;tar;extract;unpack; +TryExec=file-roller +Exec=file-roller %U +StartupNotify=true +Terminal=false +Type=Application +# Translators: Do NOT translate or transliterate this text (this is an icon file name)! +Icon=something +Categories=GTK;GNOME;Utility +X-GNOME-DocPath=file-roller/file-roller.xml +X-GNOME-UsesNotifications=true diff --git a/test cases/frameworks/6 gettext/meson.build b/test cases/frameworks/6 gettext/meson.build new file mode 100644 index 0000000..ce99242 --- /dev/null +++ b/test cases/frameworks/6 gettext/meson.build @@ -0,0 +1,27 @@ +project('gettext example', 'c') + +gettext = find_program('gettext', required: false) +if not gettext.found() + error('MESON_SKIP_TEST gettext not found.') +endif + +xgettext = find_program('xgettext', required: false) +if not xgettext.found() + error('MESON_SKIP_TEST xgettext not found.') +endif + +intl = dependency('intl', required: false, static: get_option('static')) +if not intl.found() + error('MESON_SKIP_TEST libintl/gettext functions not found.') +endif + +itstool = find_program('itstool', required: false) + +i18n = import('i18n') + +subdir('po') +subdir('src') +subdir('data') +subdir('data2') +subdir('data3') +subdir('generated') diff --git a/test cases/frameworks/6 gettext/meson_options.txt b/test cases/frameworks/6 gettext/meson_options.txt new file mode 100644 index 0000000..f41ed25 --- /dev/null +++ b/test cases/frameworks/6 gettext/meson_options.txt @@ -0,0 +1 @@ +option('static', type : 'boolean', value : false, description : 'build statically linked binaries') diff --git a/test cases/frameworks/6 gettext/po/LINGUAS b/test cases/frameworks/6 gettext/po/LINGUAS new file mode 100644 index 0000000..4cde210 --- /dev/null +++ b/test cases/frameworks/6 gettext/po/LINGUAS @@ -0,0 +1,3 @@ +de +fi +ru diff --git a/test cases/frameworks/6 gettext/po/POTFILES b/test cases/frameworks/6 gettext/po/POTFILES new file mode 100644 index 0000000..8ac0de5 --- /dev/null +++ b/test cases/frameworks/6 gettext/po/POTFILES @@ -0,0 +1,2 @@ +src/intlmain.c +data/test.desktop.in diff --git a/test cases/frameworks/6 gettext/po/de.po b/test cases/frameworks/6 gettext/po/de.po new file mode 100644 index 0000000..1e4693b --- /dev/null +++ b/test cases/frameworks/6 gettext/po/de.po @@ -0,0 +1,26 @@ +# German translations for PACKAGE package. +# Copyright (C) 2013 THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# Jussi Pakkanen <jpakkane@brash>, 2013. +# +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2013-09-12 18:53+0300\n" +"PO-Revision-Date: 2013-09-12 18:57+0300\n" +"Last-Translator: Jussi Pakkanen <jpakkane@brash>\n" +"Language-Team: German\n" +"Language: de\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=ASCII\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#: src/intlmain.c:15 +msgid "International greeting." +msgstr "Internationale Gruss." + +#: data/com.mesonbuild.test.dummy.metainfo.xml:19 +msgid "This is <code>text</code> with <em>embedded XML tags</em>. Nice!" +msgstr "Dies ist <code>Text</code> mit <em>eingebetteten XML Tags</em>. Toll!" diff --git a/test cases/frameworks/6 gettext/po/fi.po b/test cases/frameworks/6 gettext/po/fi.po new file mode 100644 index 0000000..114cb10 --- /dev/null +++ b/test cases/frameworks/6 gettext/po/fi.po @@ -0,0 +1,22 @@ +# Finnish translations for PACKAGE package. +# Copyright (C) 2013 THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# Jussi Pakkanen <jpakkane@brash>, 2013. +# +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2013-09-12 18:53+0300\n" +"PO-Revision-Date: 2013-09-12 18:57+0300\n" +"Last-Translator: Jussi Pakkanen <jpakkane@brash>\n" +"Language-Team: Finnish\n" +"Language: fi\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=ASCII\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#: src/intlmain.c:15 +msgid "International greeting." +msgstr "Maailman tervehdys." diff --git a/test cases/frameworks/6 gettext/po/intltest.pot b/test cases/frameworks/6 gettext/po/intltest.pot new file mode 100644 index 0000000..c34e7f9 --- /dev/null +++ b/test cases/frameworks/6 gettext/po/intltest.pot @@ -0,0 +1,38 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the intltest package. +# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: intltest\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2017-05-31 05:16-0500\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" +"Language-Team: LANGUAGE <LL@li.org>\n" +"Language: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=CHARSET\n" +"Content-Transfer-Encoding: 8bit\n" + +#: src/intlmain.c:15 +msgid "International greeting." +msgstr "" + +#: data/test.desktop.in:3 +msgid "Test" +msgstr "" + +#: data/test.desktop.in:4 +msgid "Application" +msgstr "" + +#: data/test.desktop.in:5 +msgid "Test Application" +msgstr "" + +#: data/com.mesonbuild.test.dummy.metainfo.xml:19 +msgid "This is <code>text</code> with <em>embedded XML tags</em>. Nice!" +msgstr "" diff --git a/test cases/frameworks/6 gettext/po/meson.build b/test cases/frameworks/6 gettext/po/meson.build new file mode 100644 index 0000000..5510e42 --- /dev/null +++ b/test cases/frameworks/6 gettext/po/meson.build @@ -0,0 +1,4 @@ +langs = ['fi', 'de', 'ru'] + +gettext_targets = i18n.gettext('intltest', languages : langs) +mo_targets = gettext_targets[0] diff --git a/test cases/frameworks/6 gettext/po/ru.po b/test cases/frameworks/6 gettext/po/ru.po new file mode 100644 index 0000000..e5867c8 --- /dev/null +++ b/test cases/frameworks/6 gettext/po/ru.po @@ -0,0 +1,34 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the intltest package. +# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR. +# +msgid "" +msgstr "" +"Project-Id-Version: intltest\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2017-05-31 05:16-0500\n" +"PO-Revision-Date: 2019-04-22 02:38+0300\n" +"Language: ru\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Last-Translator: \n" +"Language-Team: \n" +"X-Generator: Poedit 2.2.1\n" + +#: src/intlmain.c:15 +msgid "International greeting." +msgstr "Межнациональное приветствие." + +#: data/test.desktop.in:3 +msgid "Test" +msgstr "Тест" + +#: data/test.desktop.in:4 +msgid "Application" +msgstr "Приложение" + +#: data/test.desktop.in:5 +msgid "Test Application" +msgstr "Тестовое приложение" diff --git a/test cases/frameworks/6 gettext/src/intlmain.c b/test cases/frameworks/6 gettext/src/intlmain.c new file mode 100644 index 0000000..bd7af6f --- /dev/null +++ b/test cases/frameworks/6 gettext/src/intlmain.c @@ -0,0 +1,17 @@ +#include<libintl.h> +#include<locale.h> +#include<stdio.h> + +#define _(String) gettext (String) + +#define PACKAGE "intltest" +// WRONG, but enough for this test. +#define LOCALEDIR "/usr/share/locale" + +int main(int argc, char **argv) { + setlocale(LC_ALL, ""); + bindtextdomain(PACKAGE, LOCALEDIR); + textdomain(PACKAGE); + printf("%s\n", _("International greeting.")); + return 0; +} diff --git a/test cases/frameworks/6 gettext/src/meson.build b/test cases/frameworks/6 gettext/src/meson.build new file mode 100644 index 0000000..cda3ea4 --- /dev/null +++ b/test cases/frameworks/6 gettext/src/meson.build @@ -0,0 +1,2 @@ +executable('intlprog', 'intlmain.c', install : true, + dependencies : intl) diff --git a/test cases/frameworks/6 gettext/test.json b/test cases/frameworks/6 gettext/test.json new file mode 100644 index 0000000..910fc1c --- /dev/null +++ b/test cases/frameworks/6 gettext/test.json @@ -0,0 +1,26 @@ +{ + "installed": [ + {"type": "exe", "file": "usr/bin/intlprog"}, + {"type": "file", "file": "usr/share/locale/de/LC_MESSAGES/intltest.mo"}, + {"type": "file", "file": "usr/share/locale/fi/LC_MESSAGES/intltest.mo"}, + {"type": "file", "file": "usr/share/locale/ru/LC_MESSAGES/intltest.mo"}, + {"type": "file", "file": "usr/share/applications/something.desktop"}, + {"type": "file", "file": "usr/share/applications/test.desktop"}, + {"type": "file", "file": "usr/share/applications/test.plugin"}, + {"type": "file", "file": "usr/share/applications/test2.desktop"}, + {"type": "file", "file": "usr/share/applications/test3.desktop"}, + {"type": "file", "file": "usr/share/applications/test4.desktop"}, + {"type": "file", "file": "usr/share/applications/test5.desktop"}, + {"type": "file", "file": "usr/share/applications/test6.desktop"}, + {"type": "file", "file": "usr/share/metainfo/com.mesonbuild.test.intlprog.metainfo.xml"} + ], + "matrix": { + "options": { + "static": [ + { "val": "true" }, + { "val": "false" } + ] + } + }, + "skip_on_jobname": ["azure", "cygwin"] +} diff --git a/test cases/frameworks/7 gnome/copyfile.py b/test cases/frameworks/7 gnome/copyfile.py new file mode 100644 index 0000000..7e44c48 --- /dev/null +++ b/test cases/frameworks/7 gnome/copyfile.py @@ -0,0 +1,6 @@ +#!/usr/bin/env python3 + +import sys +import shutil + +shutil.copy(sys.argv[1], sys.argv[2]) diff --git a/test cases/frameworks/7 gnome/gdbus/data/com.example.Sample.xml b/test cases/frameworks/7 gnome/gdbus/data/com.example.Sample.xml new file mode 100644 index 0000000..d7adc30 --- /dev/null +++ b/test cases/frameworks/7 gnome/gdbus/data/com.example.Sample.xml @@ -0,0 +1,14 @@ +<!DOCTYPE node PUBLIC "-//freedesktop//DTD D-BUS Object Introspection 1.0//EN" +"http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd"> +<node> + <interface name="com.example"> + <method name="Hello"> + <arg direction="in" type="s" name="name"/> + <arg direction="out" type="s" name="greeting"/> + </method> + <method name="Bye"> + <arg direction="in" type="s" name="name"/> + <arg direction="out" type="s" name="greeting"/> + </method> + </interface> +</node> diff --git a/test cases/frameworks/7 gnome/gdbus/gdbusprog.c b/test cases/frameworks/7 gnome/gdbus/gdbusprog.c new file mode 100644 index 0000000..b42b6fe --- /dev/null +++ b/test cases/frameworks/7 gnome/gdbus/gdbusprog.c @@ -0,0 +1,8 @@ +#include"generated-gdbus.h" + +int main(int argc, char **argv) { + SampleComExample *s; + s = sample_com_example_skeleton_new(); + g_object_unref(s); + return 0; +} diff --git a/test cases/frameworks/7 gnome/gdbus/meson.build b/test cases/frameworks/7 gnome/gdbus/meson.build new file mode 100644 index 0000000..fdb3896 --- /dev/null +++ b/test cases/frameworks/7 gnome/gdbus/meson.build @@ -0,0 +1,95 @@ +gdbus_src = gnome.gdbus_codegen('generated-gdbus-no-docbook', + 'data/com.example.Sample.xml', + interface_prefix : 'com.example.', + namespace : 'Sample', + annotations : [ + ['com.example.Hello()', 'org.freedesktop.DBus.Deprecated', 'true'] + ], +) + +# check that empty annotations work +gdbus_src2 = gnome.gdbus_codegen( + 'generated-gdbus-no-docbook2', + 'data/com.example.Sample.xml', + interface_prefix : 'com.example.', + namespace : 'Sample', + annotations : [], +) + +assert(gdbus_src.length() == 2, 'expected 2 targets') +assert(gdbus_src[0].full_path().endswith('.c'), 'expected 1 c source file') +assert(gdbus_src[1].full_path().endswith('.h'), 'expected 1 c header file') + +sample_xml = configure_file(input: 'data/com.example.Sample.xml', + output: 'com.example.Sample.xml', + copy: true) + +gdbus_src = gnome.gdbus_codegen('generated-gdbus-no-docbook-files-posarg', + sample_xml, + interface_prefix : 'com.example.', + namespace : 'Sample', + annotations : [ + ['com.example.Hello()', 'org.freedesktop.DBus.Deprecated', 'true'] + ], +) +assert(gdbus_src.length() == 2, 'expected 2 targets') +assert(gdbus_src[0].full_path().endswith('.c'), 'expected 1 c source file') +assert(gdbus_src[1].full_path().endswith('.h'), 'expected 1 c header file') + +gdbus_src = gnome.gdbus_codegen('generated-gdbus', + sources : files('data/com.example.Sample.xml'), + interface_prefix : 'com.example.', + namespace : 'Sample', + annotations : [ + ['com.example.Hello()', 'org.freedesktop.DBus.Deprecated', 'true'], + ['com.example.Bye()', 'org.freedesktop.DBus.Deprecated', 'true'], + ], + docbook : 'generated-gdbus-doc', + install_header : true, + install_dir : get_option('includedir') +) +assert(gdbus_src.length() == 3, 'expected 3 targets') +assert(gdbus_src[0].full_path().endswith('.c'), 'expected 1 c source file') +assert(gdbus_src[1].full_path().endswith('.h'), 'expected 1 c header file') + +if not pretend_glib_old and glib.version().version_compare('>=2.51.3') + includes = [] +else + includes = include_directories('..') +endif + +# check that custom targets work +gdbus_xml_ct = custom_target('built xml sources for gdbus', + output: 'com.example.SampleCustomTarget.xml', + input: 'data/com.example.Sample.xml', + command : [copyfile, '@INPUT@', '@OUTPUT@']) + +gdbus_src_ct = gnome.gdbus_codegen( + 'generated-gdbus-customtarget-src', + gdbus_xml_ct, + interface_prefix : 'com.example.', + namespace : 'Sample', + annotations : [], +) +gdbus_src_cti = gnome.gdbus_codegen( + 'generated-gdbus-customtargetindex-src', + gdbus_xml_ct[0], + interface_prefix : 'com.example.', + namespace : 'Sample', + annotations : [], +) + +gdbus_src_gen = gnome.gdbus_codegen( + 'generated-gdbus-generator-src', + copyfile_gen.process('data/com.example.Sample.xml'), + interface_prefix : 'com.example.', + namespace : 'Sample', + annotations : [], +) + +gdbus_exe = executable('gdbus-test', 'gdbusprog.c', + gdbus_src, + include_directories : includes, + dependencies : giounix) + +test('gdbus', gdbus_exe) diff --git a/test cases/frameworks/7 gnome/genmarshal/main.c.in b/test cases/frameworks/7 gnome/genmarshal/main.c.in new file mode 100644 index 0000000..8e3ca7a --- /dev/null +++ b/test cases/frameworks/7 gnome/genmarshal/main.c.in @@ -0,0 +1,102 @@ +#include <stdio.h> +#include <stdlib.h> +#include <glib-object.h> +#include @MARSHALLER_HEADER@ + +static int singleton = 42; + +void foo(gpointer user_data, gpointer data) { + if (user_data != &singleton) { + fprintf(stderr, "Invoked foo function was passed incorrect user data.\n"); + exit(1); + } +} + +void bar(gpointer user_data, gint param1, gpointer data) { + if (param1 != singleton) { + fprintf(stderr, "Invoked bar function was passed incorrect param1, but %d.\n", param1); + exit(2); + } + if (user_data != &singleton) { + fprintf(stderr, "Invoked bar function was passed incorrect user data.\n"); + exit(3); + } +} + +gfloat baz(gpointer user_data, gboolean param1, guchar param2, gpointer data) { + if (param1 != TRUE) { + fprintf(stderr, "Invoked baz function was passed incorrect param1.\n"); + exit(4); + } + if (param2 != singleton) { + fprintf(stderr, "Invoked baz function was passed incorrect param2.\n"); + exit(5); + } + if (user_data != &singleton) { + fprintf(stderr, "Invoked baz function was passed incorrect user data.\n"); + exit(6); + } + return (gfloat)param2; +} + +int main(int argc, char **argv) { + GClosure *cc_foo, *cc_bar, *cc_baz; + GValue return_value = G_VALUE_INIT; + GValue param_values[3] = {G_VALUE_INIT, G_VALUE_INIT, G_VALUE_INIT}; + + fprintf(stderr, "Invoking foo function.\n"); + cc_foo = g_cclosure_new(G_CALLBACK(foo), NULL, NULL); + g_closure_set_marshal(cc_foo, g_cclosure_user_marshal_VOID__VOID); + g_value_init(¶m_values[0], G_TYPE_POINTER); + g_value_set_pointer(¶m_values[0], &singleton); + g_closure_invoke(cc_foo, &return_value, 1, param_values, NULL); + if (G_VALUE_TYPE(&return_value) != G_TYPE_INVALID) { + fprintf(stderr, "Invoked foo function did not return empty value, but %s.\n", + G_VALUE_TYPE_NAME(&return_value)); + return 7; + } + g_value_unset(¶m_values[0]); + g_value_unset(&return_value); + g_closure_unref(cc_foo); + + fprintf(stderr, "Invoking bar function.\n"); + cc_bar = g_cclosure_new(G_CALLBACK(bar), NULL, NULL); + g_closure_set_marshal(cc_bar, g_cclosure_user_marshal_VOID__INT); + g_value_init(¶m_values[0], G_TYPE_POINTER); + g_value_set_pointer(¶m_values[0], &singleton); + g_value_init(¶m_values[1], G_TYPE_INT); + g_value_set_int(¶m_values[1], 42); + g_closure_invoke(cc_bar, &return_value, 2, param_values, NULL); + if (G_VALUE_TYPE(&return_value) != G_TYPE_INVALID) { + fprintf(stderr, "Invoked bar function did not return empty value.\n"); + return 8; + } + g_value_unset(¶m_values[0]); + g_value_unset(¶m_values[1]); + g_value_unset(&return_value); + g_closure_unref(cc_bar); + + fprintf(stderr, "Invoking baz function.\n"); + cc_baz = g_cclosure_new(G_CALLBACK(baz), NULL, NULL); + g_closure_set_marshal(cc_baz, g_cclosure_user_marshal_FLOAT__BOOLEAN_UCHAR); + g_value_init(¶m_values[0], G_TYPE_POINTER); + g_value_set_pointer(¶m_values[0], &singleton); + g_value_init(¶m_values[1], G_TYPE_BOOLEAN); + g_value_set_boolean(¶m_values[1], TRUE); + g_value_init(¶m_values[2], G_TYPE_UCHAR); + g_value_set_uchar(¶m_values[2], 42); + g_value_init(&return_value, G_TYPE_FLOAT); + g_closure_invoke(cc_baz, &return_value, 3, param_values, NULL); + if (g_value_get_float(&return_value) != 42.0f) { + fprintf(stderr, "Invoked baz function did not return expected value.\n"); + return 9; + } + g_value_unset(¶m_values[0]); + g_value_unset(¶m_values[1]); + g_value_unset(¶m_values[2]); + g_value_unset(&return_value); + g_closure_unref(cc_baz); + + fprintf(stderr, "All ok.\n"); + return 0; +} diff --git a/test cases/frameworks/7 gnome/genmarshal/marshaller.list b/test cases/frameworks/7 gnome/genmarshal/marshaller.list new file mode 100644 index 0000000..a29f6c9 --- /dev/null +++ b/test cases/frameworks/7 gnome/genmarshal/marshaller.list @@ -0,0 +1,3 @@ +VOID:VOID +VOID:INT +FLOAT:BOOLEAN,UCHAR diff --git a/test cases/frameworks/7 gnome/genmarshal/meson.build b/test cases/frameworks/7 gnome/genmarshal/meson.build new file mode 100644 index 0000000..9a2cd7a --- /dev/null +++ b/test cases/frameworks/7 gnome/genmarshal/meson.build @@ -0,0 +1,54 @@ +m_list = configure_file(input: 'marshaller.list', + output: 'm.list', + copy: true) + +idx = 0 +mlists = ['marshaller.list', files('marshaller.list'), m_list] + +foreach mlist : mlists + marshallers = gnome.genmarshal('marshaller-@0@'.format(idx), + sources : mlist, + install_header : true, + install_dir : get_option('includedir') / 'subdir-@0@'.format(idx), + extra_args : ['-UG_ENABLE_DEBUG', '--prototypes']) + + marshaller_c = marshallers[0] + marshaller_h = marshallers[1] + + cdata = configuration_data() + cdata.set_quoted('MARSHALLER_HEADER', 'marshaller-@0@.h'.format(idx)) + + main_c = configure_file(input: 'main.c.in', + output: 'main-@0@.c'.format(idx), + configuration: cdata) + + genmarshalexe = executable('genmarshalprog-@0@'.format(idx), + main_c, marshaller_c, marshaller_h, + dependencies : gobj) + test('genmarshal test @0@'.format(idx), genmarshalexe) + idx += 1 +endforeach + +foreach mlist : mlists + marshallers = gnome.genmarshal('marshaller-@0@'.format(idx), + sources : [mlist], + install_header : true, + install_dir : get_option('includedir') / 'subdir-@0@'.format(idx), + extra_args : ['-UG_ENABLE_DEBUG', '--prototypes']) + + marshaller_c = marshallers[0] + marshaller_h = marshallers[1] + + cdata = configuration_data() + cdata.set_quoted('MARSHALLER_HEADER', 'marshaller-@0@.h'.format(idx)) + + main_c = configure_file(input: 'main.c.in', + output: 'main-@0@.c'.format(idx), + configuration: cdata) + + genmarshalexe = executable('genmarshalprog-@0@'.format(idx), + main_c, marshaller_c, marshaller_h, + dependencies : gobj) + test('genmarshal test @0@'.format(idx), genmarshalexe) + idx += 1 +endforeach diff --git a/test cases/frameworks/7 gnome/gir/copy.py b/test cases/frameworks/7 gnome/gir/copy.py new file mode 100755 index 0000000..fa70145 --- /dev/null +++ b/test cases/frameworks/7 gnome/gir/copy.py @@ -0,0 +1,18 @@ +#!/usr/bin/env python3 +# SPDX-License-Identifier: Apache-2.0 +# Copyright © 2021 Intel Corproation + +import argparse +import shutil + +def main() -> None: + parser = argparse.ArgumentParser() + parser.add_argument('src') + parser.add_argument('dest') + args = parser.parse_args() + + shutil.copy(args.src, args.dest) + + +if __name__ == "__main__": + main() diff --git a/test cases/frameworks/7 gnome/gir/dep1/dep1.c b/test cases/frameworks/7 gnome/gir/dep1/dep1.c new file mode 100644 index 0000000..8d4ca4b --- /dev/null +++ b/test cases/frameworks/7 gnome/gir/dep1/dep1.c @@ -0,0 +1,56 @@ +#include "dep1.h" + +struct _MesonDep1 +{ + GObject parent_instance; +}; + +G_DEFINE_TYPE (MesonDep1, meson_dep1, G_TYPE_OBJECT) + +/** + * meson_dep1_new: + * + * Allocates a new #MesonDep1. + * + * Returns: (transfer full): a #MesonDep1. + */ +MesonDep1 * +meson_dep1_new (void) +{ + return g_object_new (MESON_TYPE_DEP1, NULL); +} + +static void +meson_dep1_finalize (GObject *object) +{ + G_OBJECT_CLASS (meson_dep1_parent_class)->finalize (object); +} + +static void +meson_dep1_class_init (MesonDep1Class *klass) +{ + GObjectClass *object_class = G_OBJECT_CLASS (klass); + + object_class->finalize = meson_dep1_finalize; +} + +static void +meson_dep1_init (MesonDep1 *self) +{ +} + +/** + * meson_dep1_just_return_it: + * @dep: a #MesonDep2. + * + * Returns the #MesonDep2 that is passed in + * + * Returns: (transfer none): a #MesonDep2 + */ +MesonDep2* +meson_dep1_just_return_it (MesonDep1 *self, MesonDep2 *dep) +{ + g_return_val_if_fail (MESON_IS_DEP1 (self), NULL); + + return dep; +} diff --git a/test cases/frameworks/7 gnome/gir/dep1/dep1.h b/test cases/frameworks/7 gnome/gir/dep1/dep1.h new file mode 100644 index 0000000..92fc44c --- /dev/null +++ b/test cases/frameworks/7 gnome/gir/dep1/dep1.h @@ -0,0 +1,23 @@ +#ifndef MESON_DEP1_H +#define MESON_DEP1_H + +#if !defined (MESON_TEST) +#error "MESON_TEST not defined." +#endif + +#include <glib-object.h> +#include "dep2/dep2.h" + +G_BEGIN_DECLS + +#define MESON_TYPE_DEP1 (meson_dep1_get_type()) + +G_DECLARE_FINAL_TYPE (MesonDep1, meson_dep1, MESON, DEP1, GObject) + +MesonDep1 *meson_dep1_new (void); +MesonDep2 *meson_dep1_just_return_it (MesonDep1 *self, + MesonDep2 *dep); + +G_END_DECLS + +#endif /* MESON_DEP1_H */ diff --git a/test cases/frameworks/7 gnome/gir/dep1/dep2/dep2.c b/test cases/frameworks/7 gnome/gir/dep1/dep2/dep2.c new file mode 100644 index 0000000..754c6d7 --- /dev/null +++ b/test cases/frameworks/7 gnome/gir/dep1/dep2/dep2.c @@ -0,0 +1,124 @@ +#include "dep2.h" + +struct _MesonDep2 +{ + GObject parent_instance; + + gchar *msg; +}; + +G_DEFINE_TYPE (MesonDep2, meson_dep2, G_TYPE_OBJECT) + +enum { + PROP_0, + PROP_MSG, + LAST_PROP +}; + +static GParamSpec *gParamSpecs [LAST_PROP]; + +/** + * meson_dep2_new: + * @msg: The message to set. + * + * Allocates a new #MesonDep2. + * + * Returns: (transfer full): a #MesonDep2. + */ +MesonDep2 * +meson_dep2_new (const gchar *msg) +{ + g_return_val_if_fail (msg != NULL, NULL); + + return g_object_new (MESON_TYPE_DEP2, + "message", msg, + NULL); +} + +static void +meson_dep2_finalize (GObject *object) +{ + MesonDep2 *self = (MesonDep2 *)object; + + g_clear_pointer (&self->msg, g_free); + + G_OBJECT_CLASS (meson_dep2_parent_class)->finalize (object); +} + +static void +meson_dep2_get_property (GObject *object, + guint prop_id, + GValue *value, + GParamSpec *pspec) +{ + MesonDep2 *self = MESON_DEP2 (object); + + switch (prop_id) + { + case PROP_MSG: + g_value_set_string (value, self->msg); + break; + default: + G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); + } +} + +static void +meson_dep2_set_property (GObject *object, + guint prop_id, + const GValue *value, + GParamSpec *pspec) +{ + MesonDep2 *self = MESON_DEP2 (object); + + switch (prop_id) + { + case PROP_MSG: + self->msg = g_value_dup_string (value); + break; + default: + G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); + } +} + +static void +meson_dep2_class_init (MesonDep2Class *klass) +{ + GObjectClass *object_class = G_OBJECT_CLASS (klass); + + object_class->finalize = meson_dep2_finalize; + object_class->get_property = meson_dep2_get_property; + object_class->set_property = meson_dep2_set_property; + + gParamSpecs [PROP_MSG] = + g_param_spec_string ("message", + "Message", + "The message to print.", + NULL, + (G_PARAM_READWRITE | + G_PARAM_CONSTRUCT_ONLY | + G_PARAM_STATIC_STRINGS)); + + g_object_class_install_properties (object_class, LAST_PROP, gParamSpecs); +} + +static void +meson_dep2_init (MesonDep2 *self) +{ +} + +/** + * meson_dep2_return_message: + * @self: a #MesonDep2. + * + * Returns the message. + * + * Returns: (transfer none): a const gchar* + */ +const gchar* +meson_dep2_return_message (MesonDep2 *self) +{ + g_return_val_if_fail (MESON_IS_DEP2 (self), NULL); + + return (const gchar*) self->msg; +} diff --git a/test cases/frameworks/7 gnome/gir/dep1/dep2/dep2.h b/test cases/frameworks/7 gnome/gir/dep1/dep2/dep2.h new file mode 100644 index 0000000..0afea90 --- /dev/null +++ b/test cases/frameworks/7 gnome/gir/dep1/dep2/dep2.h @@ -0,0 +1,21 @@ +#ifndef MESON_DEP2_H +#define MESON_DEP2_H + +#if !defined (MESON_TEST) +#error "MESON_TEST not defined." +#endif + +#include <glib-object.h> + +G_BEGIN_DECLS + +#define MESON_TYPE_DEP2 (meson_dep2_get_type()) + +G_DECLARE_FINAL_TYPE (MesonDep2, meson_dep2, MESON, DEP2, GObject) + +MesonDep2 *meson_dep2_new (const gchar *msg); +const gchar *meson_dep2_return_message (MesonDep2 *self); + +G_END_DECLS + +#endif /* MESON_DEP2_H */ diff --git a/test cases/frameworks/7 gnome/gir/dep1/dep2/meson.build b/test cases/frameworks/7 gnome/gir/dep1/dep2/meson.build new file mode 100644 index 0000000..4004f22 --- /dev/null +++ b/test cases/frameworks/7 gnome/gir/dep1/dep2/meson.build @@ -0,0 +1,22 @@ +dep2sources = ['dep2.c', 'dep2.h'] + +dep2lib = shared_library( + 'dep2lib', + sources : dep2sources, + dependencies : gobj, + install : true +) + +dep2gir = gnome.generate_gir( + dep2lib, + sources : dep2sources, + nsversion : '1.0', + namespace : 'MesonDep2', + symbol_prefix : 'meson', + identifier_prefix : 'Meson', + includes : ['GObject-2.0'], + install : true +) + +dep2_dep = declare_dependency(link_with : dep2lib, + sources : [dep2gir]) diff --git a/test cases/frameworks/7 gnome/gir/dep1/dep3/dep3.c b/test cases/frameworks/7 gnome/gir/dep1/dep3/dep3.c new file mode 100644 index 0000000..ee5c5e1 --- /dev/null +++ b/test cases/frameworks/7 gnome/gir/dep1/dep3/dep3.c @@ -0,0 +1,124 @@ +#include "dep3.h" + +struct _MesonDep3 +{ + GObject parent_instance; + + gchar *msg; +}; + +G_DEFINE_TYPE (MesonDep3, meson_dep3, G_TYPE_OBJECT) + +enum { + PROP_0, + PROP_MSG, + LAST_PROP +}; + +static GParamSpec *gParamSpecs [LAST_PROP]; + +/** + * meson_dep3_new: + * @msg: The message to set. + * + * Allocates a new #MesonDep3. + * + * Returns: (transfer full): a #MesonDep3. + */ +MesonDep3 * +meson_dep3_new (const gchar *msg) +{ + g_return_val_if_fail (msg != NULL, NULL); + + return g_object_new (MESON_TYPE_DEP3, + "message", msg, + NULL); +} + +static void +meson_dep3_finalize (GObject *object) +{ + MesonDep3 *self = (MesonDep3 *)object; + + g_clear_pointer (&self->msg, g_free); + + G_OBJECT_CLASS (meson_dep3_parent_class)->finalize (object); +} + +static void +meson_dep3_get_property (GObject *object, + guint prop_id, + GValue *value, + GParamSpec *pspec) +{ + MesonDep3 *self = MESON_DEP3 (object); + + switch (prop_id) + { + case PROP_MSG: + g_value_set_string (value, self->msg); + break; + default: + G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); + } +} + +static void +meson_dep3_set_property (GObject *object, + guint prop_id, + const GValue *value, + GParamSpec *pspec) +{ + MesonDep3 *self = MESON_DEP3 (object); + + switch (prop_id) + { + case PROP_MSG: + self->msg = g_value_dup_string (value); + break; + default: + G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); + } +} + +static void +meson_dep3_class_init (MesonDep3Class *klass) +{ + GObjectClass *object_class = G_OBJECT_CLASS (klass); + + object_class->finalize = meson_dep3_finalize; + object_class->get_property = meson_dep3_get_property; + object_class->set_property = meson_dep3_set_property; + + gParamSpecs [PROP_MSG] = + g_param_spec_string ("message", + "Message", + "The message to print.", + NULL, + (G_PARAM_READWRITE | + G_PARAM_CONSTRUCT_ONLY | + G_PARAM_STATIC_STRINGS)); + + g_object_class_install_properties (object_class, LAST_PROP, gParamSpecs); +} + +static void +meson_dep3_init (MesonDep3 *self) +{ +} + +/** + * meson_dep3_return_message: + * @self: a #MesonDep3. + * + * Returns the message. + * + * Returns: (transfer none): a const gchar* + */ +const gchar* +meson_dep3_return_message (MesonDep3 *self) +{ + g_return_val_if_fail (MESON_IS_DEP3 (self), NULL); + + return (const gchar*) self->msg; +} diff --git a/test cases/frameworks/7 gnome/gir/dep1/dep3/dep3.h b/test cases/frameworks/7 gnome/gir/dep1/dep3/dep3.h new file mode 100644 index 0000000..9883d76 --- /dev/null +++ b/test cases/frameworks/7 gnome/gir/dep1/dep3/dep3.h @@ -0,0 +1,21 @@ +#ifndef MESON_DEP3_H +#define MESON_DEP3_H + +#if !defined (MESON_TEST) +#error "MESON_TEST not defined." +#endif + +#include <glib-object.h> + +G_BEGIN_DECLS + +#define MESON_TYPE_DEP3 (meson_dep3_get_type()) + +G_DECLARE_FINAL_TYPE (MesonDep3, meson_dep3, MESON, DEP3, GObject) + +MesonDep3 *meson_dep3_new (const gchar *msg); +const gchar *meson_dep3_return_message (MesonDep3 *self); + +G_END_DECLS + +#endif /* MESON_DEP3_H */ diff --git a/test cases/frameworks/7 gnome/gir/dep1/dep3/meson.build b/test cases/frameworks/7 gnome/gir/dep1/dep3/meson.build new file mode 100644 index 0000000..1ef7765 --- /dev/null +++ b/test cases/frameworks/7 gnome/gir/dep1/dep3/meson.build @@ -0,0 +1,22 @@ +dep3sources = ['dep3.c', 'dep3.h'] + +dep3lib = shared_library( + 'dep3lib', + sources : dep3sources, + dependencies : gobj, + install : true +) + +dep3gir = gnome.generate_gir( + dep3lib, + sources : dep3sources, + nsversion : '1.0', + namespace : 'MesonDep3', + symbol_prefix : 'meson', + identifier_prefix : 'Meson', + includes : ['GObject-2.0'], + install : true +) + +dep3_dep = declare_dependency(link_with : dep3lib, + sources : [dep3gir]) diff --git a/test cases/frameworks/7 gnome/gir/dep1/meson.build b/test cases/frameworks/7 gnome/gir/dep1/meson.build new file mode 100644 index 0000000..2f03ede --- /dev/null +++ b/test cases/frameworks/7 gnome/gir/dep1/meson.build @@ -0,0 +1,31 @@ +subdir('dep2') +subdir('dep3') + +dep1sources = ['dep1.c', 'dep1.h'] + +# Do not need to link to dep2lib because we don't use any symbols from it +dep1lib = shared_library( + 'dep1lib', + sources : dep1sources, + dependencies : gobj, + install : true +) + +# But the gir does need it because it we use the MesonDep2* structure defined +# in the header +dep1gir = gnome.generate_gir( + dep1lib, + sources : dep1sources, + nsversion : '1.0', + namespace : 'MesonDep1', + symbol_prefix : 'meson', + identifier_prefix : 'Meson', + header: 'dep1.h', + includes : ['GObject-2.0', 'MesonDep2-1.0', dep3gir[0]], + dependencies : [dep2_dep], + install : true +) + +dep1_dep = declare_dependency(link_with : dep1lib, + dependencies : [dep2_dep, dep3_dep], + sources : [dep1gir]) diff --git a/test cases/frameworks/7 gnome/gir/meson-sample.c b/test cases/frameworks/7 gnome/gir/meson-sample.c new file mode 100644 index 0000000..850b850 --- /dev/null +++ b/test cases/frameworks/7 gnome/gir/meson-sample.c @@ -0,0 +1,121 @@ +#include "meson-sample.h" + +struct _MesonSample +{ + GObject parent_instance; + + gchar *msg; +}; + +G_DEFINE_TYPE (MesonSample, meson_sample, G_TYPE_OBJECT) + +enum { + PROP_0, + PROP_MSG, + LAST_PROP +}; + +static GParamSpec *gParamSpecs [LAST_PROP]; + +/** + * meson_sample_new: + * + * Allocates a new #MesonSample. + * + * Returns: (transfer full): a #MesonSample. + */ +MesonSample * +meson_sample_new (void) +{ + return g_object_new (MESON_TYPE_SAMPLE, NULL); +} + +static void +meson_sample_finalize (GObject *object) +{ + MesonSample *self = (MesonSample *)object; + + g_clear_pointer (&self->msg, g_free); + + G_OBJECT_CLASS (meson_sample_parent_class)->finalize (object); +} + +static void +meson_sample_get_property (GObject *object, + guint prop_id, + GValue *value, + GParamSpec *pspec) +{ + MesonSample *self = MESON_SAMPLE (object); + + switch (prop_id) + { + case PROP_MSG: + g_value_set_string (value, self->msg); + break; + default: + G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); + } +} + +static void +meson_sample_set_property (GObject *object, + guint prop_id, + const GValue *value, + GParamSpec *pspec) +{ + MesonSample *self = MESON_SAMPLE (object); + + switch (prop_id) + { + case PROP_MSG: + self->msg = g_value_dup_string (value); + break; + default: + G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); + } +} + +static void +meson_sample_class_init (MesonSampleClass *klass) +{ + GObjectClass *object_class = G_OBJECT_CLASS (klass); + + object_class->finalize = meson_sample_finalize; + object_class->get_property = meson_sample_get_property; + object_class->set_property = meson_sample_set_property; + + gParamSpecs [PROP_MSG] = + g_param_spec_string ("message", + "Message", + "The message to print.", + NULL, + (G_PARAM_READWRITE | + G_PARAM_CONSTRUCT_ONLY | + G_PARAM_STATIC_STRINGS)); + + g_object_class_install_properties (object_class, LAST_PROP, gParamSpecs); +} + +static void +meson_sample_init (MesonSample *self) +{ +} + +/** + * meson_sample_print_message: + * @self: a #MesonSample. + * + * Prints the message. + * + * Returns: Nothing. + */ +void +meson_sample_print_message (MesonSample *self, MesonDep1 *dep1, MesonDep2 *dep2) +{ + MesonDep2 *samedep; + g_return_if_fail (MESON_IS_SAMPLE (self)); + + samedep = meson_dep1_just_return_it (dep1, dep2); + g_print ("Message: %s\n", meson_dep2_return_message (samedep)); +} diff --git a/test cases/frameworks/7 gnome/gir/meson-sample.h b/test cases/frameworks/7 gnome/gir/meson-sample.h new file mode 100644 index 0000000..04e79b8 --- /dev/null +++ b/test cases/frameworks/7 gnome/gir/meson-sample.h @@ -0,0 +1,24 @@ +#ifndef MESON_SAMPLE_H +#define MESON_SAMPLE_H + +#if !defined (MESON_TEST) +#error "MESON_TEST not defined." +#endif + +#include <glib-object.h> +#include "dep1/dep1.h" + +G_BEGIN_DECLS + +#define MESON_TYPE_SAMPLE (meson_sample_get_type()) + +G_DECLARE_FINAL_TYPE (MesonSample, meson_sample, MESON, SAMPLE, GObject) + +MesonSample *meson_sample_new (void); +void meson_sample_print_message (MesonSample *self, + MesonDep1 *dep1, + MesonDep2 *dep2); + +G_END_DECLS + +#endif /* MESON_SAMPLE_H */ diff --git a/test cases/frameworks/7 gnome/gir/meson-sample2.c b/test cases/frameworks/7 gnome/gir/meson-sample2.c new file mode 100644 index 0000000..f76bc16 --- /dev/null +++ b/test cases/frameworks/7 gnome/gir/meson-sample2.c @@ -0,0 +1,45 @@ +#include "meson-sample2.h" + +struct _MesonSample2 +{ + GObject parent_instance; +}; + +G_DEFINE_TYPE (MesonSample2, meson_sample2, G_TYPE_OBJECT) + +/** + * meson_sample2_new: + * + * Allocates a new #MesonSample2. + * + * Returns: (transfer full): a #MesonSample2. + */ +MesonSample2 * +meson_sample2_new (void) +{ + return g_object_new (MESON_TYPE_SAMPLE2, NULL); +} + +static void +meson_sample2_class_init (MesonSample2Class *klass) +{ +} + +static void +meson_sample2_init (MesonSample2 *self) +{ +} + +/** + * meson_sample2_print_message: + * @self: a #MesonSample2. + * + * Prints Hello. + * + * Returns: Nothing. + */ +void +meson_sample2_print_message (MesonSample2 *self) +{ + g_print ("Message: Hello\n"); +} diff --git a/test cases/frameworks/7 gnome/gir/meson-sample2.h b/test cases/frameworks/7 gnome/gir/meson-sample2.h new file mode 100644 index 0000000..d39084e --- /dev/null +++ b/test cases/frameworks/7 gnome/gir/meson-sample2.h @@ -0,0 +1,21 @@ +#ifndef MESON_SAMPLE2_H +#define MESON_SAMPLE2_H + +#if !defined (MESON_TEST) +#error "MESON_TEST not defined." +#endif + +#include <glib-object.h> + +G_BEGIN_DECLS + +#define MESON_TYPE_SAMPLE2 (meson_sample2_get_type()) + +G_DECLARE_FINAL_TYPE (MesonSample2, meson_sample2, MESON, SAMPLE2, GObject) + +MesonSample2 *meson_sample2_new (void); +void meson_sample2_print_message (MesonSample2 *self); + +G_END_DECLS + +#endif /* MESON_SAMPLE2_H */ diff --git a/test cases/frameworks/7 gnome/gir/meson.build b/test cases/frameworks/7 gnome/gir/meson.build new file mode 100644 index 0000000..fbff206 --- /dev/null +++ b/test cases/frameworks/7 gnome/gir/meson.build @@ -0,0 +1,60 @@ +subdir('dep1') + +libsources = ['meson-sample.c', 'meson-sample.h'] +lib2sources = ['meson-sample2.c', 'meson-sample2.h'] + +gen_source = custom_target( + 'meson_smaple3.h', + input : 'meson-sample.h', + output : 'meson-sample3.h', + command : [find_program('copy.py'), '@INPUT@', '@OUTPUT@'], + build_by_default : false, # this will force a race condition if one exists +) + +girlib = shared_library( + 'gir_lib', + sources : libsources, + dependencies : [gobj, dep1_dep], + install : true +) + +girlib2 = shared_library( + 'gir_lib2', + sources : lib2sources, + dependencies : [gobj], + install : true +) + +girexe = executable( + 'girprog', + sources : 'prog.c', + dependencies : [glib, gobj, gir, dep1_dep], + link_with : girlib +) + +fake_dep = dependency('no-way-this-exists', required: false) + +gnome.generate_gir( + girlib, girlib2, + sources : [libsources, lib2sources, gen_source], + nsversion : '1.0', + namespace : 'Meson', + symbol_prefix : 'meson', + identifier_prefix : 'Meson', + includes : ['GObject-2.0', 'MesonDep1-1.0'], + # dep1_dep pulls in dep2_dep for us + dependencies : [[fake_dep, dep1_dep]], + install : true, + build_by_default : true, +) + +test('gobject introspection/c', girexe) +gir_paths = ':'.join([girlib.outdir(), dep1lib.outdir(), dep2lib.outdir(), dep3lib.outdir()]) +envdata = environment() +envdata.append('GI_TYPELIB_PATH', gir_paths, separator : ':') +envdata.append('LD_LIBRARY_PATH', gir_paths) +if ['windows', 'cygwin'].contains(host_machine.system()) + envdata.append('PATH', gir_paths) +endif +test('gobject introspection/py', find_program('prog.py'), + env : envdata) diff --git a/test cases/frameworks/7 gnome/gir/prog.c b/test cases/frameworks/7 gnome/gir/prog.c new file mode 100644 index 0000000..001f6d0 --- /dev/null +++ b/test cases/frameworks/7 gnome/gir/prog.c @@ -0,0 +1,35 @@ +#include <girepository.h> + +#include "meson-sample.h" + +gint +main (gint argc, + gchar *argv[]) +{ + GError * error = NULL; + + GOptionContext * ctx = g_option_context_new (NULL); + g_option_context_add_group (ctx, g_irepository_get_option_group ()); + + if (!g_option_context_parse (ctx, &argc, &argv, &error)) { + g_print ("sample: %s\n", error->message); + g_option_context_free (ctx); + if (error) { + g_error_free (error); + } + + return 1; + } + + MesonSample * i = meson_sample_new (); + MesonDep1 * dep1 = meson_dep1_new (); + MesonDep2 * dep2 = meson_dep2_new ("Hello, meson/c!"); + meson_sample_print_message (i, dep1, dep2); + + g_object_unref (i); + g_object_unref (dep1); + g_object_unref (dep2); + g_option_context_free (ctx); + + return 0; +} diff --git a/test cases/frameworks/7 gnome/gir/prog.py b/test cases/frameworks/7 gnome/gir/prog.py new file mode 100755 index 0000000..aa1f9a7 --- /dev/null +++ b/test cases/frameworks/7 gnome/gir/prog.py @@ -0,0 +1,11 @@ +#!/usr/bin/env python3 +from gi.repository import Meson, MesonDep1, MesonDep2 + +if __name__ == "__main__": + s = Meson.Sample.new() + dep1 = MesonDep1.Dep1.new() + dep2 = MesonDep2.Dep2.new("Hello, meson/py!") + s.print_message(dep1, dep2) + + s2 = Meson.Sample2.new() + s2.print_message() diff --git a/test cases/frameworks/7 gnome/meson.build b/test cases/frameworks/7 gnome/meson.build new file mode 100644 index 0000000..5f438cb --- /dev/null +++ b/test cases/frameworks/7 gnome/meson.build @@ -0,0 +1,63 @@ +project('gobject-introspection', 'c') + +copyfile = find_program('copyfile.py') +copyfile_gen = generator(copyfile, + output: '@BASENAME@Gen.xml', + arguments : ['@INPUT@', '@OUTPUT@']) + +glib = dependency('glib-2.0', required: false) +if not glib.found() + error('MESON_SKIP_TEST glib not found.') +endif + +gir = dependency('gobject-introspection-1.0', required: false) +if not gir.found() + error('MESON_SKIP_TEST gobject-introspection not found.') +endif + +python3 = import('python3') +py3 = python3.find_python() +if run_command(py3, '-c', 'import gi;', check: false).returncode() != 0 + error('MESON_SKIP_TEST python3-gi not found') +endif + +cc = meson.get_compiler('c') + +add_global_arguments('-DMESON_TEST', language : 'c') +if cc.get_id() == 'intel' + # Ignore invalid GCC pragma warnings from glib + # https://bugzilla.gnome.org/show_bug.cgi?id=776562 + add_global_arguments('-wd2282', language : 'c') +endif + +py3 = import('python3').find_python() +pycode = '''import os, sys +if "MESON_UNIT_TEST_PRETEND_GLIB_OLD" in os.environ: + sys.exit(0) +sys.exit(1) +''' + +pretend_glib_old = false +res = run_command(py3, '-c', pycode, check: false) +if res.returncode() == 0 + pretend_glib_old = true +endif + +gnome = import('gnome') +gio = dependency('gio-2.0') +giounix = dependency('gio-unix-2.0') +glib = dependency('glib-2.0') +gobj = dependency('gobject-2.0') +gir = dependency('gobject-introspection-1.0') +gmod = dependency('gmodule-2.0') + +# Test that static deps don't error out when static libraries aren't found +glib_static = dependency('glib-2.0', static : true) + +subdir('resources-data') +subdir('resources') +subdir('gir') +subdir('schemas') +subdir('gdbus') +subdir('mkenums') +subdir('genmarshal') diff --git a/test cases/frameworks/7 gnome/mkenums/enums.c.in b/test cases/frameworks/7 gnome/mkenums/enums.c.in new file mode 100644 index 0000000..1c19d8f --- /dev/null +++ b/test cases/frameworks/7 gnome/mkenums/enums.c.in @@ -0,0 +1,41 @@ +/*** BEGIN file-header ***/ + +#include "enums.h" + +/*** END file-header ***/ +/*** BEGIN file-production ***/ + +/* enumerations from "@basename@" */ +#include "@basename@" + +/*** END file-production ***/ + +/*** BEGIN value-header ***/ +GType +@enum_name@_get_type(void) { + static gsize static_g_define_type_id = 0; + + if(g_once_init_enter(&static_g_define_type_id)) { + static const G@Type@Value values [] = { +/*** END value-header ***/ + +/*** BEGIN value-production ***/ + { @VALUENAME@, "@VALUENAME@", "@valuenick@" }, +/*** END value-production ***/ + +/*** BEGIN value-tail ***/ + { 0, NULL, NULL } + }; + + GType g_define_type_id = + g_@type@_register_static(g_intern_static_string("@EnumName@"), values); + g_once_init_leave(&static_g_define_type_id, g_define_type_id); + } + + return static_g_define_type_id; +} + +/*** END value-tail ***/ + +/*** BEGIN file-tail ***/ +/*** END file-tail ***/ diff --git a/test cases/frameworks/7 gnome/mkenums/enums.h.in b/test cases/frameworks/7 gnome/mkenums/enums.h.in new file mode 100644 index 0000000..479867f --- /dev/null +++ b/test cases/frameworks/7 gnome/mkenums/enums.h.in @@ -0,0 +1,24 @@ +/*** BEGIN file-header ***/ +#ifndef MESON_ENUMS_H +#define MESON_ENUMS_H + +#include <glib-object.h> + +G_BEGIN_DECLS +/*** END file-header ***/ + +/*** BEGIN file-production ***/ + +/* enumerations from "@basename@" */ +/*** END file-production ***/ +/*** BEGIN value-header ***/ +GType @enum_name@_get_type(void) G_GNUC_CONST; +#define @ENUMPREFIX@_TYPE_@ENUMSHORT@ (@enum_name@_get_type()) +/*** END value-header ***/ + +/*** BEGIN file-tail ***/ + +G_END_DECLS + +#endif /* MESON_ENUMS_H */ +/*** END file-tail ***/ diff --git a/test cases/frameworks/7 gnome/mkenums/enums2.c.in b/test cases/frameworks/7 gnome/mkenums/enums2.c.in new file mode 100644 index 0000000..1c19d8f --- /dev/null +++ b/test cases/frameworks/7 gnome/mkenums/enums2.c.in @@ -0,0 +1,41 @@ +/*** BEGIN file-header ***/ + +#include "enums.h" + +/*** END file-header ***/ +/*** BEGIN file-production ***/ + +/* enumerations from "@basename@" */ +#include "@basename@" + +/*** END file-production ***/ + +/*** BEGIN value-header ***/ +GType +@enum_name@_get_type(void) { + static gsize static_g_define_type_id = 0; + + if(g_once_init_enter(&static_g_define_type_id)) { + static const G@Type@Value values [] = { +/*** END value-header ***/ + +/*** BEGIN value-production ***/ + { @VALUENAME@, "@VALUENAME@", "@valuenick@" }, +/*** END value-production ***/ + +/*** BEGIN value-tail ***/ + { 0, NULL, NULL } + }; + + GType g_define_type_id = + g_@type@_register_static(g_intern_static_string("@EnumName@"), values); + g_once_init_leave(&static_g_define_type_id, g_define_type_id); + } + + return static_g_define_type_id; +} + +/*** END value-tail ***/ + +/*** BEGIN file-tail ***/ +/*** END file-tail ***/ diff --git a/test cases/frameworks/7 gnome/mkenums/enums2.h.in b/test cases/frameworks/7 gnome/mkenums/enums2.h.in new file mode 100644 index 0000000..479867f --- /dev/null +++ b/test cases/frameworks/7 gnome/mkenums/enums2.h.in @@ -0,0 +1,24 @@ +/*** BEGIN file-header ***/ +#ifndef MESON_ENUMS_H +#define MESON_ENUMS_H + +#include <glib-object.h> + +G_BEGIN_DECLS +/*** END file-header ***/ + +/*** BEGIN file-production ***/ + +/* enumerations from "@basename@" */ +/*** END file-production ***/ +/*** BEGIN value-header ***/ +GType @enum_name@_get_type(void) G_GNUC_CONST; +#define @ENUMPREFIX@_TYPE_@ENUMSHORT@ (@enum_name@_get_type()) +/*** END value-header ***/ + +/*** BEGIN file-tail ***/ + +G_END_DECLS + +#endif /* MESON_ENUMS_H */ +/*** END file-tail ***/ diff --git a/test cases/frameworks/7 gnome/mkenums/main.c b/test cases/frameworks/7 gnome/mkenums/main.c new file mode 100644 index 0000000..d257185 --- /dev/null +++ b/test cases/frameworks/7 gnome/mkenums/main.c @@ -0,0 +1,30 @@ +#include<stdio.h> +#include<string.h> +#include<glib-object.h> +#include"meson-sample.h" +#include"@ENUM_FILE@" + +int main(int argc, char **argv) { + GEnumClass *xenum = g_type_class_ref(MESON_TYPE_THE_XENUM); + GFlagsClass *flags_enum = g_type_class_ref(MESON_TYPE_THE_FLAGS_ENUM); + if (g_enum_get_value_by_name(xenum, "MESON_THE_XVALUE")->value != MESON_THE_XVALUE) { + fprintf(stderr, "Get MESON_THE_XVALUE by name failed.\n"); + return 1; + } + if (g_enum_get_value_by_nick(xenum, "the-xvalue")->value != MESON_THE_XVALUE) { + fprintf(stderr, "Get MESON_THE_XVALUE by nick failed.\n"); + return 2; + } + if (g_flags_get_value_by_name(flags_enum, "MESON_THE_FIRST_VALUE")->value != MESON_THE_FIRST_VALUE) { + fprintf(stderr, "Get MESON_THE_FIRST_VALUE by name failed.\n"); + return 3; + } + if (g_flags_get_value_by_nick(flags_enum, "the-first-value")->value != MESON_THE_FIRST_VALUE) { + fprintf(stderr, "Get MESON_THE_FIRST_VALUE by nick failed.\n"); + return 4; + } + g_type_class_unref(xenum); + g_type_class_unref(flags_enum); + fprintf(stderr, "All ok.\n"); + return 0; +} diff --git a/test cases/frameworks/7 gnome/mkenums/main4.c b/test cases/frameworks/7 gnome/mkenums/main4.c new file mode 100644 index 0000000..3df4dd8 --- /dev/null +++ b/test cases/frameworks/7 gnome/mkenums/main4.c @@ -0,0 +1,35 @@ +#include <stdio.h> +#include <string.h> +#include <glib-object.h> +#include "enums4.h" +#include "meson-sample.h" + +int main(int argc, char **argv) { + GEnumClass *xenum = g_type_class_ref(MESON_TYPE_THE_XENUM); + GFlagsClass *flags_enum = g_type_class_ref(MESON_TYPE_THE_FLAGS_ENUM); + if (g_enum_get_value_by_name(xenum, "MESON_THE_XVALUE")->value != MESON_THE_XVALUE) { + fprintf(stderr, "Get MESON_THE_XVALUE by name failed.\n"); + return 1; + } + if (g_enum_get_value_by_nick(xenum, "the-xvalue")->value != MESON_THE_XVALUE) { + fprintf(stderr, "Get MESON_THE_XVALUE by nick failed.\n"); + return 2; + } + if (g_flags_get_value_by_name(flags_enum, "MESON_THE_FIRST_VALUE")->value != MESON_THE_FIRST_VALUE) { + fprintf(stderr, "Get MESON_THE_FIRST_VALUE by name failed.\n"); + return 3; + } + if (g_flags_get_value_by_nick(flags_enum, "the-first-value")->value != MESON_THE_FIRST_VALUE) { + fprintf(stderr, "Get MESON_THE_FIRST_VALUE by nick failed.\n"); + return 4; + } + + /* Make sure that funcs are generated with leading underscore as requested */ + if (!_meson_the_xenum_get_type()) + g_error ("Bad!"); + + g_type_class_unref(xenum); + g_type_class_unref(flags_enum); + fprintf(stderr, "All ok.\n"); + return 0; +} diff --git a/test cases/frameworks/7 gnome/mkenums/main5.c b/test cases/frameworks/7 gnome/mkenums/main5.c new file mode 100644 index 0000000..ed1ccfd --- /dev/null +++ b/test cases/frameworks/7 gnome/mkenums/main5.c @@ -0,0 +1,35 @@ +#include <stdio.h> +#include <string.h> +#include <glib-object.h> +#include "enums5.h" +#include "meson-sample.h" + +int main(int argc, char **argv) { + GEnumClass *xenum = g_type_class_ref(MESON_TYPE_THE_XENUM); + GFlagsClass *flags_enum = g_type_class_ref(MESON_TYPE_THE_FLAGS_ENUM); + if (g_enum_get_value_by_name(xenum, "MESON_THE_XVALUE")->value != MESON_THE_XVALUE) { + fprintf(stderr, "Get MESON_THE_XVALUE by name failed.\n"); + return 1; + } + if (g_enum_get_value_by_nick(xenum, "the-xvalue")->value != MESON_THE_XVALUE) { + fprintf(stderr, "Get MESON_THE_XVALUE by nick failed.\n"); + return 2; + } + if (g_flags_get_value_by_name(flags_enum, "MESON_THE_FIRST_VALUE")->value != MESON_THE_FIRST_VALUE) { + fprintf(stderr, "Get MESON_THE_FIRST_VALUE by name failed.\n"); + return 3; + } + if (g_flags_get_value_by_nick(flags_enum, "the-first-value")->value != MESON_THE_FIRST_VALUE) { + fprintf(stderr, "Get MESON_THE_FIRST_VALUE by nick failed.\n"); + return 4; + } + + /* Make sure that funcs do not have any extra prefix */ + if (!meson_the_xenum_get_type()) + g_error ("Bad!"); + + g_type_class_unref(xenum); + g_type_class_unref(flags_enum); + fprintf(stderr, "All ok.\n"); + return 0; +} diff --git a/test cases/frameworks/7 gnome/mkenums/meson-decls.h b/test cases/frameworks/7 gnome/mkenums/meson-decls.h new file mode 100644 index 0000000..ba94eb9 --- /dev/null +++ b/test cases/frameworks/7 gnome/mkenums/meson-decls.h @@ -0,0 +1,2 @@ +#pragma once +#define MESON_EXPORT extern diff --git a/test cases/frameworks/7 gnome/mkenums/meson-sample.h b/test cases/frameworks/7 gnome/mkenums/meson-sample.h new file mode 100644 index 0000000..ee7b5cb --- /dev/null +++ b/test cases/frameworks/7 gnome/mkenums/meson-sample.h @@ -0,0 +1,20 @@ +#pragma once + +typedef enum +{ + MESON_THE_XVALUE, + MESON_ANOTHER_VALUE +} MesonTheXEnum; + +typedef enum /*< skip >*/ +{ + MESON_FOO +} MesonThisEnumWillBeSkipped; + +typedef enum /*< flags,prefix=MESON >*/ +{ + MESON_THE_ZEROTH_VALUE, /*< skip >*/ + MESON_THE_FIRST_VALUE, + MESON_THE_SECOND_VALUE, + MESON_THE_THIRD_VALUE, /*< nick=the-last-value >*/ +} MesonTheFlagsEnum; diff --git a/test cases/frameworks/7 gnome/mkenums/meson.build b/test cases/frameworks/7 gnome/mkenums/meson.build new file mode 100644 index 0000000..4cf4dcf --- /dev/null +++ b/test cases/frameworks/7 gnome/mkenums/meson.build @@ -0,0 +1,164 @@ +# Generate both header and source via template together. + +myenums = gnome.mkenums('abc1', + sources : 'meson-sample.h', + h_template : 'enums.h.in', + c_template : 'enums.c.in', + install_header : true, + install_dir : get_option('includedir')) + +enums_c1 = myenums[0] +enums_h1 = myenums[1] + +conf = configuration_data() +conf.set('ENUM_FILE', 'enums.h') +main = configure_file( + input : 'main.c', + output : 'main1.c', + configuration : conf) + +enumexe1 = executable('enumprog1', main, enums_c1, enums_h1, +dependencies : gobj) +test('enum test 1', enumexe1) + +# Generate both header and source via template individually and overriding. + +enums_h2 = gnome.mkenums('abc2', + sources : 'meson-sample.h', + h_template : 'enums2.h.in', + ftail : '/* trailing header file info */', + install_header : true, + install_dir : get_option('includedir')) + +enums_c2 = gnome.mkenums('abc2', + sources : 'meson-sample.h', + depends : [enums_h1, enums_h2], + c_template : 'enums2.c.in', + ftail : '/* trailing source file info */') +# explicitly don't set install_dir here, for bug testing +# See https://github.com/mesonbuild/meson/issues/9472 + +conf = configuration_data() +conf.set('ENUM_FILE', 'enums2.h') +main = configure_file( + input : 'main.c', + output : 'main2.c', + configuration : conf) + +enumexe2 = executable('enumprog2', main, enums_c2, enums_h2, +dependencies : gobj) +test('enum test 2', enumexe2) + +# Generate both header and source by options only. +# These are specified in a way that should produce the same result as above +# (modulo any filename changes.) + +enums_h3 = gnome.mkenums('enums3.h', + sources : 'meson-sample.h', + fhead : '''#ifndef MESON_ENUMS_H +#define MESON_ENUMS_H + +#include <glib-object.h> + +G_BEGIN_DECLS +''', + fprod : ''' +/* enumerations from "@basename@" */ +''', + vhead : '''GType @enum_name@_get_type(void) G_GNUC_CONST; +#define @ENUMPREFIX@_TYPE_@ENUMSHORT@ (@enum_name@_get_type()) +''', + ftail : ''' +G_END_DECLS + +#endif /* MESON_ENUMS_H */ +''', + install_header : true, + install_dir : get_option('includedir')) + +enums_c3 = gnome.mkenums('enums3.c', + sources : 'meson-sample.h', + depends : enums_h3, + fhead : '''#include "enums3.h" +''', + fprod : ''' + +/* enumerations from "@basename@" */ +#include "@basename@" +''', + vhead : ''' +GType +@enum_name@_get_type(void) { + static gsize static_g_define_type_id = 0; + + if(g_once_init_enter(&static_g_define_type_id)) { + static const G@Type@Value values [] = { +''', + vprod : ''' { @VALUENAME@, "@VALUENAME@", "@valuenick@" },''', + vtail : ''' { 0, NULL, NULL } + }; + + GType g_define_type_id = + g_@type@_register_static(g_intern_static_string("@EnumName@"), values); + g_once_init_leave(&static_g_define_type_id, g_define_type_id); + } + + return static_g_define_type_id; +} +''') + +conf = configuration_data() +conf.set('ENUM_FILE', 'enums3.h') +main = configure_file( + input : 'main.c', + output : 'main3.c', + configuration : conf) + +enumexe3 = executable('enumprog3', main, enums_c3, enums_h3, +dependencies : gobj) +test('enum test 3', enumexe3) + +enums4 = gnome.mkenums_simple('enums4', sources : files('meson-sample.h'), + function_prefix : '_') +enumexe4 = executable('enumprog4', 'main4.c', enums4, dependencies : gobj) + +enums5 = gnome.mkenums_simple('enums5', sources : 'meson-sample.h', + install_header : true, + decorator : 'MESON_EXPORT', + header_prefix : '#include "meson-decls.h"') + +conf = configuration_data() +conf.set('ENUM_FILE', 'enums5.h') +main = configure_file( + input : 'main.c', + output : 'main5.c', + configuration : conf) + +enumexe5 = executable('enumprog5', main, enums5, dependencies : gobj) + +# Generate template then use as input to mkenums + +# Simple trick to copy the file without substitutions, can be +# removed when https://github.com/mesonbuild/meson/pull/3383 is fixed +gen_h_template = configure_file(input: 'enums.h.in', + output: 'enums6.h.in', + configuration: configuration_data(), + format: 'cmake') + +enums_h6 = gnome.mkenums('enums6', + sources : 'meson-sample.h', + h_template : gen_h_template, + ftail : '/* trailing header file info */', + install_header : true, + install_dir : get_option('includedir')) + +conf = configuration_data() +conf.set('ENUM_FILE', 'enums6.h') +main = configure_file( + input : 'main.c', + output : 'main6.c', + configuration : conf) + +enumexe6 = executable('enumprog6', main, enums_c2, enums_h6, +dependencies : gobj) +test('enum test 4', enumexe6) diff --git a/test cases/frameworks/7 gnome/resources-data/meson.build b/test cases/frameworks/7 gnome/resources-data/meson.build new file mode 100644 index 0000000..31a577b --- /dev/null +++ b/test cases/frameworks/7 gnome/resources-data/meson.build @@ -0,0 +1,18 @@ +subdir('subdir') + +python3 = import('python3').find_python() + +fake_generator_script = ''' +import os, sys +assert os.path.exists(sys.argv[1]), "File %s not found" % sys.argv[1] +print("This is a generated resource.") +''' + +# Generate file res3.txt from file res3.txt.in. This is then included +# in a GResource file, driven by resources/meson.build. +res3_txt = custom_target('res3', + input: 'res3.txt.in', + output: 'res3.txt', + command: [python3, '-c', fake_generator_script, '@INPUT@'], + capture: true, +) diff --git a/test cases/frameworks/7 gnome/resources-data/res1.txt b/test cases/frameworks/7 gnome/resources-data/res1.txt new file mode 100644 index 0000000..e10afea --- /dev/null +++ b/test cases/frameworks/7 gnome/resources-data/res1.txt @@ -0,0 +1 @@ +This is a resource. diff --git a/test cases/frameworks/7 gnome/resources-data/res3.txt.in b/test cases/frameworks/7 gnome/resources-data/res3.txt.in new file mode 100644 index 0000000..077a8e3 --- /dev/null +++ b/test cases/frameworks/7 gnome/resources-data/res3.txt.in @@ -0,0 +1 @@ +This content is ignored, but Meson doesn't need to know that. diff --git a/test cases/frameworks/7 gnome/resources-data/subdir/meson.build b/test cases/frameworks/7 gnome/resources-data/subdir/meson.build new file mode 100644 index 0000000..b41300f --- /dev/null +++ b/test cases/frameworks/7 gnome/resources-data/subdir/meson.build @@ -0,0 +1,8 @@ +cdata = configuration_data() +cdata.set('NOISE', 'BARK') + +res4_txt = configure_file( + input: 'res4.txt.in', + output: 'res4.txt', + configuration: cdata +) diff --git a/test cases/frameworks/7 gnome/resources-data/subdir/res2.txt b/test cases/frameworks/7 gnome/resources-data/subdir/res2.txt new file mode 100644 index 0000000..d297899 --- /dev/null +++ b/test cases/frameworks/7 gnome/resources-data/subdir/res2.txt @@ -0,0 +1 @@ +This is a resource in a subdirectory. diff --git a/test cases/frameworks/7 gnome/resources-data/subdir/res4.txt.in b/test cases/frameworks/7 gnome/resources-data/subdir/res4.txt.in new file mode 100644 index 0000000..c0ec6f2 --- /dev/null +++ b/test cases/frameworks/7 gnome/resources-data/subdir/res4.txt.in @@ -0,0 +1 @@ +@NOISE@ @NOISE@ @NOISE@ diff --git a/test cases/frameworks/7 gnome/resources/generated-main.c b/test cases/frameworks/7 gnome/resources/generated-main.c new file mode 100644 index 0000000..d102604 --- /dev/null +++ b/test cases/frameworks/7 gnome/resources/generated-main.c @@ -0,0 +1,26 @@ +#include<stdio.h> +#include<string.h> +#include<gio/gio.h> +#include"generated-resources.h" + +#define EXPECTED "This is a generated resource.\n" + +int main(int argc, char **argv) { + generated_resources_get_resource(); + GError *err = NULL; + GBytes *data = g_resources_lookup_data("/com/example/myprog/res3.txt", + G_RESOURCE_LOOKUP_FLAGS_NONE, &err); + + if(data == NULL) { + fprintf(stderr, "Data lookup failed: %s\n", err->message); + return 1; + } + if(strcmp(g_bytes_get_data(data, NULL), EXPECTED) != 0) { + fprintf(stderr, "Resource contents are wrong:\n %s\n", + (const char*)g_bytes_get_data(data, NULL)); + return 1; + } + fprintf(stdout, "All ok.\n"); + g_bytes_unref(data); + return 0; +} diff --git a/test cases/frameworks/7 gnome/resources/generated.gresource.xml b/test cases/frameworks/7 gnome/resources/generated.gresource.xml new file mode 100644 index 0000000..7a242d7 --- /dev/null +++ b/test cases/frameworks/7 gnome/resources/generated.gresource.xml @@ -0,0 +1,9 @@ +<?xml version="1.0" encoding="UTF-8"?> +<gresources> + <gresource prefix="/com/example/myprog"> + <file>res1.txt</file> + <file>subdir/res2.txt</file> + <file>res3.txt</file> + <file>subdir/res4.txt</file> + </gresource> +</gresources> diff --git a/test cases/frameworks/7 gnome/resources/generated/meson.build b/test cases/frameworks/7 gnome/resources/generated/meson.build new file mode 100644 index 0000000..9805c66 --- /dev/null +++ b/test cases/frameworks/7 gnome/resources/generated/meson.build @@ -0,0 +1,4 @@ +ct_simple_gresource = custom_target( + input : '../simple.gresource.xml', + output : 'simple-ct.gresource.xml', + command : [copyfile, '@INPUT@', '@OUTPUT@']) diff --git a/test cases/frameworks/7 gnome/resources/meson.build b/test cases/frameworks/7 gnome/resources/meson.build new file mode 100644 index 0000000..60fc848 --- /dev/null +++ b/test cases/frameworks/7 gnome/resources/meson.build @@ -0,0 +1,72 @@ +# There are two tests here, because the 2nd one depends on a version of +# GLib (2.51.1) that is very recent at the time of writing. + +simple_gresource = configure_file( + input : 'simple.gresource.xml', + output : 'simple-gen.gresource.xml', + command : [copyfile, '@INPUT@', '@OUTPUT@']) + +simple_resources = gnome.compile_resources('simple-resources', + simple_gresource, + install_header : true, + export : true, + source_dir : '../resources-data', + c_name : 'simple_resources') + +simple_res_exe = executable('simple-resources-test', + 'simple-main.c', simple_resources, + dependencies: gio) +test('simple resource test', simple_res_exe) + +gnome.compile_resources('simple-resources', + 'simple.gresource.xml', + gresource_bundle: true, + install: true, + install_dir: get_option('datadir'), + source_dir : '../resources-data', +) +test('simple resource test (gresource)', find_program('resources.py')) + +if not pretend_glib_old and glib.version() >= '2.52.0' + # This test cannot pass if GLib version is too old. Generated resource + # dependencies do not work correctly and Meson will raise an error if the + # user tries to use either the 'dependencies' kwarg or a gresource file that + # is itself generated. + generated_resources = gnome.compile_resources('generated-resources', + 'generated.gresource.xml', + source_dir : '../resources-data', + c_name : 'generated_resources', + dependencies : [res3_txt, res4_txt]) + + generated_res_exe = executable('generated-resources-test', + 'generated-main.c', generated_resources, + dependencies: gio) + test('generated resource test', generated_res_exe) + + # Test with a CustomTarget + subdir('generated') + + ct_resources = gnome.compile_resources( + 'ct-resources', + ct_simple_gresource, + install_header : true, + export : true, + source_dir : '../resources-data', + c_name : 'simple_resources') + + cti_resources = gnome.compile_resources( + 'cti-resources', + ct_simple_gresource[0], + install_header : true, + export : true, + source_dir : '../resources-data', + c_name : 'simple_resources') +endif + +# Test build_by_default +gnome.compile_resources('build-resources', + 'simple.gresource.xml', + gresource_bundle : true, + build_by_default : true, + source_dir : '../resources-data', +) diff --git a/test cases/frameworks/7 gnome/resources/myresource.gresource.xml b/test cases/frameworks/7 gnome/resources/myresource.gresource.xml new file mode 100644 index 0000000..7a242d7 --- /dev/null +++ b/test cases/frameworks/7 gnome/resources/myresource.gresource.xml @@ -0,0 +1,9 @@ +<?xml version="1.0" encoding="UTF-8"?> +<gresources> + <gresource prefix="/com/example/myprog"> + <file>res1.txt</file> + <file>subdir/res2.txt</file> + <file>res3.txt</file> + <file>subdir/res4.txt</file> + </gresource> +</gresources> diff --git a/test cases/frameworks/7 gnome/resources/res3.txt b/test cases/frameworks/7 gnome/resources/res3.txt new file mode 100644 index 0000000..aeed4a5 --- /dev/null +++ b/test cases/frameworks/7 gnome/resources/res3.txt @@ -0,0 +1 @@ +This file is from the wrong directory. diff --git a/test cases/frameworks/7 gnome/resources/resources.py b/test cases/frameworks/7 gnome/resources/resources.py new file mode 100644 index 0000000..0855ef7 --- /dev/null +++ b/test cases/frameworks/7 gnome/resources/resources.py @@ -0,0 +1,10 @@ +#!/usr/bin/env python3 +import os +from gi.repository import Gio + +if __name__ == '__main__': + res = Gio.resource_load(os.path.join('resources', 'simple-resources.gresource')) + Gio.Resource._register(res) + + data = Gio.resources_lookup_data('/com/example/myprog/res1.txt', Gio.ResourceLookupFlags.NONE) + assert data.get_data() == b'This is a resource.\n' diff --git a/test cases/frameworks/7 gnome/resources/simple-main.c b/test cases/frameworks/7 gnome/resources/simple-main.c new file mode 100644 index 0000000..c021a54 --- /dev/null +++ b/test cases/frameworks/7 gnome/resources/simple-main.c @@ -0,0 +1,27 @@ +#include<stdio.h> +#include<string.h> +#include<gio/gio.h> +#include"simple-resources.h" + +#define EXPECTED "This is a resource.\n" + +int main(int argc, char **argv) { + simple_resources_get_resource(); + + GError *err = NULL; + GBytes *data = g_resources_lookup_data("/com/example/myprog/res1.txt", + G_RESOURCE_LOOKUP_FLAGS_NONE, &err); + + if(data == NULL) { + fprintf(stderr, "Data lookup failed: %s\n", err->message); + return 1; + } + if(strcmp(g_bytes_get_data(data, NULL), EXPECTED) != 0) { + fprintf(stderr, "Resource contents are wrong:\n %s\n", + (const char*)g_bytes_get_data(data, NULL)); + return 1; + } + fprintf(stdout, "All ok.\n"); + g_bytes_unref(data); + return 0; +} diff --git a/test cases/frameworks/7 gnome/resources/simple.gresource.xml b/test cases/frameworks/7 gnome/resources/simple.gresource.xml new file mode 100644 index 0000000..6e55910 --- /dev/null +++ b/test cases/frameworks/7 gnome/resources/simple.gresource.xml @@ -0,0 +1,7 @@ +<?xml version="1.0" encoding="UTF-8"?> +<gresources> + <gresource prefix="/com/example/myprog"> + <file>res1.txt</file> + <file>subdir/res2.txt</file> + </gresource> +</gresources> diff --git a/test cases/frameworks/7 gnome/schemas/com.github.meson.gschema.xml b/test cases/frameworks/7 gnome/schemas/com.github.meson.gschema.xml new file mode 100644 index 0000000..741518d --- /dev/null +++ b/test cases/frameworks/7 gnome/schemas/com.github.meson.gschema.xml @@ -0,0 +1,12 @@ +<schemalist> + <schema id="com.github.meson" path="/com/github/meson/" gettext-domain="test"> + + <key name="greeting" type="s"> + <default l10n="messages">"Hello"</default> + <summary>A greeting</summary> + <description> + Sample text to test schema compilation + </description> + </key> + </schema> +</schemalist>
\ No newline at end of file diff --git a/test cases/frameworks/7 gnome/schemas/meson.build b/test cases/frameworks/7 gnome/schemas/meson.build new file mode 100644 index 0000000..9544a57 --- /dev/null +++ b/test cases/frameworks/7 gnome/schemas/meson.build @@ -0,0 +1,7 @@ + +compiled = gnome.compile_schemas(build_by_default: true) +install_data('com.github.meson.gschema.xml', +install_dir : 'share/glib-2.0/schemas') + +schemaexe = executable('schemaprog', 'schemaprog.c', dependencies : gio) +test('schema test', schemaexe) diff --git a/test cases/frameworks/7 gnome/schemas/schemaprog.c b/test cases/frameworks/7 gnome/schemas/schemaprog.c new file mode 100644 index 0000000..17dab65 --- /dev/null +++ b/test cases/frameworks/7 gnome/schemas/schemaprog.c @@ -0,0 +1,47 @@ +#include<gio/gio.h> +#include<stdio.h> +#include<string.h> + +int main(int argc, char **argv) { + GSettingsSchemaSource *src; + GSettingsSchema *schema; + GSettings *settings; + GVariant *value; + + GError *error = NULL; + src = g_settings_schema_source_new_from_directory("schemas", + g_settings_schema_source_get_default(), TRUE, &error); + if(error) { + fprintf(stderr, "Fail: %s\n", error->message); + g_error_free(error); + return 1; + } + + schema = g_settings_schema_source_lookup(src, "com.github.meson", FALSE); + if(!schema) { + fprintf(stderr, "Could not get schema from source.\n"); + return 2; + } + + settings = g_settings_new_full(schema, NULL, NULL); + if(!settings) { + fprintf(stderr, "Could not get settings object.\n"); + return 3; + } + + value = g_settings_get_value(settings, "greeting"); + if(!value) { + fprintf(stderr, "Could not get value from settings.\n"); + return 4; + } + + if(strcmp("Hello", g_variant_get_string(value, NULL)) != 0) { + fprintf(stderr, "Value of setting is incorrect.\n"); + return 5; + } + g_variant_unref(value); + g_object_unref(settings); + g_settings_schema_unref(schema); + g_settings_schema_source_unref(src); + return 0; +} diff --git a/test cases/frameworks/7 gnome/test.json b/test cases/frameworks/7 gnome/test.json new file mode 100644 index 0000000..f75ba13 --- /dev/null +++ b/test cases/frameworks/7 gnome/test.json @@ -0,0 +1,40 @@ +{ + "installed": [ + {"type": "file", "file": "usr/include/ct-resources.h"}, + {"type": "file", "file": "usr/include/cti-resources.h"}, + {"type": "file", "file": "usr/include/enums.h"}, + {"type": "file", "file": "usr/include/enums2.h"}, + {"type": "file", "file": "usr/include/enums3.h"}, + {"type": "file", "file": "usr/include/enums5.h"}, + {"type": "file", "file": "usr/include/subdir-0/marshaller-0.h"}, + {"type": "file", "file": "usr/include/subdir-1/marshaller-1.h"}, + {"type": "file", "file": "usr/include/subdir-2/marshaller-2.h"}, + {"type": "file", "file": "usr/include/subdir-3/marshaller-3.h"}, + {"type": "file", "file": "usr/include/subdir-4/marshaller-4.h"}, + {"type": "file", "file": "usr/include/subdir-5/marshaller-5.h"}, + {"type": "expr", "file": "usr/lib/?libgir_lib.so"}, + {"type": "file", "platform": "cygwin", "file": "usr/lib/libgir_lib.dll.a"}, + {"type": "expr", "file": "usr/lib/?libgir_lib2.so"}, + {"type": "file", "platform": "cygwin", "file": "usr/lib/libgir_lib2.dll.a"}, + {"type": "expr", "file": "usr/lib/?libdep1lib.so"}, + {"type": "file", "platform": "cygwin", "file": "usr/lib/libdep1lib.dll.a"}, + {"type": "expr", "file": "usr/lib/?libdep2lib.so"}, + {"type": "file", "platform": "cygwin", "file": "usr/lib/libdep2lib.dll.a"}, + {"type": "expr", "file": "usr/lib/?libdep3lib.so"}, + {"type": "file", "platform": "cygwin", "file": "usr/lib/libdep3lib.dll.a"}, + {"type": "file", "file": "usr/lib/girepository-1.0/Meson-1.0.typelib"}, + {"type": "file", "file": "usr/lib/girepository-1.0/MesonDep1-1.0.typelib"}, + {"type": "file", "file": "usr/lib/girepository-1.0/MesonDep2-1.0.typelib"}, + {"type": "file", "file": "usr/lib/girepository-1.0/MesonDep3-1.0.typelib"}, + {"type": "file", "file": "usr/share/gir-1.0/Meson-1.0.gir"}, + {"type": "file", "file": "usr/share/gir-1.0/MesonDep1-1.0.gir"}, + {"type": "file", "file": "usr/share/gir-1.0/MesonDep2-1.0.gir"}, + {"type": "file", "file": "usr/share/gir-1.0/MesonDep3-1.0.gir"}, + {"type": "file", "file": "usr/share/glib-2.0/schemas/com.github.meson.gschema.xml"}, + {"type": "file", "file": "usr/share/simple-resources.gresource"}, + {"type": "file", "file": "usr/include/enums6.h"}, + {"type": "file", "file": "usr/include/simple-resources.h"}, + {"type": "file", "file": "usr/include/generated-gdbus.h"} + ], + "skip_on_jobname": ["azure", "cygwin", "macos", "msys2", "pypy"] +} diff --git a/test cases/frameworks/8 flex/lexer.l b/test cases/frameworks/8 flex/lexer.l new file mode 100644 index 0000000..ca6513c --- /dev/null +++ b/test cases/frameworks/8 flex/lexer.l @@ -0,0 +1,13 @@ +%{ +#include <stdlib.h> +#include "parser.tab.h" + +extern int yylex(void); +extern int yyerror(); +%} + +%option noyywrap nounput noinput + +%% +("true"|"false") {return BOOLEAN;} +. { yyerror(); } diff --git a/test cases/frameworks/8 flex/meson.build b/test cases/frameworks/8 flex/meson.build new file mode 100644 index 0000000..55b96dd --- /dev/null +++ b/test cases/frameworks/8 flex/meson.build @@ -0,0 +1,36 @@ +project('flex and bison', 'c') + +# The point of this test is that one generator +# may output headers that are necessary to build +# the sources of a different generator. + +flex = find_program('flex', required: false) +bison = find_program('bison', required: false) + +if not flex.found() + error('MESON_SKIP_TEST flex not found.') +endif + +if not bison.found() + error('MESON_SKIP_TEST bison not found.') +endif + +lgen = generator(flex, +output : '@PLAINNAME@.yy.c', +arguments : ['-o', '@OUTPUT@', '@INPUT@']) + +lfiles = lgen.process('lexer.l') + +pgen = generator(bison, +output : ['@BASENAME@.tab.c', '@BASENAME@.tab.h'], +arguments : ['@INPUT@', '--defines=@OUTPUT1@', '--output=@OUTPUT0@']) + +pfiles = pgen.process('parser.y') + +e = executable('pgen', 'prog.c', + lfiles, + pfiles, + override_options: 'unity=off') + +test('parsertest', e, + args: [meson.current_source_dir() / 'testfile']) diff --git a/test cases/frameworks/8 flex/parser.y b/test cases/frameworks/8 flex/parser.y new file mode 100644 index 0000000..663f2f3 --- /dev/null +++ b/test cases/frameworks/8 flex/parser.y @@ -0,0 +1,11 @@ +%{ +extern int yylex(void); +extern int yyerror(); +%} + +%token BOOLEAN + +%% +input: + BOOLEAN { $$ = $1;} +; diff --git a/test cases/frameworks/8 flex/prog.c b/test cases/frameworks/8 flex/prog.c new file mode 100644 index 0000000..ae481d0 --- /dev/null +++ b/test cases/frameworks/8 flex/prog.c @@ -0,0 +1,30 @@ +#include"parser.tab.h" +#include<unistd.h> +#include<sys/types.h> +#include<sys/stat.h> +#include<fcntl.h> +#include<stdio.h> +#include<stdlib.h> + +extern int yyparse(); + +int main(int argc, char **argv) { + int input; + if(argc != 2) { + printf("%s <input file>\n", argv[0]); + return 1; + } + input = open(argv[1], O_RDONLY); + dup2(input, STDIN_FILENO); + close(input); + return yyparse(); +} + +int yywrap(void) { + return 0; +} + +int yyerror(void) { + printf("Parse error\n"); + exit(1); +} diff --git a/test cases/frameworks/8 flex/test.json b/test cases/frameworks/8 flex/test.json new file mode 100644 index 0000000..613cfe5 --- /dev/null +++ b/test cases/frameworks/8 flex/test.json @@ -0,0 +1,3 @@ +{ + "skip_on_jobname": ["azure", "cygwin"] +} diff --git a/test cases/frameworks/8 flex/test.txt b/test cases/frameworks/8 flex/test.txt new file mode 100644 index 0000000..27ba77d --- /dev/null +++ b/test cases/frameworks/8 flex/test.txt @@ -0,0 +1 @@ +true diff --git a/test cases/frameworks/8 flex/testfile b/test cases/frameworks/8 flex/testfile new file mode 100644 index 0000000..27ba77d --- /dev/null +++ b/test cases/frameworks/8 flex/testfile @@ -0,0 +1 @@ +true diff --git a/test cases/frameworks/9 wxwidgets/mainwin.h b/test cases/frameworks/9 wxwidgets/mainwin.h new file mode 100644 index 0000000..b5ca18d --- /dev/null +++ b/test cases/frameworks/9 wxwidgets/mainwin.h @@ -0,0 +1,23 @@ +#pragma once + +#include <wx/wx.h> + +class MyApp: public wxApp +{ +public: + virtual bool OnInit(); +}; +class MyFrame: public wxFrame +{ +public: + MyFrame(const wxString& title, const wxPoint& pos, const wxSize& size); +private: + void OnHello(wxCommandEvent& event); + void OnExit(wxCommandEvent& event); + void OnAbout(wxCommandEvent& event); + wxDECLARE_EVENT_TABLE(); +}; + +enum { + ID_Hello = 1 +}; diff --git a/test cases/frameworks/9 wxwidgets/meson.build b/test cases/frameworks/9 wxwidgets/meson.build new file mode 100644 index 0000000..0c7ecaa --- /dev/null +++ b/test cases/frameworks/9 wxwidgets/meson.build @@ -0,0 +1,19 @@ +project('wxwidgets test', 'cpp', default_options : ['cpp_std=c++11']) + +wxd = dependency('wxwidgets', version : '>=5', required : false) +wxd = dependency('wxwidgets', version : '>=3.0.0', required : false) + +if wxd.found() + wp = executable('wxprog', 'wxprog.cpp', dependencies : wxd) + + test('wxtest', wp) + + # WxWidgets framework is available, we can use required here + wx_stc = dependency('wxwidgets', version : '>=3.0.0', modules : ['std', 'stc']) + stc_exe = executable('wxstc', 'wxstc.cpp', dependencies : wx_stc) + test('wxstctest', stc_exe) + + # Check we can apply a version constraint + dependency('wxwidgets', version: '>=@0@'.format(wxd.version())) + +endif diff --git a/test cases/frameworks/9 wxwidgets/wxprog.cpp b/test cases/frameworks/9 wxwidgets/wxprog.cpp new file mode 100644 index 0000000..2be5512 --- /dev/null +++ b/test cases/frameworks/9 wxwidgets/wxprog.cpp @@ -0,0 +1,56 @@ +#include"mainwin.h" + +wxBEGIN_EVENT_TABLE(MyFrame, wxFrame) +EVT_MENU(ID_Hello, MyFrame::OnHello) +EVT_MENU(wxID_EXIT, MyFrame::OnExit) +EVT_MENU(wxID_ABOUT, MyFrame::OnAbout) +wxEND_EVENT_TABLE() + +bool MyApp::OnInit() { + MyFrame *frame = new MyFrame("Hello World", wxPoint(50, 50), wxSize(450, 340)); + frame->Show( true ); + return true; +} + +MyFrame::MyFrame(const wxString& title, const wxPoint& pos, const wxSize& size) + : wxFrame(NULL, wxID_ANY, title, pos, size) { + wxMenu *menuFile = new wxMenu; + menuFile->Append(ID_Hello, "&Hello...\tCtrl-H", + "Help string shown in status bar for this menu item"); + menuFile->AppendSeparator(); + menuFile->Append(wxID_EXIT); + wxMenu *menuHelp = new wxMenu; + menuHelp->Append(wxID_ABOUT); + wxMenuBar *menuBar = new wxMenuBar; + menuBar->Append(menuFile, "&File"); + menuBar->Append(menuHelp, "&Help"); + SetMenuBar(menuBar); + CreateStatusBar(); + SetStatusText("This is status." ); +} + +void MyFrame::OnExit(wxCommandEvent& event) { + Close( true ); +} + +void MyFrame::OnAbout(wxCommandEvent& event) { + //wxMessageBox("Some text", wxOK | wxICON_INFORMATION); +} + +void MyFrame::OnHello(wxCommandEvent& event) { + wxLogMessage("Some more text."); +} + +#if 0 +wxIMPLEMENT_APP(MyApp); +#else +// Don't open a window because this is an unit test and needs to +// run headless. +int main(int, char **) { + wxString name("Some app"); + wxPoint p(0, 0); + wxSize s(100, 100); + return 0; +} + +#endif diff --git a/test cases/frameworks/9 wxwidgets/wxstc.cpp b/test cases/frameworks/9 wxwidgets/wxstc.cpp new file mode 100644 index 0000000..c0c7043 --- /dev/null +++ b/test cases/frameworks/9 wxwidgets/wxstc.cpp @@ -0,0 +1,6 @@ +#include <wx/stc/stc.h> + +int main(void) { + wxStyledTextCtrl *canvas = new wxStyledTextCtrl(); + delete canvas; +} |