diff options
author | Robert Maynard <robert.maynard@kitware.com> | 2019-07-30 15:01:57 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2019-08-19 19:20:38 (GMT) |
commit | f4fc0667ae406c8f6b4c3e22a73ae4a7a075404b (patch) | |
tree | af34a92c3d13d3230f208b9f6f76513052e2d0b0 /Tests/FindOpenACC/CTest/CMakeLists.txt | |
parent | 9460501ad7353e6eecdf42d56568c1f909f64e27 (diff) | |
download | CMake-f4fc0667ae406c8f6b4c3e22a73ae4a7a075404b.zip CMake-f4fc0667ae406c8f6b4c3e22a73ae4a7a075404b.tar.gz CMake-f4fc0667ae406c8f6b4c3e22a73ae4a7a075404b.tar.bz2 |
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.
Diffstat (limited to 'Tests/FindOpenACC/CTest/CMakeLists.txt')
-rw-r--r-- | Tests/FindOpenACC/CTest/CMakeLists.txt | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/Tests/FindOpenACC/CTest/CMakeLists.txt b/Tests/FindOpenACC/CTest/CMakeLists.txt new file mode 100644 index 0000000..c8d0968 --- /dev/null +++ b/Tests/FindOpenACC/CTest/CMakeLists.txt @@ -0,0 +1,13 @@ +cmake_minimum_required(VERSION 3.14) +project(VerifyFindOpenAcc C) + +set(CMAKE_C_STANDARD 11) + +find_package(OpenACC REQUIRED) + +add_executable(UsesOpenACC main.c) +target_link_libraries(UsesOpenACC PRIVATE OpenACC::OpenACC_C) + +add_executable(UsesOpenACCVars main.c) +target_link_options(UsesOpenACCVars PRIVATE ${OpenACC_C_OPTIONS}) +target_compile_options(UsesOpenACCVars PRIVATE ${OpenACC_C_OPTIONS}) |