From: Timo Heister Date: Tue, 2 Jun 2015 17:36:41 +0000 (-0400) Subject: intel and openmp-simd X-Git-Tag: v8.3.0-rc1~132^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=06b30cac00c073844f3049f0dcb044dbcb24ef8f;p=dealii.git intel and openmp-simd - Intel 13 does not support -openmp-simd and generates a bogus warning (confusing it with -o). Do not try to check for it. - Intel 15 renamed the flag to -qopenmp-simd (see https://software.intel.com/en-us/node/522965) --- diff --git a/cmake/checks/check_01_cpu_features.cmake b/cmake/checks/check_01_cpu_features.cmake index 6d7c466f82..eb2aa3a0b5 100644 --- a/cmake/checks/check_01_cpu_features.cmake +++ b/cmake/checks/check_01_cpu_features.cmake @@ -221,7 +221,12 @@ ENDIF() 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() @@ -229,8 +234,13 @@ 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()