From 5f49f2c6575cc2b7d343f8d41581fe92d69d7b52 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Blissing?= Date: Sat, 26 Jun 2021 22:20:36 +0200 Subject: [PATCH] Mark advanced options and removed redundant ones Options marked as advanced are hidden by default in the CMake GUI. The `PUGIXML_HEADER_ONLY` are redundant when during CMake builds, hence removed. The `PUGIXML_HAS_LONG_LONG` should be handled automatically and needs to be rewritten, hence these options has been removed. --- CMakeLists.txt | 28 +++------------------------- 1 file changed, 3 insertions(+), 25 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 0ee5239..f40401c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -50,26 +50,20 @@ option(PUGIXML_NO_XPATH "Disable XPath" OFF) if (PUGIXML_NO_XPATH) list(APPEND PUGIXML_BUILD_DEFINES PUGIXML_NO_XPATH) endif() +mark_as_advanced(PUGIXML_NO_XPATH) option(PUGIXML_NO_STL "Disable STL" OFF) if (PUGIXML_NO_STL) list(APPEND PUGIXML_BUILD_DEFINES PUGIXML_NO_STL) endif() +mark_as_advanced(PUGIXML_NO_STL) option(PUGIXML_NO_EXCEPTIONS "Disable Exceptions" OFF) if (PUGIXML_NO_EXCEPTIONS) list(APPEND PUGIXML_BUILD_DEFINES PUGIXML_NO_EXCEPTIONS) endif() +mark_as_advanced(PUGIXML_NO_EXCEPTIONS) -option(PUGIXML_HEADER_ONLY "Switch to header only" OFF) -if (PUGIXML_HEADER_ONLY) - list(APPEND PUGIXML_BUILD_DEFINES PUGIXML_HEADER_ONLY) -endif() - -option(PUGIXML_HAS_LONG_LONG "Enable long long support" OFF) -if (PUGIXML_HAS_LONG_LONG) - list(APPEND PUGIXML_BUILD_DEFINES PUGIXML_HAS_LONG_LONG) -endif() # Tune these to adjust memory-related behaviour if (DEFINED PUGIXML_MEMORY_PAGE_SIZE) @@ -89,22 +83,6 @@ if (DEFINED PUGIXML_XPATH_DEPTH_LIMIT) list(APPEND PUGIXML_BUILD_DEFINES PUGIXML_XPATH_DEPTH_LIMIT=${PUGIXML_XPATH_DEPTH_LIMIT}) endif() -# Set these to control attributes for public classes/functions -option(PUGIXML_OVERRIDE_API "Export all public symbols from DLL" OFF) -if(PUGIXML_OVERRIDE_API) - list(APPEND PUGIXML_BUILD_DEFINES PUGIXML_API=__declspec(dllexport)) -endif() - -option(PUGIXML_OVERRIDE_CLASS "Import all classes from DLL" OFF) -if(PUGIXML_OVERRIDE_CLASS) - list(APPEND PUGIXML_BUILD_DEFINES PUGIXML_CLASS=__declspec(dllimport)) -endif() - -option(PUGIXML_OVERRIDE_FUNCTION "Set calling conventions to all public functions to fastcall" OFF) -if(PUGIXML_OVERRIDE_FUNCTION) - list(APPEND PUGIXML_BUILD_DEFINES PUGIXML_FUNCTION=__fastcall) -endif() - # This is used to backport a CMake 3.15 feature, but is also forwards compatible if (NOT DEFINED CMAKE_MSVC_RUNTIME_LIBRARY) set(CMAKE_MSVC_RUNTIME_LIBRARY