diff --git a/bin/dunecontrol b/bin/dunecontrol index 66caf06afa53bdd8462815c9b4dc7c758d5284de..3604ec101a798312be43e625346f4bf3ee18dbee 100755 --- a/bin/dunecontrol +++ b/bin/dunecontrol @@ -594,7 +594,6 @@ run_default_configure () { # Translate the configure PARMS to cmake export PARAMS export CMAKE_PARAMS - module_translate_options_am2cmake $m $path/lib if test x$module = x$m; then continue; fi # skip myself name=$(eval "echo \$NAME_$m") diff --git a/lib/CMakeLists.txt b/lib/CMakeLists.txt index 4c91e04d43cefc757a420daee6222c382a6bf584..0534cd8f96411a9bbee921ad29da90b59dc20e43 100644 --- a/lib/CMakeLists.txt +++ b/lib/CMakeLists.txt @@ -1,2 +1,2 @@ -install(FILES dunemodules.lib dunecommonam2cmake.lib +install(FILES dunemodules.lib DESTINATION ${CMAKE_INSTALL_BINDIR}/../lib) diff --git a/lib/dunecommonam2cmake.lib b/lib/dunecommonam2cmake.lib deleted file mode 100644 index 6e1dbe918e03500c1f6673a793d40c0cc75bf39a..0000000000000000000000000000000000000000 --- a/lib/dunecommonam2cmake.lib +++ /dev/null @@ -1,49 +0,0 @@ -# -*-sh-*- - -########################################## -### -### Function for converting configure options -### to CMake options for dune-common -### -########################################## -space=" " -tab=" " -BLANK="$space$tab" - -dune_common_options_am2cmake() -{ - # CMake Packages are case sensitive - # This is a list of packages whose names converted - # to lower case are used for configures - # --with-<package> or without-<package> options - # - CMAKE_PACKAGES="Inkscape GMP LAPACK UMFPack" - - default_am2cmake_options $CMAKE_PACKAGES - - # Check for --disable-parallel and deactivate MPI if given - echo $PARAMS | grep \\-\\-disable-parallel > /dev/null - if test "$?" -eq 0 ; then - CMAKE_PARAMS="$CMAKE_PARAMS -DCMAKE_DISABLE_FIND_PACKAGE_MPI=TRUE" - else - CMAKE_PARAMS="$CMAKE_PARAMS -DCMAKE_DISABLE_FIND_PACKAGE_MPI=FALSE" - fi - - # Check for --disable-cxx11check - echo $PARAMS | grep \\-\\-disable-cxx11check > /dev/null - if test "$?" -eq 0 ; then - CMAKE_PARAMS="$CMAKE_PARAMS -DDISABLE_CXX11CHECK:BOOL=TRUE" - fi - - # Check for --with-minimal-debug-level - local arg=`echo "$PARAMS"| grep \\\\--with-minimal-debug-level= | sed "s/.*--with-minimal-debug-level=\([^$BLANK]*\).*/\1/"` - if test "x$arg" != "x"; then - CMAKE_PARAMS="$CMAKE_PARAMS -DMINIMAL_DEBUG_LEVEL:String=$arg" - fi - - #Check for --prefix - local arg=`echo "$PARAMS"| grep \\\\--prefix= | sed "s/.*--prefix=\([^$BLANK]*\).*/\1/"` - if test "x$arg" != "x"; then - CMAKE_PARAMS="$CMAKE_PARAMS -DCMAKE_INSTALL_PREFIX=$arg" - fi -} diff --git a/lib/dunemodules.lib b/lib/dunemodules.lib index 3d7f2f27da218cab5f7c9d956c3ae81737c38612..ec07a3b626e04606150b1ad67eeb41d6e6622dfa 100644 --- a/lib/dunemodules.lib +++ b/lib/dunemodules.lib @@ -613,83 +613,3 @@ check_version() { fi return 1 } - -# -# Function that the translates options for configure -# The arguments are the case sensitive cmake package names. -# It is assumed that their lowercase version is used -# for the autotools. This function either deactivates -# a package using CMAKE_DISABLE_FIND_PACKAGE_<package>=TRUE -# or passes th provided path using -# the <CMAKE_PACKAGE_ALL_UPPERCASE>_ROOT variable -default_am2cmake_options(){ - while test "$#" -gt 0; do - local package=$1 - local lowercase=`tr 'A-Z' 'a-z' <<< $1` - local uppercase=`tr 'a-z' 'A-Z' <<< $1` - shift - if eval test \$"$lowercase"_processed ; then - continue - fi - export "$lowercase"_processed=1 - # check for --without-$lowercase - echo $PARAMS | grep \\-\\-without-$lowercase > /dev/null - if test "$?" -eq 0 ; then - CMAKE_PARAMS="$CMAKE_PARAMS -DCMAKE_DISABLE_FIND_PACKAGE_$package=TRUE" - continue - fi - # process --with-$lowercase=<arg> - local arg=`echo $PARAMS| sed "s/.*--with-$lowercase=\([$NOBLANK]*\).*/\1/"` - local arg=`eval echo $arg` # expand tilde to prevent problems - if test "x$arg" = "xno"; then - CMAKE_PARAMS="$CMAKE_PARAMS -DCMAKE_DISABLE_FIND_PACKAGE_$package=TRUE" - continue - fi - if test -d "$arg"; then - CMAKE_PARAMS="$CMAKE_PARAMS -D$uppercase""_ROOT=$arg" - fi - done - export CMAKE_PARAMS -} - - -# Default translation routine for libraries. -# Arguments are the CMake package names. -# Searches for --with-<package>lib=<library> -# in the configure options and translates them -# to -D<PACKAGE>_LIBRARY=<library> -default_am2cmake_libraries(){ - while test "$#" -gt 0; do - lib=$1 - local lowercase=`tr 'A-Z' 'a-z' <<< $1` - local uppercase=`tr 'a-z' 'A-Z' <<< $1` - shift - if eval test \$"$lowercase"-lib_processed; then - continue - fi - export "$lowercase"-lib_processed=1 - term="s/.*--with-""$lowercase""-lib=\([$NOBLANK]*\).*/\1/" - arg=`echo "$PARAMS" | grep \\-\\-with-$lowercase | sed "$term"` - if test "x$arg" != "x"; then - CMAKE_PARAMS="$CMAKE_PARAMS -D$uppercase""_LIBRARY=$arg" - fi - done -} - -module_translate_options_am2cmake() -{ - local module=$1 # the module name - local path=$2 # where the sh libs reside - - # Check whether the module provides a lib named - # <module-without-dashes>autotools2cmake.lib - local module_undashed=`echo $module | sed "s/[-_]//g"` - local libfile="$path/$module_undashed""am2cmake.lib" - if test -e "$libfile"; then - . $libfile - local module_underline=`echo $module | sed "s/-/_/g"` - eval "$module_underline"_options_am2cmake - else - echo "$libfile for converting options does not exist" - fi -}