Fix CMake 3.20 warnings when compiling with IntelLLVM
authorAndrey Alekseenko <al42and@gmail.com>
Tue, 18 May 2021 19:54:23 +0000 (22:54 +0300)
committerAndrey Alekseenko <al42and@gmail.com>
Tue, 18 May 2021 20:00:12 +0000 (23:00 +0300)
Most work was done in 5d2d4769 (MR !1558), but we were still getting
warnings from the compiler compatibility checks. Nothing major, just
noise.

cmake/gmxTestCompilerProblems.cmake

index 620f1767eda7c32b832e6a60faaa169539923fba..59848df2f1f43035d9900a2bc17f8cdd07bac33c 100644 (file)
@@ -62,6 +62,8 @@ macro(gmx_test_compiler_problems)
         if (CMAKE_CXX_COMPILER_VERSION VERSION_LESS 5)
             set(cxx_required_version "Clang 5")
         endif()
+    elseif(CMAKE_CXX_COMPILER_ID MATCHES "IntelLLVM")
+        # All versions of IntelLLVM (a.k.a. DPCPP) compiler so far support C++17
     else()
         message(WARNING "You are using an unsupported compiler. Please make sure it fully supports C++17.")
     endif()
@@ -70,7 +72,7 @@ macro(gmx_test_compiler_problems)
                             "Earlier versions don't have full C++17 support.")
     endif()
 
-    if (CMAKE_CXX_COMPILER_ID MATCHES "Intel")
+    if (CMAKE_CXX_COMPILER_ID MATCHES "Intel" AND NOT CMAKE_CXX_COMPILER_ID MATCHES "IntelLLVM")
         message(WARNING "The Intel classic compiler is no longer supported. It may pass the tests, but is not tested by the GROMACS developers. Use the clang-based compiler from oneAPI, or gcc")
     endif()