diff --git a/CMakeLists.txt b/CMakeLists.txt index 400e946..67fca85 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -62,7 +62,7 @@ if(CMAKE_PROJECT_NAME STREQUAL PROJECT_NAME) target_compile_options(CLI11_warnings INTERFACE "/WX") endif() else() - target_compile_options(CLI11_warnings INTERFACE -Wall -Wextra -pedantic -Wshadow -Wsign-conversion) + target_compile_options(CLI11_warnings INTERFACE -Wall -Wextra -pedantic -Wshadow -Wsign-conversion -Wswitch-enum) if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU") if(NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 4.9) # GCC 4.8 has a false positive diff --git a/include/CLI/Validators.hpp b/include/CLI/Validators.hpp index 2137e95..d51d6b3 100644 --- a/include/CLI/Validators.hpp +++ b/include/CLI/Validators.hpp @@ -283,6 +283,13 @@ inline path_type check_path(const char *file) noexcept { return path_type::nonexistant; case std::filesystem::file_type::directory: return path_type::directory; + case std::filesystem::file_type::symlink: + case std::filesystem::file_type::block: + case std::filesystem::file_type::character: + case std::filesystem::file_type::fifo: + case std::filesystem::file_type::socket: + case std::filesystem::file_type::regular: + case std::filesystem::file_type::unknown: default: return path_type::file; }