https://github.com/Kitware/CMake
Raw File
Tip revision: a4774b0c10e9ce5354b9a7a721f8ff2952d1f247 authored by Brad King on 03 April 2024, 15:45:14 UTC
CMake 3.29.1
Tip revision: a4774b0
compare_options.cmake
set(range 1 2 3 4 5 6 7 8 9 10)
set(aargs "")
set(bargs "")
foreach(n IN LISTS range)
  set(aval "${A${n}ARG}")
  set(bval "${B${n}ARG}")
  if(aval OR bval)
    list(APPEND aargs "\"${aval}\"")
    list(APPEND bargs "\"${bval}\"")
  endif()
endforeach()
if(NOT "${aargs}" STREQUAL "${bargs}")
  message(FATAL_ERROR "COMPARE_OPTIONS: \n\t${aargs} != \n\t${bargs}")
endif()
back to top