Newer
Older
cmake_minimum_required(VERSION 3.11)
set(CMAKE_CXX_STANDARD 17)
include(FetchContent)
FetchContent_Declare(
pybind11
GIT_REPOSITORY https://github.com/pybind/pybind11.git
)
FetchContent_GetProperties(pybind11)
if(NOT pybind11_POPULATED)
FetchContent_Populate(pybind11)
add_subdirectory(${pybind11_SOURCE_DIR} ${pybind11_BINARY_DIR})
endif()
pybind11_add_module(pygio_new genericio.cpp)
set_target_properties(pygio_new PROPERTIES OUTPUT_NAME pygio)
if(MPI_FOUND)
target_link_libraries(pygio_new PRIVATE genericio_mpi)
else()
target_link_libraries(pygio_new PRIVATE genericio)
endif()