#
# This file is part of the GROMACS molecular simulation package.
#
-# Copyright (c) 2019,2020, by the GROMACS development team, led by
+# Copyright (c) 2019,2020,2021, by the GROMACS development team, led by
# Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
# and including many others, as listed in the AUTHORS file in the
# top-level source directory and at http://www.gromacs.org.
set(EXTRA_MESSAGE ", ignoring the value of GMX_GPLUSPLUS_PATH")
endif()
string(TOUPPER "${CMAKE_BUILD_TYPE}" _cmake_build_type)
-if (CMAKE_CXX_COMPILER_ID MATCHES "Clang")
+if (CMAKE_CXX_COMPILER_ID MATCHES "Clang" OR CMAKE_CXX_COMPILER_ID MATCHES "IntelLLVM")
if ("${CMAKE_CXX_FLAGS} ${CMAKE_CXX_FLAGS_${_cmake_build_type}}" MATCHES "--gcc-toolchain")
message(STATUS "The --gcc-toolchain option is already present in the CMAKE_CXX_FLAGS "
"(or perhaps those specific to the CMAKE_BUILD_TYPE), and the GROMACS build "
# Find a gcc (perhaps already specified by the user in
# GMX_GPLUSPLUS_PATH) and prepare to reproducibly use its libstdc++.
find_program(GMX_GPLUSPLUS_PATH g++)
- if (CMAKE_CXX_COMPILER_ID MATCHES "Clang")
+ if (CMAKE_CXX_COMPILER_ID MATCHES "Clang" OR CMAKE_CXX_COMPILER_ID MATCHES "IntelLLVM")
set(EXTRA_MESSAGE
" Clang supports using libc++ with -DCMAKE_CXX_FLAGS=--stdlib=libc++, and if so there will be no need to find g++.")
endif()
endif()
# Now make some sanity checks on the compiler using libstdc++.
- if (CMAKE_CXX_COMPILER_ID MATCHES "Clang")
+ if (CMAKE_CXX_COMPILER_ID MATCHES "Clang" OR CMAKE_CXX_COMPILER_ID MATCHES "IntelLLVM")
get_filename_component(GMX_GPLUSPLUS_PATH "${GMX_GPLUSPLUS_PATH}" REALPATH)
get_filename_component(GMX_GPLUSPLUS_PATH "${GMX_GPLUSPLUS_PATH}" DIRECTORY) #strip g++
get_filename_component(GMX_GPLUSPLUS_PATH "${GMX_GPLUSPLUS_PATH}" DIRECTORY) #strip bin
# Set up to use the libstdc++ from that g++. Note that we checked
# the existing contents of CMAKE_CXX_FLAGS* variables earlier, so
# we will not override any user settings here.
- if (CMAKE_CXX_COMPILER_ID MATCHES "Clang")
+ if (CMAKE_CXX_COMPILER_ID MATCHES "Clang" OR CMAKE_CXX_COMPILER_ID MATCHES "IntelLLVM")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} --gcc-toolchain=${GMX_GPLUSPLUS_PATH}")
else() #Intel
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -gcc-name=${GMX_GPLUSPLUS_PATH}")
endif()
# icc
- if (CMAKE_C_COMPILER_ID MATCHES "Intel")
+ if (CMAKE_C_COMPILER_ID STREQUAL "Intel")
if (NOT WIN32)
if(NOT GMX_OPENMP)
# 3180: unrecognized OpenMP #pragma
endif()
endif()
- if (CMAKE_CXX_COMPILER_ID MATCHES "Intel")
+ if (CMAKE_CXX_COMPILER_ID STREQUAL "Intel")
if (NOT WIN32)
if(NOT GMX_OPENMP)
GMX_TEST_CXXFLAG(CXXFLAGS_PRAGMA "-wd3180" GMXC_CXXFLAGS)
GMX_TEST_CXXFLAG(CXXFLAGS_LANG "/permissive-" GMXC_CXXFLAGS)
endif()
- if (CMAKE_C_COMPILER_ID MATCHES "Clang")
+ if (CMAKE_C_COMPILER_ID MATCHES "Clang" OR CMAKE_C_COMPILER_ID MATCHES "IntelLLVM")
if(NOT GMX_OPENMP)
GMX_TEST_CFLAG(CFLAGS_PRAGMA "-Wno-unknown-pragmas" GMXC_CFLAGS)
endif()
GMX_TEST_CFLAG(CFLAGS_WARN_NO_MISSING_FIELD_INITIALIZERS "-Wno-missing-field-initializers" GMXC_CFLAGS)
endif()
- if (CMAKE_CXX_COMPILER_ID MATCHES "Clang")
+ if (CMAKE_CXX_COMPILER_ID MATCHES "Clang" OR CMAKE_CXX_COMPILER_ID MATCHES "IntelLLVM")
if (GMX_COMPILER_WARNINGS)
# If used, -Wall should precede other options that silence warnings it enables
GMX_TEST_CXXFLAG(CXXFLAGS_WARN "-Wall" GMXC_CXXFLAGS)
#
# This file is part of the GROMACS molecular simulation package.
#
-# Copyright (c) 2012,2013,2014,2015,2018,2020, by the GROMACS development team, led by
+# Copyright (c) 2012,2013,2014,2015,2018,2020,2021, by the GROMACS development team, led by
# Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
# and including many others, as listed in the AUTHORS file in the
# top-level source directory and at http://www.gromacs.org.
gmx_manage_prefer_static_libs_flags("${build_type}")
endforeach()
ENDIF()
- IF( CMAKE_C_COMPILER_ID MATCHES "Intel" )
+ IF( CMAKE_C_COMPILER_ID STREQUAL "Intel" )
if(BUILD_SHARED_LIBS) #not sure why incremental building with shared libs doesn't work
STRING(REPLACE "/INCREMENTAL:YES" "" CMAKE_SHARED_LINKER_FLAGS ${CMAKE_SHARED_LINKER_FLAGS})
set(CMAKE_SHARED_LINKER_FLAGS ${CMAKE_SHARED_LINKER_FLAGS} PARENT_SCOPE)