fix CMake CMP0054 warning:

ported from c105b72945
This commit is contained in:
Vladislav Vinogradov 2015-01-15 18:40:33 +03:00
parent df57d038b8
commit 0376a8643e
2 changed files with 3 additions and 3 deletions

View File

@ -787,7 +787,7 @@ macro(__ocv_parse_test_sources tests_type)
set(__file_group_sources "") set(__file_group_sources "")
elseif(arg STREQUAL "DEPENDS_ON") elseif(arg STREQUAL "DEPENDS_ON")
set(__currentvar "OPENCV_${tests_type}_${the_module}_DEPS") 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}") set(__file_group_name "${arg}")
else() else()
list(APPEND ${__currentvar} "${arg}") list(APPEND ${__currentvar} "${arg}")

View File

@ -276,12 +276,12 @@ macro(OCV_OPTION variable description value)
endif() endif()
endforeach() endforeach()
unset(__varname) unset(__varname)
if("${__condition}" STREQUAL "") if(__condition STREQUAL "")
set(__condition 2 GREATER 1) set(__condition 2 GREATER 1)
endif() endif()
if(${__condition}) if(${__condition})
if("${__value}" MATCHES ";") if(__value MATCHES ";")
if(${__value}) if(${__value})
option(${variable} "${description}" ON) option(${variable} "${description}" ON)
else() else()