Skip to content

Commit

Permalink
Merge pull request #4 from GEOS-ESM/develop
Browse files Browse the repository at this point in the history
Develop
  • Loading branch information
tclune authored Jul 3, 2019
2 parents c1cf441 + 320937a commit 2e56286
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
3 changes: 3 additions & 0 deletions esma.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,11 @@ endif()

# Bring in ecbuild
list (APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}/@ecbuild/cmake")
set (BUILD_SHARED_LIBS OFF)
set (ECBUILD_2_COMPAT_VALUE OFF)
include (ecbuild_system NO_POLICY_SCOPE)


list (APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}/check_compiler_support")
include ("${CMAKE_Fortran_COMPILER_ID}")
include (check_fortran_support)
Expand Down
7 changes: 4 additions & 3 deletions esma_add_library.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,8 @@ macro (esma_add_library this)
set (install_dir include/${this})
# Export target include directories for other targets
target_include_directories(${this} PUBLIC
${CMAKE_CURRENT_SOURCE_DIR}
${CMAKE_CURRENT_BINARY_DIR} # stubs
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>
$<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR}> # stubs
# modules and copied *.h, *.inc
$<BUILD_INTERFACE:${esma_include}/${this}>
$<INSTALL_INTERFACE:${install_dir}>
Expand All @@ -79,9 +79,10 @@ macro (esma_add_library this)
endif ()

if (ARGS_INCLUDES)
target_include_directories(${this} PUBLIC ${ARGS_INCLUDES})
target_include_directories(${this} PUBLIC $<BUILD_INTERFACE:${ARGS_INCLUDES}>)
endif ()

# The following possibly duplicates logic that is already in the ecbuild layer
install (DIRECTORY ${esma_include}/${this}/ DESTINATION include/${this})

endmacro ()

0 comments on commit 2e56286

Please sign in to comment.