Detect empty elements in dependency list
These errors are usually an extra trailing semi-colon, which is easy to put in there for symmetry with the other lines. Give a warning on this but proceed with the build as usual afterwards.
This commit is contained in:
@@ -199,9 +199,13 @@ macro (find_opm_package module deps header lib defs prog conf)
|
||||
set (_deps)
|
||||
foreach (_dep IN ITEMS ${deps})
|
||||
separate_arguments (_args UNIX_COMMAND ${_dep})
|
||||
find_and_append_package_to (${module} ${_args} ${${module}_QUIET})
|
||||
list (GET _args 0 _name_only)
|
||||
list (APPEND _deps ${_name_only})
|
||||
if (_args)
|
||||
find_and_append_package_to (${module} ${_args} ${${module}_QUIET})
|
||||
list (GET _args 0 _name_only)
|
||||
list (APPEND _deps ${_name_only})
|
||||
else (_args)
|
||||
message (WARNING "Empty dependency in find module for ${module} (check for trailing semi-colon)")
|
||||
endif (_args)
|
||||
endforeach (_dep)
|
||||
|
||||
# since find_and_append_package_to is a macro, this variable have
|
||||
|
||||
Reference in New Issue
Block a user