]> git.ipfire.org Git - thirdparty/ccache.git/commitdiff
feat: Add support for Intel compiler on Windows (#1100)
authorDaniel Richtmann <DanielRichtmann@users.noreply.github.com>
Wed, 29 Jun 2022 18:08:31 +0000 (20:08 +0200)
committerGitHub <noreply@github.com>
Wed, 29 Jun 2022 18:08:31 +0000 (20:08 +0200)
doc/MANUAL.adoc
src/Config.cpp
src/Config.hpp
src/ccache.cpp

index 3dde53f90a539f676d30cf04c6d6f03ece7d25e0..1b98de06e1b350c46b59fd107b87566a06c02371 100644 (file)
@@ -522,6 +522,8 @@ _<<Using ccache with other compiler wrappers>>_.
     clang-cl.
 *gcc*::
     GCC-based compiler.
+*icl*::
+    Intel compiler on Windows.
 *msvc*::
     Microsoft Visual C++ (MSVC).
 *nvcc*::
index 9ac91a1d95bd078f3212ed9bd7089676f8c14675..2bc55e3158ac6b6ee9c55735e37cc50a152a1c48 100644 (file)
@@ -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);
index dbec498529f4e536c1b6e44a1f8878f18dfd2c44..0e18247f5fbbd3cfd1e6c8776f5ae596c58a4102 100644 (file)
 #include <string>
 #include <unordered_map>
 
-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
index 5f95849d064e03cf099c6a33fe4a4c8a7a00aac8..b209c3a2a4ca0c75e97a908b2b6bfb2be0521114 100644 (file)
@@ -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 {