Commit 4dfffc5a authored by Praetorius, Simon's avatar Praetorius, Simon

update the amdisproject script

parent 6a0296fa
Pipeline #5162 passed with stage
in 41 minutes and 13 seconds
......@@ -283,7 +283,7 @@ Version: $VERSION
Maintainer: $MAINTAINER
Depends: $DEPENDENCIES
# Suggests: # add additional optional dune modules here
# Suggests: add additional optional dune modules here
C_DELIM
## Create the parameters passed to DUNE_CHECK_ALL
......@@ -332,6 +332,12 @@ NAME=`echo $PROJECT | sed -e 's/amdis[_-]//'`
NAME_=`echo $NAME | tr '-' '_'`
# module name in uppercase with _ instead of -
UNAME=`echo $PROJECT | tr '-' '_' | sed 's/\(.*\)/\U\1/'`
# Name in CamelCase
CNAME=""
for i in $(echo $PROJECT| sed 's/-/ /g'); do
firstchar=$(echo $i | sed 's/\(.\).*/\1/')
CNAME=$CNAME$(echo $firstchar | tr '[a-z]' '[A-Z]')$(echo $i | sed 's/.\(.*\)/\1/')
done
################## README ##################
echo "- $PROJECT/README.md"
......@@ -515,9 +521,7 @@ echo "- $PROJECT/src/CMakeLists.txt"
cat> "$PROJECT/src/CMakeLists.txt" << M_DELIM
add_amdis_executable(
NAME "${MODULE}"
SOURCES ${MODULE}.cpp
DIM 2 DOW 2
ALBERTA_GRID)
SOURCES ${MODULE}.cpp)
M_DELIM
################## PROJECT.CC ##################
......@@ -552,16 +556,17 @@ EOF
echo "- $PROJECT/amdis/$NAME/CMakeLists.txt"
cat> $PROJECT/amdis/$NAME/CMakeLists.txt <<EOF
#install headers
install(FILES ${NAME}.hpp DESTINATION \${CMAKE_INSTALL_INCLUDEDIR}/amdis/$NAME)
install(FILES ${CNAME}.hpp DESTINATION \${CMAKE_INSTALL_INCLUDEDIR}/amdis/$NAME)
EOF
################## amdis/$NAME/$NAME.hh #################
echo "- $PROJECT/amdis/$NAME/$NAME.hpp"
cat> $PROJECT/amdis/$NAME/$NAME.hpp <<EOF
echo "- $PROJECT/amdis/$NAME/$CNAME.hpp"
cat> $PROJECT/amdis/$NAME/$CNAME.hpp <<EOF
#pragma once
// add your classes here
namespace AMDiS::$CNAME {
// add your classes here
}
EOF
......@@ -643,12 +648,7 @@ mkdir "$PROJECT/cmake"
mkdir "$PROJECT/cmake/modules"
macroname=""
for i in $(echo $PROJECT| sed 's/-/ /g'); do
firstchar=$(echo $i | sed 's/\(.\).*/\1/')
macroname=$macroname$(echo $firstchar | tr '[a-z]' '[A-Z]')$(echo $i | sed 's/.\(.*\)/\1/')
done
macroname="$macroname""Macros.cmake"
macroname="$CNAME""Macros.cmake"
################# cmake/modules/CMakeLists.txt #####################
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment