diff options
author | Brad King <brad.king@kitware.com> | 2017-10-24 14:56:36 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2017-10-24 14:56:36 (GMT) |
commit | b305e81b3e7e517cb445a4d0dfba127a3e563170 (patch) | |
tree | 6a2f6c3fc2a283e37742aed25ce0b8977694f3c3 | |
parent | 143b2e7b21a1b58a1737a1413beaf49004b9577c (diff) | |
parent | 15da0ba3a2a9e637f5de69b4ea49c55916a2dedb (diff) | |
download | CMake-b305e81b3e7e517cb445a4d0dfba127a3e563170.zip CMake-b305e81b3e7e517cb445a4d0dfba127a3e563170.tar.gz CMake-b305e81b3e7e517cb445a4d0dfba127a3e563170.tar.bz2 |
Merge branch 'omp-oacc-werror-return-type' into release-3.10
Merge-request: !1406
-rw-r--r-- | Modules/FindOpenACC.cmake | 9 | ||||
-rw-r--r-- | Modules/FindOpenMP.cmake | 5 |
2 files changed, 11 insertions, 3 deletions
diff --git a/Modules/FindOpenACC.cmake b/Modules/FindOpenACC.cmake index 775cc18..dc8321d 100644 --- a/Modules/FindOpenACC.cmake +++ b/Modules/FindOpenACC.cmake @@ -49,7 +49,9 @@ be returned with OpenACC_<lang>_FLAGS. set(OpenACC_C_CXX_TEST_SOURCE " int main(){ -#ifndef _OPENACC +#ifdef _OPENACC + return 0; +#else breaks_on_purpose #endif } @@ -58,7 +60,9 @@ int main(){ set(OpenACC_Fortran_TEST_SOURCE " program test -#ifndef _OPENACC +#ifdef _OPENACC + return 0; +#else breaks_on_purpose #endif endprogram test @@ -79,6 +83,7 @@ const char accver_str[] = { 'I', 'N', 'F', 'O', ':', 'O', 'p', 'e', 'n', 'A', int main() { puts(accver_str); + return 0; } ") set(OpenACC_Fortran_CHECK_VERSION_SOURCE 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; } ") |