File: compilation

package info (click to toggle)
ros-geometry 1.13.2-3
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 1,240 kB
  • sloc: cpp: 8,457; python: 1,858; xml: 149; sh: 27; 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