fix compilation issues with new/old Intel compilers

This commit is contained in:
Axel Kohlmeyer
2021-07-11 14:09:17 -04:00
parent b47a212b17
commit 41a434ae1f
2 changed files with 6 additions and 1 deletions

View File

@ -31,6 +31,11 @@ endif()
set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
# Need -restrict with Intel compilers
if((CMAKE_CXX_COMPILER_ID STREQUAL "Intel") OR (CMAKE_CXX_COMPILER_ID STREQUAL "IntelLLVM"))
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -restrict")
endif()
# bail out on windows
if(CMAKE_SYSTEM_NAME STREQUAL Windows)
message(FATAL_ERROR "LAMMPS plugins are currently not supported on Windows")