Skip to content

Commit

Permalink
Change INTERFACE to PUBLIC in target_include_directories (NOAA-EMC#351)
Browse files Browse the repository at this point in the history
Included directories should be marked as PUBLIC so that the build includes the module directory.

INTERFACE means to only apply it only to libraries that consume the target, but UPP itself should also include its modules.
  • Loading branch information
kgerheiser authored Jul 28, 2021
1 parent f7874cb commit 10e24bf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion sorc/ncep_post.fd/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ add_library(${PROJECT_NAME}::${LIBNAME} ALIAS ${LIBNAME})
set_target_properties(${LIBNAME} PROPERTIES Fortran_MODULE_DIRECTORY
${module_dir})

target_include_directories(${LIBNAME} INTERFACE
target_include_directories(${LIBNAME} PUBLIC
$<BUILD_INTERFACE:${module_dir}>
$<INSTALL_INTERFACE:include>)

Expand Down

0 comments on commit 10e24bf

Please sign in to comment.