created project with cmake

This commit is contained in:
Luis Stanglmeier 2022-06-23 13:44:39 +02:00
parent c4b3d8ac5f
commit 5f6abf300e
54 changed files with 412 additions and 310 deletions

View file

@ -0,0 +1,75 @@
#//========================================================================
#// Copyright (c) Technische Software Entwicklung Plazotta © 2021
#//
#// DESCRIPTION:
#// Shell Script to Build a cmake project under linux, running the Unittest and finally start teh install step
#//
#// HISTORY:
#// 09.04.2021 / PP
#// Module created.
#//========================================================================
#!/bin/bash
#
#=======================================================================
# Check Parameter
#=======================================================================
if [ -z "$1" ]
then
echo "usage: BuildLinuxProject [ProjectName] [Configuration] [UnitTestExe]"
exit 2
fi
if [ -z "$2" ]
then
echo "usage: BuildLinuxProject [ProjectName] [Configuration] [UnitTestExe]"
exit 2
fi
if [ -z "$3" ]
then
echo "usage: BuildLinuxProject [ProjectName] [Configuration] [UnitTestExe]"
exit 2
fi
#=======================================================================
# Show Parameter
#=======================================================================
echo "======================================================================="
echo " Build Parameter"
echo "======================================================================="
echo " Project = $1"
echo " Configuration = $2"
echo " Unit Test Executable = $3"
echo "======================================================================="
echo "."
#=======================================================================
# parse unit test s
#=======================================================================
IFS=','
read -rasplitIFS<<< "$3"
#=======================================================================
# Start build
#=======================================================================
cd ../../BuildResults_linux_$2
#- MAKE ALL ------------------------------------------------------------
make all
if [ $? -ne 0 ]; then
echo "Build error ..."
exit 1
fi
#- UNIT Test -----------------------------------------------------------
cd bin
for unittests in "${splitIFS[@]}"; do
echo tsep | sudo -S ./../../AutoBuild/linux/scripts/RunUnitTest.sh $unittests
if [ $? -ne 0 ]; then
echo "Error during Unit test ..."
exit 1
fi
done
cd ..
#- Install -------------------------------------------------------------
make install
if [ $? -ne 0 ]; then
echo "Error during INSTALL ..."
exit 1
fi
#
exit 0