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.
This commit is contained in:
parent
986b7ffd01
commit
5f49f2c657
@ -50,26 +50,20 @@ option(PUGIXML_NO_XPATH "Disable XPath" OFF)
|
|||||||
if (PUGIXML_NO_XPATH)
|
if (PUGIXML_NO_XPATH)
|
||||||
list(APPEND PUGIXML_BUILD_DEFINES PUGIXML_NO_XPATH)
|
list(APPEND PUGIXML_BUILD_DEFINES PUGIXML_NO_XPATH)
|
||||||
endif()
|
endif()
|
||||||
|
mark_as_advanced(PUGIXML_NO_XPATH)
|
||||||
|
|
||||||
option(PUGIXML_NO_STL "Disable STL" OFF)
|
option(PUGIXML_NO_STL "Disable STL" OFF)
|
||||||
if (PUGIXML_NO_STL)
|
if (PUGIXML_NO_STL)
|
||||||
list(APPEND PUGIXML_BUILD_DEFINES PUGIXML_NO_STL)
|
list(APPEND PUGIXML_BUILD_DEFINES PUGIXML_NO_STL)
|
||||||
endif()
|
endif()
|
||||||
|
mark_as_advanced(PUGIXML_NO_STL)
|
||||||
|
|
||||||
option(PUGIXML_NO_EXCEPTIONS "Disable Exceptions" OFF)
|
option(PUGIXML_NO_EXCEPTIONS "Disable Exceptions" OFF)
|
||||||
if (PUGIXML_NO_EXCEPTIONS)
|
if (PUGIXML_NO_EXCEPTIONS)
|
||||||
list(APPEND PUGIXML_BUILD_DEFINES PUGIXML_NO_EXCEPTIONS)
|
list(APPEND PUGIXML_BUILD_DEFINES PUGIXML_NO_EXCEPTIONS)
|
||||||
endif()
|
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
|
# Tune these to adjust memory-related behaviour
|
||||||
if (DEFINED PUGIXML_MEMORY_PAGE_SIZE)
|
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})
|
list(APPEND PUGIXML_BUILD_DEFINES PUGIXML_XPATH_DEPTH_LIMIT=${PUGIXML_XPATH_DEPTH_LIMIT})
|
||||||
endif()
|
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
|
# This is used to backport a CMake 3.15 feature, but is also forwards compatible
|
||||||
if (NOT DEFINED CMAKE_MSVC_RUNTIME_LIBRARY)
|
if (NOT DEFINED CMAKE_MSVC_RUNTIME_LIBRARY)
|
||||||
set(CMAKE_MSVC_RUNTIME_LIBRARY
|
set(CMAKE_MSVC_RUNTIME_LIBRARY
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user