IF(DEAL_II_ALLOW_PLATFORM_INTROSPECTION)
IF(CMAKE_CXX_COMPILER_ID MATCHES "Intel")
- CHECK_CXX_COMPILER_FLAG("-openmp-simd" DEAL_II_HAVE_OPENMP_SIMD)
+ # there is no openmp-simd support in Intel 13 and the flag got renamed in 15+
+ IF(CMAKE_CXX_COMPILER_VERSION VERSION_GREATER "15")
+ CHECK_CXX_COMPILER_FLAG("-qopenmp-simd" DEAL_II_HAVE_OPENMP_SIMD)
+ ELSEIF(CMAKE_CXX_COMPILER_VERSION VERSION_GREATER "14")
+ CHECK_CXX_COMPILER_FLAG("-openmp-simd" DEAL_II_HAVE_OPENMP_SIMD)
+ ENDIF()
ELSE()
CHECK_CXX_COMPILER_FLAG("-fopenmp-simd" DEAL_II_HAVE_OPENMP_SIMD)
ENDIF()
IF(DEAL_II_HAVE_OPENMP_SIMD)
IF(CMAKE_CXX_COMPILER_ID MATCHES "Intel")
- ADD_FLAGS(DEAL_II_CXX_FLAGS "-openmp-simd")
- ADD_FLAGS(DEAL_II_LINKER_FLAGS "-openmp")
+ IF(CMAKE_CXX_COMPILER_VERSION VERSION_GREATER "15")
+ ADD_FLAGS(DEAL_II_CXX_FLAGS "-qopenmp-simd")
+ ADD_FLAGS(DEAL_II_LINKER_FLAGS "-qopenmp")
+ ELSE()
+ ADD_FLAGS(DEAL_II_CXX_FLAGS "-openmp-simd")
+ ADD_FLAGS(DEAL_II_LINKER_FLAGS "-openmp")
+ ENDIF()
ELSE()
ADD_FLAGS(DEAL_II_CXX_FLAGS "-fopenmp-simd")
ENDIF()