| 1 |
# SPDX-FileCopyrightText: 2026 Oak Ridge National Laboratory and Contributors |
| 2 |
# |
| 3 |
# SPDX-License-Identifier: Apache-2.0 |
| 4 |
|
| 5 |
#------------------------------------------------------------------------------# |
| 6 |
# Distributed under the OSI-approved Apache License, Version 2.0. See |
| 7 |
# accompanying file Copyright.txt for details. |
| 8 |
#------------------------------------------------------------------------------# |
| 9 |
|
| 10 |
cmake_minimum_required(VERSION 3.12) |
| 11 |
project(ADIOS2SimulationsHeatTransferReadExample) |
| 12 |
|
| 13 |
set(maybe_standalone_project OFF) |
| 14 |
if(NOT TARGET adios2_core) |
| 15 |
set(maybe_standalone_project ON) |
| 16 |
set(_components C CXX) |
| 17 |
|
| 18 |
find_package(MPI COMPONENTS ${_components}) |
| 19 |
if(MPI_FOUND) |
| 20 |
# Workaround for various MPI implementations forcing the link of C++ bindings |
| 21 |
add_definitions(-DOMPI_SKIP_MPICXX -DMPICH_SKIP_MPICXX) |
| 22 |
|
| 23 |
list(APPEND _components MPI) |
| 24 |
endif() |
| 25 |
|
| 26 |
find_package(ADIOS2 REQUIRED COMPONENTS ${_components}) |
| 27 |
endif() |
| 28 |
|
| 29 |
if(ADIOS2_HAVE_MPI) |
| 30 |
add_executable(adios2_simulations_heatTransferRead |
| 31 |
heatRead.cpp |
| 32 |
PrintDataStep.h |
| 33 |
ReadSettings.cpp |
| 34 |
) |
| 35 |
target_link_libraries(adios2_simulations_heatTransferRead adios2::cxx_mpi MPI::MPI_CXX) |
| 36 |
if (maybe_standalone_project) |
| 37 |
install(TARGETS adios2_simulations_heatTransferRead RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}) |
| 38 |
endif() |
| 39 |
endif() |