diff --git a/CMakeLists.txt b/CMakeLists.txt index 4168fa4..9eb3db8 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -108,11 +108,12 @@ foreach(prec dp sp) TARGET ${LIBNAME}_${prec} SOURCES ${srcs} DEFINITIONS $<$:${FIELD_API_DEFINITIONS}> + PUBLIC_LIBS + $<${HAVE_ACC}:OpenACC::OpenACC_Fortran> PRIVATE_LIBS $<${fiat_FOUND}:fiat> $<${fiat_FOUND}:parkind_${prec}> OpenMP::OpenMP_Fortran - $<${HAVE_ACC}:OpenACC::OpenACC_Fortran> ) target_include_directories( ${LIBNAME}_${prec} PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}) set_property(TARGET ${LIBNAME}_${prec} PROPERTY C_STANDARD 99) diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index a68c86d..fdf193a 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -16,7 +16,6 @@ ecbuild_add_test( parkind_dp fiat OpenMP::OpenMP_Fortran - $<${HAVE_ACC}:OpenACC::OpenACC_Fortran> ) ## Unit tests @@ -53,7 +52,6 @@ foreach(TEST_FILE ${TEST_FILES}) parkind_dp fiat OpenMP::OpenMP_Fortran - $<${HAVE_ACC}:OpenACC::OpenACC_Fortran> ) set_target_properties(${TEST_NAME}.x