提交 5ebb2347 编写于 作者: M Maksim Shabunin

cmake: simplified configuration output

上级 3c6983a2
此差异已折叠。
......@@ -26,6 +26,6 @@ if(ANT_EXECUTABLE)
string(REGEX MATCH "[0-9]+.[0-9]+.[0-9]+" ANT_VERSION "${ANT_VERSION_FULL}")
set(ANT_VERSION "${ANT_VERSION}" CACHE INTERNAL "Detected ant vesion")
message(STATUS "Found apache ant ${ANT_VERSION}: ${ANT_EXECUTABLE}")
message(STATUS "Found apache ant: ${ANT_EXECUTABLE} (${ANT_VERSION})")
endif()
endif()
......@@ -57,4 +57,4 @@ if(HAVE_QT AND ${VTK_VERSION} VERSION_GREATER "6.0.0" AND NOT ${VTK_QT_VERSION}
endif()
set(HAVE_VTK ON)
message(STATUS "Found VTK ver. ${VTK_VERSION} (usefile: ${VTK_USE_FILE})")
message(STATUS "Found VTK ${VTK_VERSION} (${VTK_USE_FILE})")
......@@ -600,6 +600,51 @@ endfunction()
endif() # NOT DEFINED CMAKE_ARGC
#
# Generate a list of enabled features basing on conditions:
# IF <cond> THEN <title>: check condition and append title to the result if it is true
# ELSE <title>: return provided value instead of empty result
# EXCLUSIVE: break after first successful condition
#
# Usage:
# ocv_build_features_string(out [EXLUSIVE] [IF feature THEN title] ... [ELSE title])
#
function(ocv_build_features_string out)
set(result)
list(REMOVE_AT ARGV 0)
foreach(arg ${ARGV})
if(arg STREQUAL "EXCLUSIVE")
set(exclusive TRUE)
elseif(arg STREQUAL "IF")
set(then FALSE)
set(cond)
elseif(arg STREQUAL "THEN")
set(then TRUE)
set(title)
elseif(arg STREQUAL "ELSE")
set(then FALSE)
set(else TRUE)
else()
if(then)
if(${cond})
list(APPEND result "${arg}")
if(exclusive)
break()
endif()
endif()
elseif(else)
if(NOT result)
set(result "${arg}")
endif()
else()
list(APPEND cond ${arg})
endif()
endif()
endforeach()
set(${out} ${result} PARENT_SCOPE)
endfunction()
# remove all matching elements from the list
macro(ocv_list_filterout lst regex)
foreach(item ${${lst}})
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册