File: CMakeLists.txt

package info (click to toggle)
sundials 6.4.1%2Bdfsg1-3
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 79,368 kB
  • sloc: ansic: 218,700; f90: 62,503; cpp: 61,511; fortran: 5,166; python: 4,642; sh: 4,114; makefile: 562; perl: 123
file content (63 lines) | stat: -rw-r--r-- 1,727 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
# ------------------------------------------------------------------------------
# Programmer(s): David J. Gardner @ LLNL
# ------------------------------------------------------------------------------
# SUNDIALS Copyright Start
# Copyright (c) 2002-2022, Lawrence Livermore National Security
# and Southern Methodist University.
# All rights reserved.
#
# See the top-level LICENSE and NOTICE files for details.
#
# SPDX-License-Identifier: BSD-3-Clause
# SUNDIALS Copyright End
# ------------------------------------------------------------------------------

# Example lists are tuples "name\;args\;type"

# Examples that support CPU and GPU Ginkgo backends
set(cpu_gpu_examples
  "cv_heat2D_ginkgo.cpp\;\;develop")

sundials_add_examples_ginkgo(cpu_gpu_examples
  TARGETS sundials_cvode
  BACKENDS REF OMP CUDA HIP)

# Examples that only support CPU Ginkgo backends
set(cpu_examples
  "cv_kpr_ginkgo.cpp\;\;develop")

sundials_add_examples_ginkgo(cpu_examples
  TARGETS sundials_cvode
  BACKENDS REF OMP)

# Install the targets
if(EXAMPLES_INSTALL)

  if(SUNDIALS_GINKGO_BACKENDS MATCHES "CUDA")
    list(APPEND vectors nveccuda)
  endif()
  if(SUNDIALS_GINKGO_BACKENDS MATCHES "HIP")
    list(APPEND vectors nvechip)
  endif()
  if((SUNDIALS_GINKGO_BACKENDS MATCHES "OMP") OR
      (SUNDIALS_GINKGO_BACKENDS MATCHES "REF"))
    list(APPEND vectors nvecserial)
  endif()

  sundials_install_examples_ginkgo(cvode
    CPU_EXAMPLES_VAR
      cpu_examples
    CPU_GPU_EXAMPLES_VAR
      cpu_gpu_examples
    SUNDIALS_COMPONENTS
      cvode
      ${vectors}
    SUNDIALS_TARGETS
      cvode
    EXTRA_FILES
      "${PROJECT_SOURCE_DIR}/examples/utilities/example_utilities.hpp"
    DESTINATION
      cvode/ginkgo
  )

endif()