File: compilation

package info (click to toggle)
ros-image-pipeline 1.17.0-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 1,328 kB
  • sloc: cpp: 6,220; python: 2,143; xml: 445; sh: 21; makefile: 6
file content (29 lines) | stat: -rwxr-xr-x 574 bytes parent folder | download | duplicates (7)
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
#!/bin/sh

set -exu

cd "$AUTOPKGTEST_TMP"

component=$1
shift

echo "CmakeLists.txt:"
tee CMakeLists.txt << END
cmake_minimum_required(VERSION 3.7)
project(autopkgtest_$component)
find_package(catkin REQUIRED COMPONENTS $component)
include_directories(include \${catkin_INCLUDE_DIRS})
add_executable(main main.cc)
target_link_libraries(main \${catkin_LIBRARIES})
END

echo "main.cc:"
for incl in $@; do
	echo "#include <$incl>" | tee -a main.cc
done
echo "int main(int argc, char* argv[]) { return 0; }" | tee -a main.cc


mkdir build
cmake -H. -Bbuild
cmake --build build