summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Help/release/dev/FindOpenMP-clang.rst4
-rw-r--r--Modules/FindOpenMP.cmake3
2 files changed, 7 insertions, 0 deletions
diff --git a/Help/release/dev/FindOpenMP-clang.rst b/Help/release/dev/FindOpenMP-clang.rst
new file mode 100644
index 0000000..44c805c
--- /dev/null
+++ b/Help/release/dev/FindOpenMP-clang.rst
@@ -0,0 +1,4 @@
+FindOpenMP-clang
+----------------
+
+* The :module:`FindOpenMP` module learned to support Clang.
diff --git a/Modules/FindOpenMP.cmake b/Modules/FindOpenMP.cmake
index a102c66..ee4bdd6 100644
--- a/Modules/FindOpenMP.cmake
+++ b/Modules/FindOpenMP.cmake
@@ -50,6 +50,8 @@ function(_OPENMP_FLAG_CANDIDATES LANG)
" "
#GNU
"-fopenmp"
+ #Clang
+ "-fopenmp=libomp"
#Microsoft Visual Studio
"/openmp"
#Intel windows
@@ -67,6 +69,7 @@ function(_OPENMP_FLAG_CANDIDATES LANG)
)
set(OMP_FLAG_GNU "-fopenmp")
+ set(OMP_FLAG_Clang "-fopenmp=libomp")
set(OMP_FLAG_HP "+Oopenmp")
if(WIN32)
set(OMP_FLAG_Intel "-Qopenmp")