forked from lijiext/lammps
cmake: fix icc versioning
This commit is contained in:
parent
8952b1107c
commit
55bd823339
|
@ -609,13 +609,13 @@ if(PKG_USER-INTEL)
|
||||||
if(NOT CMAKE_CXX_COMPILER_ID STREQUAL "Intel")
|
if(NOT CMAKE_CXX_COMPILER_ID STREQUAL "Intel")
|
||||||
message(FATAL_ERROR "USER-INTEL is only useful together with intel compiler")
|
message(FATAL_ERROR "USER-INTEL is only useful together with intel compiler")
|
||||||
endif()
|
endif()
|
||||||
if(CMAKE_CXX_COMPILER_VERSION VERSION_LESS "2016")
|
if(CMAKE_CXX_COMPILER_VERSION VERSION_LESS 16)
|
||||||
message(FATAL_ERROR "USER-INTEL is needed at least 2016 intel compiler")
|
message(FATAL_ERROR "USER-INTEL is needed at least 2016 intel compiler, found ${CMAKE_CXX_COMPILER_VERSION}")
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
option(INJECT_INTEL_FLAG "Inject OMG fast flags for USER-INTEL" ON)
|
option(INJECT_INTEL_FLAG "Inject OMG fast flags for USER-INTEL" ON)
|
||||||
if(INJECT_INTEL_FLAG AND CMAKE_CXX_COMPILER_ID STREQUAL "Intel")
|
if(INJECT_INTEL_FLAG AND CMAKE_CXX_COMPILER_ID STREQUAL "Intel")
|
||||||
if(CMAKE_CXX_COMPILER_VERSION MATCHES "^2017\.[34].*")
|
if(CMAKE_CXX_COMPILER_VERSION VERSION_EQUAL 17.3 OR CMAKE_CXX_COMPILER_VERSION VERSION_EQUAL 17.4)
|
||||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -xCOMMON-AVX512")
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -xCOMMON-AVX512")
|
||||||
else()
|
else()
|
||||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -xHost")
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -xHost")
|
||||||
|
|
Loading…
Reference in New Issue