https://github.com/Kitware/CMake
Raw File
Tip revision: 50fc9d5b45a7dcbb11152ea77b2d47c66e277265 authored by Brad King on 16 February 2021, 17:11:10 UTC
CMake 3.20.0-rc1
Tip revision: 50fc9d5
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