diff --git a/CLI11.hpp.in b/CLI11.hpp.in index 0c9e1ee2..edc16bb1 100644 --- a/CLI11.hpp.in +++ b/CLI11.hpp.in @@ -40,8 +40,6 @@ {macros_hpp} -{slim_windows_h_hpp} - {validators_hpp_filesystem} {encoding_includes} diff --git a/include/CLI/impl/Argv_inl.hpp b/include/CLI/impl/Argv_inl.hpp index f19849e2..771154ff 100644 --- a/include/CLI/impl/Argv_inl.hpp +++ b/include/CLI/impl/Argv_inl.hpp @@ -19,14 +19,28 @@ #include // [CLI11:public_includes:end] -#ifdef _WIN32 -#include "SlimWindowsH.hpp" -#endif // _WIN32 - // [CLI11:argv_inl_includes:verbatim] #if defined(_WIN32) -#include +#if !(defined(_AMD64_) || defined(_X86_) || defined(_ARM_)) +#if defined(__amd64__) || defined(__amd64) || defined(__x86_64__) || defined(__x86_64) || defined(_M_X64) || \ + defined(_M_AMD64) +#define _AMD64_ +#elif defined(i386) || defined(__i386) || defined(__i386__) || defined(__i386__) || defined(_M_IX86) +#define _X86_ +#elif defined(__arm__) || defined(_M_ARM) || defined(_M_ARMT) +#define _ARM_ +#endif +#endif +#define NOMINMAX +// first +#include +// second +#include +// third +#include #include + +#undef NOMINMAX #elif defined(__APPLE__) #include #endif diff --git a/include/CLI/impl/SlimWindowsH.hpp b/include/CLI/impl/SlimWindowsH.hpp deleted file mode 100644 index 1a8d7feb..00000000 --- a/include/CLI/impl/SlimWindowsH.hpp +++ /dev/null @@ -1,101 +0,0 @@ -// Copyright (c) 2017-2023, University of Cincinnati, developed by Henry Schreiner -// under NSF AWARD 1414736 and by the respective contributors. -// All rights reserved. -// -// SPDX-License-Identifier: BSD-3-Clause - -#pragma once -// [CLI11:slim_windows_h_hpp:verbatim] -#ifdef _WIN32 -// The most slimmed-down version of Windows.h. -#define WIN32_LEAN_AND_MEAN -#define WIN32_EXTRA_LEAN - -// Enable components based on necessity. -#define NOGDICAPMASKS -#define NOVIRTUALKEYCODES -#define NOWINMESSAGES -#define NOWINSTYLES -#define NOSYSMETRICS -#define NOMENUS -#define NOICONS -#define NOKEYSTATES -#define NOSYSCOMMANDS -#define NORASTEROPS -#define NOSHOWWINDOW -#define OEMRESOURCE -#define NOATOM -#define NOCLIPBOARD -#define NOCOLOR -#define NOCTLMGR -#define NODRAWTEXT -#define NOGDI -#define NOKERNEL -#define NOUSER -#define NONLS -#define NOMB -#define NOMEMMGR -#define NOMETAFILE -#define NOMINMAX -#define NOMSG -#define NOOPENFILE -#define NOSCROLL -#define NOSERVICE -#define NOSOUND -#define NOTEXTMETRIC -#define NOWH -#define NOWINOFFSETS -#define NOCOMM -#define NOKANJI -#define NOHELP -#define NOPROFILER -#define NODEFERWINDOWPOS -#define NOMCX - -#include "Windows.h" - -#undef WIN32_LEAN_AND_MEAN -#undef WIN32_EXTRA_LEAN - -#undef NOGDICAPMASKS -#undef NOVIRTUALKEYCODES -#undef NOWINMESSAGES -#undef NOWINSTYLES -#undef NOSYSMETRICS -#undef NOMENUS -#undef NOICONS -#undef NOKEYSTATES -#undef NOSYSCOMMANDS -#undef NORASTEROPS -#undef NOSHOWWINDOW -#undef OEMRESOURCE -#undef NOATOM -#undef NOCLIPBOARD -#undef NOCOLOR -#undef NOCTLMGR -#undef NODRAWTEXT -#undef NOGDI -#undef NOKERNEL -#undef NOUSER -#undef NONLS -#undef NOMB -#undef NOMEMMGR -#undef NOMETAFILE -#undef NOMINMAX -#undef NOMSG -#undef NOOPENFILE -#undef NOSCROLL -#undef NOSERVICE -#undef NOSOUND -#undef NOTEXTMETRIC -#undef NOWH -#undef NOWINOFFSETS -#undef NOCOMM -#undef NOKANJI -#undef NOHELP -#undef NOPROFILER -#undef NODEFERWINDOWPOS -#undef NOMCX - -#endif // _WIN32 -// [CLI11:slim_windows_h_hpp:end] diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 89eb7e11..2c2aafa1 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -28,8 +28,7 @@ set(CLI11_impl_headers ${CLI11_implLoc}/StringTools_inl.hpp ${CLI11_implLoc}/Validators_inl.hpp ${CLI11_implLoc}/Encoding_inl.hpp - ${CLI11_implLoc}/Argv_inl.hpp - ${CLI11_implLoc}/SlimWindowsH.hpp) + ${CLI11_implLoc}/Argv_inl.hpp) set(CLI11_library_headers ${CLI11_headerLoc}/CLI.hpp ${CLI11_headerLoc}/Timer.hpp)