Skip to content
Snippets Groups Projects
Commit e3554ac2 authored by Christoph Grüninger's avatar Christoph Grüninger
Browse files

[dunecontrol][CMake] Reintroduce evaluation of CMAKE from opts file.

CMAKE can now be set in the shell or the opts file, if both are set
the shell has higher priority.
This feature was dropped in …aef001c21e3a9 to fix FS#1518.
parent 4990fcbc
No related branches found
No related tags found
No related merge requests found
......@@ -17,8 +17,10 @@ if test -z "$MAKE"; then
MAKE=make
fi
system_default_cmake="no"
if test -z "$CMAKE"; then
CMAKE=cmake
system_default_cmake="yes"
fi
space=" "
......@@ -191,6 +193,14 @@ load_opts() {
USE_CMAKE="yes"
fi
fi
if test -n "$USE_CMAKE" && test "$system_default_cmake" = "yes"; then
# We use cmake for building, but CMAKE is not yet set.
# Check the opts file for it
OPTS_FILE_CMAKE="$(eval CMAKE=""; . $DUNE_OPTS_FILE; eval echo \$CMAKE)"
if test -n "$OPTS_FILE_CMAKE"; then
CMAKE="$OPTS_FILE_CMAKE"
fi
fi
fi
fi
if test "x$DUNE_OPTS_FILE" != "x"; then
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment