code:
<!DOCTYPE html>

    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" /><meta name="generator" content="Docutils 0.19: https://docutils.sourceforge.io/" />

  <title>FindCUDA — CMake 3.29.0-rc3 Documentation</title>

    <link rel="stylesheet" type="text/css" href="../_static/pygments.css" />
    <link rel="stylesheet" type="text/css" href="../_static/cmake.css" />

    <link rel="icon" href="../_static/cmake-favicon.ico"/>
    <link rel="index" title="Index" href="../genindex.html" />
    <link rel="search" title="Search" href="../search.html" />
    <link rel="next" title="FindDart" href="FindDart.html" />
    <link rel="prev" title="WriteCompilerDetectionHeader" href="WriteCompilerDetectionHeader.html" />

Navigation

          index

          next |

          previous |

    CMake »

    3.29.0-rc3 Documentation »

cmake-modules(7) »

FindCUDA

FindCUDA¶

Changed in version 3.27: This module is available only if policy CMP0146 is not set to NEW.
Port projects to CMake's first-class CUDA language support.

Deprecated since version 3.10: Do not use this module in new code.

It is no longer necessary to use this module or call find_package(CUDA)
for compiling CUDA code. Instead, list CUDA among the languages named
in the top-level call to the project() command, or call the
enable_language() command with CUDA.
Then one can add CUDA (.cu) sources directly to targets similar to other
languages.

New in version 3.17: To find and use the CUDA toolkit libraries manually, use the
FindCUDAToolkit module instead.  It works regardless of the
CUDA language being enabled.

Documentation of Deprecated Usage¶

Tools for building CUDA C files: libraries and build dependencies.

This script locates the NVIDIA CUDA C tools.  It should work on Linux,
Windows, and macOS and should be reasonably up to date with CUDA C
releases.

New in version 3.19: QNX support.

This script makes use of the standard find_package() arguments of
<VERSION>, REQUIRED and QUIET.  CUDA_FOUND will report if an
acceptable version of CUDA was found.

The script will prompt the user to specify CUDA_TOOLKIT_ROOT_DIR if
the prefix cannot be determined by the location of nvcc in the system
path and REQUIRED is specified to find_package().  To use
a different installed version of the toolkit set the environment variable
CUDA_BIN_PATH before running cmake (e.g.
CUDA_BIN_PATH=/usr/local/cuda1.0 instead of the default
/usr/local/cuda) or set CUDA_TOOLKIT_ROOT_DIR after configuring.  If
you change the value of CUDA_TOOLKIT_ROOT_DIR, various components that
depend on the path will be relocated.

It might be necessary to set CUDA_TOOLKIT_ROOT_DIR manually on certain
platforms, or to use a CUDA runtime not installed in the default
location.  In newer versions of the toolkit the CUDA library is
included with the graphics driver -- be sure that the driver version
matches what is needed by the CUDA runtime version.

Input Variables¶

The following variables affect the behavior of the macros in the
script (in alphabetical order).  Note that any of these flags can be
changed multiple times in the same directory before calling
cuda_add_executable(), cuda_add_library(), cuda_compile(),
cuda_compile_ptx(), cuda_compile_fatbin(), cuda_compile_cubin()
or cuda_wrap_srcs():

CUDA_64_BIT_DEVICE_CODE (Default: host bit size)

Set to ON to compile for 64 bit device code, OFF for 32 bit device code.
Note that making this different from the host code when generating object
or C files from CUDA code just won't work, because size_t gets defined by
nvcc in the generated source.  If you compile to PTX and then load the
file yourself, you can mix bit sizes between device and host.

CUDA_ATTACH_VS_BUILD_RULE_TO_CUDA_FILE (Default: ON)

Set to ON if you want the custom build rule to be attached to the source
file in Visual Studio.  Turn OFF if you add the same cuda file to multiple
targets.

This allows the user to build the target from the CUDA file; however, bad
things can happen if the CUDA source file is added to multiple targets.
When performing parallel builds it is possible for the custom build
command to be run more than once and in parallel causing cryptic build
errors.  VS runs the rules for every source file in the target, and a
source can have only one rule no matter how many projects it is added to.
When the rule is run from multiple targets race conditions can occur on
the generated file.  Eventually everything will get built, but if the user
is unaware of this behavior, there may be confusion.  It would be nice if
this script could detect the reuse of source files across multiple targets
and turn the option off for the user, but no good solution could be found.

CUDA_BUILD_CUBIN (Default: OFF)

Set to ON to enable and extra compilation pass with the -cubin option in
Device mode. The output is parsed and register, shared memory usage is
printed during build.

CUDA_BUILD_EMULATION (Default: OFF for device mode)

Set to ON for Emulation mode. -D_DEVICEEMU is defined for CUDA C files
when CUDA_BUILD_EMULATION is TRUE.

CUDA_LINK_LIBRARIES_KEYWORD (Default: "")

New in version 3.9.

The <PRIVATE|PUBLIC|INTERFACE> keyword to use for internal
target_link_libraries() calls. The default is to use no keyword which
uses the old "plain" form of target_link_libraries(). Note that is matters
because whatever is used inside the FindCUDA module must also be used
outside - the two forms of target_link_libraries() cannot be mixed.

CUDA_GENERATED_OUTPUT_DIR (Default: CMAKE_CURRENT_BINARY_DIR)

Set to the path you wish to have the generated files placed.  If it is
blank output files will be placed in CMAKE_CURRENT_BINARY_DIR.
Intermediate files will always be placed in
CMAKE_CURRENT_BINARY_DIR/CMakeFiles.

CUDA_HOST_COMPILATION_CPP (Default: ON)

Set to OFF for C compilation of host code.

CUDA_HOST_COMPILER (Default: CMAKE_C_COMPILER)

Set the host compiler to be used by nvcc.  Ignored if -ccbin or
--compiler-bindir is already present in the CUDA_NVCC_FLAGS or
CUDA_NVCC_FLAGS_<CONFIG> variables.  For Visual Studio targets,
the host compiler is constructed with one or more visual studio macros
such as $(VCInstallDir), that expands out to the path when
the command is run from within VS.

New in version 3.13: If the CUDAHOSTCXX environment variable is set it will
be used as the default.

CUDA_NVCC_FLAGS, CUDA_NVCC_FLAGS_<CONFIG>

Additional NVCC command line arguments.  NOTE: multiple arguments must be
semi-colon delimited (e.g. --compiler-options;-Wall)

New in version 3.6: Contents of these variables may use
generator expressions.

CUDA_PROPAGATE_HOST_FLAGS (Default: ON)

Set to ON to propagate CMAKE_{C,CXX}_FLAGS and their configuration
dependent counterparts (e.g. CMAKE_C_FLAGS_DEBUG) automatically to the
host compiler through nvcc's -Xcompiler flag.  This helps make the
generated host code match the rest of the system better.  Sometimes
certain flags give nvcc problems, and this will help you turn the flag
propagation off.  This does not affect the flags supplied directly to nvcc
via CUDA_NVCC_FLAGS or through the OPTION flags specified through
cuda_add_library(), cuda_add_executable(), or cuda_wrap_srcs().  Flags used for
shared library compilation are not affected by this flag.

CUDA_SEPARABLE_COMPILATION (Default: OFF)

If set this will enable separable compilation for all CUDA runtime object
files.  If used outside of cuda_add_executable() and cuda_add_library()
(e.g. calling cuda_wrap_srcs() directly),
cuda_compute_separable_compilation_object_file_name() and
cuda_link_separable_compilation_objects() should be called.

CUDA_SOURCE_PROPERTY_FORMAT

New in version 3.3.

If this source file property is set, it can override the format specified
to cuda_wrap_srcs() (OBJ, PTX, CUBIN, or FATBIN).  If an input source file
is not a .cu file, setting this file will cause it to be treated as a .cu
file. See documentation for set_source_files_properties on how to set
this property.

CUDA_USE_STATIC_CUDA_RUNTIME (Default: ON)

New in version 3.3.

When enabled the static version of the CUDA runtime library will be used
in CUDA_LIBRARIES.  If the version of CUDA configured doesn't support
this option, then it will be silently disabled.

CUDA_VERBOSE_BUILD (Default: OFF)

Set to ON to see all the commands used when building the CUDA file.  When
using a Makefile generator the value defaults to VERBOSE (run
make VERBOSE=1 to see output), although setting CUDA_VERBOSE_BUILD to ON will
always print the output.

Commands¶

The script creates the following functions and macros (in alphabetical order):

cuda_add_cufft_to_target(<cuda_target>)

Adds the cufft library to the target (can be any target).  Handles whether
you are in emulation mode or not.

cuda_add_cublas_to_target(<cuda_target>)

Adds the cublas library to the target (can be any target).  Handles
whether you are in emulation mode or not.

cuda_add_executable(<cuda_target> <file>...
                    [WIN32] [MACOSX_BUNDLE] [EXCLUDE_FROM_ALL] [OPTIONS ...])

Creates an executable <cuda_target> which is made up of the files
specified.  All of the non CUDA C files are compiled using the standard
build rules specified by CMake and the CUDA files are compiled to object
files using nvcc and the host compiler.  In addition CUDA_INCLUDE_DIRS is
added automatically to include_directories().  Some standard CMake target
calls can be used on the target after calling this macro
(e.g. set_target_properties() and target_link_libraries()), but setting
properties that adjust compilation flags will not affect code compiled by
nvcc.  Such flags should be modified before calling cuda_add_executable(),
cuda_add_library() or cuda_wrap_srcs().

cuda_add_library(<cuda_target> <file>...
                 [STATIC | SHARED | MODULE] [EXCLUDE_FROM_ALL] [OPTIONS ...])

Same as cuda_add_executable() except that a library is created.

cuda_build_clean_target()

Creates a convenience target that deletes all the dependency files
generated.  You should make clean after running this target to ensure the
dependency files get regenerated.

cuda_compile(<generated_files> <file>... [STATIC | SHARED | MODULE]
             [OPTIONS ...])

Returns a list of generated files from the input source files to be used
with add_library() or add_executable().

cuda_compile_ptx(<generated_files> <file>... [OPTIONS ...])

Returns a list of PTX files generated from the input source files.

cuda_compile_fatbin(<generated_files> <file>... [OPTIONS ...])

New in version 3.1.

Returns a list of FATBIN files generated from the input source files.

cuda_compile_cubin(<generated_files> <file>... [OPTIONS ...])

New in version 3.1.

Returns a list of CUBIN files generated from the input source files.

cuda_compute_separable_compilation_object_file_name(<output_file_var>
                                                    <cuda_target>
                                                    <object_files>)

Compute the name of the intermediate link file used for separable
compilation.  This file name is typically passed into
CUDA_LINK_SEPARABLE_COMPILATION_OBJECTS.  output_file_var is produced
based on cuda_target the list of objects files that need separable
compilation as specified by <object_files>.  If the <object_files> list is
empty, then <output_file_var> will be empty.  This function is called
automatically for cuda_add_library() and cuda_add_executable().  Note that
this is a function and not a macro.

cuda_include_directories(path0 path1 ...)

Sets the directories that should be passed to nvcc
(e.g. nvcc -Ipath0 -Ipath1 ...). These paths usually contain other .cu
files.

cuda_link_separable_compilation_objects(<output_file_var> <cuda_target>
                                        <nvcc_flags> <object_files>)

Generates the link object required by separable compilation from the given
object files.  This is called automatically for cuda_add_executable() and
cuda_add_library(), but can be called manually when using cuda_wrap_srcs()
directly.  When called from cuda_add_library() or cuda_add_executable() the
<nvcc_flags> passed in are the same as the flags passed in via the OPTIONS
argument.  The only nvcc flag added automatically is the bitness flag as
specified by CUDA_64_BIT_DEVICE_CODE.  Note that this is a function
instead of a macro.

cuda_select_nvcc_arch_flags(<out_variable> [<target_CUDA_architecture> ...])

Selects GPU arch flags for nvcc based on target_CUDA_architecture.

Values for target_CUDA_architecture:

Auto: detects local machine GPU compute arch at runtime.

Common and All: cover common and entire subsets of architectures.

<name>: one of Fermi, Kepler, Maxwell, Kepler+Tegra, Kepler+Tesla, Maxwell+Tegra, Pascal.

<ver>, <ver>(<ver>), <ver>+PTX, where <ver> is one of
2.0, 2.1, 3.0, 3.2, 3.5, 3.7, 5.0, 5.2, 5.3, 6.0, 6.2.

Returns list of flags to be added to CUDA_NVCC_FLAGS in <out_variable>.
Additionally, sets <out_variable>_readable to the resulting numeric list.

Example:

cuda_select_nvcc_arch_flags(ARCH_FLAGS 3.0 3.5+PTX 5.2(5.0) Maxwell)
list(APPEND CUDA_NVCC_FLAGS ${ARCH_FLAGS})

More info on CUDA architectures: https://en.wikipedia.org/wiki/CUDA.
Note that this is a function instead of a macro.

cuda_wrap_srcs(<cuda_target> <format> <generated_files> <file>...
               [STATIC | SHARED | MODULE] [OPTIONS ...])

This is where all the magic happens.  cuda_add_executable(),
cuda_add_library(), cuda_compile(), and cuda_compile_ptx() all call this
function under the hood.

Given the list of files <file>... this macro generates
custom commands that generate either PTX or linkable objects (use PTX or
OBJ for the <format> argument to switch).  Files that don't end with .cu
or have the HEADER_FILE_ONLY property are ignored.

The arguments passed in after OPTIONS are extra command line options to
give to nvcc.  You can also specify per configuration options by
specifying the name of the configuration followed by the options.  General
options must precede configuration specific options.  Not all
configurations need to be specified, only the ones provided will be used.
For example:

cuda_add_executable(...
  OPTIONS -DFLAG=2 "-DFLAG_OTHER=space in flag"
  DEBUG -g
  RELEASE --use_fast_math
  RELWITHDEBINFO --use_fast_math;-g
  MINSIZEREL --use_fast_math)

For certain configurations (namely VS generating object files with
CUDA_ATTACH_VS_BUILD_RULE_TO_CUDA_FILE set to ON), no generated file will
be produced for the given cuda file.  This is because when you add the
cuda file to Visual Studio it knows that this file produces an object file
and will link in the resulting object file automatically.

This script will also generate a separate cmake script that is used at
build time to invoke nvcc.  This is for several reasons:

nvcc can return negative numbers as return values which confuses
Visual Studio into thinking that the command succeeded.  The script now
checks the error codes and produces errors when there was a problem.

nvcc has been known to not delete incomplete results when it
encounters problems.  This confuses build systems into thinking the
target was generated when in fact an unusable file exists.  The script
now deletes the output files if there was an error.

By putting all the options that affect the build into a file and then
make the build rule dependent on the file, the output files will be
regenerated when the options change.

This script also looks at optional arguments STATIC, SHARED, or MODULE to
determine when to target the object compilation for a shared library.
BUILD_SHARED_LIBS is ignored in cuda_wrap_srcs(), but it is respected in
cuda_add_library().  On some systems special flags are added for building
objects intended for shared libraries.  A preprocessor macro,
<target_name>_EXPORTS is defined when a shared library compilation is
detected.

Flags passed into add_definitions with -D or /D are passed along to nvcc.

Result Variables¶

The script defines the following variables:

CUDA_VERSION_MAJOR

The major version of cuda as reported by nvcc.

CUDA_VERSION_MINOR

The minor version.

CUDA_VERSION, CUDA_VERSION_STRING

Full version in the X.Y format.

CUDA_HAS_FP16

New in version 3.6: Whether a short float (float16, fp16) is supported.

CUDA_TOOLKIT_ROOT_DIR

Path to the CUDA Toolkit (defined if not set).

CUDA_SDK_ROOT_DIR

Path to the CUDA SDK.  Use this to find files in the SDK.  This script will
not directly support finding specific libraries or headers, as that isn't
supported by NVIDIA.  If you want to change libraries when the path changes
see the FindCUDA.cmake script for an example of how to clear these
variables.  There are also examples of how to use the CUDA_SDK_ROOT_DIR
to locate headers or libraries, if you so choose (at your own risk).

CUDA_INCLUDE_DIRS

Include directory for cuda headers.  Added automatically
for cuda_add_executable() and cuda_add_library().

CUDA_LIBRARIES

Cuda RT library.

CUDA_CUFFT_LIBRARIES

Device or emulation library for the Cuda FFT implementation (alternative to
cuda_add_cufft_to_target() macro)

CUDA_CUBLAS_LIBRARIES

Device or emulation library for the Cuda BLAS implementation (alternative to
cuda_add_cublas_to_target() macro).

CUDA_cudart_static_LIBRARY

Statically linkable cuda runtime library.
Only available for CUDA version 5.5+.

CUDA_cudadevrt_LIBRARY

New in version 3.7: Device runtime library.  Required for separable compilation.

CUDA_cupti_LIBRARY

CUDA Profiling Tools Interface library.
Only available for CUDA version 4.0+.

CUDA_curand_LIBRARY

CUDA Random Number Generation library.
Only available for CUDA version 3.2+.

CUDA_cusolver_LIBRARY

New in version 3.2: CUDA Direct Solver library.
Only available for CUDA version 7.0+.

CUDA_cusparse_LIBRARY

CUDA Sparse Matrix library.
Only available for CUDA version 3.2+.

CUDA_npp_LIBRARY

NVIDIA Performance Primitives lib.
Only available for CUDA version 4.0+.

CUDA_nppc_LIBRARY

NVIDIA Performance Primitives lib (core).
Only available for CUDA version 5.5+.

CUDA_nppi_LIBRARY

NVIDIA Performance Primitives lib (image processing).
Only available for CUDA version 5.5 - 8.0.

CUDA_nppial_LIBRARY

NVIDIA Performance Primitives lib (image processing).
Only available for CUDA version 9.0.

CUDA_nppicc_LIBRARY

NVIDIA Performance Primitives lib (image processing).
Only available for CUDA version 9.0.

CUDA_nppicom_LIBRARY

NVIDIA Performance Primitives lib (image processing).
Only available for CUDA version 9.0 - 10.2.
Replaced by nvjpeg.

CUDA_nppidei_LIBRARY

NVIDIA Performance Primitives lib (image processing).
Only available for CUDA version 9.0.

CUDA_nppif_LIBRARY

NVIDIA Performance Primitives lib (image processing).
Only available for CUDA version 9.0.

CUDA_nppig_LIBRARY

NVIDIA Performance Primitives lib (image processing).
Only available for CUDA version 9.0.

CUDA_nppim_LIBRARY

NVIDIA Performance Primitives lib (image processing).
Only available for CUDA version 9.0.

CUDA_nppist_LIBRARY

NVIDIA Performance Primitives lib (image processing).
Only available for CUDA version 9.0.

CUDA_nppisu_LIBRARY

NVIDIA Performance Primitives lib (image processing).
Only available for CUDA version 9.0.

CUDA_nppitc_LIBRARY

NVIDIA Performance Primitives lib (image processing).
Only available for CUDA version 9.0.

CUDA_npps_LIBRARY

NVIDIA Performance Primitives lib (signal processing).
Only available for CUDA version 5.5+.

CUDA_nvcuvenc_LIBRARY

CUDA Video Encoder library.
Only available for CUDA version 3.2+.
Windows only.

CUDA_nvcuvid_LIBRARY

CUDA Video Decoder library.
Only available for CUDA version 3.2+.
Windows only.

CUDA_nvToolsExt_LIBRARY

New in version 3.16: NVIDA CUDA Tools Extension library.
Available for CUDA version 5+.

CUDA_OpenCL_LIBRARY

New in version 3.16: NVIDA CUDA OpenCL library.
Available for CUDA version 5+.

Table of Contents

FindCUDA

Documentation of Deprecated Usage

Input Variables

Commands

Result Variables

Previous topic

WriteCompilerDetectionHeader

Next topic

FindDart

This Page

Show Source

Quick search

    <form class="search" action="../search.html" method="get">
      <input type="text" name="q" aria-labelledby="searchlabel" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/>
      <input type="submit" value="Go" />
    </form>

Navigation

          index

          next |

          previous |

    CMake »

    3.29.0-rc3 Documentation »

cmake-modules(7) »

FindCUDA

        © Copyright 2000-2024 Kitware, Inc. and Contributors.
      Created using Sphinx 6.2.1.


code:
<!DOCTYPE html>

    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" /><meta name="generator" content="Docutils 0.19: https://docutils.sourceforge.io/" />

  <title>FindCUDAToolkit — CMake 3.29.0-rc3 Documentation</title>

    <link rel="stylesheet" type="text/css" href="../_static/pygments.css" />
    <link rel="stylesheet" type="text/css" href="../_static/cmake.css" />

    <link rel="icon" href="../_static/cmake-favicon.ico"/>
    <link rel="index" title="Index" href="../genindex.html" />
    <link rel="search" title="Search" href="../search.html" />
    <link rel="next" title="FindCups" href="FindCups.html" />
    <link rel="prev" title="FindCoin3D" href="FindCoin3D.html" />

Navigation

          index

          next |

          previous |

    CMake »

    3.29.0-rc3 Documentation »

cmake-modules(7) »

FindCUDAToolkit

FindCUDAToolkit¶

New in version 3.17.

This script locates the NVIDIA CUDA toolkit and the associated libraries, but
does not require the CUDA language be enabled for a given project. This
module does not search for the NVIDIA CUDA Samples.

New in version 3.19: QNX support.

Search Behavior¶

The CUDA Toolkit search behavior uses the following order:

If the CUDA language has been enabled we will use the directory
containing the compiler as the first search location for nvcc.

If the CUDAToolkit_ROOT cmake configuration variable (e.g.,
-DCUDAToolkit_ROOT=/some/path) or environment variable is defined, it
will be searched.  If both an environment variable and a
configuration variable are specified, the configuration variable takes
precedence.

The directory specified here must be such that the executable nvcc or
the appropriate version.txt or version.json file can be found
underneath the specified directory.

If the CUDA_PATH environment variable is defined, it will be searched
for nvcc.

The user's path is searched for nvcc using find_program().  If
this is found, no subsequent search attempts are performed.  Users are
responsible for ensuring that the first nvcc to show up in the path is
the desired path in the event that multiple CUDA Toolkits are installed.

On Unix systems, if the symbolic link /usr/local/cuda exists, this is
used.  No subsequent search attempts are performed.  No default symbolic link
location exists for the Windows platform.

The platform specific default install locations are searched.  If exactly one
candidate is found, this is used.  The default CUDA Toolkit install locations
searched are:

Platform

Search Pattern

macOS

/Developer/NVIDIA/CUDA-X.Y

Other Unix

/usr/local/cuda-X.Y

Windows

C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\vX.Y

Where X.Y would be a specific version of the CUDA Toolkit, such as
/usr/local/cuda-9.0 or
C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v9.0

Note

When multiple CUDA Toolkits are installed in the default location of a
system (e.g., both /usr/local/cuda-9.0 and /usr/local/cuda-10.0
exist but the /usr/local/cuda symbolic link does not exist), this
package is marked as not found.

There are too many factors involved in making an automatic decision in
the presence of multiple CUDA Toolkits being installed.  In this
situation, users are encouraged to either (1) set CUDAToolkit_ROOT or
(2) ensure that the correct nvcc executable shows up in $PATH for
find_program() to find.

Arguments¶

[<version>]

The [<version>] argument requests a version with which the package found
should be compatible. See find_package version format
for more details.

Options¶

REQUIRED

If specified, configuration will error if a suitable CUDA Toolkit is not
found.

QUIET

If specified, the search for a suitable CUDA Toolkit will not produce any
messages.

EXACT

If specified, the CUDA Toolkit is considered found only if the exact
VERSION specified is recovered.

Imported targets¶

An imported target named CUDA::toolkit is provided.

This module defines IMPORTED targets for each
of the following libraries that are part of the CUDAToolkit:

CUDA Runtime Library

CUDA Driver Library

cuBLAS

cuDLA

cuFile

cuFFT

cuRAND

cuSOLVER

cuSPARSE

cuPTI

NPP

nvBLAS

nvGRAPH

nvJPEG

nvidia-ML

nvPTX Compiler

nvRTC

nvToolsExt

nvtx3

OpenCL

cuLIBOS

CUDA Runtime Library¶

The CUDA Runtime library (cudart) are what most applications will typically
need to link against to make any calls such as cudaMalloc, and cudaFree.

Targets Created:

CUDA::cudart

CUDA::cudart_static

CUDA Driver Library¶

The CUDA Driver library (cuda) are used by applications that use calls
such as cuMemAlloc, and cuMemFree.

Targets Created:

CUDA::cuda_driver

cuBLAS¶

The cuBLAS library.

Targets Created:

CUDA::cublas

CUDA::cublas_static

CUDA::cublasLt starting in CUDA 10.1

CUDA::cublasLt_static starting in CUDA 10.1

cuDLA¶

New in version 3.27.

The NVIDIA Tegra Deep Learning Accelerator cuDLA library.

Targets Created:

CUDA::cudla starting in CUDA 11.6

cuFile¶

New in version 3.25.

The NVIDIA GPUDirect Storage cuFile library.

Targets Created:

CUDA::cuFile starting in CUDA 11.4

CUDA::cuFile_static starting in CUDA 11.4

CUDA::cuFile_rdma starting in CUDA 11.4

CUDA::cuFile_rdma_static starting in CUDA 11.4

cuFFT¶

The cuFFT library.

Targets Created:

CUDA::cufft

CUDA::cufftw

CUDA::cufft_static

CUDA::cufft_static_nocallback starting in CUDA 9.2, requires CMake 3.23+

CUDA::cufftw_static

cuRAND¶

The cuRAND library.

Targets Created:

CUDA::curand

CUDA::curand_static

cuSOLVER¶

The cuSOLVER library.

Targets Created:

CUDA::cusolver

CUDA::cusolver_static

cuSPARSE¶

The cuSPARSE library.

Targets Created:

CUDA::cusparse

CUDA::cusparse_static

cupti¶

The NVIDIA CUDA Profiling Tools Interface.

Targets Created:

CUDA::cupti

CUDA::cupti_static

New in version 3.27:

CUDA::nvperf_host         starting in CUDA 10.2

CUDA::nvperf_host_static  starting in CUDA 10.2

CUDA::nvperf_target       starting in CUDA 10.2

CUDA::pcsamplingutil      starting in CUDA 11.3

NPP¶

The NPP libraries.

Targets Created:

nppc:

CUDA::nppc

CUDA::nppc_static

nppial: Arithmetic and logical operation functions in nppi_arithmetic_and_logical_operations.h

CUDA::nppial

CUDA::nppial_static

nppicc: Color conversion and sampling functions in nppi_color_conversion.h

CUDA::nppicc

CUDA::nppicc_static

nppicom: JPEG compression and decompression functions in nppi_compression_functions.h
Removed starting in CUDA 11.0, use nvJPEG instead.

CUDA::nppicom

CUDA::nppicom_static

nppidei: Data exchange and initialization functions in nppi_data_exchange_and_initialization.h

CUDA::nppidei

CUDA::nppidei_static

nppif: Filtering and computer vision functions in nppi_filter_functions.h

CUDA::nppif

CUDA::nppif_static

nppig: Geometry transformation functions found in nppi_geometry_transforms.h

CUDA::nppig

CUDA::nppig_static

nppim: Morphological operation functions found in nppi_morphological_operations.h

CUDA::nppim

CUDA::nppim_static

nppist: Statistics and linear transform in nppi_statistics_functions.h and nppi_linear_transforms.h

CUDA::nppist

CUDA::nppist_static

nppisu: Memory support functions in nppi_support_functions.h

CUDA::nppisu

CUDA::nppisu_static

nppitc: Threshold and compare operation functions in nppi_threshold_and_compare_operations.h

CUDA::nppitc

CUDA::nppitc_static

npps:

CUDA::npps

CUDA::npps_static

nvBLAS¶

The nvBLAS libraries.
This is a shared library only.

Targets Created:

CUDA::nvblas

nvGRAPH¶

The nvGRAPH library.
Removed starting in CUDA 11.0

Targets Created:

CUDA::nvgraph

CUDA::nvgraph_static

nvJPEG¶

The nvJPEG library.
Introduced in CUDA 10.

Targets Created:

CUDA::nvjpeg

CUDA::nvjpeg_static

nvPTX Compiler¶

New in version 3.25.

The nvPTX (PTX Compilation) library.
The PTX Compiler APIs are a set of APIs which can be used to compile a PTX program into GPU assembly code.
Introduced in CUDA 11.1
This is a static library only.

Targets Created:

CUDA::nvptxcompiler_static starting in CUDA 11.1

nvRTC¶

The nvRTC (Runtime Compilation) library.

Targets Created:

CUDA::nvrtc

New in version 3.26:

CUDA::nvrtc_builtins

CUDA::nvrtc_static starting in CUDA 11.5

CUDA::nvrtc_builtins_static starting in CUDA 11.5

nvJitLink¶

The nvJItLink (Runtime LTO Linking) library.

Targets Created:

CUDA::nvJitLink starting in CUDA 12.0

CUDA::nvJitLink_static  starting in CUDA 12.0

nvidia-ML¶

The NVIDIA Management Library.
This is a shared library only.

Targets Created:

CUDA::nvml

nvToolsExt¶

Deprecated since version 3.25: With CUDA 10.0+, use nvtx3.

The NVIDIA Tools Extension.
This is a shared library only.

Targets Created:

CUDA::nvToolsExt

nvtx3¶

New in version 3.25.

The header-only NVIDIA Tools Extension Library.
Introduced in CUDA 10.0.

Targets created:

CUDA::nvtx3

OpenCL¶

The NVIDIA OpenCL Library.
This is a shared library only.

Targets Created:

CUDA::OpenCL

cuLIBOS¶

The cuLIBOS library is a backend thread abstraction layer library which is
static only.  The CUDA::cublas_static, CUDA::cusparse_static,
CUDA::cufft_static, CUDA::curand_static, and (when implemented) NPP
libraries all automatically have this dependency linked.

Target Created:

CUDA::culibos

Note: direct usage of this target by consumers should not be necessary.

Result variables¶

CUDAToolkit_FOUND

A boolean specifying whether or not the CUDA Toolkit was found.

CUDAToolkit_VERSION

The exact version of the CUDA Toolkit found (as reported by
nvcc --version, version.txt, or version.json).

CUDAToolkit_VERSION_MAJOR

The major version of the CUDA Toolkit.

CUDAToolkit_VERSION_MINOR

The minor version of the CUDA Toolkit.

CUDAToolkit_VERSION_PATCH

The patch version of the CUDA Toolkit.

CUDAToolkit_BIN_DIR

The path to the CUDA Toolkit library directory that contains the CUDA
executable nvcc.

CUDAToolkit_INCLUDE_DIRS

List of paths to all the CUDA Toolkit folders containing header files
required to compile a project linking against CUDA.

CUDAToolkit_LIBRARY_DIR

The path to the CUDA Toolkit library directory that contains the CUDA
Runtime library cudart.

CUDAToolkit_LIBRARY_ROOT

New in version 3.18.

The path to the CUDA Toolkit directory containing the nvvm directory and
either version.txt or version.json.

CUDAToolkit_TARGET_DIR

The path to the CUDA Toolkit directory including the target architecture
when cross-compiling. When not cross-compiling this will be equivalent to
the parent directory of CUDAToolkit_BIN_DIR.

CUDAToolkit_NVCC_EXECUTABLE

The path to the NVIDIA CUDA compiler nvcc.  Note that this path may
not be the same as
CMAKE_CUDA_COMPILER.  nvcc must be
found to determine the CUDA Toolkit version as well as determining other
features of the Toolkit.  This variable is set for the convenience of
modules that depend on this one.

Table of Contents

FindCUDAToolkit

Search Behavior

Arguments

Options

Imported targets

CUDA Runtime Library

CUDA Driver Library

cuBLAS

cuDLA

cuFile

cuFFT

cuRAND

cuSOLVER

cuSPARSE

cupti

NPP

nvBLAS

nvGRAPH

nvJPEG

nvPTX Compiler

nvRTC

nvJitLink

nvidia-ML

nvToolsExt

nvtx3

OpenCL

cuLIBOS

Result variables

Previous topic

FindCoin3D

Next topic

FindCups

This Page

Show Source

Quick search

    <form class="search" action="../search.html" method="get">
      <input type="text" name="q" aria-labelledby="searchlabel" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/>
      <input type="submit" value="Go" />
    </form>

Navigation

          index

          next |

          previous |

    CMake »

    3.29.0-rc3 Documentation »

cmake-modules(7) »

FindCUDAToolkit

        © Copyright 2000-2024 Kitware, Inc. and Contributors.
      Created using Sphinx 6.2.1.

repo_name: lazytadpole/codenamesilverfish

license: mit


code:
<!DOCTYPE html>

    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" /><meta name="generator" content="Docutils 0.19: https://docutils.sourceforge.io/" />

  <title>FindCURL — CMake 3.29.0-rc3 Documentation</title>

    <link rel="stylesheet" type="text/css" href="../_static/pygments.css" />
    <link rel="stylesheet" type="text/css" href="../_static/cmake.css" />

    <link rel="icon" href="../_static/cmake-favicon.ico"/>
    <link rel="index" title="Index" href="../genindex.html" />
    <link rel="search" title="Search" href="../search.html" />
    <link rel="next" title="FindCurses" href="FindCurses.html" />
    <link rel="prev" title="FindCups" href="FindCups.html" />

Navigation

          index

          next |

          previous |

    CMake »

    3.29.0-rc3 Documentation »

cmake-modules(7) »

FindCURL

FindCURL¶

Find the native CURL headers and libraries.

New in version 3.14: This module accept optional COMPONENTS to check supported features and
protocols:

PROTOCOLS: ICT FILE FTP FTPS GOPHER HTTP HTTPS IMAP IMAPS LDAP LDAPS POP3
           POP3S RTMP RTSP SCP SFTP SMB SMBS SMTP SMTPS TELNET TFTP
FEATURES:  SSL IPv6 UnixSockets libz AsynchDNS IDN GSS-API PSL SPNEGO
           Kerberos NTLM NTLM_WB TLS-SRP HTTP2 HTTPS-proxy

IMPORTED Targets¶

New in version 3.12.

This module defines IMPORTED target CURL::libcurl, if
curl has been found.

Result Variables¶

This module defines the following variables:

CURL_FOUND

"True" if curl found.

CURL_INCLUDE_DIRS

where to find curl/curl.h, etc.

CURL_LIBRARIES

List of libraries when using curl.

CURL_VERSION_STRING

The version of curl found.

New in version 3.13: Debug and Release variants are found separately.

CURL CMake¶

New in version 3.17.

If CURL was built using the CMake buildsystem then it provides its own
CURLConfig.cmake file for use with the find_package() command's
config mode. This module looks for this file and, if found,
returns its results with no further action.

Set CURL_NO_CURL_CMAKE to ON to disable this search.

Hints¶

CURL_USE_STATIC_LIBS

New in version 3.28.

Set to TRUE to use static libraries.

This is meaningful only when CURL is not found via its
CMake Package Configuration file.

Table of Contents

FindCURL

IMPORTED Targets

Result Variables

CURL CMake

Hints

Previous topic

FindCups

Next topic

FindCurses

This Page

Show Source

Quick search

    <form class="search" action="../search.html" method="get">
      <input type="text" name="q" aria-labelledby="searchlabel" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/>
      <input type="submit" value="Go" />
    </form>

Navigation

          index

          next |

          previous |

    CMake »

    3.29.0-rc3 Documentation »

cmake-modules(7) »

FindCURL

        © Copyright 2000-2024 Kitware, Inc. and Contributors.
      Created using Sphinx 6.2.1.


code:
<!DOCTYPE html>

    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" /><meta name="generator" content="Docutils 0.19: https://docutils.sourceforge.io/" />

  <title>FindCVS — CMake 3.29.0-rc3 Documentation</title>

    <link rel="stylesheet" type="text/css" href="../_static/pygments.css" />
    <link rel="stylesheet" type="text/css" href="../_static/cmake.css" />

    <link rel="icon" href="../_static/cmake-favicon.ico"/>
    <link rel="index" title="Index" href="../genindex.html" />
    <link rel="search" title="Search" href="../search.html" />
    <link rel="next" title="FindCxxTest" href="FindCxxTest.html" />
    <link rel="prev" title="FindCurses" href="FindCurses.html" />

Navigation

          index

          next |

          previous |

    CMake »

    3.29.0-rc3 Documentation »

cmake-modules(7) »

FindCVS

FindCVS¶

Find the Concurrent Versions System (CVS).

The module defines the following variables:

CVS_EXECUTABLE - path to cvs command line client
CVS_FOUND - true if the command line client was found

Example usage:

find_package(CVS)
if(CVS_FOUND)
  message("CVS found: ${CVS_EXECUTABLE}")
endif()

Previous topic

FindCurses

Next topic

FindCxxTest

This Page

Show Source

Quick search

    <form class="search" action="../search.html" method="get">
      <input type="text" name="q" aria-labelledby="searchlabel" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/>
      <input type="submit" value="Go" />
    </form>

Navigation

          index

          next |

          previous |

    CMake »

    3.29.0-rc3 Documentation »

cmake-modules(7) »

FindCVS

        © Copyright 2000-2024 Kitware, Inc. and Contributors.
      Created using Sphinx 6.2.1.


code:
<!DOCTYPE html>

    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" /><meta name="generator" content="Docutils 0.19: https://docutils.sourceforge.io/" />

  <title>FindCoin3D — CMake 3.29.0-rc3 Documentation</title>

    <link rel="stylesheet" type="text/css" href="../_static/pygments.css" />
    <link rel="stylesheet" type="text/css" href="../_static/cmake.css" />

    <link rel="icon" href="../_static/cmake-favicon.ico"/>
    <link rel="index" title="Index" href="../genindex.html" />
    <link rel="search" title="Search" href="../search.html" />
    <link rel="next" title="FindCUDAToolkit" href="FindCUDAToolkit.html" />
    <link rel="prev" title="FindCABLE" href="FindCABLE.html" />

Navigation

          index

          next |

          previous |

    CMake »

    3.29.0-rc3 Documentation »

cmake-modules(7) »

FindCoin3D

FindCoin3D¶

Find Coin3D (Open Inventor)

Coin3D is an implementation of the Open Inventor API.  It provides
data structures and algorithms for 3D visualization.

This module defines the following variables

COIN3D_FOUND         - system has Coin3D - Open Inventor
COIN3D_INCLUDE_DIRS  - where the Inventor include directory can be found
COIN3D_LIBRARIES     - Link to this to use Coin3D

Previous topic

FindCABLE

Next topic

FindCUDAToolkit

This Page

Show Source

Quick search

    <form class="search" action="../search.html" method="get">
      <input type="text" name="q" aria-labelledby="searchlabel" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/>
      <input type="submit" value="Go" />
    </form>

Navigation

          index

          next |

          previous |

    CMake »

    3.29.0-rc3 Documentation »

cmake-modules(7) »

FindCoin3D

        © Copyright 2000-2024 Kitware, Inc. and Contributors.
      Created using Sphinx 6.2.1.


code:
<!DOCTYPE html>

    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" /><meta name="generator" content="Docutils 0.19: https://docutils.sourceforge.io/" />

  <title>FindCups — CMake 3.29.0-rc3 Documentation</title>

    <link rel="stylesheet" type="text/css" href="../_static/pygments.css" />
    <link rel="stylesheet" type="text/css" href="../_static/cmake.css" />

    <link rel="icon" href="../_static/cmake-favicon.ico"/>
    <link rel="index" title="Index" href="../genindex.html" />
    <link rel="search" title="Search" href="../search.html" />
    <link rel="next" title="FindCURL" href="FindCURL.html" />
    <link rel="prev" title="FindCUDAToolkit" href="FindCUDAToolkit.html" />

Navigation

          index

          next |

          previous |

    CMake »

    3.29.0-rc3 Documentation »

cmake-modules(7) »

FindCups

FindCups¶

Find the Common UNIX Printing System (CUPS).

Set CUPS_REQUIRE_IPP_DELETE_ATTRIBUTE to TRUE if you need a version which
features this function (i.e. at least 1.1.19)

Imported targets¶

New in version 3.15.

This module defines IMPORTED target Cups::Cups, if Cups has
been found.

Result variables¶

This module will set the following variables in your project:

CUPS_FOUND

true if CUPS headers and libraries were found

CUPS_INCLUDE_DIRS

the directory containing the Cups headers

CUPS_LIBRARIES

the libraries to link against to use CUPS.

CUPS_VERSION_STRING

the version of CUPS found (since CMake 2.8.8)

Cache variables¶

The following cache variables may also be set:

CUPS_INCLUDE_DIR

the directory containing the Cups headers

Table of Contents

FindCups

Imported targets

Result variables

Cache variables

Previous topic

FindCUDAToolkit

Next topic

FindCURL

This Page

Show Source

Quick search

    <form class="search" action="../search.html" method="get">
      <input type="text" name="q" aria-labelledby="searchlabel" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/>
      <input type="submit" value="Go" />
    </form>

Navigation

          index

          next |

          previous |

    CMake »

    3.29.0-rc3 Documentation »

cmake-modules(7) »

FindCups

        © Copyright 2000-2024 Kitware, Inc. and Contributors.
      Created using Sphinx 6.2.1.


code:
<!DOCTYPE html>

    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" /><meta name="generator" content="Docutils 0.19: https://docutils.sourceforge.io/" />

  <title>FindCurses — CMake 3.29.0-rc3 Documentation</title>

    <link rel="stylesheet" type="text/css" href="../_static/pygments.css" />
    <link rel="stylesheet" type="text/css" href="../_static/cmake.css" />

    <link rel="icon" href="../_static/cmake-favicon.ico"/>
    <link rel="index" title="Index" href="../genindex.html" />
    <link rel="search" title="Search" href="../search.html" />
    <link rel="next" title="FindCVS" href="FindCVS.html" />
    <link rel="prev" title="FindCURL" href="FindCURL.html" />

Navigation

          index

          next |

          previous |

    CMake »

    3.29.0-rc3 Documentation »

cmake-modules(7) »

FindCurses

FindCurses¶

Find the curses or ncurses include file and library.

Result Variables¶

This module defines the following variables:

CURSES_FOUND

True if Curses is found.

CURSES_INCLUDE_DIRS

The include directories needed to use Curses.

CURSES_LIBRARIES

The libraries needed to use Curses.

CURSES_CFLAGS

New in version 3.16.

Parameters which ought be given to C/C++ compilers when using Curses.

CURSES_HAVE_CURSES_H

True if curses.h is available.

CURSES_HAVE_NCURSES_H

True if ncurses.h is available.

CURSES_HAVE_NCURSES_NCURSES_H

True if ncurses/ncurses.h is available.

CURSES_HAVE_NCURSES_CURSES_H

True if ncurses/curses.h is available.

Set CURSES_NEED_NCURSES to TRUE before the
find_package(Curses) call if NCurses functionality is required.

New in version 3.10: Set CURSES_NEED_WIDE to TRUE before the
find_package(Curses) call if unicode functionality is required.

Backward Compatibility¶

The following variable are provided for backward compatibility:

CURSES_INCLUDE_DIR

Path to Curses include.  Use CURSES_INCLUDE_DIRS instead.

CURSES_LIBRARY

Path to Curses library.  Use CURSES_LIBRARIES instead.

Table of Contents

FindCurses

Result Variables

Backward Compatibility

Previous topic

FindCURL

Next topic

FindCVS

This Page

Show Source

Quick search

    <form class="search" action="../search.html" method="get">
      <input type="text" name="q" aria-labelledby="searchlabel" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/>
      <input type="submit" value="Go" />
    </form>

Navigation

          index

          next |

          previous |

    CMake »

    3.29.0-rc3 Documentation »

cmake-modules(7) »

FindCurses

        © Copyright 2000-2024 Kitware, Inc. and Contributors.
      Created using Sphinx 6.2.1.


code:
<!DOCTYPE html>

    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" /><meta name="generator" content="Docutils 0.19: https://docutils.sourceforge.io/" />

  <title>FindCxxTest — CMake 3.29.0-rc3 Documentation</title>

    <link rel="stylesheet" type="text/css" href="../_static/pygments.css" />
    <link rel="stylesheet" type="text/css" href="../_static/cmake.css" />

    <link rel="icon" href="../_static/cmake-favicon.ico"/>
    <link rel="index" title="Index" href="../genindex.html" />
    <link rel="search" title="Search" href="../search.html" />
    <link rel="next" title="FindCygwin" href="FindCygwin.html" />
    <link rel="prev" title="FindCVS" href="FindCVS.html" />

Navigation

          index

          next |

          previous |

    CMake »

    3.29.0-rc3 Documentation »

cmake-modules(7) »

FindCxxTest

FindCxxTest¶

Find CxxTest unit testing framework.

Find the CxxTest suite and declare a helper macro for creating
unit tests and integrating them with CTest.

Input Variables¶

CXXTEST_USE_PYTHON

Deprecated since version 1.3.

Only used in the case both Python & Perl
are detected on the system to control
which CxxTest code generator is used.
Valid only for CxxTest version 3.

In older versions of this Find Module,
this variable controlled if the Python test
generator was used instead of the Perl one,
regardless of which scripting language the
user had installed.

CXXTEST_TESTGEN_ARGS

New in version 2.8.3.

Specify a list of options to pass to the CxxTest code
generator.  If not defined, --error-printer is passed.

Result Variables¶

CXXTEST_FOUND

True if the CxxTest framework was found

CXXTEST_INCLUDE_DIRS

Where to find the CxxTest include directory

CXXTEST_PERL_TESTGEN_EXECUTABLE

The perl-based test generator

CXXTEST_PYTHON_TESTGEN_EXECUTABLE

The python-based test generator

CXXTEST_TESTGEN_EXECUTABLE

New in version 2.8.3.

The test generator that is actually used (chosen using user preferences
and interpreters found in the system)

CXXTEST_TESTGEN_INTERPRETER

New in version 2.8.3.

The full path to the Perl or Python executable on the system, on
platforms where the script cannot be executed using its shebang line.

Module Commands¶

cxxtest_add_test¶

Create a CxxTest runner and adds it to the CTest testing suite:

CXXTEST_ADD_TEST(<test_name> <gen_source_file>
                 <input_files_to_testgen>...)

Parameters:

test_name

The name of the test

gen_source_file

The generated source filename to be generated by CxxTest

input_files_to_testgen

The list of header files containing the CxxTest::TestSuite's
to be included in this runner

Example Usage¶

The following example, if CxxTest is found, will:

Invoke the testgen executable to autogenerate foo_test.cc in the
binary tree from "foo_test.h" in the current source directory.

Create an executable and test called unittest_foo.

find_package(CxxTest)
if(CXXTEST_FOUND)
  include_directories(${CXXTEST_INCLUDE_DIR})
  enable_testing()
  CXXTEST_ADD_TEST(unittest_foo foo_test.cc
                   ${CMAKE_CURRENT_SOURCE_DIR}/foo_test.h)
  target_link_libraries(unittest_foo foo) # as needed
endif()

foo_test.h contains:

#include <cxxtest/TestSuite.h>
class MyTestSuite : public CxxTest::TestSuite
{
public:
   void testAddition( void )
   {
      TS_ASSERT( 1 + 1 > 1 );
      TS_ASSERT_EQUALS( 1 + 1, 2 );
   }
};

Table of Contents

FindCxxTest

Input Variables

Result Variables

Module Commands

Example Usage

Previous topic

FindCVS

Next topic

FindCygwin

This Page

Show Source

Quick search

    <form class="search" action="../search.html" method="get">
      <input type="text" name="q" aria-labelledby="searchlabel" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/>
      <input type="submit" value="Go" />
    </form>

Navigation

          index

          next |

          previous |

    CMake »

    3.29.0-rc3 Documentation »

cmake-modules(7) »

FindCxxTest

        © Copyright 2000-2024 Kitware, Inc. and Contributors.
      Created using Sphinx 6.2.1.


code:
<!DOCTYPE html>

    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" /><meta name="generator" content="Docutils 0.19: https://docutils.sourceforge.io/" />

  <title>FindCygwin — CMake 3.29.0-rc3 Documentation</title>

    <link rel="stylesheet" type="text/css" href="../_static/pygments.css" />
    <link rel="stylesheet" type="text/css" href="../_static/cmake.css" />

    <link rel="icon" href="../_static/cmake-favicon.ico"/>
    <link rel="index" title="Index" href="../genindex.html" />
    <link rel="search" title="Search" href="../search.html" />
    <link rel="next" title="FindDCMTK" href="FindDCMTK.html" />
    <link rel="prev" title="FindCxxTest" href="FindCxxTest.html" />

Navigation

          index

          next |

          previous |

    CMake »

    3.29.0-rc3 Documentation »

cmake-modules(7) »

FindCygwin

FindCygwin¶

Find Cygwin, a POSIX-compatible environment that runs natively
on Microsoft Windows

Previous topic

FindCxxTest

Next topic

FindDCMTK

This Page

Show Source

Quick search

    <form class="search" action="../search.html" method="get">
      <input type="text" name="q" aria-labelledby="searchlabel" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/>
      <input type="submit" value="Go" />
    </form>

Navigation

          index

          next |

          previous |

    CMake »

    3.29.0-rc3 Documentation »

cmake-modules(7) »

FindCygwin

        © Copyright 2000-2024 Kitware, Inc. and Contributors.
      Created using Sphinx 6.2.1.


code:
<!DOCTYPE html>

    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" /><meta name="generator" content="Docutils 0.19: https://docutils.sourceforge.io/" />

  <title>FindDCMTK — CMake 3.29.0-rc3 Documentation</title>

    <link rel="stylesheet" type="text/css" href="../_static/pygments.css" />
    <link rel="stylesheet" type="text/css" href="../_static/cmake.css" />

    <link rel="icon" href="../_static/cmake-favicon.ico"/>
    <link rel="index" title="Index" href="../genindex.html" />
    <link rel="search" title="Search" href="../search.html" />
    <link rel="next" title="FindDevIL" href="FindDevIL.html" />
    <link rel="prev" title="FindCygwin" href="FindCygwin.html" />

Navigation

          index

          next |

          previous |

    CMake »

    3.29.0-rc3 Documentation »

cmake-modules(7) »

FindDCMTK

FindDCMTK¶

Find DICOM ToolKit (DCMTK) libraries and applications

The module defines the following variables:

DCMTK_INCLUDE_DIRS  - Directories to include to use DCMTK
DCMTK_LIBRARIES     - Files to link against to use DCMTK
DCMTK_FOUND         - If false, don't try to use DCMTK
DCMTK_DIR           - (optional) Source directory for DCMTK

Compatibility¶

This module is able to find a version of DCMTK that does or does not export
a DCMTKConfig.cmake file. It applies a two step process:

Step 1:  Attempt to find DCMTK version providing a DCMTKConfig.cmake file.

Step 2:  If step 1 failed, rely on FindDCMTK.cmake to set DCMTK_*
variables details below.

Recent DCMTK
provides a DCMTKConfig.cmake package configuration file. To exclusively use the package configuration file
(recommended when possible), pass the NO_MODULE option to
find_package(). For example, find_package(DCMTK NO_MODULE).
This requires official DCMTK snapshot 3.6.1_20140617 or newer.

Until all clients update to the more recent DCMTK, build systems will need
to support different versions of DCMTK.

On any given system, the following combinations of DCMTK versions could be
considered:

SYSTEM DCMTK

LOCAL DCMTK

Supported ?

Case A

NA

[ ] DCMTKConfig

YES

Case B

NA

[X] DCMTKConfig

YES

Case C

[ ] DCMTKConfig

NA

YES

Case D

[X] DCMTKConfig

NA

YES

Case E

[ ] DCMTKConfig

[ ] DCMTKConfig

YES (*)

Case F

[X] DCMTKConfig

[ ] DCMTKConfig

NO

Case G

[ ] DCMTKConfig

[X] DCMTKConfig

YES

Case H

[X] DCMTKConfig

[X] DCMTKConfig

YES

(*) See Troubleshooting section.

Legend:

NA ...............: Means that no System or Local DCMTK is available

[ ] DCMTKConfig ..: Means that the version of DCMTK does NOT export a DCMTKConfig.cmake file.

[X] DCMTKConfig ..: Means that the version of DCMTK exports a DCMTKConfig.cmake file.

Troubleshooting¶

What to do if my project finds a different version of DCMTK?

Remove DCMTK entry from the CMake cache per find_package()
documentation.

Table of Contents

FindDCMTK

Compatibility

Troubleshooting

Previous topic

FindCygwin

Next topic

FindDevIL

This Page

Show Source

Quick search

    <form class="search" action="../search.html" method="get">
      <input type="text" name="q" aria-labelledby="searchlabel" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/>
      <input type="submit" value="Go" />
    </form>

Navigation

          index

          next |

          previous |

    CMake »

    3.29.0-rc3 Documentation »

cmake-modules(7) »

FindDCMTK

        © Copyright 2000-2024 Kitware, Inc. and Contributors.
      Created using Sphinx 6.2.1.


code:
<!DOCTYPE html>

    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" /><meta name="generator" content="Docutils 0.19: https://docutils.sourceforge.io/" />

  <title>FindDart — CMake 3.29.0-rc3 Documentation</title>

    <link rel="stylesheet" type="text/css" href="../_static/pygments.css" />
    <link rel="stylesheet" type="text/css" href="../_static/cmake.css" />

    <link rel="icon" href="../_static/cmake-favicon.ico"/>
    <link rel="index" title="Index" href="../genindex.html" />
    <link rel="search" title="Search" href="../search.html" />
    <link rel="next" title="FindITK" href="FindITK.html" />
    <link rel="prev" title="FindCUDA" href="FindCUDA.html" />

Navigation

          index

          next |

          previous |

    CMake »

    3.29.0-rc3 Documentation »

cmake-modules(7) »

FindDart

FindDart¶

Deprecated since version 3.27: This module is available only if policy CMP0145 is not set to NEW.

Find DART

This module looks for the dart testing software and sets DART_ROOT to
point to where it found it.

Previous topic

FindCUDA

Next topic

FindITK

This Page

Show Source

Quick search

    <form class="search" action="../search.html" method="get">
      <input type="text" name="q" aria-labelledby="searchlabel" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/>
      <input type="submit" value="Go" />
    </form>

Navigation

          index

          next |

          previous |

    CMake »

    3.29.0-rc3 Documentation »

cmake-modules(7) »

FindDart

        © Copyright 2000-2024 Kitware, Inc. and Contributors.
      Created using Sphinx 6.2.1.


code:
<!DOCTYPE html>

    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" /><meta name="generator" content="Docutils 0.19: https://docutils.sourceforge.io/" />

  <title>FindDevIL — CMake 3.29.0-rc3 Documentation</title>

    <link rel="stylesheet" type="text/css" href="../_static/pygments.css" />
    <link rel="stylesheet" type="text/css" href="../_static/cmake.css" />

    <link rel="icon" href="../_static/cmake-favicon.ico"/>
    <link rel="index" title="Index" href="../genindex.html" />
    <link rel="search" title="Search" href="../search.html" />
    <link rel="next" title="FindDoxygen" href="FindDoxygen.html" />
    <link rel="prev" title="FindDCMTK" href="FindDCMTK.html" />

Navigation

          index

          next |

          previous |

    CMake »

    3.29.0-rc3 Documentation »

cmake-modules(7) »

FindDevIL

FindDevIL¶

This module locates the developer's image library.
https://openil.sourceforge.net/

IMPORTED Targets¶

New in version 3.21.

This module defines the IMPORTED targets:

DevIL::IL

Defined if the system has DevIL.

DevIL::ILU

Defined if the system has DevIL Utilities.

DevIL::ILUT

Defined if the system has DevIL Utility Toolkit.

Result Variables¶

This module sets:

IL_LIBRARIES

The name of the IL library. These include the full path to
the core DevIL library. This one has to be linked into the
application.

ILU_LIBRARIES

The name of the ILU library. Again, the full path. This
library is for filters and effects, not actual loading. It
doesn't have to be linked if the functionality it provides
is not used.

ILUT_LIBRARIES

The name of the ILUT library. Full path. This part of the
library interfaces with OpenGL. It is not strictly needed
in applications.

IL_INCLUDE_DIR

where to find the il.h, ilu.h and ilut.h files.

DevIL_FOUND

This is set to TRUE if all the above variables were set.
This will be set to false if ILU or ILUT are not found,
even if they are not needed. In most systems, if one
library is found all the others are as well. That's the
way the DevIL developers release it.

DevIL_ILUT_FOUND

New in version 3.21.

This is set to TRUE if the ILUT library is found.

Table of Contents

FindDevIL

IMPORTED Targets

Result Variables

Previous topic

FindDCMTK

Next topic

FindDoxygen

This Page

Show Source

Quick search

    <form class="search" action="../search.html" method="get">
      <input type="text" name="q" aria-labelledby="searchlabel" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/>
      <input type="submit" value="Go" />
    </form>

Navigation

          index

          next |

          previous |

    CMake »

    3.29.0-rc3 Documentation »

cmake-modules(7) »

FindDevIL

        © Copyright 2000-2024 Kitware, Inc. and Contributors.
      Created using Sphinx 6.2.1.


code:
<!DOCTYPE html>

    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" /><meta name="generator" content="Docutils 0.19: https://docutils.sourceforge.io/" />

  <title>FindDoxygen — CMake 3.29.0-rc3 Documentation</title>

    <link rel="stylesheet" type="text/css" href="../_static/pygments.css" />
    <link rel="stylesheet" type="text/css" href="../_static/cmake.css" />

    <link rel="icon" href="../_static/cmake-favicon.ico"/>
    <link rel="index" title="Index" href="../genindex.html" />
    <link rel="search" title="Search" href="../search.html" />
    <link rel="next" title="FindEnvModules" href="FindEnvModules.html" />
    <link rel="prev" title="FindDevIL" href="FindDevIL.html" />

Navigation

          index

          next |

          previous |

    CMake »

    3.29.0-rc3 Documentation »

cmake-modules(7) »

FindDoxygen

FindDoxygen¶

Doxygen is a documentation generation tool (see https://www.doxygen.nl).
This module looks for Doxygen and some optional tools it supports:

dot

Graphviz dot utility used to render various
graphs.

mscgen

Message Chart Generator utility used
by Doxygen's \msc and \mscfile commands.

dia

Dia the diagram editor used by Doxygen's
\diafile command.

New in version 3.9: These tools are available as components in the find_package() command.
For example:

# Require dot, treat the other components as optional
find_package(Doxygen
             REQUIRED dot
             OPTIONAL_COMPONENTS mscgen dia)

The following variables are defined by this module:

DOXYGEN_FOUND¶

True if the doxygen executable was found.

DOXYGEN_VERSION¶

The version reported by doxygen --version.

New in version 3.9: The module defines IMPORTED targets for Doxygen and each component found.
These can be used as part of custom commands, etc. and should be preferred over
old-style (and now deprecated) variables like DOXYGEN_EXECUTABLE. The
following import targets are defined if their corresponding executable could be
found (the component import targets will only be defined if that component was
requested):

Doxygen::doxygen
Doxygen::dot
Doxygen::mscgen
Doxygen::dia

Functions¶

doxygen_add_docs¶

New in version 3.9.

This function is intended as a convenience for adding a target for generating
documentation with Doxygen. It aims to provide sensible defaults so that
projects can generally just provide the input files and directories and that
will be sufficient to give sensible results. The function supports the
ability to customize the Doxygen configuration used to build the
documentation.

doxygen_add_docs(targetName
    [filesOrDirs...]
    [ALL]
    [USE_STAMP_FILE]
    [WORKING_DIRECTORY dir]
    [COMMENT comment]
    [CONFIG_FILE filename])

The function constructs a Doxyfile and defines a custom target that runs
Doxygen on that generated file. The listed files and directories are used as
the INPUT of the generated Doxyfile and they can contain wildcards.
Any files that are listed explicitly will also be added as SOURCES of the
custom target so they will show up in an IDE project's source list.

So that relative input paths work as expected, by default the working
directory of the Doxygen command will be the current source directory (i.e.
CMAKE_CURRENT_SOURCE_DIR). This can be overridden with the
WORKING_DIRECTORY option to change the directory used as the relative
base point. Note also that Doxygen's default behavior is to strip the working
directory from relative paths in the generated documentation (see the
STRIP_FROM_PATH Doxygen config option for details).

If provided, the optional comment will be passed as the COMMENT for
the add_custom_target() command used to create the custom target
internally.

New in version 3.27: If CONFIG_FILE is set, the given file provided with full-path
will be used as doxygen configuration file

New in version 3.12: If ALL is set, the target will be added to the default build target.

New in version 3.16: If USE_STAMP_FILE is set, the custom command defined by this function will
create a stamp file with the name <targetName>.stamp in the current
binary directory whenever doxygen is re-run.  With this option present, all
items in <filesOrDirs> must be files (i.e. no directories, symlinks or
wildcards) and each of the files must exist at the time
doxygen_add_docs() is called.  An error will be raised if any of the
items listed is missing or is not a file when USE_STAMP_FILE is given.
A dependency will be created on each of the files so that doxygen will only
be re-run if one of the files is updated.  Without the USE_STAMP_FILE
option, doxygen will always be re-run if the <targetName> target is built
regardless of whether anything listed in <filesOrDirs> has changed.

The contents of the generated Doxyfile can be customized by setting CMake
variables before calling doxygen_add_docs(). Any variable with a name of
the form DOXYGEN_<tag> will have its value substituted for the
corresponding <tag> configuration option in the Doxyfile. See the
Doxygen documentation for the
full list of supported configuration options.

Some of Doxygen's defaults are overridden to provide more appropriate
behavior for a CMake project. Each of the following will be explicitly set
unless the variable already has a value before doxygen_add_docs() is
called (with some exceptions noted):

DOXYGEN_HAVE_DOT¶

Set to YES if the dot component was requested and it was found,
NO otherwise. Any existing value of DOXYGEN_HAVE_DOT is ignored.

DOXYGEN_DOT_MULTI_TARGETS¶

Set to YES by this module (note that this requires a dot version
newer than 1.8.10). This option is only meaningful if DOXYGEN_HAVE_DOT
is also set to YES.

DOXYGEN_GENERATE_LATEX¶

Set to NO by this module.

DOXYGEN_WARN_FORMAT¶

For Visual Studio based generators, this is set to the form recognized by
the Visual Studio IDE: $file($line) : $text. For all other generators,
Doxygen's default value is not overridden.

DOXYGEN_PROJECT_NAME¶

Populated with the name of the current project (i.e.
PROJECT_NAME).

DOXYGEN_PROJECT_NUMBER¶

Populated with the version of the current project (i.e.
PROJECT_VERSION).

DOXYGEN_PROJECT_BRIEF¶

Populated with the description of the current project (i.e.
PROJECT_DESCRIPTION).

DOXYGEN_INPUT¶

Projects should not set this variable. It will be populated with the set of
files and directories passed to doxygen_add_docs(), thereby providing
consistent behavior with the other built-in commands like
add_executable(), add_library() and
add_custom_target(). If a variable named DOXYGEN_INPUT is set
by the project, it will be ignored and a warning will be issued.

DOXYGEN_RECURSIVE¶

Set to YES by this module.

DOXYGEN_EXCLUDE_PATTERNS¶

If the set of inputs includes directories, this variable will specify
patterns used to exclude files from them. The following patterns are added
by doxygen_add_docs() to ensure CMake-specific files and directories
are not included in the input. If the project sets
DOXYGEN_EXCLUDE_PATTERNS, those contents are merged with these
additional patterns rather than replacing them:

*/.git/*
*/.svn/*
*/.hg/*
*/CMakeFiles/*
*/_CPack_Packages/*
DartConfiguration.tcl
CMakeLists.txt
CMakeCache.txt

DOXYGEN_OUTPUT_DIRECTORY¶

Set to CMAKE_CURRENT_BINARY_DIR by this module. Note that if
the project provides its own value for this and it is a relative path, it
will be converted to an absolute path relative to the current binary
directory. This is necessary because doxygen will normally be run from a
directory within the source tree so that relative source paths work as
expected. If this directory does not exist, it will be recursively created
prior to executing the doxygen commands.

To change any of these defaults or override any other Doxygen config option,
set relevant variables before calling doxygen_add_docs(). For example:

set(DOXYGEN_GENERATE_HTML NO)
set(DOXYGEN_GENERATE_MAN YES)

doxygen_add_docs(
    doxygen
    ${PROJECT_SOURCE_DIR}
    COMMENT "Generate man pages"
)

A number of Doxygen config options accept lists of values, but Doxygen requires
them to be separated by whitespace. CMake variables hold lists as a string with
items separated by semi-colons, so a conversion needs to be performed. The
doxygen_add_docs() command specifically checks the following Doxygen config
options and will convert their associated CMake variable's contents into the
required form if set. CMake variables are named DOXYGEN_<name> for the
Doxygen settings specified here.

ABBREVIATE_BRIEF
ALIASES
CITE_BIB_FILES
DIAFILE_DIRS
DOTFILE_DIRS
DOT_FONTPATH
ENABLED_SECTIONS
EXAMPLE_PATH
EXAMPLE_PATTERNS
EXCLUDE
EXCLUDE_PATTERNS
EXCLUDE_SYMBOLS
EXPAND_AS_DEFINED
EXTENSION_MAPPING
EXTRA_PACKAGES
EXTRA_SEARCH_MAPPINGS
FILE_PATTERNS
FILTER_PATTERNS
FILTER_SOURCE_PATTERNS
HTML_EXTRA_FILES
HTML_EXTRA_STYLESHEET
IGNORE_PREFIX
IMAGE_PATH
INCLUDE_FILE_PATTERNS
INCLUDE_PATH
INPUT
LATEX_EXTRA_FILES
LATEX_EXTRA_STYLESHEET
MATHJAX_EXTENSIONS
MSCFILE_DIRS
PLANTUML_INCLUDE_PATH
PREDEFINED
QHP_CUST_FILTER_ATTRS
QHP_SECT_FILTER_ATTRS
STRIP_FROM_INC_PATH
STRIP_FROM_PATH
TAGFILES
TCL_SUBST

The following single value Doxygen options will be quoted automatically
if they contain at least one space:

CHM_FILE
DIA_PATH
DOCBOOK_OUTPUT
DOCSET_FEEDNAME
DOCSET_PUBLISHER_NAME
DOT_FONTNAME
DOT_PATH
EXTERNAL_SEARCH_ID
FILE_VERSION_FILTER
GENERATE_TAGFILE
HHC_LOCATION
HTML_FOOTER
HTML_HEADER
HTML_OUTPUT
HTML_STYLESHEET
INPUT_FILTER
LATEX_FOOTER
LATEX_HEADER
LATEX_OUTPUT
LAYOUT_FILE
MAN_OUTPUT
MAN_SUBDIR
MATHJAX_CODEFILE
MSCGEN_PATH
OUTPUT_DIRECTORY
PERL_PATH
PLANTUML_JAR_PATH
PROJECT_BRIEF
PROJECT_LOGO
PROJECT_NAME
QCH_FILE
QHG_LOCATION
QHP_CUST_FILTER_NAME
QHP_VIRTUAL_FOLDER
RTF_EXTENSIONS_FILE
RTF_OUTPUT
RTF_STYLESHEET_FILE
SEARCHDATA_FILE
USE_MDFILE_AS_MAINPAGE
WARN_FORMAT
WARN_LOGFILE
XML_OUTPUT

New in version 3.11: There are situations where it may be undesirable for a particular config option
to be automatically quoted by doxygen_add_docs(), such as ALIASES which
may need to include its own embedded quoting.  The DOXYGEN_VERBATIM_VARS
variable can be used to specify a list of Doxygen variables (including the
leading DOXYGEN_ prefix) which should not be quoted.  The project is then
responsible for ensuring that those variables' values make sense when placed
directly in the Doxygen input file.  In the case of list variables, list items
are still separated by spaces, it is only the automatic quoting that is
skipped.  For example, the following allows doxygen_add_docs() to apply
quoting to DOXYGEN_PROJECT_BRIEF, but not each item in the
DOXYGEN_ALIASES list (bracket syntax can also
be used to make working with embedded quotes easier):

set(DOXYGEN_PROJECT_BRIEF "String with spaces")
set(DOXYGEN_ALIASES
    [[somealias="@some_command param"]]
    "anotherAlias=@foobar"
)
set(DOXYGEN_VERBATIM_VARS DOXYGEN_ALIASES)

The resultant Doxyfile will contain the following lines:

PROJECT_BRIEF = "String with spaces"
ALIASES       = somealias="@some_command param" anotherAlias=@foobar

Deprecated Result Variables¶

Deprecated since version 3.9.

For compatibility with previous versions of CMake, the following variables
are also defined but they are deprecated and should no longer be used:

DOXYGEN_EXECUTABLE¶

The path to the doxygen command. If projects need to refer to the
doxygen executable directly, they should use the Doxygen::doxygen
import target instead.

DOXYGEN_DOT_FOUND¶

True if the dot executable was found.

DOXYGEN_DOT_EXECUTABLE¶

The path to the dot command. If projects need to refer to the dot
executable directly, they should use the Doxygen::dot import target
instead.

DOXYGEN_DOT_PATH¶

The path to the directory containing the dot executable as reported in
DOXYGEN_DOT_EXECUTABLE. The path may have forward slashes even on Windows
and is not suitable for direct substitution into a Doxyfile.in template.
If you need this value, get the IMPORTED_LOCATION property of the
Doxygen::dot target and use get_filename_component() to extract
the directory part of that path. You may also want to consider using
file(TO_NATIVE_PATH) to prepare the path for a Doxygen
configuration file.

Deprecated Hint Variables¶

Deprecated since version 3.9.

DOXYGEN_SKIP_DOT¶

This variable has no effect for the component form of find_package.
In backward compatibility mode (i.e. without components list) it prevents
the finder module from searching for Graphviz's dot utility.

Table of Contents

FindDoxygen

Functions

Deprecated Result Variables

Deprecated Hint Variables

Previous topic

FindDevIL

Next topic

FindEnvModules

This Page

Show Source

Quick search

    <form class="search" action="../search.html" method="get">
      <input type="text" name="q" aria-labelledby="searchlabel" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/>
      <input type="submit" value="Go" />
    </form>

Navigation

          index

          next |

          previous |

    CMake »

    3.29.0-rc3 Documentation »

cmake-modules(7) »

FindDoxygen

        © Copyright 2000-2024 Kitware, Inc. and Contributors.
      Created using Sphinx 6.2.1.


code:
<!DOCTYPE html>

    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" /><meta name="generator" content="Docutils 0.19: https://docutils.sourceforge.io/" />

  <title>FindEXPAT — CMake 3.29.0-rc3 Documentation</title>

    <link rel="stylesheet" type="text/css" href="../_static/pygments.css" />
    <link rel="stylesheet" type="text/css" href="../_static/cmake.css" />

    <link rel="icon" href="../_static/cmake-favicon.ico"/>
    <link rel="index" title="Index" href="../genindex.html" />
    <link rel="search" title="Search" href="../search.html" />
    <link rel="next" title="FindFLEX" href="FindFLEX.html" />
    <link rel="prev" title="FindEnvModules" href="FindEnvModules.html" />

Navigation

          index

          next |

          previous |

    CMake »

    3.29.0-rc3 Documentation »

cmake-modules(7) »

FindEXPAT

FindEXPAT¶

Find the native Expat headers and library.
Expat is a stream-oriented XML parser library written in C.

Imported Targets¶

New in version 3.10.

This module defines the following IMPORTED targets:

EXPAT::EXPAT

The Expat expat library, if found.

Result Variables¶

This module will set the following variables in your project:

EXPAT_INCLUDE_DIRS

where to find expat.h, etc.

EXPAT_LIBRARIES

the libraries to link against to use Expat.

EXPAT_FOUND

true if the Expat headers and libraries were found.

Hints¶

EXPAT_USE_STATIC_LIBS

New in version 3.28.

Set to TRUE to use static libraries.

Table of Contents

FindEXPAT

Imported Targets

Result Variables

Hints

Previous topic

FindEnvModules

Next topic

FindFLEX

This Page

Show Source

Quick search

    <form class="search" action="../search.html" method="get">
      <input type="text" name="q" aria-labelledby="searchlabel" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/>
      <input type="submit" value="Go" />
    </form>

Navigation

          index

          next |

          previous |

    CMake »

    3.29.0-rc3 Documentation »

cmake-modules(7) »

FindEXPAT

        © Copyright 2000-2024 Kitware, Inc. and Contributors.
      Created using Sphinx 6.2.1.


code:
<!DOCTYPE html>

    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" /><meta name="generator" content="Docutils 0.19: https://docutils.sourceforge.io/" />

  <title>FindEnvModules — CMake 3.29.0-rc3 Documentation</title>

    <link rel="stylesheet" type="text/css" href="../_static/pygments.css" />
    <link rel="stylesheet" type="text/css" href="../_static/cmake.css" />

    <link rel="icon" href="../_static/cmake-favicon.ico"/>
    <link rel="index" title="Index" href="../genindex.html" />
    <link rel="search" title="Search" href="../search.html" />
    <link rel="next" title="FindEXPAT" href="FindEXPAT.html" />
    <link rel="prev" title="FindDoxygen" href="FindDoxygen.html" />

Navigation

          index

          next |

          previous |

    CMake »

    3.29.0-rc3 Documentation »

cmake-modules(7) »

FindEnvModules

FindEnvModules¶

New in version 3.15.

Locate an environment module implementation and make commands available to
CMake scripts to use them.  This is compatible with both Lua-based Lmod
and TCL-based EnvironmentModules.

This module is intended for the use case of setting up the compiler and library
environment within a CTest Script (ctest -S).  It can
also be used in a CMake Script (cmake -P).

Note

The loaded environment will not survive past the end of the calling process.
Do not use this module in project code (CMakeLists.txt files) to load
a compiler environment; it will not be available during the build.  Instead
load the environment manually before running CMake or using the generated
build system.

Example Usage¶

set(CTEST_BUILD_NAME "CrayLinux-CrayPE-Cray-dynamic")
set(CTEST_BUILD_CONFIGURATION Release)
set(CTEST_BUILD_FLAGS "-k -j8")
set(CTEST_CMAKE_GENERATOR "Unix Makefiles")

...

find_package(EnvModules REQUIRED)

env_module(purge)
env_module(load modules)
env_module(load craype)
env_module(load PrgEnv-cray)
env_module(load craype-knl)
env_module(load cray-mpich)
env_module(load cray-libsci)

set(ENV{CRAYPE_LINK_TYPE} dynamic)

...

Result Variables¶

This module will set the following variables in your project:

EnvModules_FOUND

True if a compatible environment modules framework was found.

Cache Variables¶

The following cache variable will be set:

EnvModules_COMMAND

The low level module command to use.  Currently supported
implementations are the Lua based Lmod and TCL based EnvironmentModules.

Environment Variables¶

ENV{MODULESHOME}

Usually set by the module environment implementation, used as a hint to
locate the module command to execute.

Provided Functions¶

This defines the following CMake functions for interacting with environment
modules:

env_module¶

Execute an arbitrary module command:

env_module(cmd arg1 ... argN)
env_module(
  COMMAND cmd arg1 ... argN
  [OUTPUT_VARIABLE <out-var>]
  [RESULT_VARIABLE <ret-var>]
)

The options are:

cmd arg1 ... argN

The module sub-command and arguments to execute as if they were
passed directly to the module command in your shell environment.

OUTPUT_VARIABLE <out-var>

The standard output from executing the module command.

RESULT_VARIABLE <ret-var>

The return code from executing the module command.

env_module_swap¶

Swap one module for another:

env_module_swap(out_mod in_mod
  [OUTPUT_VARIABLE <out-var>]
  [RESULT_VARIABLE <ret-var>]
)

This is functionally equivalent to the module swap out_mod in_mod shell
command.  The options are:

OUTPUT_VARIABLE <out-var>

The standard output from executing the module command.

RESULT_VARIABLE <ret-var>

The return code from executing the module command.

env_module_list¶

Retrieve the list of currently loaded modules:

env_module_list(<out-var>)

This is functionally equivalent to the module list shell command.
The result is stored in <out-var> as a properly formatted CMake
semicolon-separated list variable.

env_module_avail¶

Retrieve the list of available modules:

env_module_avail([<mod-prefix>] <out-var>)

This is functionally equivalent to the module avail <mod-prefix> shell
command.  The result is stored in <out-var> as a properly formatted
CMake semicolon-separated list variable.

Table of Contents

FindEnvModules

Example Usage

Result Variables

Cache Variables

Environment Variables

Provided Functions

Previous topic

FindDoxygen

Next topic

FindEXPAT

This Page

Show Source

Quick search

    <form class="search" action="../search.html" method="get">
      <input type="text" name="q" aria-labelledby="searchlabel" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/>
      <input type="submit" value="Go" />
    </form>

Navigation

          index

          next |

          previous |

    CMake »

    3.29.0-rc3 Documentation »

cmake-modules(7) »

FindEnvModules

        © Copyright 2000-2024 Kitware, Inc. and Contributors.
      Created using Sphinx 6.2.1.


code:
<!DOCTYPE html>

    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" /><meta name="generator" content="Docutils 0.19: https://docutils.sourceforge.io/" />

  <title>FindFLEX — CMake 3.29.0-rc3 Documentation</title>

    <link rel="stylesheet" type="text/css" href="../_static/pygments.css" />
    <link rel="stylesheet" type="text/css" href="../_static/cmake.css" />

    <link rel="icon" href="../_static/cmake-favicon.ico"/>
    <link rel="index" title="Index" href="../genindex.html" />
    <link rel="search" title="Search" href="../search.html" />
    <link rel="next" title="FindFLTK" href="FindFLTK.html" />
    <link rel="prev" title="FindEXPAT" href="FindEXPAT.html" />

Navigation

          index

          next |

          previous |

    CMake »

    3.29.0-rc3 Documentation »

cmake-modules(7) »

FindFLEX

FindFLEX¶

Find Fast Lexical Analyzer (Flex) executable and provides a macro
to generate custom build rules

The module defines the following variables:

FLEX_FOUND - True is flex executable is found
FLEX_EXECUTABLE - the path to the flex executable
FLEX_VERSION - the version of flex
FLEX_LIBRARIES - The flex libraries
FLEX_INCLUDE_DIRS - The path to the flex headers

The minimum required version of flex can be specified using the
standard syntax, e.g.  find_package(FLEX 2.5.13)

If flex is found on the system, the module provides the macro:

FLEX_TARGET(Name FlexInput FlexOutput
            [COMPILE_FLAGS <string>]
            [DEFINES_FILE <string>]
            )

which creates a custom command to generate the FlexOutput file from
the FlexInput file.  Name is an alias used to get details of this custom
command.  If COMPILE_FLAGS option is specified, the next
parameter is added to the flex command line.

New in version 3.5: If flex is configured to
output a header file, the DEFINES_FILE option may be used to specify its
name.

Changed in version 3.17: When CMP0098 is set to NEW, flex runs in the
CMAKE_CURRENT_BINARY_DIR directory.

The macro defines the following variables:

FLEX_${Name}_DEFINED - true is the macro ran successfully
FLEX_${Name}_OUTPUTS - the source file generated by the custom rule, an
alias for FlexOutput
FLEX_${Name}_INPUT - the flex source file, an alias for ${FlexInput}
FLEX_${Name}_OUTPUT_HEADER - the header flex output, if any.

Flex scanners often use tokens defined by Bison: the code generated
by Flex depends of the header generated by Bison.  This module also
defines a macro:

ADD_FLEX_BISON_DEPENDENCY(FlexTarget BisonTarget)

which adds the required dependency between a scanner and a parser
where FlexTarget and BisonTarget are the first parameters of
respectively FLEX_TARGET and BISON_TARGET macros.

====================================================================
Example:

find_package(BISON)
find_package(FLEX)

BISON_TARGET(MyParser parser.y ${CMAKE_CURRENT_BINARY_DIR}/parser.cpp)
FLEX_TARGET(MyScanner lexer.l  ${CMAKE_CURRENT_BINARY_DIR}/lexer.cpp)
ADD_FLEX_BISON_DEPENDENCY(MyScanner MyParser)

 include_directories(${CMAKE_CURRENT_BINARY_DIR})
 add_executable(Foo
    Foo.cc
    ${BISON_MyParser_OUTPUTS}
    ${FLEX_MyScanner_OUTPUTS}
 )
 target_link_libraries(Foo ${FLEX_LIBRARIES})
====================================================================

Previous topic

FindEXPAT

Next topic

FindFLTK

This Page

Show Source

Quick search

    <form class="search" action="../search.html" method="get">
      <input type="text" name="q" aria-labelledby="searchlabel" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/>
      <input type="submit" value="Go" />
    </form>

Navigation

          index

          next |

          previous |

    CMake »

    3.29.0-rc3 Documentation »

cmake-modules(7) »

FindFLEX

        © Copyright 2000-2024 Kitware, Inc. and Contributors.
      Created using Sphinx 6.2.1.


code:
<!DOCTYPE html>

    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" /><meta name="generator" content="Docutils 0.19: https://docutils.sourceforge.io/" />

  <title>FindFLTK — CMake 3.29.0-rc3 Documentation</title>

    <link rel="stylesheet" type="text/css" href="../_static/pygments.css" />
    <link rel="stylesheet" type="text/css" href="../_static/cmake.css" />

    <link rel="icon" href="../_static/cmake-favicon.ico"/>
    <link rel="index" title="Index" href="../genindex.html" />
    <link rel="search" title="Search" href="../search.html" />
    <link rel="next" title="FindFLTK2" href="FindFLTK2.html" />
    <link rel="prev" title="FindFLEX" href="FindFLEX.html" />

Navigation

          index

          next |

          previous |

    CMake »

    3.29.0-rc3 Documentation »

cmake-modules(7) »

FindFLTK

FindFLTK¶

Find the Fast Light Toolkit (FLTK) library

Input Variables¶

By default this module will search for all of the FLTK components and
add them to the FLTK_LIBRARIES variable.  You can limit the components
which get placed in FLTK_LIBRARIES by defining one or more of the
following three options:

FLTK_SKIP_OPENGL

Set to true to disable searching for the FLTK GL library

FLTK_SKIP_FORMS

Set to true to disable searching for the FLTK Forms library

FLTK_SKIP_IMAGES

Set to true to disable searching for the FLTK Images library

FLTK is composed also by a binary tool. You can set the following option:

FLTK_SKIP_FLUID

Set to true to not look for the FLUID binary

Result Variables¶

The following variables will be defined:

FLTK_FOUND

True if all components not skipped were found

FLTK_INCLUDE_DIR

Path to the include directory for FLTK header files

FLTK_LIBRARIES

List of the FLTK libraries found

FLTK_FLUID_EXECUTABLE

Path to the FLUID binary tool

FLTK_WRAP_UI

True if FLUID is found, used to enable the FLTK_WRAP_UI command

Cache Variables¶

The following cache variables are also available to set or use:

FLTK_BASE_LIBRARY_RELEASE

The FLTK base library (optimized)

FLTK_BASE_LIBRARY_DEBUG

The FLTK base library (debug)

FLTK_GL_LIBRARY_RELEASE

The FLTK GL library (optimized)

FLTK_GL_LIBRARY_DEBUG

The FLTK GL library (debug)

FLTK_FORMS_LIBRARY_RELEASE

The FLTK Forms library (optimized)

FLTK_FORMS_LIBRARY_DEBUG

The FLTK Forms library (debug)

FLTK_IMAGES_LIBRARY_RELEASE

The FLTK Images protobuf library (optimized)

FLTK_IMAGES_LIBRARY_DEBUG

The FLTK Images library (debug)

New in version 3.11: Debug and Release variants are found separately and use per-configuration
variables.

Table of Contents

FindFLTK

Input Variables

Result Variables

Cache Variables

Previous topic

FindFLEX

Next topic

FindFLTK2

This Page

Show Source

Quick search

    <form class="search" action="../search.html" method="get">
      <input type="text" name="q" aria-labelledby="searchlabel" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/>
      <input type="submit" value="Go" />
    </form>

Navigation

          index

          next |

          previous |

    CMake »

    3.29.0-rc3 Documentation »

cmake-modules(7) »

FindFLTK

        © Copyright 2000-2024 Kitware, Inc. and Contributors.
      Created using Sphinx 6.2.1.


code:
<!DOCTYPE html>

    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" /><meta name="generator" content="Docutils 0.19: https://docutils.sourceforge.io/" />

  <title>FindFLTK2 — CMake 3.29.0-rc3 Documentation</title>

    <link rel="stylesheet" type="text/css" href="../_static/pygments.css" />
    <link rel="stylesheet" type="text/css" href="../_static/cmake.css" />

    <link rel="icon" href="../_static/cmake-favicon.ico"/>
    <link rel="index" title="Index" href="../genindex.html" />
    <link rel="search" title="Search" href="../search.html" />
    <link rel="next" title="FindFontconfig" href="FindFontconfig.html" />
    <link rel="prev" title="FindFLTK" href="FindFLTK.html" />

Navigation

          index

          next |

          previous |

    CMake »

    3.29.0-rc3 Documentation »

cmake-modules(7) »

FindFLTK2

FindFLTK2¶

Find the native FLTK 2.0 includes and library

The following settings are defined

FLTK2_FLUID_EXECUTABLE, where to find the Fluid tool
FLTK2_WRAP_UI, This enables the FLTK2_WRAP_UI command
FLTK2_INCLUDE_DIR, where to find include files
FLTK2_LIBRARIES, list of fltk2 libraries
FLTK2_FOUND, Don't use FLTK2 if false.

The following settings should not be used in general.

FLTK2_BASE_LIBRARY   = the full path to fltk2.lib
FLTK2_GL_LIBRARY     = the full path to fltk2_gl.lib
FLTK2_IMAGES_LIBRARY = the full path to fltk2_images.lib

Previous topic

FindFLTK

Next topic

FindFontconfig

This Page

Show Source

Quick search

    <form class="search" action="../search.html" method="get">
      <input type="text" name="q" aria-labelledby="searchlabel" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/>
      <input type="submit" value="Go" />
    </form>

Navigation

          index

          next |

          previous |

    CMake »

    3.29.0-rc3 Documentation »

cmake-modules(7) »

FindFLTK2

        © Copyright 2000-2024 Kitware, Inc. and Contributors.
      Created using Sphinx 6.2.1.


code:
<!DOCTYPE html>

    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" /><meta name="generator" content="Docutils 0.19: https://docutils.sourceforge.io/" />

  <title>FindFontconfig — CMake 3.29.0-rc3 Documentation</title>

    <link rel="stylesheet" type="text/css" href="../_static/pygments.css" />
    <link rel="stylesheet" type="text/css" href="../_static/cmake.css" />

    <link rel="icon" href="../_static/cmake-favicon.ico"/>
    <link rel="index" title="Index" href="../genindex.html" />
    <link rel="search" title="Search" href="../search.html" />
    <link rel="next" title="FindFreetype" href="FindFreetype.html" />
    <link rel="prev" title="FindFLTK2" href="FindFLTK2.html" />

Navigation

          index

          next |

          previous |

    CMake »

    3.29.0-rc3 Documentation »

cmake-modules(7) »

FindFontconfig

FindFontconfig¶

New in version 3.14.

Find Fontconfig headers and library.

Imported Targets¶

Fontconfig::Fontconfig

The Fontconfig library, if found.

Result Variables¶

This will define the following variables in your project:

Fontconfig_FOUND

true if (the requested version of) Fontconfig is available.

Fontconfig_VERSION

the version of Fontconfig.

Fontconfig_LIBRARIES

the libraries to link against to use Fontconfig.

Fontconfig_INCLUDE_DIRS

where to find the Fontconfig headers.

Fontconfig_COMPILE_OPTIONS

this should be passed to target_compile_options(), if the
target is not used for linking

Table of Contents

FindFontconfig

Imported Targets

Result Variables

Previous topic

FindFLTK2

Next topic

FindFreetype

This Page

Show Source

Quick search

    <form class="search" action="../search.html" method="get">
      <input type="text" name="q" aria-labelledby="searchlabel" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/>
      <input type="submit" value="Go" />
    </form>

Navigation

          index

          next |

          previous |

    CMake »

    3.29.0-rc3 Documentation »

cmake-modules(7) »

FindFontconfig

        © Copyright 2000-2024 Kitware, Inc. and Contributors.
      Created using Sphinx 6.2.1.


code:
<!DOCTYPE html>

    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" /><meta name="generator" content="Docutils 0.19: https://docutils.sourceforge.io/" />

  <title>FindFreetype — CMake 3.29.0-rc3 Documentation</title>

    <link rel="stylesheet" type="text/css" href="../_static/pygments.css" />
    <link rel="stylesheet" type="text/css" href="../_static/cmake.css" />

    <link rel="icon" href="../_static/cmake-favicon.ico"/>
    <link rel="index" title="Index" href="../genindex.html" />
    <link rel="search" title="Search" href="../search.html" />
    <link rel="next" title="FindGCCXML" href="FindGCCXML.html" />
    <link rel="prev" title="FindFontconfig" href="FindFontconfig.html" />

Navigation

          index

          next |

          previous |

    CMake »

    3.29.0-rc3 Documentation »

cmake-modules(7) »

FindFreetype

FindFreetype¶

Find the FreeType font renderer includes and library.

Imported Targets¶

New in version 3.10.

This module defines the following IMPORTED target:

Freetype::Freetype

The Freetype freetype library, if found

Result Variables¶

This module will set the following variables in your project:

FREETYPE_FOUND

true if the Freetype headers and libraries were found

FREETYPE_INCLUDE_DIRS

directories containing the Freetype headers. This is the
concatenation of the variables:

FREETYPE_INCLUDE_DIR_ft2build

directory holding the main Freetype API configuration header

FREETYPE_INCLUDE_DIR_freetype2

directory holding Freetype public headers

FREETYPE_LIBRARIES

the library to link against

FREETYPE_VERSION_STRING

the version of freetype found

New in version 3.7: Debug and Release variants are found separately.

Hints¶

The user may set the environment variable FREETYPE_DIR to the root
directory of a Freetype installation.

Table of Contents

FindFreetype

Imported Targets

Result Variables

Hints

Previous topic

FindFontconfig

Next topic

FindGCCXML

This Page

Show Source

Quick search

    <form class="search" action="../search.html" method="get">
      <input type="text" name="q" aria-labelledby="searchlabel" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/>
      <input type="submit" value="Go" />
    </form>

Navigation

          index

          next |

          previous |

    CMake »

    3.29.0-rc3 Documentation »

cmake-modules(7) »

FindFreetype

        © Copyright 2000-2024 Kitware, Inc. and Contributors.
      Created using Sphinx 6.2.1.


code:
<!DOCTYPE html>

    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" /><meta name="generator" content="Docutils 0.19: https://docutils.sourceforge.io/" />

  <title>FindGCCXML — CMake 3.29.0-rc3 Documentation</title>

    <link rel="stylesheet" type="text/css" href="../_static/pygments.css" />
    <link rel="stylesheet" type="text/css" href="../_static/cmake.css" />

    <link rel="icon" href="../_static/cmake-favicon.ico"/>
    <link rel="index" title="Index" href="../genindex.html" />
    <link rel="search" title="Search" href="../search.html" />
    <link rel="next" title="FindGDAL" href="FindGDAL.html" />
    <link rel="prev" title="FindFreetype" href="FindFreetype.html" />

Navigation

          index

          next |

          previous |

    CMake »

    3.29.0-rc3 Documentation »

cmake-modules(7) »

FindGCCXML

FindGCCXML¶

Find the GCC-XML front-end executable.

This module will define the following variables:

GCCXML - the GCC-XML front-end executable.

Previous topic

FindFreetype

Next topic

FindGDAL

This Page

Show Source

Quick search

    <form class="search" action="../search.html" method="get">
      <input type="text" name="q" aria-labelledby="searchlabel" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/>
      <input type="submit" value="Go" />
    </form>

Navigation

          index

          next |

          previous |

    CMake »

    3.29.0-rc3 Documentation »

cmake-modules(7) »

FindGCCXML

        © Copyright 2000-2024 Kitware, Inc. and Contributors.
      Created using Sphinx 6.2.1.


code:
<!DOCTYPE html>

    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" /><meta name="generator" content="Docutils 0.19: https://docutils.sourceforge.io/" />

  <title>FindGDAL — CMake 3.29.0-rc3 Documentation</title>

    <link rel="stylesheet" type="text/css" href="../_static/pygments.css" />
    <link rel="stylesheet" type="text/css" href="../_static/cmake.css" />

    <link rel="icon" href="../_static/cmake-favicon.ico"/>
    <link rel="index" title="Index" href="../genindex.html" />
    <link rel="search" title="Search" href="../search.html" />
    <link rel="next" title="FindGettext" href="FindGettext.html" />
    <link rel="prev" title="FindGCCXML" href="FindGCCXML.html" />

Navigation

          index

          next |

          previous |

    CMake »

    3.29.0-rc3 Documentation »

cmake-modules(7) »

FindGDAL

FindGDAL¶

Find Geospatial Data Abstraction Library (GDAL).

IMPORTED Targets¶

New in version 3.14.

This module defines IMPORTED target GDAL::GDAL
if GDAL has been found.

Result Variables¶

This module will set the following variables in your project:

GDAL_FOUND

True if GDAL is found.

GDAL_INCLUDE_DIRS

Include directories for GDAL headers.

GDAL_LIBRARIES

Libraries to link to GDAL.

GDAL_VERSION

New in version 3.14: The version of GDAL found.

Cache variables¶

The following cache variables may also be set:

GDAL_LIBRARY

The libgdal library file.

GDAL_INCLUDE_DIR

The directory containing gdal.h.

Hints¶

Set GDAL_DIR or GDAL_ROOT in the environment to specify the
GDAL installation prefix.

The following variables may be set to modify the search strategy:

FindGDAL_SKIP_GDAL_CONFIG

If set, gdal-config will not be used. This can be useful if there are
GDAL libraries built with autotools (which provide the tool) and CMake (which
do not) in the same environment.

GDAL_ADDITIONAL_LIBRARY_VERSIONS

Extra versions of library names to search for.

Table of Contents

FindGDAL

IMPORTED Targets

Result Variables

Cache variables

Hints

Previous topic

FindGCCXML

Next topic

FindGettext

This Page

Show Source

Quick search

    <form class="search" action="../search.html" method="get">
      <input type="text" name="q" aria-labelledby="searchlabel" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/>
      <input type="submit" value="Go" />
    </form>

Navigation

          index

          next |

          previous |

    CMake »

    3.29.0-rc3 Documentation »

cmake-modules(7) »

FindGDAL

        © Copyright 2000-2024 Kitware, Inc. and Contributors.
      Created using Sphinx 6.2.1.


code:
<!DOCTYPE html>

    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" /><meta name="generator" content="Docutils 0.19: https://docutils.sourceforge.io/" />

  <title>FindGIF — CMake 3.29.0-rc3 Documentation</title>

    <link rel="stylesheet" type="text/css" href="../_static/pygments.css" />
    <link rel="stylesheet" type="text/css" href="../_static/cmake.css" />

    <link rel="icon" href="../_static/cmake-favicon.ico"/>
    <link rel="index" title="Index" href="../genindex.html" />
    <link rel="search" title="Search" href="../search.html" />
    <link rel="next" title="FindGit" href="FindGit.html" />
    <link rel="prev" title="FindGettext" href="FindGettext.html" />

Navigation

          index

          next |

          previous |

    CMake »

    3.29.0-rc3 Documentation »

cmake-modules(7) »

FindGIF

FindGIF¶

This finds the Graphics Interchange Format (GIF) library (giflib)

Imported targets¶

This module defines the following IMPORTED target:

GIF::GIF

The giflib library, if found.

Result variables¶

This module will set the following variables in your project:

GIF_FOUND

If false, do not try to use GIF.

GIF_INCLUDE_DIRS

where to find gif_lib.h, etc.

GIF_LIBRARIES

the libraries needed to use GIF.

GIF_VERSION

3, 4 or a full version string (eg 5.1.4) for versions >= 4.1.6.

Cache variables¶

The following cache variables may also be set:

GIF_INCLUDE_DIR

where to find the GIF headers.

GIF_LIBRARY

where to find the GIF library.

Hints¶

GIF_DIR is an environment variable that would correspond to the
./configure --prefix=$GIF_DIR.

Table of Contents

FindGIF

Imported targets

Result variables

Cache variables

Hints

Previous topic

FindGettext

Next topic

FindGit

This Page

Show Source

Quick search

    <form class="search" action="../search.html" method="get">
      <input type="text" name="q" aria-labelledby="searchlabel" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/>
      <input type="submit" value="Go" />
    </form>

Navigation

          index

          next |

          previous |

    CMake »

    3.29.0-rc3 Documentation »

cmake-modules(7) »

FindGIF

        © Copyright 2000-2024 Kitware, Inc. and Contributors.
      Created using Sphinx 6.2.1.