TargetCompilation.sh 512 Bytes
Newer Older
1 2
#run from project root!
#make sure all ros packages have been sourced!
3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
function quitOnError {
    if [ "$?" -ne 0 ]
    then
        echo Failed!
        exit 1
    fi
}

cd target/generated-sources-cmake/
quitOnError

for d in */ ; do
    echo Trying to build "$d"
    echo creating dir "$d"/build
    mkdir "$d"/build
    quitOnError
    echo CMake
20
    cmake -B"$d"/build/ -H"$d"/src/ -DCMAKE_BUILD_TYPE=DEBUG
21
    quitOnError
22
    echo make -j4
23 24 25 26
    make -C "$d"/build/
    quitOnError
done

27
echo Success!
28
exit 0