File: CMakeLists.txt

package info (click to toggle)
paraview 5.13.2%2Bdfsg-3
  • links: PTS, VCS
  • area: main
  • in suites: sid, trixie
  • size: 544,220 kB
  • sloc: cpp: 3,374,605; ansic: 1,332,409; python: 150,381; xml: 122,166; sql: 65,887; sh: 7,317; javascript: 5,262; yacc: 4,417; java: 3,977; perl: 2,363; lex: 1,929; f90: 1,397; makefile: 170; objc: 153; tcl: 59; pascal: 50; fortran: 29
file content (132 lines) | stat: -rw-r--r-- 4,454 bytes parent folder | download
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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
cmake_minimum_required(VERSION 3.8)
project(ParaViewExamples)

if (ParaView_BINARY_DIR)
  set(paraview_catalyst_directory "")
  if (TARGET ParaView::catalyst-paraview)
    get_property(paraview_catalyst_directory GLOBAL
      PROPERTY paraview_catalyst_directory)
  endif ()

  function (add_example dir)
    cmake_parse_arguments(arg "" "TEST_TIMEOUT" "" ${ARGN})
    if (arg_UNPARSED_ARGUMENTS)
      message(FATAL_ERROR "Unknown arguments passed to 'add_example': ${arg_UNPARSED_ARGUMENTS}")
    endif()

    add_test(
      NAME    "ParaViewExample-${dir}"
      COMMAND "${CMAKE_COMMAND}"
              "-Dconfig=$<CONFIGURATION>"
              "-Dgenerator=${CMAKE_GENERATOR}"
              "-Dsource=${CMAKE_CURRENT_SOURCE_DIR}"
              "-Dbinary=${CMAKE_CURRENT_BINARY_DIR}"
              "-Dexample_dir=${dir}"
              "-Dbuild_type=${CMAKE_BUILD_TYPE}"
              "-Dshared=${BUILD_SHARED_LIBS}"
              "-Dparaview_dir=${paraview_cmake_build_dir}"
              "-Dctest=${CMAKE_CTEST_COMMAND}"
              "-Dplatform=${CMAKE_GENERATOR_PLATFORM}"
              "-Dtoolset=${CMAKE_GENERATOR_TOOLSET}"
              "-Dparaview_binary_dir=${CMAKE_RUNTIME_OUTPUT_DIRECTORY}"
              "-Dcatalyst_DIR=${catalyst_DIR}"
              "-Dparaview_catalyst_dir=${ParaView_BINARY_DIR}/${paraview_catalyst_directory}"
              -P "${CMAKE_CURRENT_LIST_DIR}/RunExample.cmake")
    set_property(TEST "ParaViewExample-${dir}" APPEND
      PROPERTY
        SKIP_REGULAR_EXPRESSION "Skipping example")

    if (arg_TEST_TIMEOUT)
      # override timeout, if specified.
      set_property(TEST "ParaViewExample-${dir}"
        PROPERTY
          TIMEOUT "${arg_TEST_TIMEOUT}")
    endif()
  endfunction ()
else ()
  if (NOT BUILD_SHARED_LIBS)
    set(CMAKE_JOB_POOL_LINK static_exe_link)
    set_property(GLOBAL APPEND PROPERTY
      JOB_POOLS "${CMAKE_JOB_POOL_LINK}=1")
  endif ()

  find_package(ParaView REQUIRED)
  include(CTest)
  enable_testing()

  macro (add_example dir)
    add_subdirectory("${dir}")
  endmacro ()
endif ()

add_example(Plugins/AddPQProxy)
add_example(Plugins/Autostart)
add_example(Plugins/ComplexPluginArchitecture)
add_example(Plugins/ContextMenu)
add_example(Plugins/DynamicInitializer)
add_example(Plugins/DockWidget)
add_example(Plugins/DockWidgetCustomProxy)
if (TARGET ParaView::RemotingMisc)
  add_example(Plugins/ElevationFilter)
endif ()
add_example(Plugins/GUIMyToolBar)
add_example(Plugins/LagrangianIntegrationModel)
add_example(Plugins/LiveSource)
add_example(Plugins/MyPNGReader)
add_example(Plugins/MyTiffWriter)
add_example(Plugins/OverrideXMLOnly)
add_example(Plugins/PropertyWidgets)
add_example(Plugins/RegistrationName)
add_example(Plugins/ReaderXMLOnly)
add_example(Plugins/Representation)
# TODO: update this plugin to use the pipeline controller instead.
#add_example(Plugins/RepresentationBehavior)
add_example(Plugins/SMParametricSource)
add_example(Plugins/SMMyProxy)
add_example(Plugins/ServerSideQt)
add_example(Plugins/SourceToolbar)
# add_example(Plugins/VisItReader)

add_example(CustomApplications/Clone1)
add_example(CustomApplications/Clone2)
add_example(CustomApplications/Demo0)
add_example(CustomApplications/Demo1)
add_example(CustomApplications/MultiServerClient)
add_example(CustomApplications/SimpleParaView)
add_example(CustomApplications/Spreadsheet)

# increate timeout for this test since it builds multiple executables
# which be timeconsuming on static builds.
add_example(Catalyst
  TEST_TIMEOUT 600)

if (TARGET VTK::IOCatalystConduit)
  add_example(Catalyst2/CFullExample)
  add_example(Catalyst2/CxxFullExample)
  add_example(Catalyst2/CxxImageDataExample)
  add_example(Catalyst2/CxxMultiChannelInputExample)
  add_example(Catalyst2/CxxOverlappingAMRExample)
  add_example(Catalyst2/CxxPolyhedra)
  add_example(Catalyst2/CxxMultimesh)
  add_example(Catalyst2/CxxSteeringExample)
  if (TARGET catalyst::catalyst_fortran)
    add_example(Catalyst2/Fortran90FullExample)
  endif ()
  if (Python3_EXECUTABLE)
    add_example(Catalyst2/PythonFullExample)
    add_example(Catalyst2/PythonSteeringExample)
  endif ()
endif ()

add_example(UseParaView/Incubator)
add_example(UseParaView/NoIncubator)

add_custom_target(paraview-examples
  COMMAND
    "${CMAKE_CTEST_COMMAND}"
    --test-dir "${CMAKE_BINARY_DIR}"
    --tests-regex "ParaViewExample-"
    --extra-verbose
    -C "$<CONFIGURATION>"
  USES_TERMINAL
  COMMENT "Running ParaView Examples")