Files
CMake/Tests/FindOpenACC/FortranTest/CMakeLists.txt
T
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

12 lines
399 B
CMake

cmake_minimum_required(VERSION 3.14)
project(VerifyFindOpenAcc Fortran)
find_package(OpenACC REQUIRED)
add_executable(UsesOpenACC main.f90)
target_link_libraries(UsesOpenACC PRIVATE OpenACC::OpenACC_Fortran)
add_executable(UsesOpenACCVars main.f90)
target_link_options(UsesOpenACCVars PRIVATE ${OpenACC_Fortran_OPTIONS})
target_compile_options(UsesOpenACCVars PRIVATE ${OpenACC_Fortran_OPTIONS})