diff --git a/examples/heatTransfer/CMakeLists.txt b/examples/heatTransfer/CMakeLists.txt index 86a5f7fb248cf56adcb2d9b1809717c591097b1c..f6c932be42dd7223d5e08f12a3eb710d4947a433 100644 --- a/examples/heatTransfer/CMakeLists.txt +++ b/examples/heatTransfer/CMakeLists.txt @@ -3,10 +3,5 @@ # accompanying file Copyright.txt for details. #------------------------------------------------------------------------------# - -if(ADIOS2_HAVE_ADIOS1) - add_subdirectory(write) - add_subdirectory(read) -endif() - - +add_subdirectory(write) +add_subdirectory(read) \ No newline at end of file diff --git a/examples/heatTransfer/read/CMakeLists.txt b/examples/heatTransfer/read/CMakeLists.txt index ce72b19ab07fb5da36e47ec3523bb88f73054419..5691e81b41f61d55ba77f41243a350d6bc7c4f47 100644 --- a/examples/heatTransfer/read/CMakeLists.txt +++ b/examples/heatTransfer/read/CMakeLists.txt @@ -5,7 +5,11 @@ if(ADIOS2_HAVE_MPI) + if(ADIOS2_HAVE_ADIOS1) + find_package(MPI COMPONENTS C REQUIRED) + find_package(ADIOS1 REQUIRED) + add_executable(heatTransfer_read_adios2 heatRead_adios2.cpp PrintData.cpp) target_include_directories(heatTransfer_read_adios2 PRIVATE ${MPI_C_INCLUDE_PATH} @@ -13,9 +17,6 @@ if(ADIOS2_HAVE_MPI) target_link_libraries(heatTransfer_read_adios2 adios2 ${MPI_C_LIBRARIES} ) - - if(ADIOS2_HAVE_ADIOS1) - find_package(ADIOS1 REQUIRED) add_executable(heatTransfer_read_adios1 heatRead_adios1.cpp PrintData.cpp) target_include_directories(heatTransfer_read_adios1 @@ -26,5 +27,4 @@ if(ADIOS2_HAVE_MPI) ) endif() -endif() - +endif() \ No newline at end of file