Skip to content
Snippets Groups Projects
Commit b11c527c authored by Markus Blatt's avatar Markus Blatt
Browse files

Create a function that checks whether to use CMake for a module.

It sets LOCAL_USE_CMAKE for the current module depending on USE_CMAKE
and whether there actually is CMake support for this module.
This will make it more easy to use the same check in all run_*
directives.
parent bbe203e8
No related branches found
No related tags found
No related merge requests found
......@@ -348,6 +348,21 @@ for command in $COMMANDS; do
eval "run_$command () { run_default_$command; }"
done
#
# Check whether we should use cmake for this particular value
# and set LOCAL_USE_CMAKE accordingly.
# We use cmake if USE_CMAKE is not set to no and the module has
# CMake build infrastructure, i.e. a toplevel CMakeLists.txt
#
create_local_use_cmake() {
if test "x$USE_CMAKE" != "xno" && test -e "$(eval "echo \$PATH_$module")/CMakeLists.txt"; then
LOCAL_USE_CMAKE=yes
else
LOCAL_USE_CMAKE=no
fi
}
#
# default implementations for commands...
# these can be overwritten in the $CONTROL files
......
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