diff --git a/src/ecwam/CMakeLists.txt b/src/ecwam/CMakeLists.txt index d03eed952..7d43f003a 100644 --- a/src/ecwam/CMakeLists.txt +++ b/src/ecwam/CMakeLists.txt @@ -455,6 +455,11 @@ ecbuild_add_library( PUBLIC_DEFINITIONS ${ECWAM_DEFINITIONS} ) +# Workaround for import scoping bug in nvhpc +get_target_property(FIELD_API_INCLUDE_DIRS field_api_${prec} INTERFACE_INCLUDE_DIRECTORIES) +target_include_directories( ${ecwam} INTERFACE $ ) +target_include_directories( ${ecwam} INTERFACE $ ) + ecwam_target_fortran_module_directory( TARGET ${ecwam} MODULE_DIRECTORY ${CMAKE_BINARY_DIR}/module/${ecwam} diff --git a/src/programs/CMakeLists.txt b/src/programs/CMakeLists.txt index 050fe57fe..53757729a 100644 --- a/src/programs/CMakeLists.txt +++ b/src/programs/CMakeLists.txt @@ -17,7 +17,7 @@ foreach( program ecbuild_add_executable( TARGET ${PROJECT_NAME}-${program} SOURCES ${program}.F90 - LIBS ${PROJECT_NAME} ${OpenMP_Fortran_LIBRARIES} $<${HAVE_ACC}:OpenACC::OpenACC_Fortran> field_api_${prec} + LIBS ${PROJECT_NAME} ${OpenMP_Fortran_LIBRARIES} $<${HAVE_ACC}:OpenACC::OpenACC_Fortran> LINKER_LANGUAGE Fortran ) ecwam_target_compile_definitions_FILENAME(${PROJECT_NAME}-${program})