EnableModeVars.cmake 673 B

123456789101112131415161718192021
  1. set(__OCV_MODE_VARS_DIR "${CMAKE_CURRENT_LIST_DIR}")
  2. macro(ocv_change_mode_var)
  3. set(__var "${ARGV0}")
  4. set(__mode "${ARGV1}")
  5. set(__value "${ARGV2}")
  6. if(__mode STREQUAL "MODIFIED_ACCESS" AND __value)
  7. if(NOT __applied_mode_${__var})
  8. include("${__OCV_MODE_VARS_DIR}/${__var}.cmake")
  9. set(__applied_mode_${__var} 1)
  10. else()
  11. #message("Mode is already applied: ${__var}")
  12. endif()
  13. endif()
  14. endmacro()
  15. variable_watch(OPENCV_DISABLE_THREAD_SUPPORT ocv_change_mode_var)
  16. set(OPENCV_DISABLE_THREAD_SUPPORT "${OPENCV_DISABLE_THREAD_SUPPORT}")
  17. variable_watch(OPENCV_SEMIHOSTING ocv_change_mode_var)
  18. set(OPENCV_SEMIHOSTING "${OPENCV_SEMIHOSTING}")