diff --git a/examples/hello/bpWriter/CMakeLists.txt b/examples/hello/bpWriter/CMakeLists.txt index ffd7d017bcedc54808f4abc5ac19957db0a32394..3518b42787191b823fce4f840f9275693867b8f3 100644 --- a/examples/hello/bpWriter/CMakeLists.txt +++ b/examples/hello/bpWriter/CMakeLists.txt @@ -6,7 +6,7 @@ if(ADIOS_USE_MPI) find_package(MPI COMPONENTS C REQUIRED) add_executable(hello_bpWriter helloBPWriter.cpp) - target_include_directories(hello_bpWriter ${MPI_C_INCLUDE_PATH}) + target_include_directories(hello_bpWriter PRIVATE ${MPI_C_INCLUDE_PATH}) target_link_libraries(hello_bpWriter adios2 ${MPI_C_LIBRARIES}) endif() diff --git a/examples/hello/timeBP/CMakeLists.txt b/examples/hello/timeBP/CMakeLists.txt index 7a859cd13e127a4ad23fa7837c3bbfeb2bd6c8c9..a0e38282532c2bf6cd2c2c726a809e2dd2ea2cac 100644 --- a/examples/hello/timeBP/CMakeLists.txt +++ b/examples/hello/timeBP/CMakeLists.txt @@ -7,7 +7,7 @@ if(ADIOS_USE_MPI) find_package(MPI COMPONENTS C REQUIRED) add_executable(hello_timeBPWriter timeBPWriter.cpp) target_link_libraries(hello_timeBPWriter adios2) - target_include_directories(hello_timeBPWriter ${MPI_C_INCLUDE_PATH}) + target_include_directories(hello_timeBPWriter PRIVATE ${MPI_C_INCLUDE_PATH}) target_link_libraries(hello_timeBPWriter adios2 ${MPI_C_LIBRARIES}) endif()