diff options
Diffstat (limited to 'src/util.cc')
-rw-r--r-- | src/util.cc | 38 |
1 files changed, 0 insertions, 38 deletions
diff --git a/src/util.cc b/src/util.cc index 08a135f..fe16471 100644 --- a/src/util.cc +++ b/src/util.cc @@ -6,7 +6,6 @@ #include <iostream> #include <fstream> #include <algorithm> -#include <cctype> std::string to_lower(const std::string& str) { @@ -152,43 +151,6 @@ std::string cleanUp(const std::string& path) return cleaned; } -ctor::target_type target_type_from_extension(const std::filesystem::path& file) -{ - auto ext = to_lower(file.extension().string()); - // Loosely based on: - // https://en.wikipedia.org/wiki/List_of_file_formats#Object_code,_executable_files,_shared_and_dynamically_linked_libraries - if(ext == ".a" || - ext == ".lib") - { - return ctor::target_type::static_library; - } - - if(ext == ".so" || - ext == ".dll" || - ext == ".dylib") - { - return ctor::target_type::dynamic_library; - } - - if(ext == ".o" || - ext == ".obj") - { - return ctor::target_type::object; - } - - if(ext == "" || - ext == ".exe" || - ext == ".com" || - ext == ".bin" || - ext == ".run" || - ext == ".out") - { - return ctor::target_type::executable; - } - - return ctor::target_type::unknown; -} - std::string esc(const std::string& in) { std::string out; |