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}")
endif()
endif()