mirror of https://github.com/CGAL/cgal
check cmake scripts of tests, examples and demos exist
This commit is contained in:
parent
de8d0d33f5
commit
1b9fb0be94
|
|
@ -82,23 +82,33 @@ else
|
||||||
echo 'No new files.'
|
echo 'No new files.'
|
||||||
fi
|
fi
|
||||||
|
|
||||||
project_name_tests=$(for i in */test/*/CMakeLists.txt; do pkg=$(echo $i | awk -F "/" '{print $3}'); grep ${pkg}_Tests -L $i; done)
|
#check cmake scripts of tests, examples are present
|
||||||
project_name_examples=$(for i in */examples/*/CMakeLists.txt; do pkg=$(echo $i | awk -F "/" '{print $3}'); grep ${pkg}_Examples -L $i; done)
|
for i in `ls -d */examples/*/ */test/*/`; do
|
||||||
project_name_demo=$(for i in */demo/*/CMakeLists.txt; do pkg=$(echo $i | awk -F "/" '{print $3}'); grep ${pkg}_Demo -L $i; done)
|
if ! [ -f $i/CMakeLists.txt ]; then
|
||||||
|
echo "Error: $i/CMakeLists.txt does not exist!"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
if [ -n "${project_name_tests}" ]; do
|
|
||||||
|
# check project in cmake scripts is correct
|
||||||
|
project_name_tests=$(for i in */test/*/CMakeLists.txt; do pkg=$(echo $i | awk -F "/" '{print $3}'); egrep "${pkg}_Tests\s*\)" -L $i; done)
|
||||||
|
project_name_examples=$(for i in */examples/*/CMakeLists.txt; do pkg=$(echo $i | awk -F "/" '{print $3}'); egrep "${pkg}_Examples\s*\)" -L $i; done)
|
||||||
|
project_name_demo=$(for i in */demo/*/CMakeLists.txt; do pkg=$(echo $i | awk -F "/" '{print $3}'); egrep "${pkg}_Demo\s*\)" -L $i; done)
|
||||||
|
|
||||||
|
if [ -n "${project_name_tests}" ]; then
|
||||||
echo "CMakeLists with incorrect project name"
|
echo "CMakeLists with incorrect project name"
|
||||||
echo ${project_name_tests}
|
echo ${project_name_tests}
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -n "${project_name_examples}" ]; do
|
if [ -n "${project_name_examples}" ]; then
|
||||||
echo "CMakeLists with incorrect project name"
|
echo "CMakeLists with incorrect project name"
|
||||||
echo ${project_name_examples}
|
echo ${project_name_examples}
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -n "${project_name_demo}" ]; do
|
if [ -n "${project_name_demo}" ]; then
|
||||||
echo "CMakeLists with incorrect project name"
|
echo "CMakeLists with incorrect project name"
|
||||||
echo ${project_name_demo}
|
echo ${project_name_demo}
|
||||||
exit 1
|
exit 1
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue