diff options
author | Robert Maynard <robert.maynard@kitware.com> | 2019-08-09 18:49:34 (GMT) |
---|---|---|
committer | Robert Maynard <robert.maynard@kitware.com> | 2019-08-09 18:54:16 (GMT) |
commit | 9460501ad7353e6eecdf42d56568c1f909f64e27 (patch) | |
tree | 48ee3d4fa9ca5c9857d8ab57461bd1d8654bbbc4 | |
parent | 38a5b0203fe116268afbdb8d82fc8d89c3b213f2 (diff) | |
download | CMake-9460501ad7353e6eecdf42d56568c1f909f64e27.zip CMake-9460501ad7353e6eecdf42d56568c1f909f64e27.tar.gz CMake-9460501ad7353e6eecdf42d56568c1f909f64e27.tar.bz2 |
FindOpenACC: Provide a Fortran snippet that compiles with gfortran
The original Fortran snippet would fail to compile with the error
message of:
```
return 0;
1
Error: Alternate RETURN statement at (1) is only allowed within a SUBROUTINE
```
We solve this by removing the early termination logic.
-rw-r--r-- | Modules/FindOpenACC.cmake | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/Modules/FindOpenACC.cmake b/Modules/FindOpenACC.cmake index dc8321d..1f0238e 100644 --- a/Modules/FindOpenACC.cmake +++ b/Modules/FindOpenACC.cmake @@ -60,9 +60,7 @@ int main(){ set(OpenACC_Fortran_TEST_SOURCE " program test -#ifdef _OPENACC - return 0; -#else +#ifndef _OPENACC breaks_on_purpose #endif endprogram test |