Skip to content

Commit 198c0a1

Browse files
committed
Merge branch 'atmosphere/cmake_framework' into develop (PR #1366)
This merge fixes a CMake build failure by adding src/framework to the list of include file search paths. With merge commit 55c737f (PR #1359), the file mpas_halo_interface.inc from the src/framework directory was included by several files in the atmosphere core via preprocessing directives. While the Makefile files under src/core_atmosphere already contained the framework directory in the list of search paths for include files, the CMakeLists.txt files did not, resulting in a build failure when compiling the atmosphere core with CMake. To address the build error, the CMakeLists.txt file for src/framework now exports its source directory as an interface include directory, adding that directory to the compilation include path for any target that links against framework. * atmosphere/cmake_framework: Add src/framework to list of include directories when building with CMake
2 parents 55c737f + 42b5d79 commit 198c0a1

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

src/framework/CMakeLists.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,9 @@ if (MPAS_PROFILE)
6969
list(APPEND FRAMEWORK_LINK_LIBRARIES GPTL::GPTL)
7070
endif ()
7171
target_link_libraries(framework PUBLIC ${FRAMEWORK_LINK_LIBRARIES})
72+
target_include_directories(framework INTERFACE
73+
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>
74+
$<INSTALL_INTERFACE:include/framework>)
7275

7376
install(TARGETS framework EXPORT ${PROJECT_NAME}Exports
7477
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}

0 commit comments

Comments
 (0)