CMakeLists.txt 1.67 KB
Newer Older
Burlen Loring's avatar
Burlen Loring committed
1
2
if (ENABLE_SENSEI)
  message(STATUS "Enabled: sensei library")
3

Burlen Loring's avatar
Burlen Loring committed
4
5
6
  set(sensei_sources AnalysisAdaptor.cxx Autocorrelation.cxx
    ConfigurableAnalysis.cxx DataAdaptor.cxx DataRequirements.cxx
    Histogram.cxx Error.cxx ProgrammableDataAdaptor.cxx VTKHistogram.cxx
Burlen Loring's avatar
Burlen Loring committed
7
    VTKDataAdaptor.cxx VTKUtils.cxx)
8

Burlen Loring's avatar
Burlen Loring committed
9
  set(sensei_libs mpi pugixml vtk thread ArrayIO timer diy grid)
10

Burlen Loring's avatar
Burlen Loring committed
11
12
13
  if(ENABLE_CATALYST)
    list(APPEND sensei_sources CatalystAnalysisAdaptor.cxx
      CatalystSlice.cxx CatalystUtilities.cxx)
14
15
  endif()

Burlen Loring's avatar
Burlen Loring committed
16
  if(ENABLE_ADIOS)
17
18
    list(APPEND sensei_sources ADIOSSchema.cxx
      ADIOSAnalysisAdaptor.cxx ADIOSDataAdaptor.cxx)
Burlen Loring's avatar
Burlen Loring committed
19
    list(APPEND sensei_libs adios)
20
  endif()
Burlen Loring's avatar
Burlen Loring committed
21

22
23
24
25
26
27
  if(ENABLE_VTK_M)
    list(APPEND sensei_sources
      VTKmContourAnalysis.cxx
      VTKmContourAnalysis.h)
  endif()

Burlen Loring's avatar
Burlen Loring committed
28
29
30
31
  if(ENABLE_LIBSIM)
    list(APPEND sensei_sources LibsimAnalysisAdaptor.cxx
      LibsimImageProperties.cxx)
    list(APPEND sensei_libs libsim)
Burlen Loring's avatar
Burlen Loring committed
32
  endif()
Burlen Loring's avatar
Burlen Loring committed
33
34

  if(ENABLE_VTK_XMLP)
Burlen Loring's avatar
Burlen Loring committed
35
    list(APPEND sensei_sources VTKPosthocIO.cxx VTKAmrWriter.cxx)
36
37
  endif()

Burlen Loring's avatar
Burlen Loring committed
38
  add_library(sensei ${sensei_sources})
39

Burlen Loring's avatar
Burlen Loring committed
40
41
42
  target_include_directories(sensei PUBLIC
    $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>
    $<INSTALL_INTERFACE:include>)
43

Burlen Loring's avatar
Burlen Loring committed
44
  target_link_libraries(sensei PUBLIC ${sensei_libs})
45

46
47
48
49
  if (ENABLE_VTK_M)
    target_compile_definitions(sensei PUBLIC ENABLE_VTK_M)
  endif()

Burlen Loring's avatar
Burlen Loring committed
50
51
52
53
54
  install(DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/"
    DESTINATION include FILES_MATCHING PATTERN "*.h")

  install(TARGETS sensei EXPORT sensei INCLUDES DESTINATION include
    ARCHIVE DESTINATION lib LIBRARY DESTINATION lib)
Burlen Loring's avatar
Burlen Loring committed
55

Burlen Loring's avatar
Burlen Loring committed
56
57
  install(EXPORT sensei DESTINATION lib/cmake
    EXPORT_LINK_INTERFACE_LIBRARIES)
58

59
  add_subdirectory(testing)
Burlen Loring's avatar
Burlen Loring committed
60
endif()