mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
Only add parent directories for actual variants
Otherwise we'll inadvertedly add the root directory and will probably find the system implementation underneath there.
This commit is contained in:
parent
47eb8a0549
commit
847d8fe924
@ -149,10 +149,18 @@ macro (find_opm_package module deps header lib defs prog conf)
|
||||
${${module}_DIR}
|
||||
${${module}_ROOT}
|
||||
${${MODULE}_ROOT}
|
||||
${${module}_DIR}/..
|
||||
${${module}_ROOT}/..
|
||||
${${MODULE}_ROOT}/..
|
||||
)
|
||||
# only add parent directories for those variants that are actually set
|
||||
# (otherwise, we'll inadvertedly add the root directory (=all))
|
||||
if (${module}_DIR)
|
||||
list (APPEND _guess ${${module}_DIR}/..)
|
||||
endif (${module}_DIR)
|
||||
if (${module}_ROOT)
|
||||
list (APPEND _guess ${${module}_ROOT}/..)
|
||||
endif (${module}_ROOT)
|
||||
if (${MODULE}_ROOT)
|
||||
list (APPEND _guess ${${MODULE}_ROOT}/..)
|
||||
endif (${MODULE}_ROOT)
|
||||
# don't search the system paths! that would be dangerous; if there
|
||||
# is a problem in our own specified directory, we don't necessarily
|
||||
# want an old version that is left in one of the system paths!
|
||||
|
Loading…
Reference in New Issue
Block a user