Merge topic 'FindOpenACC_set_found_variable'

9a6f74ffa2 FindOpenACC: Set OpenACC_FOUND when OpenACC is enabled for a language

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7437
This commit is contained in:
Brad King
2022-07-22 13:55:05 +00:00
committed by Kitware Robot
+10
View File
@@ -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()