From 9460501ad7353e6eecdf42d56568c1f909f64e27 Mon Sep 17 00:00:00 2001 From: Robert Maynard Date: Fri, 9 Aug 2019 14:49:34 -0400 Subject: 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. --- Modules/FindOpenACC.cmake | 4 +--- 1 file changed, 1 insertion(+), 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 -- cgit v0.12