From 00da2cb7732764a65464082af8b512309c98553b Mon Sep 17 00:00:00 2001 From: David Schneller Date: Tue, 2 Jul 2024 21:22:10 +0200 Subject: [PATCH] Fix CMake script --- CMakeLists.txt | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 3240ce7..3f6cc93 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -46,6 +46,9 @@ if( USE_MPI ) # Use MPI add_definitions( -DUSE_MPI ) + + target_include_directories(ASYNC SYSTEM INTERFACE ${MPI_CXX_INCLUDE_PATH}) + target_link_libraries(ASYNC INTERFACE MPI::MPI_C) endif( USE_MPI ) # Threads @@ -55,9 +58,9 @@ find_package( Threads REQUIRED ) enable_testing() # Make sure we find the header files -include_directories( ${CMAKE_SOURCE_DIR} ) +target_include_directories(ASYNC PUBLIC ${CMAKE_SOURCE_DIR} ) # Submodules -include_directories( ${CMAKE_SOURCE_DIR}/submodules ) +target_include_directories(ASYNC PUBLIC ${CMAKE_SOURCE_DIR}/submodules ) add_subdirectory( tests )