소스 검색

FindOpenMP: ICC 15 deprecates -openmp, use -qopenmp

Intel Composer XE 2015 Beta 2 deprecates all options starting with -o
for sake of compatibility with other compilers expecting anything goes
after -o... is output file name.
Adam Strzelecki 11 년 전
부모
커밋
4671f3ab7d
1개의 변경된 파일4개의 추가작업 그리고 1개의 파일을 삭제
  1. 4 1
      Modules/FindOpenMP.cmake

+ 4 - 1
Modules/FindOpenMP.cmake

@@ -68,8 +68,11 @@ function(_OPENMP_FLAG_CANDIDATES LANG)
   set(OMP_FLAG_HP "+Oopenmp")
   set(OMP_FLAG_HP "+Oopenmp")
   if(WIN32)
   if(WIN32)
     set(OMP_FLAG_Intel "-Qopenmp")
     set(OMP_FLAG_Intel "-Qopenmp")
-  else()
+  elseif(CMAKE_${LANG}_COMPILER_ID STREQUAL "Intel" AND
+         "${CMAKE_${LANG}_COMPILER_VERSION}" VERSION_LESS "15.0.0.20140528")
     set(OMP_FLAG_Intel "-openmp")
     set(OMP_FLAG_Intel "-openmp")
+  else()
+    set(OMP_FLAG_Intel "-qopenmp")
   endif()
   endif()
   set(OMP_FLAG_MIPSpro "-mp")
   set(OMP_FLAG_MIPSpro "-mp")
   set(OMP_FLAG_MSVC "/openmp")
   set(OMP_FLAG_MSVC "/openmp")