File: compilation

package info (click to toggle)
ros-kdl-parser 1.13.1-1
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 356 kB
  • sloc: xml: 3,314; cpp: 347; python: 102; sh: 20; makefile: 2
file content (28 lines) | stat: -rwxr-xr-x 533 bytes parent folder | download | duplicates (14)
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
#!/bin/sh

set -exu

cd "$ADTTMP"

component=$1
shift

echo "CmakeLists.txt:"
tee CMakeLists.txt << END
CMAKE_MINIMUM_REQUIRED(VERSION 2.4)
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