Merge pull request #224 from rolk/224_findupsc

Fix erroneous trailing empty dependency
This commit is contained in:
Atgeirr Flø Rasmussen 2013-04-09 00:43:10 -07:00
commit 5722d85ed1
2 changed files with 8 additions and 4 deletions

View File

@ -21,7 +21,7 @@ find_opm_package (
dune-istl REQUIRED; dune-istl REQUIRED;
opm-core REQUIRED; opm-core REQUIRED;
dune-cornerpoint REQUIRED; dune-cornerpoint REQUIRED;
opm-porsol REQUIRED; opm-porsol REQUIRED
" "
# header to search for # header to search for
"opm/upscaling/SinglePhaseUpscaler.hpp" "opm/upscaling/SinglePhaseUpscaler.hpp"

View File

@ -199,9 +199,13 @@ macro (find_opm_package module deps header lib defs prog conf)
set (_deps) set (_deps)
foreach (_dep IN ITEMS ${deps}) foreach (_dep IN ITEMS ${deps})
separate_arguments (_args UNIX_COMMAND ${_dep}) separate_arguments (_args UNIX_COMMAND ${_dep})
find_and_append_package_to (${module} ${_args} ${${module}_QUIET}) if (_args)
list (GET _args 0 _name_only) find_and_append_package_to (${module} ${_args} ${${module}_QUIET})
list (APPEND _deps ${_name_only}) 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) endforeach (_dep)
# since find_and_append_package_to is a macro, this variable have # since find_and_append_package_to is a macro, this variable have