mirror of
https://github.com/CLIUtils/CLI11.git
synced 2025-04-30 20:53:52 +00:00
Add windows latest and gcc 8 builds to azure (#446)
* add windows latest and gcc 8 builds to azure * try adding pr trigger * try adding something specific for gcc 8 * use interface instead of public * try C++17 on clang 8 * update the readme with some additional notes about gcc 8 * fix some incorrect doxygen comment formatting * try using the glibcxx_release value * debug some code paths to make sure macros are working * Update readme and fix formatting. * update formatting for Validators
This commit is contained in:
parent
7432ab264d
commit
b9a2f320b9
15
README.md
15
README.md
@ -151,6 +151,21 @@ make
|
||||
GTEST_COLOR=1 CTEST_OUTPUT_ON_FAILURE=1 make test
|
||||
```
|
||||
|
||||
<details><summary>Note: Special instructions for GCC 8</summary><p>
|
||||
|
||||
If you are using GCC 8 and using it in C++17 mode with CLI11. CLI11 makes use of the `<filesystem>` header if available, but specifically for this compiler, the `filesystem` library is separate from the standard library and needs to be linked separately. So it is available but CLI11 doesn't use it by default.
|
||||
|
||||
Specifically `libstdc++fs` needs to be added to the linking list and `CLI11_HAS_FILESYSTEM=1` has to be defined. Then the filesystem variant of the Validators could be used on GCC 8. GCC 9+ does not have this issue so the `<filesystem>` is used by default.
|
||||
|
||||
There may also be other cases where a specific library needs to be linked.
|
||||
|
||||
Defining `CLI11_HAS_FILESYSTEM=0` which will remove the usage and hence any linking issue.
|
||||
|
||||
In some cases certain clang compilations may require linking against `libc++fs`. These situations have not been encountered so the specific situations requiring them are unknown yet.
|
||||
|
||||
</p></details>
|
||||
</br>
|
||||
|
||||
## Usage
|
||||
|
||||
### Adding options
|
||||
|
@ -6,6 +6,9 @@
|
||||
trigger:
|
||||
- master
|
||||
|
||||
pr:
|
||||
- master
|
||||
|
||||
variables:
|
||||
cli11.single: ON
|
||||
cli11.std: 14
|
||||
@ -57,6 +60,9 @@ jobs:
|
||||
Windows11:
|
||||
vmImage: 'vs2017-win2016'
|
||||
cli11.std: 11
|
||||
Windowslatest:
|
||||
vmImage: 'windows-2019'
|
||||
cli11.std: 17
|
||||
pool:
|
||||
vmImage: $(vmImage)
|
||||
steps:
|
||||
@ -89,6 +95,9 @@ jobs:
|
||||
gcc9:
|
||||
containerImage: gcc:9
|
||||
cli11.std: 17
|
||||
gcc8:
|
||||
containerImage: gcc:8
|
||||
cli11.std: 17
|
||||
gcc4.8:
|
||||
containerImage: gcc:4.8
|
||||
cli11.std: 11
|
||||
@ -100,6 +109,10 @@ jobs:
|
||||
containerImage: silkeh/clang:8
|
||||
cli11.std: 14
|
||||
cli11.options: -DCLI11_FORCE_LIBCXX=ON
|
||||
clang8_17:
|
||||
containerImage: silkeh/clang:8
|
||||
cli11.std: 17
|
||||
cli11.options: -DCLI11_FORCE_LIBCXX=ON
|
||||
container: $[ variables['containerImage'] ]
|
||||
steps:
|
||||
- template: .ci/azure-cmake.yml
|
||||
|
@ -24,9 +24,9 @@ class App;
|
||||
/// the second argument.
|
||||
|
||||
enum class AppFormatMode {
|
||||
Normal, //< The normal, detailed help
|
||||
All, //< A fully expanded help
|
||||
Sub, //< Used when printed as part of expanded subcommand
|
||||
Normal, ///< The normal, detailed help
|
||||
All, ///< A fully expanded help
|
||||
Sub, ///< Used when printed as part of expanded subcommand
|
||||
};
|
||||
|
||||
/// This is the minimum requirements to run a formatter.
|
||||
|
@ -33,7 +33,14 @@
|
||||
#else
|
||||
#include <filesystem>
|
||||
#if defined __cpp_lib_filesystem && __cpp_lib_filesystem >= 201703
|
||||
#if defined _GLIBCXX_RELEASE && _GLIBCXX_RELEASE >= 9
|
||||
#define CLI11_HAS_FILESYSTEM 1
|
||||
#elif defined(__GLIBCXX__)
|
||||
// if we are using gcc and Version <9 default to no filesystem
|
||||
#define CLI11_HAS_FILESYSTEM 0
|
||||
#else
|
||||
#define CLI11_HAS_FILESYSTEM 1
|
||||
#endif
|
||||
#else
|
||||
#define CLI11_HAS_FILESYSTEM 0
|
||||
#endif
|
||||
|
Loading…
x
Reference in New Issue
Block a user