mirror of
https://github.com/Kitware/CMake.git
synced 2026-04-29 18:51:05 -05:00
f4fc0667ae
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.
14 lines
411 B
CMake
14 lines
411 B
CMake
cmake_minimum_required(VERSION 3.14)
|
|
project(VerifyFindOpenAcc CXX)
|
|
|
|
set(CMAKE_CXX_STANDARD 11)
|
|
|
|
find_package(OpenACC REQUIRED)
|
|
|
|
add_executable(UsesOpenACC main.cxx)
|
|
target_link_libraries(UsesOpenACC PRIVATE OpenACC::OpenACC_CXX)
|
|
|
|
add_executable(UsesOpenACCVars main.cxx)
|
|
target_link_options(UsesOpenACCVars PRIVATE ${OpenACC_CXX_OPTIONS})
|
|
target_compile_options(UsesOpenACCVars PRIVATE ${OpenACC_CXX_OPTIONS})
|