Commit Graph

12 Commits

Author SHA1 Message Date
Brad King
5a77c2e02a FindOpenACC: Keep flags together in imported target usage requirements
If `OpenACC_C_FLAGS` contains `-h acc`, the flag pair needs to
be preserved as a shell command fragment, and must not be split by
de-duplication with other `target_compile_options`.

Fixes: #24963
2023-06-02 09:15:40 -04:00
Matthew Woehlke
41f7b1169a Modules: Use new SOURCES_FROM_* try_compile (2/2)
Modify some additional modules that ship with CMake to use the new
SOURCES_FROM_* arguments to try_compile / try_run as added by commits
cb14ae2b87 (try_compile: Add SOURCE_FROM_{ARG,VAR}, 2022-09-21) and
611d801790 (try_compile: Add SOURCE_FROM_FILE, 2022-09-22). This covers
modules that need to read and alter a template source file, which were
not addressed in the previous commit.

Note that FindOpenACC.cmake does not actually need configure_file
functionality; it appears to have inherited the (gratuitous) use thereof
from FindOpenMP.cmake, with which its code bears significant similarity.
2022-09-27 13:29:52 -04:00
Matthew Woehlke
2edf0fc6d7 Modules: Use new keyword-dispatched try_compile signature
Modify most of the modules that ship with CMake to use the new
try_compile / try_run signatures added by commit aa9220d3a0
(try_compile: Add keyword-dispatched signature, 2022-09-02). This
improves debugging by each invocation using its own directory so that
the results of multiple invocations can be retained.

This does not cover any invocations which provide an entire project, as
that flavor of try_compile has not yet been updated.
2022-09-14 07:52:16 -04:00
Robert Maynard
9a6f74ffa2 FindOpenACC: Set OpenACC_FOUND when OpenACC is enabled for a language 2022-07-13 08:58:51 -04:00
Tin Huynh
76dee5831b FindOpenACC: Add support for NVHPC compiler 2021-01-27 09:53:02 -05:00
Nikita Nemkin
8fea95319b Help: Add .. versionadded directives to module docs
Issue: #19715
2020-12-02 21:00:30 +05:00
Kitware Robot
496ec6036f Help: Add Sphinx 'versionadded' directives to each top-level document
Run the `Utilities/Sphinx/update_versions.py` script to add initial
markup to every top-level document and find module.

Issue: #19715
2020-07-06 10:23:20 -04:00
Ben Boeckel
be4d1bdf9a FPHSA: acknowledge the name mismatches in CMake-owned modules 2020-01-14 17:25:49 -05:00
Robert Maynard
f4fc0667ae FindOpenACC: Provide import targets and OpenACC_<lang>_OPTIONS variable
Previously the FindOpenACC module had issues where the contents of
OpenACC_<lang>_FLAGS could not be used with target_compile_options
when it contained multiple compiler flags.
2019-08-19 15:20:38 -04:00
Robert Maynard
9460501ad7 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.
2019-08-09 14:54:16 -04:00
Christian Pfeiffer
15da0ba3a2 Find{OpenMP,OpenACC}: Fix detection with -Werror=return-type
Explicitly return a value from `main` in our test sources.

Fixes: #17391
2017-10-24 10:55:06 -04:00
Tin Huynh
d3b6f29140 FindOpenACC: Add module to detect compiler support for OpenACC 2017-09-22 10:42:27 -04:00