File: build

package info (click to toggle)
ignition-plugin 1.2.1%2Bds-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 728 kB
  • sloc: cpp: 4,712; ansic: 277; ruby: 128; sh: 38; makefile: 12
file content (60 lines) | stat: -rwxr-xr-x 1,101 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
#!/bin/sh
# autopkgtest check: very few things to test without other subcommands
# (C) 2021 Jose Luis Rivero
# Author: Jose Luis Rivero <jrivero@osrfoundation.org>

set -e

WORKDIR=$(mktemp -d)
#trap "rm -rf $WORKDIR" 0 INT QUIT ABRT PIPE TERM
cd $WORKDIR

cat <<EOF > CMakeLists.txt
cmake_minimum_required(VERSION 3.5.1 FATAL_ERROR)

project(example)

# Find the ignition-plugin library
find_package(ignition-plugin1 REQUIRED COMPONENTS all)
#include_directories(\${ignition-plugin1_INCLUDE_DIRS})
add_executable(plugin_test plugin_test.cc)
target_link_libraries(plugin_test
  PRIVATE
    ignition-plugin1::register
    ignition-plugin1::loader
)

EOF

cat <<EOF2 > plugin_test.cc
#include <ignition/plugin/Loader.hh>
#include <ignition/plugin/Register.hh>

class Drive
{
  public: virtual ~Drive() = default;
};


class CautiousBot : public virtual Drive
{
};

IGNITION_ADD_PLUGIN(CautiousBot,
    CautiousBot::Drive)

int main(int argc, char** argv) {
  ignition::plugin::Loader pl;

  return 0;
}
EOF2

cmake .
echo "configure: OK"
make
echo "build: OK"

./plugin_test
echo "plugin_test run: OK"