From cbd44ff67acbcdf23f827a422e30818e765a7265 Mon Sep 17 00:00:00 2001 From: Markus Blatt Date: Thu, 12 Jul 2018 08:21:36 +0200 Subject: [PATCH] Remove unneeded opm_common_processed variable. As we now process the prerequisites in the package configuration file one search for opm-common is fully sufficient. --- cmake/Modules/OpmFind.cmake | 7 +------ cmake/Modules/OpmPackage.cmake | 4 ---- 2 files changed, 1 insertion(+), 10 deletions(-) diff --git a/cmake/Modules/OpmFind.cmake b/cmake/Modules/OpmFind.cmake index 30bcc0309..d97aa03dc 100644 --- a/cmake/Modules/OpmFind.cmake +++ b/cmake/Modules/OpmFind.cmake @@ -147,8 +147,7 @@ macro (find_and_append_package_to prefix name) # We even need to repeat the search for opm-common once as this is done # in the top most CMakeLists.txt without querying defines, setting dependencies # and the likes which is only done via opm_find_package - if (NOT DEFINED ${name}_FOUND AND NOT DEFINED ${NAME}_FOUND - OR ("${name}" STREQUAL "opm-common" AND NOT _opm_common_deps_processed)) + if (NOT DEFINED ${name}_FOUND AND NOT DEFINED ${NAME}_FOUND) string(REGEX MATCH "(dune|opm)-.*" _is_opm ${name}) if(NOT _is_opm) string(REGEX MATCH "ewoms" _is_opm ${name}) @@ -197,10 +196,6 @@ macro (find_and_append_package_to prefix name) if (NOT DEFINED ${NAME}_FOUND) set (${NAME}_FOUND "${${name}_FOUND}") endif () - - if("${name}" STREQUAL "opm-common") - set(_opm_common_deps_processed ON) - endif() endif () # the variable "NAME" may be replaced during find_package (as this is diff --git a/cmake/Modules/OpmPackage.cmake b/cmake/Modules/OpmPackage.cmake index 1adf495ee..83bb8b0e4 100644 --- a/cmake/Modules/OpmPackage.cmake +++ b/cmake/Modules/OpmPackage.cmake @@ -59,11 +59,7 @@ macro (find_opm_package module deps header lib defs prog conf) # top most CMakeLists.txt but we still need to search for its # dependencies if (${MODULE}_FOUND OR ${module}_FOUND) - if (${module} STREQUAL "opm-common" AND NOT _opm_common_deps_processed) - set(_opm_common_deps_processed ON) - else() return () - endif() endif () # variables to pass on to other packages