Use <PackageName>_ROOT variables if possible

This commit is contained in:
Rodrigo Arias 2021-11-15 16:25:51 +01:00
parent dd8519f6e6
commit 77adb27cb9

View File

@ -79,6 +79,12 @@ add_executable(ovni2prv
parson.c parson.c
) )
# Use <PackageName>_ROOT variables if available, commonly used by MPI
# installations
if(POLICY CMP0074)
cmake_policy(SET CMP0074 NEW)
endif()
find_package(MPI REQUIRED) find_package(MPI REQUIRED)
add_executable(ovnisync ovnisync.c) add_executable(ovnisync ovnisync.c)
target_include_directories(ovnisync PRIVATE ${MPI_C_INCLUDE_PATH}) target_include_directories(ovnisync PRIVATE ${MPI_C_INCLUDE_PATH})