From: Daniel Richtmann Date: Wed, 29 Jun 2022 18:08:31 +0000 (+0200) Subject: feat: Add support for Intel compiler on Windows (#1100) X-Git-Tag: v4.7~172 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=6c2f9ee727d4f540b2574bb62ba5eea3077c3f5c;p=thirdparty%2Fccache.git feat: Add support for Intel compiler on Windows (#1100) --- diff --git a/doc/MANUAL.adoc b/doc/MANUAL.adoc index 3dde53f90..1b98de06e 100644 --- a/doc/MANUAL.adoc +++ b/doc/MANUAL.adoc @@ -522,6 +522,8 @@ _<>_. clang-cl. *gcc*:: GCC-based compiler. +*icl*:: + Intel compiler on Windows. *msvc*:: Microsoft Visual C++ (MSVC). *nvcc*:: diff --git a/src/Config.cpp b/src/Config.cpp index 9ac91a1d9..2bc55e315 100644 --- a/src/Config.cpp +++ b/src/Config.cpp @@ -245,6 +245,8 @@ parse_compiler_type(const std::string& value) return CompilerType::clang_cl; } else if (value == "gcc") { return CompilerType::gcc; + } else if (value == "icl") { + return CompilerType::icl; } else if (value == "msvc") { return CompilerType::msvc; } else if (value == "nvcc") { @@ -461,6 +463,7 @@ compiler_type_to_string(CompilerType compiler_type) CASE(clang); CASE(gcc); + CASE(icl); CASE(msvc); CASE(nvcc); CASE(other); diff --git a/src/Config.hpp b/src/Config.hpp index dbec49852..0e18247f5 100644 --- a/src/Config.hpp +++ b/src/Config.hpp @@ -30,7 +30,16 @@ #include #include -enum class CompilerType { auto_guess, clang, clang_cl, gcc, msvc, nvcc, other }; +enum class CompilerType { + auto_guess, + clang, + clang_cl, + gcc, + icl, + msvc, + nvcc, + other +}; std::string compiler_type_to_string(CompilerType compiler_type); @@ -87,7 +96,7 @@ public: // Return true for Clang and clang-cl. bool is_compiler_group_clang() const; - // Return true for MSVC (cl.exe) and clang-cl. + // Return true for MSVC (cl.exe), clang-cl, and icl. bool is_compiler_group_msvc() const; std::string default_temporary_dir() const; @@ -248,7 +257,8 @@ inline bool Config::is_compiler_group_msvc() const { return m_compiler_type == CompilerType::msvc - || m_compiler_type == CompilerType::clang_cl; + || m_compiler_type == CompilerType::clang_cl + || m_compiler_type == CompilerType::icl; } inline bool diff --git a/src/ccache.cpp b/src/ccache.cpp index 5f95849d0..b209c3a2a 100644 --- a/src/ccache.cpp +++ b/src/ccache.cpp @@ -251,6 +251,8 @@ guess_compiler(std::string_view path) return CompilerType::gcc; } else if (name.find("nvcc") != std::string_view::npos) { return CompilerType::nvcc; + } else if (name == "icl") { + return CompilerType::icl; } else if (name == "cl") { return CompilerType::msvc; } else {