CMakeLists.txt 1.87 KB
Newer Older
Berk Geveci's avatar
Berk Geveci committed
1
2
PROJECT (AMR)

3
IF(NOT VTK_BINARY_DIR)
4
5
6
7
FIND_PACKAGE(VTK REQUIRED)
IF(NOT VTK_USE_RENDERING)
  MESSAGE(FATAL_ERROR "Example ${PROJECT_NAME} requires VTK_USE_RENDERING.")
ENDIF(NOT VTK_USE_RENDERING)
8
INCLUDE(${VTK_USE_FILE})
9
ENDIF(NOT VTK_BINARY_DIR)
Berk Geveci's avatar
Berk Geveci committed
10

11
12
13
14
15
16
17
18
19
IF (VTK_USE_MPI)
  INCLUDE_DIRECTORIES("${MPI_INCLUDE_PATH} ${VTK_USE_FILE}")
  IF (MPI_LIBRARY) 
    SET(MPI_LIBRARIES ${MPI_LIBRARY})   
  ENDIF (MPI_LIBRARY)   
  IF (MPI_EXTRA_LIBRARY)   
    SET(MPI_LIBRARIES ${MPI_LIBRARIES} "${MPI_EXTRA_LIBRARY}")   
  ENDIF (MPI_EXTRA_LIBRARY) 
  
20
  ADD_DEFINITIONS("-DMPICH_IGNORE_CXX_SEEK -DASSERT_ON")
21
22
23
24

ENDIF (VTK_USE_MPI)


25
## Add HierarchicalBoxPipeline executable
26
ADD_EXECUTABLE(HierarchicalBoxPipeline HierarchicalBoxPipeline.cxx)
Berk Geveci's avatar
Berk Geveci committed
27
TARGET_LINK_LIBRARIES(HierarchicalBoxPipeline vtkRendering vtkIO)
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
## Add AMR examples 
IF (VTK_USE_PARALLEL AND VTK_USE_MPI )
  ADD_EXECUTABLE( Generate3DAMRDataSetWithPulse Generate3DAMRDataSetWithPulse.cxx)
  TARGET_LINK_LIBRARIES( Generate3DAMRDataSetWithPulse
                         vtkGraphics
                         vtkFiltering
                         vtkRendering
                         vtkIO
                         vtkAMR
                         vtkParallel
                         ${MPI_LIBRARIES} 
                         ${VTK_HDF5_LIBRARIES}
                         )
                                                
  ADD_EXECUTABLE( Generate2DAMRDataSetWithPulse Generate2DAMRDataSetWithPulse.cxx)
  TARGET_LINK_LIBRARIES( Generate2DAMRDataSetWithPulse
                         vtkGraphics
                         vtkFiltering
                         vtkRendering
                         vtkIO
                         vtkAMR
                         vtkParallel
                         ${MPI_LIBRARIES} 
                         ${VTK_HDF5_LIBRARIES}
                         )
ENDIF (VTK_USE_PARALLEL AND VTK_USE_MPI)