diff options
Diffstat (limited to 'tests/test_cases/deps/prebuilt')
-rw-r--r-- | tests/test_cases/deps/prebuilt/TARGETS | 158 | ||||
-rw-r--r-- | tests/test_cases/deps/prebuilt/bar.hpp | 8 | ||||
-rw-r--r-- | tests/test_cases/deps/prebuilt/foo.hpp | 8 |
3 files changed, 174 insertions, 0 deletions
diff --git a/tests/test_cases/deps/prebuilt/TARGETS b/tests/test_cases/deps/prebuilt/TARGETS new file mode 100644 index 0000000..c923995 --- /dev/null +++ b/tests/test_cases/deps/prebuilt/TARGETS @@ -0,0 +1,158 @@ +{ "foo.pc": + { "type": "file_gen" + , "name": "foo.pc" + , "data": + { "type": "join" + , "separator": "\n" + , "$1": + [ "Name: foo" + , "Version: 1.2.3" + , "Description: test prebuilt foo" + , "URL: unknown" + , "Cflags: -I/usr/include -DUSE_FOO=1" + , "Libs: -L/usr/lib -lfoo -lpthread" + ] + } + } +, "foo": + { "type": ["@", "rules", "CC/prebuilt", "library"] + , "name": ["foo"] + , "version": ["1", "2", "3"] + , "hdrs": ["foo.hpp"] + , "lib": [["shared", "foo"]] + , "pkg-config": ["foo.pc"] + , "stage": ["foo"] + } +, "foo_s": + { "type": ["@", "rules", "CC/prebuilt", "library"] + , "name": ["foo"] + , "version": ["1", "2", "3"] + , "hdrs": ["foo.hpp"] + , "lib": [["shared", "foo_s"]] + , "pkg-config": ["foo.pc"] + , "stage": ["foo"] + } +, "bar.pc": + { "type": "file_gen" + , "name": "bar.pc" + , "data": + { "type": "join" + , "separator": "\n" + , "$1": + [ "Name: bar" + , "Version: unknown" + , "Description: test prebuilt bar" + , "URL: unknown" + , "Cflags: -I/usr/include -DUSE_BAR=1" + , "Libs: -L/usr/lib -lbar -lpthread -lm" + ] + } + } +, "bar": + { "type": ["@", "rules", "CC/prebuilt", "library"] + , "name": ["bar"] + , "hdrs": ["bar.hpp"] + , "lib": [["shared", "bar"]] + , "pkg-config": ["bar.pc"] + , "stage": ["bar"] + , "deps": ["foo"] + } +, "bar_s": + { "type": ["@", "rules", "CC/prebuilt", "library"] + , "name": ["bar"] + , "hdrs": ["bar.hpp"] + , "lib": [["shared", "bar_s"]] + , "pkg-config": ["bar.pc"] + , "stage": ["bar"] + , "deps": ["foo"] + } +, "main_uses_foo": + { "type": ["@", "rules", "CC", "binary"] + , "name": ["main_uses_foo"] + , "srcs": [["shared", "main_uses_foo.cpp"]] + , "private-deps": ["foo"] + } +, "test_uses_foo": + { "type": ["@", "rules", "CC/test", "test"] + , "name": ["test_uses_foo"] + , "srcs": [["shared", "test_uses_foo.cpp"]] + , "private-deps": ["foo"] + } +, "main_uses_bar": + { "type": ["@", "rules", "CC", "binary"] + , "name": ["main_uses_bar"] + , "srcs": [["shared", "main_uses_bar.cpp"]] + , "private-deps": ["bar"] + } +, "test_uses_bar": + { "type": ["@", "rules", "CC/test", "test"] + , "name": ["test_uses_bar"] + , "srcs": [["shared", "test_uses_bar.cpp"]] + , "private-deps": ["bar"] + } +, "test_uses_bar_s": + { "type": ["@", "rules", "CC/test", "test"] + , "name": ["test_uses_bar"] + , "srcs": [["shared", "test_uses_bar.cpp"]] + , "private-deps": ["bar_s"] + } +, "test_uses_main": + { "type": ["@", "rules", "shell/test", "script"] + , "name": ["test_uses_main"] + , "test": [["shared", "test_uses_main.sh"]] + , "deps": ["main_uses_bar"] + } +, "install_foo": + {"type": ["@", "rules", "CC", "install-with-deps"], "targets": ["foo"]} +, "install_bar": + {"type": ["@", "rules", "CC", "install-with-deps"], "targets": ["bar"]} +, "install_main": + { "type": ["@", "rules", "CC", "install-with-deps"] + , "targets": ["main_uses_bar"] + } +, "foobar.pc": + { "type": "file_gen" + , "name": "foobar.pc" + , "data": + { "type": "join" + , "separator": "\n" + , "$1": + [ "Name: foobar" + , "Version: unknown" + , "Description: test compound prebuilt foobar" + , "URL: unknown" + , "Requires: bar, foo >= 1.2.3" + ] + } + } +, "foobar": + { "type": ["@", "rules", "CC/prebuilt", "library"] + , "name": ["foobar"] + , "hdrs": ["bar.hpp"] + , "lib": [["shared", "bar"], ["shared", "foo"]] + , "pkg-config": ["foobar.pc", "foo.pc", "bar.pc"] + , "stage": ["bar"] + } +, "foobar_s": + { "type": ["@", "rules", "CC/prebuilt", "library"] + , "name": ["foobar"] + , "hdrs": ["bar.hpp"] + , "lib": [["shared", "bar_s"], ["shared", "foo_s"]] + , "pkg-config": ["foobar.pc", "foo.pc", "bar.pc"] + , "stage": ["bar"] + } +, "test_uses_foobar": + { "type": ["@", "rules", "CC/test", "test"] + , "name": ["test_uses_bar"] + , "srcs": [["shared", "test_uses_bar.cpp"]] + , "private-deps": ["foobar"] + } +, "test_uses_foobar_s": + { "type": ["@", "rules", "CC/test", "test"] + , "name": ["test_uses_bar"] + , "srcs": [["shared", "test_uses_bar.cpp"]] + , "private-deps": ["foobar_s"] + } +, "install_foobar": + {"type": ["@", "rules", "CC", "install-with-deps"], "targets": ["foobar"]} +} diff --git a/tests/test_cases/deps/prebuilt/bar.hpp b/tests/test_cases/deps/prebuilt/bar.hpp new file mode 100644 index 0000000..243dba6 --- /dev/null +++ b/tests/test_cases/deps/prebuilt/bar.hpp @@ -0,0 +1,8 @@ +#ifndef BAR_HPP +#define BAR_HPP + +#ifdef USE_BAR +int bar(); +#endif + +#endif diff --git a/tests/test_cases/deps/prebuilt/foo.hpp b/tests/test_cases/deps/prebuilt/foo.hpp new file mode 100644 index 0000000..4f040d4 --- /dev/null +++ b/tests/test_cases/deps/prebuilt/foo.hpp @@ -0,0 +1,8 @@ +#ifndef FOO_HPP +#define FOO_HPP + +#ifdef USE_FOO +int foo(); +#endif + +#endif |