mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
Only search for a package again if not found
If it is already found, most packages sets a flag that makes it exit immediately anyway. We usually cannot rerun find_package to get another combinations of modules. Here we check the flag before we start looking for the package to avoid the endless stream of messages.
This commit is contained in:
parent
b3947b0ff3
commit
ae727487f5
@ -132,13 +132,15 @@ macro (find_and_append_package_to prefix name)
|
|||||||
# using config mode is better than using module (aka. find) mode
|
# using config mode is better than using module (aka. find) mode
|
||||||
# because then the package has already done all its probes and
|
# because then the package has already done all its probes and
|
||||||
# stored them in the config file for us
|
# stored them in the config file for us
|
||||||
if (${name}_DIR)
|
if (NOT ${NAME}_FOUND)
|
||||||
message (STATUS "Finding package ${name} using config mode")
|
if (${name}_DIR)
|
||||||
find_package (${name} ${ARGN} NO_MODULE PATHS ${${name}_DIR} NO_DEFAULT_PATH)
|
message (STATUS "Finding package ${name} using config mode")
|
||||||
else (${name}_DIR)
|
find_package (${name} ${ARGN} NO_MODULE PATHS ${${name}_DIR} NO_DEFAULT_PATH)
|
||||||
message (STATUS "Finding package ${name} using module mode")
|
else (${name}_DIR)
|
||||||
find_package (${name} ${ARGN})
|
message (STATUS "Finding package ${name} using module mode")
|
||||||
endif (${name}_DIR)
|
find_package (${name} ${ARGN})
|
||||||
|
endif (${name}_DIR)
|
||||||
|
endif (NOT ${NAME}_FOUND)
|
||||||
|
|
||||||
# the variable "NAME" may be replaced during find_package (as this is
|
# the variable "NAME" may be replaced during find_package (as this is
|
||||||
# now a macro, and not a function anymore), so we must reinitialize
|
# now a macro, and not a function anymore), so we must reinitialize
|
||||||
|
Loading…
Reference in New Issue
Block a user