summaryrefslogtreecommitdiffstats
path: root/Modules/FindOpenMP.cmake
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2017-10-25 12:12:27 (GMT)
committerKitware Robot <kwrobot@kitware.com>2017-10-25 12:12:30 (GMT)
commitfe4d6f1fd6a0af755e30e71430082667f9683e5e (patch)
tree2f31f606817dcb10768e95da8e50c50d54714214 /Modules/FindOpenMP.cmake
parentb0207cec320673dcff29417ab689164de49ad8b0 (diff)
parent15da0ba3a2a9e637f5de69b4ea49c55916a2dedb (diff)
downloadCMake-fe4d6f1fd6a0af755e30e71430082667f9683e5e.zip
CMake-fe4d6f1fd6a0af755e30e71430082667f9683e5e.tar.gz
CMake-fe4d6f1fd6a0af755e30e71430082667f9683e5e.tar.bz2
Merge topic 'omp-oacc-werror-return-type'
15da0ba3 Find{OpenMP,OpenACC}: Fix detection with -Werror=return-type Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !1406
Diffstat (limited to 'Modules/FindOpenMP.cmake')
-rw-r--r--Modules/FindOpenMP.cmake5
1 files changed, 4 insertions, 1 deletions
diff --git a/Modules/FindOpenMP.cmake b/Modules/FindOpenMP.cmake
index a39a234..489476b 100644
--- a/Modules/FindOpenMP.cmake
+++ b/Modules/FindOpenMP.cmake
@@ -123,7 +123,9 @@ set(OpenMP_C_CXX_TEST_SOURCE
"
#include <omp.h>
int main() {
-#ifndef _OPENMP
+#ifdef _OPENMP
+ return 0;
+#else
breaks_on_purpose
#endif
}
@@ -273,6 +275,7 @@ const char ompver_str[] = { 'I', 'N', 'F', 'O', ':', 'O', 'p', 'e', 'n', 'M',
int main()
{
puts(ompver_str);
+ return 0;
}
")