You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

27 lines
644 B

#!/bin/bash
# This script makes sure every API header can be included in isolation
for filename in $(find ../include/librealsense2 -name *.hpp); do
echo Checking that $filename is self-contained
rm 1.cpp
echo "#include \"$filename\"" >> 1.cpp
echo "int main() {}" >> 1.cpp
g++ -std=c++11 1.cpp || exit 1
echo $filename is OK!
echo
done
for filename in $(find ../include/librealsense2 -name *.h); do
echo Checking that $filename is self-contained
rm 1.c
echo "#include \"$filename\"" >> 1.c
echo "int main() {}" >> 1.c
g++ 1.c || exit 1
echo $filename is OK!
echo
done
rm 1.cpp
rm 1.c