From 0376a8643e8a32e7f773d82054460dae98cd348e Mon Sep 17 00:00:00 2001 From: Vladislav Vinogradov Date: Thu, 15 Jan 2015 18:40:33 +0300 Subject: [PATCH] fix CMake CMP0054 warning: ported from c105b72945013b1cecb00617879598c43b82f298 --- cmake/OpenCVModule.cmake | 2 +- cmake/OpenCVUtils.cmake | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/cmake/OpenCVModule.cmake b/cmake/OpenCVModule.cmake index c5325e20f1..362aa6f975 100644 --- a/cmake/OpenCVModule.cmake +++ b/cmake/OpenCVModule.cmake @@ -787,7 +787,7 @@ macro(__ocv_parse_test_sources tests_type) set(__file_group_sources "") elseif(arg STREQUAL "DEPENDS_ON") set(__currentvar "OPENCV_${tests_type}_${the_module}_DEPS") - elseif("${__currentvar}" STREQUAL "__file_group_sources" AND NOT __file_group_name) + elseif(" ${__currentvar}" STREQUAL " __file_group_sources" AND NOT __file_group_name) # spaces to avoid CMP0054 set(__file_group_name "${arg}") else() list(APPEND ${__currentvar} "${arg}") diff --git a/cmake/OpenCVUtils.cmake b/cmake/OpenCVUtils.cmake index b32465ead2..60d862efca 100644 --- a/cmake/OpenCVUtils.cmake +++ b/cmake/OpenCVUtils.cmake @@ -276,12 +276,12 @@ macro(OCV_OPTION variable description value) endif() endforeach() unset(__varname) - if("${__condition}" STREQUAL "") + if(__condition STREQUAL "") set(__condition 2 GREATER 1) endif() if(${__condition}) - if("${__value}" MATCHES ";") + if(__value MATCHES ";") if(${__value}) option(${variable} "${description}" ON) else()