From f5106371c52674a8fc0fe8ddfac92e62c85402c7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=94=D0=B8=D0=BB=D1=8F=D0=BD=20=D0=9F=D0=B0=D0=BB=D0=B0?= =?UTF-8?q?=D1=83=D0=B7=D0=BE=D0=B2?= Date: Wed, 10 Apr 2024 07:42:35 +0000 Subject: [PATCH] cmake: use enumerations for possible values, so that cmake-gui offers a drop-down selection --- cmake/XercesMsgLoaderSelection.cmake | 1 + cmake/XercesMutexMgrSelection.cmake | 1 + cmake/XercesNetAccessorSelection.cmake | 1 + cmake/XercesTranscoderSelection.cmake | 1 + cmake/XercesXMLCh.cmake | 1 + 5 files changed, 5 insertions(+) diff --git a/cmake/XercesMsgLoaderSelection.cmake b/cmake/XercesMsgLoaderSelection.cmake index f0d9b0d0d..c2957e7e3 100644 --- a/cmake/XercesMsgLoaderSelection.cmake +++ b/cmake/XercesMsgLoaderSelection.cmake @@ -42,6 +42,7 @@ endif() string(REPLACE ";" "|" msgloader_help "${msgloaders}") list(GET msgloaders 0 xerces_msgloader_default) set(message-loader "${xerces_msgloader_default}" CACHE STRING "Message loader (${msgloader_help})") +set_property(CACHE message-loader PROPERTY STRINGS ${msgloaders}) set(msgloader "${message-loader}") list(FIND msgloaders "${msgloader}" msgloader_found) diff --git a/cmake/XercesMutexMgrSelection.cmake b/cmake/XercesMutexMgrSelection.cmake index ad698840d..8d1c9ad94 100644 --- a/cmake/XercesMutexMgrSelection.cmake +++ b/cmake/XercesMutexMgrSelection.cmake @@ -90,6 +90,7 @@ list(APPEND mutexmgrs nothreads) string(REPLACE ";" "|" mutexmgr_help "${mutexmgrs}") list(GET mutexmgrs 0 xerces_mutexmgr_default) set(mutex-manager "${xerces_mutexmgr_default}" CACHE STRING "Mutex manager (${mutexmgr_help})") +set_property(CACHE mutex-manager PROPERTY STRINGS ${mutexmgrs}) set(mutexmgr "${mutex-manager}") list(FIND mutexmgrs "${mutexmgr}" mutexmgr_found) diff --git a/cmake/XercesNetAccessorSelection.cmake b/cmake/XercesNetAccessorSelection.cmake index 7a63f1f6b..7c0f7d17a 100644 --- a/cmake/XercesNetAccessorSelection.cmake +++ b/cmake/XercesNetAccessorSelection.cmake @@ -69,6 +69,7 @@ if(network) string(REPLACE ";" "|" netaccessor_help "${netaccessors}") list(GET netaccessors 0 xerces_netaccessor_default) set(network-accessor "${xerces_netaccessor_default}" CACHE STRING "Network accessor (${netaccessor_help})") + set_property(CACHE network-accessor PROPERTY STRINGS ${netaccessors}) set(netaccessor "${network-accessor}") list(FIND netaccessors "${netaccessor}" netaccessor_found) diff --git a/cmake/XercesTranscoderSelection.cmake b/cmake/XercesTranscoderSelection.cmake index 5dd7c6257..a6c87ab5d 100644 --- a/cmake/XercesTranscoderSelection.cmake +++ b/cmake/XercesTranscoderSelection.cmake @@ -87,6 +87,7 @@ endif() string(REPLACE ";" "|" transcoder_help "${transcoders}") list(GET transcoders 0 xerces_transcoder_default) set(transcoder "${xerces_transcoder_default}" CACHE STRING "Transcoder (${transcoder_help})") +set_property(CACHE transcoder PROPERTY STRINGS ${transcoders}) set(transcoder "${transcoder}") list(FIND transcoders "${transcoder}" transcoder_found) diff --git a/cmake/XercesXMLCh.cmake b/cmake/XercesXMLCh.cmake index d3b7fce31..0da61347b 100644 --- a/cmake/XercesXMLCh.cmake +++ b/cmake/XercesXMLCh.cmake @@ -66,6 +66,7 @@ list(APPEND xmlch_types uint16_t) string(REPLACE ";" "|" xmlch_type_help "${xmlch_types}") list(GET xmlch_types 0 xerces_xmlch_type_default) set(xmlch-type "${xerces_xmlch_type_default}" CACHE STRING "XMLCh type (${xmlch_type_help})") +set_property(CACHE xmlch-type PROPERTY STRINGS ${xmlch_types}) set(xmlch_type "${xmlch-type}") list(FIND xmlch_types "${xmlch_type}" xmlch_type_found)