1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62
|
include (GNUInstallDirs)
if (NOT CMAKE_RUNTIME_OUTPUT_DIRECTORY)
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/${CMAKE_INSTALL_BINDIR}")
endif ()
if (NOT CMAKE_LIBRARY_OUTPUT_DIRECTORY)
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/${CMAKE_INSTALL_LIBDIR}")
endif ()
set(mpi_definitions
MPICH_SKIP_MPICXX
OMPI_SKIP_MPICXX)
if (USE_CATALYST)
add_library(CachingExampleAdaptor
FEAdaptor.cxx
FEAdaptor.h
FEDataStructures.cxx
FEDataStructures.h)
target_link_libraries(CachingExampleAdaptor
INTERFACE
VTK::PythonUsed
PUBLIC
ParaView::PythonCatalyst
ParaView::RemotingServerManager
VTK::CommonCore
VTK::CommonDataModel
VTK::CommonSystem
VTK::FiltersGeneral
VTK::FiltersHybrid
VTK::IOXML
MPI::MPI_C)
target_compile_definitions(CachingExampleAdaptor
PUBLIC
${mpi_definitions})
endif ()
if (TARGET CachingExampleAdaptor)
add_executable(CachingExample
FEDriver.cxx)
target_link_libraries(CachingExample
PRIVATE
CachingExampleAdaptor
VTK::mpi)
else ()
find_package(ParaView REQUIRED)
add_executable(CachingExample
FEDriver.cxx
FEDataStructures.cxx
FEDataStructures.h)
target_link_libraries(CachingExample
PRIVATE
VTK::CommonSystem
VTK::CommonCore
MPI::MPI_C)
target_compile_definitions(CachingExample
PUBLIC
${mpi_definitions})
endif ()
if (BUILD_TESTING)
add_test(NAME CachingExampleTest COMMAND CachingExample ${CMAKE_CURRENT_SOURCE_DIR}/SampleScripts/exPostFactoMovie.py)
endif()
|