parsing the cmake output to get the list of opencv modules compiled

This commit is contained in:
Joachim
2020-04-07 22:51:08 +02:00
parent 751f90bf1e
commit ec3162b0ae

View File

@ -51,9 +51,11 @@ rm -rf build/ && mkdir -p build/ && cd build
echo "================================================================================"
echo "Configuring with cmake ${CMAKE_ARGS} :"
echo "================================================================================"
cmake $CMAKE_ARGS ..
# launch cmake with args and parse list of modules to be build in a variable
OPENCV_MODULES_LIST=`cmake $CMAKE_ARGS .. | tee /dev/tty | grep 'To be built' | cut -f2 -d ':' | xargs | tr ' ' ','`
echo $OPENCV_MODULES_LIST
read -p "Don't forget to check the cmake summary! Continue ? [y/N]" prompt
if [ "${prompt}" != "y" ]; then
if [ "${prompt}" != "y" ] && [ "${prompt}" != "Y" ] && [ "${prompt}" != "yes" ]; then
echo "aborted."
exit 1
fi