From 5fed28bad8ef24421363f956362cd403925f4d99 Mon Sep 17 00:00:00 2001 From: Rodrigo Arias Date: Mon, 15 Nov 2021 17:29:26 +0100 Subject: [PATCH] Use modern target-based dependency for MPI --- CMakeLists.txt | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 05f4aa0..5d8c659 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -87,9 +87,7 @@ endif() find_package(MPI REQUIRED) add_executable(ovnisync ovnisync.c) -target_include_directories(ovnisync PRIVATE ${MPI_C_INCLUDE_PATH}) -target_compile_options(ovnisync PRIVATE ${MPI_C_COMPILE_FLAGS}) -target_link_libraries(ovnisync m ${MPI_C_LIBRARIES} ${MPI_C_LINK_FLAGS}) +target_link_libraries(ovnisync m MPI::MPI_C) install(TARGETS ovni LIBRARY) install(TARGETS emu dump ovni2prv ovnisync RUNTIME)