summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorRobert Maynard <rmaynard@nvidia.com>2022-07-01 18:08:17 (GMT)
committerRobert Maynard <rmaynard@nvidia.com>2022-07-13 12:58:51 (GMT)
commit9a6f74ffa284762f5489392113f55ad6357fa037 (patch)
treea29a04e35402a376ae7d2ef234f6419f825cc793 /Modules
parent6a35e799fd8742fa875c304daed2784a1ce9d710 (diff)
downloadCMake-9a6f74ffa284762f5489392113f55ad6357fa037.zip
CMake-9a6f74ffa284762f5489392113f55ad6357fa037.tar.gz
CMake-9a6f74ffa284762f5489392113f55ad6357fa037.tar.bz2
FindOpenACC: Set OpenACC_FOUND when OpenACC is enabled for a language
Diffstat (limited to 'Modules')
-rw-r--r--Modules/FindOpenACC.cmake10
1 files changed, 10 insertions, 0 deletions
diff --git a/Modules/FindOpenACC.cmake b/Modules/FindOpenACC.cmake
index cf58f3b..71bd84f 100644
--- a/Modules/FindOpenACC.cmake
+++ b/Modules/FindOpenACC.cmake
@@ -27,6 +27,13 @@ The module provides :prop_tgt:`IMPORTED` targets:
Variables
^^^^^^^^^
+The module defines the following variables:
+
+``OpenACC_FOUND``
+ .. versionadded:: 3.25
+
+ Variable indicating that OpenACC flags for at least one languages have been found.
+
This module will set the following variables per language in your
project, where ``<lang>`` is one of C, CXX, or Fortran:
@@ -270,6 +277,9 @@ foreach (LANG IN ITEMS C CXX Fortran)
REQUIRED_VARS OpenACC_${LANG}_FLAGS
VERSION_VAR OpenACC_${LANG}_VERSION
)
+ if(OpenACC_${LANG}_FOUND)
+ set(OpenACC_FOUND TRUE)
+ endif()
endif()
endforeach()