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>FindLibXml2 — 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="FindLibXslt" href="FindLibXslt.html" />
    <link rel="prev" title="FindLibLZMA" href="FindLibLZMA.html" />

Navigation

          index

          next |

          previous |

    CMake »

    3.29.0-rc3 Documentation »

cmake-modules(7) »

FindLibXml2

FindLibXml2¶

Find the XML processing library (libxml2).

IMPORTED Targets¶

New in version 3.12.

The following IMPORTED targets may be defined:

LibXml2::LibXml2

libxml2 library.

LibXml2::xmllint

New in version 3.17.

xmllint command-line executable.

Result variables¶

This module will set the following variables in your project:

LibXml2_FOUND

true if libxml2 headers and libraries were found

LIBXML2_INCLUDE_DIR

the directory containing LibXml2 headers

LIBXML2_INCLUDE_DIRS

list of the include directories needed to use LibXml2

LIBXML2_LIBRARIES

LibXml2 libraries to be linked

LIBXML2_DEFINITIONS

the compiler switches required for using LibXml2

LIBXML2_XMLLINT_EXECUTABLE

path to the XML checking tool xmllint coming with LibXml2

LIBXML2_VERSION_STRING

the version of LibXml2 found (since CMake 2.8.8)

Cache variables¶

The following cache variables may also be set:

LIBXML2_INCLUDE_DIR

the directory containing LibXml2 headers

LIBXML2_LIBRARY

path to the LibXml2 library

Table of Contents

FindLibXml2

IMPORTED Targets

Result variables

Cache variables

Previous topic

FindLibLZMA

Next topic

FindLibXslt

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) »

FindLibXml2

        © 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>FindLibXslt — 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="FindLTTngUST" href="FindLTTngUST.html" />
    <link rel="prev" title="FindLibXml2" href="FindLibXml2.html" />

Navigation

          index

          next |

          previous |

    CMake »

    3.29.0-rc3 Documentation »

cmake-modules(7) »

FindLibXslt

FindLibXslt¶

Find the XSL Transformations, Extensible Stylesheet Language
Transformations (XSLT) library (LibXslt)

IMPORTED Targets¶

New in version 3.18.

The following IMPORTED targets may be defined:

LibXslt::LibXslt

If the libxslt library has been found

LibXslt::LibExslt

If the libexslt library has been found

LibXslt::xsltproc

If the xsltproc command-line executable has been found

Result variables¶

This module will set the following variables in your project:

LIBXSLT_FOUND - system has LibXslt
LIBXSLT_INCLUDE_DIR - the LibXslt include directory
LIBXSLT_LIBRARIES - Link these to LibXslt
LIBXSLT_DEFINITIONS - Compiler switches required for using LibXslt
LIBXSLT_VERSION_STRING - version of LibXslt found (since CMake 2.8.8)

Additionally, the following two variables are set (but not required
for using xslt):

LIBXSLT_EXSLT_INCLUDE_DIR

New in version 3.18: The include directory for exslt.

LIBXSLT_EXSLT_LIBRARIES

Link to these if you need to link against the exslt library.

LIBXSLT_XSLTPROC_EXECUTABLE

Contains the full path to the xsltproc executable if found.

Table of Contents

FindLibXslt

IMPORTED Targets

Result variables

Previous topic

FindLibXml2

Next topic

FindLTTngUST

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) »

FindLibXslt

        © 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>FindLibinput — 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="FindLibLZMA" href="FindLibLZMA.html" />
    <link rel="prev" title="FindLibArchive" href="FindLibArchive.html" />

Navigation

          index

          next |

          previous |

    CMake »

    3.29.0-rc3 Documentation »

cmake-modules(7) »

FindLibinput

FindLibinput¶

New in version 3.14.

Find libinput headers and library.

Imported Targets¶

Libinput::Libinput

The libinput library, if found.

Result Variables¶

This will define the following variables in your project:

Libinput_FOUND

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

Libinput_VERSION

the version of libinput.

Libinput_LIBRARIES

the libraries to link against to use libinput.

Libinput_INCLUDE_DIRS

where to find the libinput headers.

Libinput_COMPILE_OPTIONS

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

Table of Contents

FindLibinput

Imported Targets

Result Variables

Previous topic

FindLibArchive

Next topic

FindLibLZMA

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) »

FindLibinput

        © 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>FindLua — 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="FindLua50" href="FindLua50.html" />
    <link rel="prev" title="FindLTTngUST" href="FindLTTngUST.html" />

Navigation

          index

          next |

          previous |

    CMake »

    3.29.0-rc3 Documentation »

cmake-modules(7) »

FindLua

FindLua¶

Locate Lua library.

New in version 3.18: Support for Lua 5.4.

This module defines:

LUA_FOUND

if false, do not try to link to Lua

LUA_LIBRARIES

both lua and lualib

LUA_INCLUDE_DIR

where to find lua.h

LUA_VERSION_STRING

the version of Lua found

LUA_VERSION_MAJOR

the major version of Lua

LUA_VERSION_MINOR

the minor version of Lua

LUA_VERSION_PATCH

the patch version of Lua

Note that the expected include convention is

#include "lua.h"

and not

#include <lua/lua.h>

This is because, the lua location is not standardized and may exist in
locations other than lua/

Previous topic

FindLTTngUST

Next topic

FindLua50

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) »

FindLua

        © 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>FindLua50 — 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="FindLua51" href="FindLua51.html" />
    <link rel="prev" title="FindLua" href="FindLua.html" />

Navigation

          index

          next |

          previous |

    CMake »

    3.29.0-rc3 Documentation »

cmake-modules(7) »

FindLua50

FindLua50¶

Locate Lua library.

This module defines:

LUA50_FOUND, if false, do not try to link to Lua
LUA_LIBRARIES, both lua and lualib
LUA_INCLUDE_DIR, where to find lua.h and lualib.h (and probably lauxlib.h)

Note that the expected include convention is:

#include "lua.h"

and not:

#include <lua/lua.h>

This is because, the lua location is not standardized and may exist in
locations other than lua/

Previous topic

FindLua

Next topic

FindLua51

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) »

FindLua50

        © 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>FindLua51 — 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="FindMatlab" href="FindMatlab.html" />
    <link rel="prev" title="FindLua50" href="FindLua50.html" />

Navigation

          index

          next |

          previous |

    CMake »

    3.29.0-rc3 Documentation »

cmake-modules(7) »

FindLua51

FindLua51¶

Locate Lua library.
This module defines:

LUA51_FOUND, if false, do not try to link to Lua
LUA_LIBRARIES
LUA_INCLUDE_DIR, where to find lua.h
LUA_VERSION_STRING, the version of Lua found (since CMake 2.8.8)

Note that the expected include convention is:

#include "lua.h"

and not:

#include <lua/lua.h>

This is because, the lua location is not standardized and may exist in
locations other than lua/

Previous topic

FindLua50

Next topic

FindMatlab

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) »

FindLua51

        © 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>FindMFC — 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="FindMotif" href="FindMotif.html" />
    <link rel="prev" title="FindMatlab" href="FindMatlab.html" />

Navigation

          index

          next |

          previous |

    CMake »

    3.29.0-rc3 Documentation »

cmake-modules(7) »

FindMFC

FindMFC¶

Find Microsoft Foundation Class Library (MFC) on Windows

Find the native MFC - i.e.  decide if an application can link to the
MFC libraries.

MFC_FOUND - Was MFC support found

You don't need to include anything or link anything to use it.

Previous topic

FindMatlab

Next topic

FindMotif

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) »

FindMFC

        © 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>FindMPEG — 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="FindMPEG2" href="FindMPEG2.html" />
    <link rel="prev" title="FindMotif" href="FindMotif.html" />

Navigation

          index

          next |

          previous |

    CMake »

    3.29.0-rc3 Documentation »

cmake-modules(7) »

FindMPEG

FindMPEG¶

Find the native MPEG includes and library

This module defines

MPEG_INCLUDE_DIR, where to find MPEG.h, etc.
MPEG_LIBRARIES, the libraries required to use MPEG.
MPEG_FOUND, If false, do not try to use MPEG.

also defined, but not for general use are

MPEG_mpeg2_LIBRARY, where to find the MPEG library.
MPEG_vo_LIBRARY, where to find the vo library.

Previous topic

FindMotif

Next topic

FindMPEG2

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) »

FindMPEG

        © 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>FindMPEG2 — 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="FindMPI" href="FindMPI.html" />
    <link rel="prev" title="FindMPEG" href="FindMPEG.html" />

Navigation

          index

          next |

          previous |

    CMake »

    3.29.0-rc3 Documentation »

cmake-modules(7) »

FindMPEG2

FindMPEG2¶

Find the native MPEG2 includes and library

This module defines

MPEG2_INCLUDE_DIR, path to mpeg2dec/mpeg2.h, etc.
MPEG2_LIBRARIES, the libraries required to use MPEG2.
MPEG2_FOUND, If false, do not try to use MPEG2.

also defined, but not for general use are

MPEG2_mpeg2_LIBRARY, where to find the MPEG2 library.
MPEG2_vo_LIBRARY, where to find the vo library.

Previous topic

FindMPEG

Next topic

FindMPI

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) »

FindMPEG2

        © 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>FindMPI — 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="FindMsys" href="FindMsys.html" />
    <link rel="prev" title="FindMPEG2" href="FindMPEG2.html" />

Navigation

          index

          next |

          previous |

    CMake »

    3.29.0-rc3 Documentation »

cmake-modules(7) »

FindMPI

FindMPI¶

Find a Message Passing Interface (MPI) implementation.

The Message Passing Interface (MPI) is a library used to write
high-performance distributed-memory parallel applications, and is
typically deployed on a cluster.  MPI is a standard interface (defined
by the MPI forum) for which many implementations are available.

New in version 3.10: Major overhaul of the module: many new variables, per-language components,
support for a wider variety of runtimes.

Variables for using MPI¶

The module exposes the components C, CXX, MPICXX and Fortran.
Each of these controls the various MPI languages to search for.
The difference between CXX and MPICXX is that CXX refers to the
MPI C API being usable from C++, whereas MPICXX refers to the MPI-2 C++ API
that was removed again in MPI-3.

Depending on the enabled components the following variables will be set:

MPI_FOUND

Variable indicating that MPI settings for all requested languages have been found.
If no components are specified, this is true if MPI settings for all enabled languages
were detected. Note that the MPICXX component does not affect this variable.

MPI_VERSION

Minimal version of MPI detected among the requested languages, or all enabled languages
if no components were specified.

This module will set the following variables per language in your
project, where <lang> is one of C, CXX, or Fortran:

MPI_<lang>_FOUND

Variable indicating the MPI settings for <lang> were found and that
simple MPI test programs compile with the provided settings.

MPI_<lang>_COMPILER

MPI compiler for <lang> if such a program exists.

MPI_<lang>_COMPILE_OPTIONS

Compilation options for MPI programs in <lang>, given as a ;-list.

MPI_<lang>_COMPILE_DEFINITIONS

Compilation definitions for MPI programs in <lang>, given as a ;-list.

MPI_<lang>_INCLUDE_DIRS

Include path(s) for MPI header.

MPI_<lang>_LINK_FLAGS

Linker flags for MPI programs.

MPI_<lang>_LIBRARIES

All libraries to link MPI programs against.

New in version 3.9: Additionally, the following IMPORTED targets are defined:

MPI::MPI_<lang>

Target for using MPI from <lang>.

The following variables indicating which bindings are present will be defined:

MPI_MPICXX_FOUND

Variable indicating whether the MPI-2 C++ bindings are present (introduced in MPI-2, removed with MPI-3).

MPI_Fortran_HAVE_F77_HEADER

True if the Fortran 77 header mpif.h is available.

MPI_Fortran_HAVE_F90_MODULE

True if the Fortran 90 module mpi can be used for accessing MPI (MPI-2 and higher only).

MPI_Fortran_HAVE_F08_MODULE

True if the Fortran 2008 mpi_f08 is available to MPI programs (MPI-3 and higher only).

If possible, the MPI version will be determined by this module. The facilities to detect the MPI version
were introduced with MPI-1.2, and therefore cannot be found for older MPI versions.

MPI_<lang>_VERSION_MAJOR

Major version of MPI implemented for <lang> by the MPI distribution.

MPI_<lang>_VERSION_MINOR

Minor version of MPI implemented for <lang> by the MPI distribution.

MPI_<lang>_VERSION

MPI version implemented for <lang> by the MPI distribution.

Note that there's no variable for the C bindings being accessible through mpi.h, since the MPI standards
always have required this binding to work in both C and C++ code.

For running MPI programs, the module sets the following variables

MPIEXEC_EXECUTABLE

Executable for running MPI programs, if such exists.

MPIEXEC_NUMPROC_FLAG

Flag to pass to mpiexec before giving it the number of processors to run on.

MPIEXEC_MAX_NUMPROCS

Number of MPI processors to utilize. Defaults to the number
of processors detected on the host system.

MPIEXEC_PREFLAGS

Flags to pass to mpiexec directly before the executable to run.

MPIEXEC_POSTFLAGS

Flags to pass to mpiexec after other flags.

Variables for locating MPI¶

This module performs a four step search for an MPI implementation:

Search for MPIEXEC_EXECUTABLE and, if found, use its base directory.

Check if the compiler has MPI support built-in. This is the case if the user passed a
compiler wrapper as CMAKE_<LANG>_COMPILER or if they use Cray system compiler wrappers.

Attempt to find an MPI compiler wrapper and determine the compiler information from it.

Try to find an MPI implementation that does not ship such a wrapper by guessing settings.
Currently, only Microsoft MPI and MPICH2 on Windows are supported.

For controlling the MPIEXEC_EXECUTABLE step, the following variables may be set:

MPIEXEC_EXECUTABLE

Manually specify the location of mpiexec.

MPI_HOME

Specify the base directory of the MPI installation.

ENV{MPI_HOME}

Environment variable to specify the base directory of the MPI installation.

ENV{I_MPI_ROOT}

Environment variable to specify the base directory of the MPI installation.

For controlling the compiler wrapper step, the following variables may be set:

MPI_<lang>_COMPILER

Search for the specified compiler wrapper and use it.

MPI_<lang>_COMPILER_FLAGS

Flags to pass to the MPI compiler wrapper during interrogation. Some compiler wrappers
support linking debug or tracing libraries if a specific flag is passed and this variable
may be used to obtain them.

MPI_COMPILER_FLAGS

Used to initialize MPI_<lang>_COMPILER_FLAGS if no language specific flag has been given.
Empty by default.

MPI_EXECUTABLE_SUFFIX

A suffix which is appended to all names that are being looked for. For instance you may set this
to .mpich or .openmpi to prefer the one or the other on Debian and its derivatives.

In order to control the guessing step, the following variable may be set:

MPI_GUESS_LIBRARY_NAME

Valid values are MSMPI and MPICH2. If set, only the given library will be searched for.
By default, MSMPI will be preferred over MPICH2 if both are available.
This also sets MPI_SKIP_COMPILER_WRAPPER to true, which may be overridden.

Each of the search steps may be skipped with the following control variables:

MPI_ASSUME_NO_BUILTIN_MPI

If true, the module assumes that the compiler itself does not provide an MPI implementation and
skips to step 2.

MPI_SKIP_COMPILER_WRAPPER

If true, no compiler wrapper will be searched for.

MPI_SKIP_GUESSING

If true, the guessing step will be skipped.

Additionally, the following control variable is available to change search behavior:

MPI_CXX_SKIP_MPICXX

Add some definitions that will disable the MPI-2 C++ bindings.
Currently supported are MPICH, Open MPI, Platform MPI and derivatives thereof,
for example MVAPICH or Intel MPI.

If the find procedure fails for a variable MPI_<lang>_WORKS, then the settings detected by or passed to
the module did not work and even a simple MPI test program failed to compile.

If all of these parameters were not sufficient to find the right MPI implementation, a user may
disable the entire autodetection process by specifying both a list of libraries in MPI_<lang>_LIBRARIES
and a list of include directories in MPI_<lang>_ADDITIONAL_INCLUDE_DIRS.
Any other variable may be set in addition to these two. The module will then validate the MPI settings and store the
settings in the cache.

Cache variables for MPI¶

The variable MPI_<lang>_INCLUDE_DIRS will be assembled from the following variables.
For C and CXX:

MPI_<lang>_HEADER_DIR

Location of the mpi.h header on disk.

For Fortran:

MPI_Fortran_F77_HEADER_DIR

Location of the Fortran 77 header mpif.h, if it exists.

MPI_Fortran_MODULE_DIR

Location of the mpi or mpi_f08 modules, if available.

For all languages the following variables are additionally considered:

MPI_<lang>_ADDITIONAL_INCLUDE_DIRS

A ;-list of paths needed in addition to the normal include directories.

MPI_<include_name>_INCLUDE_DIR

Path variables for include folders referred to by <include_name>.

MPI_<lang>_ADDITIONAL_INCLUDE_VARS

A ;-list of <include_name> that will be added to the include locations of <lang>.

The variable MPI_<lang>_LIBRARIES will be assembled from the following variables:

MPI_<lib_name>_LIBRARY

The location of a library called <lib_name> for use with MPI.

MPI_<lang>_LIB_NAMES

A ;-list of <lib_name> that will be added to the include locations of <lang>.

Usage of mpiexec¶

When using MPIEXEC_EXECUTABLE to execute MPI applications, you should typically
use all of the MPIEXEC_EXECUTABLE flags as follows:

${MPIEXEC_EXECUTABLE} ${MPIEXEC_NUMPROC_FLAG} ${MPIEXEC_MAX_NUMPROCS}
  ${MPIEXEC_PREFLAGS} EXECUTABLE ${MPIEXEC_POSTFLAGS} ARGS

where EXECUTABLE is the MPI program, and ARGS are the arguments to
pass to the MPI program.

Advanced variables for using MPI¶

The module can perform some advanced feature detections upon explicit request.

Important notice: The following checks cannot be performed without executing an MPI test program.
Consider the special considerations for the behavior of try_run() during cross compilation.
Moreover, running an MPI program can cause additional issues, like a firewall notification on some systems.
You should only enable these detections if you absolutely need the information.

If the following variables are set to true, the respective search will be performed:

MPI_DETERMINE_Fortran_CAPABILITIES

Determine for all available Fortran bindings what the values of MPI_SUBARRAYS_SUPPORTED and
MPI_ASYNC_PROTECTS_NONBLOCKING are and make their values available as MPI_Fortran_<binding>_SUBARRAYS
and MPI_Fortran_<binding>_ASYNCPROT, where <binding> is one of F77_HEADER, F90_MODULE and
F08_MODULE.

MPI_DETERMINE_LIBRARY_VERSION

For each language, find the output of MPI_Get_library_version and make it available as MPI_<lang>_LIBRARY_VERSION_STRING.
This information is usually tied to the runtime component of an MPI implementation and might differ depending on <lang>.
Note that the return value is entirely implementation defined. This information might be used to identify
the MPI vendor and for example pick the correct one of multiple third party binaries that matches the MPI vendor.

Backward Compatibility¶

Deprecated since version 3.10.

For backward compatibility with older versions of FindMPI, these
variables are set:

MPI_COMPILER        MPI_LIBRARY        MPI_EXTRA_LIBRARY
MPI_COMPILE_FLAGS   MPI_INCLUDE_PATH   MPI_LINK_FLAGS
MPI_LIBRARIES

In new projects, please use the MPI_<lang>_XXX equivalents.
Additionally, the following variables are deprecated:

MPI_<lang>_COMPILE_FLAGS

Use MPI_<lang>_COMPILE_OPTIONS and MPI_<lang>_COMPILE_DEFINITIONS instead.

MPI_<lang>_INCLUDE_PATH

For consumption use MPI_<lang>_INCLUDE_DIRS and for specifying folders use MPI_<lang>_ADDITIONAL_INCLUDE_DIRS instead.

MPIEXEC

Use MPIEXEC_EXECUTABLE instead.

Table of Contents

FindMPI

Variables for using MPI

Variables for locating MPI

Cache variables for MPI

Usage of mpiexec

Advanced variables for using MPI

Backward Compatibility

Previous topic

FindMPEG2

Next topic

FindMsys

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) »

FindMPI

        © 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>FindMatlab — 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="FindMFC" href="FindMFC.html" />
    <link rel="prev" title="FindLua51" href="FindLua51.html" />

Navigation

          index

          next |

          previous |

    CMake »

    3.29.0-rc3 Documentation »

cmake-modules(7) »

FindMatlab

FindMatlab¶

Finds Matlab or Matlab Compiler Runtime (MCR) and provides Matlab tools,
libraries and compilers to CMake.

This package primary purpose is to find the libraries associated with Matlab
or the MCR in order to be able to build Matlab extensions (mex files). It
can also be used:

to run specific commands in Matlab in case Matlab is available

for declaring Matlab unit test

to retrieve various information from Matlab (mex extensions, versions and
release queries, ...)

New in version 3.12: Added Matlab Compiler Runtime (MCR) support.

The module supports the following components:

ENG_LIBRARY and MAT_LIBRARY: respectively the ENG and MAT
libraries of Matlab

MAIN_PROGRAM the Matlab binary program. Note that this component is not
available on the MCR version, and will yield an error if the MCR is found
instead of the regular Matlab installation.

MEX_COMPILER the MEX compiler.

MCC_COMPILER the MCC compiler, included with the Matlab Compiler add-on.

SIMULINK the Simulink environment.

New in version 3.7: Added the MAT_LIBRARY component.

New in version 3.13: Added the ENGINE_LIBRARY, DATAARRAY_LIBRARY and MCC_COMPILER
components.

Changed in version 3.14: Removed the MX_LIBRARY, ENGINE_LIBRARY and DATAARRAY_LIBRARY
components.  These libraries are found unconditionally.

Note

The version given to the find_package() directive is the Matlab
version, which should not be confused with the Matlab release name
(e.g. R2023b).
The matlab_get_version_from_release_name() and
matlab_get_release_name_from_version() provide a mapping
between the release name and the version.

The variable Matlab_ROOT_DIR may be specified in order to give
the path of the desired Matlab version. Otherwise, the behavior is platform
specific:

Windows: The installed versions of Matlab/MCR are retrieved from the
Windows registry

macOS: The installed versions of Matlab/MCR are given by the MATLAB
default installation paths in /Application. If no such application is
found, it falls back to the one that might be accessible from the PATH.

Unix: The desired Matlab should be accessible from the PATH. This does
not work for MCR installation and Matlab_ROOT_DIR should be
specified on this platform.

Additional information is provided when MATLAB_FIND_DEBUG is set.
When a Matlab/MCR installation is found automatically and the MATLAB_VERSION
is not given, the version is queried from Matlab directly (on Windows this
may pop up a Matlab window) or from the MCR installation.

The mapping of the release names and the version of Matlab is performed by
defining pairs (name, version).  The variable
MATLAB_ADDITIONAL_VERSIONS may be provided before the call to
the find_package() in order to handle additional versions.

A Matlab scripts can be added to the set of tests using the
matlab_add_unit_test(). By default, the Matlab unit test framework
will be used (>= 2013a) to run this script, but regular .m files
returning an exit code can be used as well (0 indicating a success).

Module Input Variables¶

Users or projects may set the following variables to configure the module
behavior:

Matlab_ROOT

New in version 3.25.

Default value for Matlab_ROOT_DIR, the root of the Matlab
installation.

Matlab_ROOT_DIR

The root of the Matlab installation.

MATLAB_FIND_DEBUG

outputs debug information

MATLAB_ADDITIONAL_VERSIONS

additional versions of Matlab for the automatic retrieval of the installed
versions.

Imported targets¶

New in version 3.22.

This module defines the following IMPORTED targets:

Matlab::mex

The mex library, always available.

Matlab::mx

The mx library of Matlab (arrays), always available.

Matlab::eng

Matlab engine library. Available only if the ENG_LIBRARY component
is requested.

Matlab::mat

Matlab matrix library. Available only if the MAT_LIBRARY component
is requested.

Matlab::MatlabEngine

Matlab C++ engine library, always available for R2018a and newer.

Matlab::MatlabDataArray

Matlab C++ data array library, always available for R2018a and newer.

Variables defined by the module¶

Result variables¶

Matlab_FOUND

TRUE if the Matlab installation is found, FALSE
otherwise. All variable below are defined if Matlab is found.

Matlab_VERSION

New in version 3.27.

the numerical version (e.g. 23.2.0) of Matlab found. Not to be confused with
Matlab release name (e.g. R2023b) that can be obtained with
matlab_get_release_name_from_version().

Matlab_ROOT_DIR

the final root of the Matlab installation determined by the FindMatlab
module.

Matlab_MAIN_PROGRAM

the Matlab binary program. Available only if the component MAIN_PROGRAM
is given in the find_package() directive.

Matlab_INCLUDE_DIRS

the path of the Matlab libraries headers

Matlab_MEX_LIBRARY

library for mex, always available.

Matlab_MX_LIBRARY

mx library of Matlab (arrays), always available.

Matlab_ENG_LIBRARY

Matlab engine library. Available only if the component ENG_LIBRARY
is requested.

Matlab_MAT_LIBRARY

Matlab matrix library. Available only if the component MAT_LIBRARY
is requested.

Matlab_ENGINE_LIBRARY

New in version 3.13.

Matlab C++ engine library, always available for R2018a and newer.

Matlab_DATAARRAY_LIBRARY

New in version 3.13.

Matlab C++ data array library, always available for R2018a and newer.

Matlab_LIBRARIES

the whole set of libraries of Matlab

Matlab_MEX_COMPILER

the mex compiler of Matlab. Currently not used.
Available only if the component MEX_COMPILER is requested.

Matlab_MCC_COMPILER

New in version 3.13.

the mcc compiler of Matlab. Included with the Matlab Compiler add-on.
Available only if the component MCC_COMPILER is requested.

Cached variables¶

Matlab_MEX_EXTENSION

the extension of the mex files for the current platform (given by Matlab).

Matlab_ROOT_DIR

the location of the root of the Matlab installation found. If this value
is changed by the user, the result variables are recomputed.

Provided commands¶

matlab_get_version_from_release_name()

returns the version from the Matlab release name

matlab_get_release_name_from_version()

returns the release name from the Matlab version

matlab_add_mex()

adds a target compiling a MEX file.

matlab_add_unit_test()

adds a Matlab unit test file as a test to the project.

matlab_extract_all_installed_versions_from_registry()

parses the registry for all Matlab versions. Available on Windows only.
The part of the registry parsed is dependent on the host processor

matlab_get_all_valid_matlab_roots_from_registry()

returns all the possible Matlab or MCR paths, according to a previously
given list. Only the existing/accessible paths are kept. This is mainly
useful for the searching all possible Matlab installation.

matlab_get_mex_suffix()

returns the suffix to be used for the mex files
(platform/architecture dependent)

matlab_get_version_from_matlab_run()

returns the version of Matlab/MCR, given the full directory of the Matlab/MCR
installation path.

Known issues¶

Symbol clash in a MEX target

By default, every symbols inside a MEX
file defined with the command matlab_add_mex() have hidden
visibility, except for the entry point. This is the default behavior of
the MEX compiler, which lowers the risk of symbol collision between the
libraries shipped with Matlab, and the libraries to which the MEX file is
linking to. This is also the default on Windows platforms.

However, this is not sufficient in certain case, where for instance your
MEX file is linking against libraries that are already loaded by Matlab,
even if those libraries have different SONAMES.
A possible solution is to hide the symbols of the libraries to which the
MEX target is linking to. This can be achieved in GNU GCC compilers with
the linker option -Wl,--exclude-libs,ALL.

Tests using GPU resources

in case your MEX file is using the GPU and
in order to be able to run unit tests on this MEX file, the GPU resources
should be properly released by Matlab. A possible solution is to make
Matlab aware of the use of the GPU resources in the session, which can be
performed by a command such as D = gpuDevice() at the beginning of
the test script (or via a fixture).

Reference¶

Matlab_ROOT_DIR¶

The root folder of the Matlab installation. If set before the call to
find_package(), the module will look for the components in that
path. If not set, then an automatic search of Matlab
will be performed. If set, it should point to a valid version of Matlab.

MATLAB_FIND_DEBUG¶

If set, the lookup of Matlab and the intermediate configuration steps are
outputted to the console.

MATLAB_ADDITIONAL_VERSIONS¶

If set, specifies additional versions of Matlab that may be looked for.
The variable should be a list of strings, organized by pairs of release
name and versions, such as follows:

set(MATLAB_ADDITIONAL_VERSIONS
    "release_name1=corresponding_version1"
    "release_name2=corresponding_version2"
    ...
    )

Example:

set(MATLAB_ADDITIONAL_VERSIONS
    "R2013b=8.2"
    "R2013a=8.1"
    "R2012b=8.0")

The order of entries in this list matters when several versions of
Matlab are installed. The priority is set according to the ordering in
this list.

matlab_get_version_from_release_name¶

matlab_get_version_from_release_name(release version)

Input: release is the release name (e.g. R2023b)

Output: version is the version of Matlab (e.g. 23.2.0)

Returns the version of Matlab from a release name

Note

This command provides correct versions mappings for Matlab but not MCR.

matlab_get_release_name_from_version¶

matlab_get_release_name_from_version(version release_name)

Input: version is the version of Matlab (e.g. 23.2.0)

Output: release_name is the release name (R2023b)

Returns the release name from the version of Matlab

Note

This command provides correct version mappings for Matlab but not MCR.

matlab_extract_all_installed_versions_from_registry¶

matlab_extract_all_installed_versions_from_registry(win64 matlab_versions)

Input: win64 is a boolean to search for the 64 bit version of Matlab

Output: matlab_versions is a list of all the versions of Matlab found

This function parses the Windows registry and founds the Matlab versions that
are installed. The found versions are returned in matlab_versions.
Set win64 to TRUE if the 64 bit version of Matlab should be looked for
The returned list contains all versions under
HKLM\\SOFTWARE\\Mathworks\\MATLAB,
HKLM\\SOFTWARE\\Mathworks\\MATLAB Runtime and
HKLM\\SOFTWARE\\Mathworks\\MATLAB Compiler Runtime or an empty list in
case an error occurred (or nothing found).

Note

Only the versions are provided. No check is made over the existence of the
installation referenced in the registry,

matlab_get_all_valid_matlab_roots_from_registry¶

Populates the Matlab root with valid versions of Matlab or
Matlab Runtime (MCR).
The returned matlab_roots is organized in triplets
(type,version_number,matlab_root_path), where type
indicates either MATLAB or MCR.

matlab_get_all_valid_matlab_roots_from_registry(matlab_versions matlab_roots)

Input: matlab_versions of each of the Matlab or MCR installations

Output: matlab_roots location of each of the Matlab or MCR installations

matlab_get_mex_suffix¶

Returns the extension of the mex files (the suffixes).
This function should not be called before the appropriate Matlab root has
been found.

matlab_get_mex_suffix(matlab_root mex_suffix)

Input: matlab_root root of Matlab/MCR install e.g. Matlab_ROOT_DIR

Output: mex_suffix variable name in which the suffix will be returned.

matlab_get_version_from_matlab_run¶

This function runs Matlab program specified on arguments and extracts its
version. If the path provided for the Matlab installation points to an MCR
installation, the version is extracted from the installed files.

matlab_get_version_from_matlab_run(matlab_binary_path matlab_list_versions)

Input: matlab_binary_path path of the matlab binary executable

Output: matlab_list_versions the version extracted from Matlab

matlab_add_unit_test¶

Adds a Matlab unit test to the test set of cmake/ctest.
This command requires the component MAIN_PROGRAM and hence is not
available for an MCR installation.

The unit test uses the Matlab unittest framework (default, available
starting Matlab 2013b+) except if the option NO_UNITTEST_FRAMEWORK
is given.

The function expects one Matlab test script file to be given.
In the case NO_UNITTEST_FRAMEWORK is given, the unittest script file
should contain the script to be run, plus an exit command with the exit
value. This exit value will be passed to the ctest framework (0 success,
non 0 failure). Additional arguments accepted by add_test() can be
passed through TEST_ARGS (eg. CONFIGURATION <config> ...).

matlab_add_unit_test(
    NAME <name>
    UNITTEST_FILE matlab_file_containing_unittest.m
    [CUSTOM_TEST_COMMAND matlab_command_to_run_as_test]
    [UNITTEST_PRECOMMAND matlab_command_to_run]
    [TIMEOUT timeout]
    [ADDITIONAL_PATH path1 [path2 ...]]
    [MATLAB_ADDITIONAL_STARTUP_OPTIONS option1 [option2 ...]]
    [TEST_ARGS arg1 [arg2 ...]]
    [NO_UNITTEST_FRAMEWORK]
    )

Function Parameters:

NAME

name of the unittest in ctest.

UNITTEST_FILE

the matlab unittest file. Its path will be automatically
added to the Matlab path.

CUSTOM_TEST_COMMAND

Matlab script command to run as the test.
If this is not set, then the following is run:
runtests('matlab_file_name'), exit(max([ans(1,:).Failed]))
where matlab_file_name is the UNITTEST_FILE without the extension.

UNITTEST_PRECOMMAND

Matlab script command to be ran before the file
containing the test (eg. GPU device initialization based on CMake
variables).

TIMEOUT

the test timeout in seconds. Defaults to 180 seconds as the
Matlab unit test may hang.

ADDITIONAL_PATH

a list of paths to add to the Matlab path prior to
running the unit test.

MATLAB_ADDITIONAL_STARTUP_OPTIONS

a list of additional option in order
to run Matlab from the command line.
-nosplash -nodesktop -nodisplay are always added.

TEST_ARGS

Additional options provided to the add_test command. These
options are added to the default options (eg. "CONFIGURATIONS Release")

NO_UNITTEST_FRAMEWORK

when set, indicates that the test should not
use the unittest framework of Matlab (available for versions >= R2013a).

WORKING_DIRECTORY

This will be the working directory for the test. If specified it will
also be the output directory used for the log file of the test run.
If not specified the temporary directory ${CMAKE_BINARY_DIR}/Matlab will
be used as the working directory and the log location.

matlab_add_mex¶

Adds a Matlab MEX target.
This commands compiles the given sources with the current tool-chain in
order to produce a MEX file. The final name of the produced output may be
specified, as well as additional link libraries, and a documentation entry
for the MEX file. Remaining arguments of the call are passed to the
add_library() or add_executable() command.

matlab_add_mex(
    NAME <name>
    [EXECUTABLE | MODULE | SHARED]
    SRC src1 [src2 ...]
    [OUTPUT_NAME output_name]
    [DOCUMENTATION file.txt]
    [LINK_TO target1 target2 ...]
    [R2017b | R2018a]
    [EXCLUDE_FROM_ALL]
    [NO_IMPLICIT_LINK_TO_MATLAB_LIBRARIES]
    [...]
)

Function Parameters:

NAME

name of the target.

SRC

list of source files.

LINK_TO

a list of additional link dependencies.  The target links to libmex
and libmx by default, unless the
NO_IMPLICIT_LINK_TO_MATLAB_LIBRARIES option is passed.

OUTPUT_NAME

if given, overrides the default name. The default name is
the name of the target without any prefix and
with Matlab_MEX_EXTENSION suffix.

DOCUMENTATION

if given, the file file.txt will be considered as
being the documentation file for the MEX file. This file is copied into
the same folder without any processing, with the same name as the final
mex file, and with extension .m. In that case, typing help <name>
in Matlab prints the documentation contained in this file.

R2017b or R2018a

New in version 3.14.

May be given to specify the version of the C API
to use: R2017b specifies the traditional (separate complex) C API,
and corresponds to the -R2017b flag for the mex command. R2018a
specifies the new interleaved complex C API, and corresponds to the
-R2018a flag for the mex command. Ignored if MATLAB version prior
to R2018a. Defaults to R2017b.

MODULE or SHARED

New in version 3.7.

May be given to specify the type of library to be
created.

EXECUTABLE

New in version 3.7.

May be given to create an executable instead of
a library. If no type is given explicitly, the type is SHARED.

EXCLUDE_FROM_ALL

This option has the same meaning as for EXCLUDE_FROM_ALL and
is forwarded to add_library() or add_executable()
commands.

NO_IMPLICIT_LINK_TO_MATLAB_LIBRARIES

New in version 3.24.

This option permits to disable the automatic linking of MATLAB
libraries, so that only the libraries that are actually required can be
linked via the LINK_TO option.

The documentation file is not processed and should be in the following
format:

% This is the documentation
function ret = mex_target_output_name(input1)

Table of Contents

FindMatlab

Module Input Variables

Imported targets

Variables defined by the module

Result variables

Cached variables

Provided commands

Known issues

Reference

Previous topic

FindLua51

Next topic

FindMFC

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) »

FindMatlab

        © 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>FindMotif — 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="FindMPEG" href="FindMPEG.html" />
    <link rel="prev" title="FindMFC" href="FindMFC.html" />

Navigation

          index

          next |

          previous |

    CMake »

    3.29.0-rc3 Documentation »

cmake-modules(7) »

FindMotif

FindMotif¶

Try to find Motif (or lesstif)

Once done this will define:

MOTIF_FOUND        - system has MOTIF
MOTIF_INCLUDE_DIR  - include paths to use Motif
MOTIF_LIBRARIES    - Link these to use Motif

Previous topic

FindMFC

Next topic

FindMPEG

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) »

FindMotif

        © 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>FindMsys — 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="FindODBC" href="FindODBC.html" />
    <link rel="prev" title="FindMPI" href="FindMPI.html" />

Navigation

          index

          next |

          previous |

    CMake »

    3.29.0-rc3 Documentation »

cmake-modules(7) »

FindMsys

FindMsys¶

New in version 3.21.

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

Previous topic

FindMPI

Next topic

FindODBC

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) »

FindMsys

        © 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>FindODBC — 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="FindOpenACC" href="FindOpenACC.html" />
    <link rel="prev" title="FindMsys" href="FindMsys.html" />

Navigation

          index

          next |

          previous |

    CMake »

    3.29.0-rc3 Documentation »

cmake-modules(7) »

FindODBC

FindODBC¶

New in version 3.12.

Find an Open Database Connectivity (ODBC) include directory and library.

On Windows, when building with Visual Studio, this module assumes the ODBC
library is provided by the available Windows SDK.

On Unix, this module allows to search for ODBC library provided by
unixODBC or iODBC implementations of ODBC API.
This module reads hint about location of the config program:

ODBC_CONFIG¶

Location of odbc_config or iodbc-config program

Otherwise, this module tries to find the config program,
first from unixODBC, then from iODBC.
If no config program found, this module searches for ODBC header
and library in list of known locations.

Imported targets¶

This module defines the following IMPORTED targets:

ODBC::ODBC¶

Imported target for using the ODBC library, if found.

Result variables¶

ODBC_FOUND¶

Set to true if ODBC library found, otherwise false or undefined.

ODBC_INCLUDE_DIRS¶

Paths to include directories listed in one variable for use by ODBC client.
May be empty on Windows, where the include directory corresponding to the
expected Windows SDK is already available in the compilation environment.

ODBC_LIBRARIES¶

Paths to libraries to linked against to use ODBC.
May just a library name on Windows, where the library directory corresponding
to the expected Windows SDK is already available in the compilation environment.

ODBC_CONFIG

Path to unixODBC or iODBC config program, if found or specified.

Cache variables¶

For users who wish to edit and control the module behavior, this module
reads hints about search locations from the following variables:

ODBC_INCLUDE_DIR¶

Path to ODBC include directory with sql.h header.

ODBC_LIBRARY¶

Path to ODBC library to be linked.

These variables should not be used directly by project code.

Limitations¶

On Windows, this module does not search for iODBC.
On Unix, there is no way to prefer unixODBC over iODBC, or vice versa,
other than providing the config program location using the ODBC_CONFIG.
This module does not allow to search for a specific ODBC driver.

Table of Contents

FindODBC

Imported targets

Result variables

Cache variables

Limitations

Previous topic

FindMsys

Next topic

FindOpenACC

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) »

FindODBC

        © 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>FindOpenACC — 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="FindOpenAL" href="FindOpenAL.html" />
    <link rel="prev" title="FindODBC" href="FindODBC.html" />

Navigation

          index

          next |

          previous |

    CMake »

    3.29.0-rc3 Documentation »

cmake-modules(7) »

FindOpenACC

FindOpenACC¶

New in version 3.10.

Detect OpenACC support by the compiler.

This module can be used to detect OpenACC support in a compiler.
If the compiler supports OpenACC, the flags required to compile with
OpenACC support are returned in variables for the different languages.
Currently, only NVHPC, PGI, GNU and Cray compilers are supported.

Imported Targets¶

New in version 3.16.

The module provides IMPORTED targets:

OpenACC::OpenACC_<lang>

Target for using OpenACC from <lang>.

Variables¶

The module defines the following variables:

OpenACC_FOUND

New in version 3.25.

Variable indicating that OpenACC flags for at least one languages have been found.

This module will set the following variables per language in your
project, where <lang> is one of C, CXX, or Fortran:

OpenACC_<lang>_FOUND

Variable indicating if OpenACC support for <lang> was detected.

OpenACC_<lang>_FLAGS

OpenACC compiler flags for <lang>, separated by spaces.

OpenACC_<lang>_OPTIONS

New in version 3.16.

OpenACC compiler flags for <lang>, as a list. Suitable for usage
with target_compile_options or target_link_options.

The module will also try to provide the OpenACC version variables:

OpenACC_<lang>_SPEC_DATE

Date of the OpenACC specification implemented by the <lang> compiler.

OpenACC_<lang>_VERSION_MAJOR

Major version of OpenACC implemented by the <lang> compiler.

OpenACC_<lang>_VERSION_MINOR

Minor version of OpenACC implemented by the <lang> compiler.

OpenACC_<lang>_VERSION

OpenACC version implemented by the <lang> compiler.

The specification date is formatted as given in the OpenACC standard:
yyyymm where yyyy and mm represents the year and month of
the OpenACC specification implemented by the <lang> compiler.

Input Variables¶

OpenACC_ACCEL_TARGET=<target>
If set, will the correct target accelerator flag set to the <target> will
be returned with OpenACC_<lang>_FLAGS.

Table of Contents

FindOpenACC

Imported Targets

Variables

Input Variables

Previous topic

FindODBC

Next topic

FindOpenAL

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) »

FindOpenACC

        © 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>FindOpenAL — 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="FindOpenCL" href="FindOpenCL.html" />
    <link rel="prev" title="FindOpenACC" href="FindOpenACC.html" />

Navigation

          index

          next |

          previous |

    CMake »

    3.29.0-rc3 Documentation »

cmake-modules(7) »

FindOpenAL

FindOpenAL¶

Finds Open Audio Library (OpenAL).

Projects using this module should use #include "al.h" to include the OpenAL
header file, not #include <AL/al.h>.  The reason for this is that the
latter is not entirely portable.  Windows/Creative Labs does not by default put
their headers in AL/ and macOS uses the convention <OpenAL/al.h>.

Hints¶

Environment variable $OPENALDIR can be used to set the prefix of OpenAL
installation to be found.

By default on macOS, system framework is search first.  In other words,
OpenAL is searched in the following order:

System framework: /System/Library/Frameworks, whose priority can be
changed via setting the CMAKE_FIND_FRAMEWORK variable.

Environment variable $OPENALDIR.

System paths.

User-compiled framework: ~/Library/Frameworks.

Manually compiled framework: /Library/Frameworks.

Add-on package: /opt.

IMPORTED Targets¶

New in version 3.25.

This module defines the IMPORTED target:

OpenAL::OpenAL

The OpenAL library, if found.

Result Variables¶

This module defines the following variables:

OPENAL_FOUND

If false, do not try to link to OpenAL

OPENAL_INCLUDE_DIR

OpenAL include directory

OPENAL_LIBRARY

Path to the OpenAL library

OPENAL_VERSION_STRING

Human-readable string containing the version of OpenAL

Table of Contents

FindOpenAL

Hints

IMPORTED Targets

Result Variables

Previous topic

FindOpenACC

Next topic

FindOpenCL

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) »

FindOpenAL

        © 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>FindOpenCL — 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="FindOpenGL" href="FindOpenGL.html" />
    <link rel="prev" title="FindOpenAL" href="FindOpenAL.html" />

Navigation

          index

          next |

          previous |

    CMake »

    3.29.0-rc3 Documentation »

cmake-modules(7) »

FindOpenCL

FindOpenCL¶

New in version 3.1.

Finds Open Computing Language (OpenCL)

New in version 3.10: Detection of OpenCL 2.1 and 2.2.

IMPORTED Targets¶

New in version 3.7.

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

Result Variables¶

This module defines the following variables:

OpenCL_FOUND          - True if OpenCL was found
OpenCL_INCLUDE_DIRS   - include directories for OpenCL
OpenCL_LIBRARIES      - link against this library to use OpenCL
OpenCL_VERSION_STRING - Highest supported OpenCL version (eg. 1.2)
OpenCL_VERSION_MAJOR  - The major version of the OpenCL implementation
OpenCL_VERSION_MINOR  - The minor version of the OpenCL implementation

The module will also define two cache variables:

OpenCL_INCLUDE_DIR    - the OpenCL include directory
OpenCL_LIBRARY        - the path to the OpenCL library

Table of Contents

FindOpenCL

IMPORTED Targets

Result Variables

Previous topic

FindOpenAL

Next topic

FindOpenGL

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) »

FindOpenCL

        © 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>FindOpenGL — 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="FindOpenMP" href="FindOpenMP.html" />
    <link rel="prev" title="FindOpenCL" href="FindOpenCL.html" />

Navigation

          index

          next |

          previous |

    CMake »

    3.29.0-rc3 Documentation »

cmake-modules(7) »

FindOpenGL

FindOpenGL¶

FindModule for OpenGL and OpenGL Utility Library (GLU).

Changed in version 3.2: X11 is no longer added as a dependency on Unix/Linux systems.

New in version 3.10: GLVND support on Linux.  See the Linux-specific section below.

Optional COMPONENTS¶

New in version 3.10.

This module respects several optional COMPONENTS:

EGL

The EGL interface between OpenGL, OpenGL ES and the underlying windowing system.

GLX

An extension to X that interfaces OpenGL, OpenGL ES with X window system.

OpenGL

The cross platform API for 3D graphics.

GLES2

New in version 3.27.

A subset of OpenGL API for embedded systems with limited capabilities.

GLES3

New in version 3.27.

A subset of OpenGL API for embedded systems with more capabilities.

IMPORTED Targets¶

New in version 3.8.

This module defines the IMPORTED targets:

OpenGL::GL

Defined to the platform-specific OpenGL libraries if the system has OpenGL.

OpenGL::GLU

Defined if the system has OpenGL Utility Library (GLU).

New in version 3.10: Additionally, the following GLVND-specific library targets are defined:

OpenGL::OpenGL

Defined to libOpenGL if the system is GLVND-based.

OpenGL::GLX

Defined if the system has OpenGL Extension to the X Window System (GLX).

OpenGL::EGL

Defined if the system has EGL.

OpenGL::GLES2

New in version 3.27.

Defined if the system has GLES2.

OpenGL::GLES3

New in version 3.27.

Defined if the system has GLES3.

Result Variables¶

This module sets the following variables:

OPENGL_FOUND

True, if the system has OpenGL and all components are found.

OPENGL_XMESA_FOUND

True, if the system has XMESA.

OPENGL_GLU_FOUND

True, if the system has GLU.

OpenGL_OpenGL_FOUND

True, if the system has an OpenGL library.

OpenGL_GLX_FOUND

True, if the system has GLX.

OpenGL_EGL_FOUND

True, if the system has EGL.

OpenGL::GLES2

Defined if the system has GLES2.

OpenGL::GLES3

Defined if the system has GLES3.

OPENGL_INCLUDE_DIR

Path to the OpenGL include directory.
The OPENGL_INCLUDE_DIRS variable is preferred.

OPENGL_EGL_INCLUDE_DIRS

Path to the EGL include directory.

OPENGL_LIBRARIES

Paths to the OpenGL library, windowing system libraries, and GLU libraries.
On Linux, this assumes GLX and is never correct for EGL-based targets.
Clients are encouraged to use the OpenGL::* import targets instead.

OPENGL_INCLUDE_DIRS

New in version 3.29.

Paths to the OpenGL include directories.

New in version 3.10: Variables for GLVND-specific libraries OpenGL, EGL and GLX.

Cache variables¶

The following cache variables may also be set:

OPENGL_egl_LIBRARY

Path to the EGL library.

OPENGL_glu_LIBRARY

Path to the GLU library.

OPENGL_glx_LIBRARY

Path to the GLVND 'GLX' library.

OPENGL_opengl_LIBRARY

Path to the GLVND 'OpenGL' library

OPENGL_gl_LIBRARY

Path to the OpenGL library.  New code should prefer the OpenGL::* import
targets.

OPENGL_gles2_LIBRARY

New in version 3.27.

Path to the OpenGL GLES2 library.

OPENGL_gles3_LIBRARY

New in version 3.27.

Path to the OpenGL GLES3 library.

OPENGL_GLU_INCLUDE_DIR

New in version 3.29.

Path to the OpenGL GLU include directory.

New in version 3.10: Variables for GLVND-specific libraries OpenGL, EGL and GLX.

Linux-specific¶

Some Linux systems utilize GLVND as a new ABI for OpenGL.  GLVND separates
context libraries from OpenGL itself; OpenGL lives in "libOpenGL", and
contexts are defined in "libGLX" or "libEGL".  GLVND is currently the only way
to get OpenGL 3+ functionality via EGL in a manner portable across vendors.
Projects may use GLVND explicitly with target OpenGL::OpenGL and either
OpenGL::GLX or OpenGL::EGL.

Projects may use the OpenGL::GL target (or OPENGL_LIBRARIES variable)
to use legacy GL interfaces.  These will use the legacy GL library located
by OPENGL_gl_LIBRARY, if available.  If OPENGL_gl_LIBRARY is empty or
not found and GLVND is available, the OpenGL::GL target will use GLVND
OpenGL::OpenGL and OpenGL::GLX (and the OPENGL_LIBRARIES
variable will use the corresponding libraries).  Thus, for non-EGL-based
Linux targets, the OpenGL::GL target is most portable.

A OpenGL_GL_PREFERENCE variable may be set to specify the preferred way
to provide legacy GL interfaces in case multiple choices are available.
The value may be one of:

GLVND

If the GLVND OpenGL and GLX libraries are available, prefer them.
This forces OPENGL_gl_LIBRARY to be empty.

Changed in version 3.11: This is the default, unless policy CMP0072 is set to OLD
and no components are requested (since components
correspond to GLVND libraries).

LEGACY

Prefer to use the legacy libGL library, if available.

For EGL targets the client must rely on GLVND support on the user's system.
Linking should use the OpenGL::OpenGL OpenGL::EGL targets.  Using GLES*
libraries is theoretically possible in place of OpenGL::OpenGL, but this
module does not currently support that; contributions welcome.

OPENGL_egl_LIBRARY and OPENGL_EGL_INCLUDE_DIRS are defined in the case of
GLVND.  For non-GLVND Linux and other systems these are left undefined.

macOS-Specific¶

On macOS this module defaults to using the macOS-native framework
version of OpenGL.  To use the X11 version of OpenGL on macOS, one
can disable searching of frameworks.  For example:

find_package(X11)
if(APPLE AND X11_FOUND)
  set(CMAKE_FIND_FRAMEWORK NEVER)
  find_package(OpenGL)
  unset(CMAKE_FIND_FRAMEWORK)
else()
  find_package(OpenGL)
endif()

An end user building this project may need to point CMake at their
X11 installation, e.g., with -DOpenGL_ROOT=/opt/X11.

Table of Contents

FindOpenGL

Optional COMPONENTS

IMPORTED Targets

Result Variables

Cache variables

Linux-specific

macOS-Specific

Previous topic

FindOpenCL

Next topic

FindOpenMP

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) »

FindOpenGL

        © 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>FindOpenMP — 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="FindOpenSceneGraph" href="FindOpenSceneGraph.html" />
    <link rel="prev" title="FindOpenGL" href="FindOpenGL.html" />

Navigation

          index

          next |

          previous |

    CMake »

    3.29.0-rc3 Documentation »

cmake-modules(7) »

FindOpenMP

FindOpenMP¶

Finds Open Multi-Processing (OpenMP) support.

This module can be used to detect OpenMP support in a compiler.  If
the compiler supports OpenMP, the flags required to compile with
OpenMP support are returned in variables for the different languages.
The variables may be empty if the compiler does not need a special
flag to support OpenMP.

New in version 3.5: Clang support.

Variables¶

New in version 3.10: The module exposes the components C, CXX, and Fortran.
Each of these controls the various languages to search OpenMP support for.

Depending on the enabled components the following variables will be set:

OpenMP_FOUND

Variable indicating that OpenMP flags for all requested languages have been found.
If no components are specified, this is true if OpenMP settings for all enabled languages
were detected.

OpenMP_VERSION

Minimal version of the OpenMP standard detected among the requested languages,
or all enabled languages if no components were specified.

This module will set the following variables per language in your
project, where <lang> is one of C, CXX, or Fortran:

OpenMP_<lang>_FOUND

Variable indicating if OpenMP support for <lang> was detected.

OpenMP_<lang>_FLAGS

OpenMP compiler flags for <lang>, separated by spaces.

OpenMP_<lang>_INCLUDE_DIRS

Directories that must be added to the header search path for <lang>
when using OpenMP.

For linking with OpenMP code written in <lang>, the following
variables are provided:

OpenMP_<lang>_LIB_NAMES

;-list of libraries for OpenMP programs for <lang>.

OpenMP_<libname>_LIBRARY

Location of the individual libraries needed for OpenMP support in <lang>.

OpenMP_<lang>_LIBRARIES

A list of libraries needed to link with OpenMP code written in <lang>.

Additionally, the module provides IMPORTED targets:

OpenMP::OpenMP_<lang>

Target for using OpenMP from <lang>.

Specifically for Fortran, the module sets the following variables:

OpenMP_Fortran_HAVE_OMPLIB_HEADER

Boolean indicating if OpenMP is accessible through omp_lib.h.

OpenMP_Fortran_HAVE_OMPLIB_MODULE

Boolean indicating if OpenMP is accessible through the omp_lib Fortran module.

The module will also try to provide the OpenMP version variables:

OpenMP_<lang>_SPEC_DATE

New in version 3.7.

Date of the OpenMP specification implemented by the <lang> compiler.

OpenMP_<lang>_VERSION_MAJOR

Major version of OpenMP implemented by the <lang> compiler.

OpenMP_<lang>_VERSION_MINOR

Minor version of OpenMP implemented by the <lang> compiler.

OpenMP_<lang>_VERSION

OpenMP version implemented by the <lang> compiler.

The specification date is formatted as given in the OpenMP standard:
yyyymm where yyyy and mm represents the year and month of
the OpenMP specification implemented by the <lang> compiler.

For some compilers, it may be necessary to add a header search path to find
the relevant OpenMP headers.  This location may be language-specific.  Where
this is needed, the module may attempt to find the location, but it can be
provided directly by setting the OpenMP_<lang>_INCLUDE_DIR cache variable.
Note that this variable is an _input_ control to the module.  Project code
should use the OpenMP_<lang>_INCLUDE_DIRS _output_ variable if it needs
to know what include directories are needed.

Table of Contents

FindOpenMP

Variables

Previous topic

FindOpenGL

Next topic

FindOpenSceneGraph

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) »

FindOpenMP

        © 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>FindOpenSP — 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="FindOpenSSL" href="FindOpenSSL.html" />
    <link rel="prev" title="FindOpenSceneGraph" href="FindOpenSceneGraph.html" />

Navigation

          index

          next |

          previous |

    CMake »

    3.29.0-rc3 Documentation »

cmake-modules(7) »

FindOpenSP

FindOpenSP¶

New in version 3.25.

Try to find the OpenSP library.

Result Variables¶

This will define the following variables:

OpenSP_FOUND

True if (the requested version of) OpenSP is available

OpenSP_VERSION

The version of OpenSP

OpenSP_VERSION_MAJOR

The major version of OpenSP

OpenSP_VERSION_MINOR

The minor version of OpenSP

OpenSP_VERSION_PATCH

The patch version of OpenSP

OpenSP_INCLUDE_DIRS

The include dirs of OpenSP with its headers

OpenSP_LIBRARIES

The OpenSP library for use with target_link_libraries().
This can be passed to target_link_libraries() instead of
the IMPORTED OpenSP::OpenSP target

OpenSP_MULTI_BYTE

True if SP_MULTI_BYTE was found to be defined in OpenSP's config.h
header file, which indicates that the OpenSP library was compiled with
support for multi-byte characters. The consuming target needs to define the
SP_MULTI_BYTE to match this value in order to avoid issues with character
decoding.

IMPORTED Targets¶

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

Cache variables¶

The following cache variables may also be set:

OpenSP_INCLUDE_DIR

the OpenSP include directory

OpenSP_LIBRARY

the absolute path of the osp library

Table of Contents

FindOpenSP

Result Variables

IMPORTED Targets

Cache variables

Previous topic

FindOpenSceneGraph

Next topic

FindOpenSSL

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) »

FindOpenSP

        © 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>FindOpenSSL — 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="FindOpenThreads" href="FindOpenThreads.html" />
    <link rel="prev" title="FindOpenSP" href="FindOpenSP.html" />

Navigation

          index

          next |

          previous |

    CMake »

    3.29.0-rc3 Documentation »

cmake-modules(7) »

FindOpenSSL

FindOpenSSL¶

Find the OpenSSL encryption library.

This module finds an installed OpenSSL library and determines its version.

New in version 3.19: When a version is requested, it can be specified as a simple value or as a
range. For a detailed description of version range usage and capabilities,
refer to the find_package() command.

New in version 3.18: Support for OpenSSL 3.0.

Optional COMPONENTS¶

New in version 3.12.

This module supports two optional COMPONENTS: Crypto and SSL.  Both
components have associated imported targets, as described below.

Imported Targets¶

New in version 3.4.

This module defines the following IMPORTED targets:

OpenSSL::SSL

The OpenSSL ssl library, if found.

OpenSSL::Crypto

The OpenSSL crypto library, if found.

OpenSSL::applink

New in version 3.18.

The OpenSSL applink components that might be need to be compiled into
projects under MSVC. This target is available only if found OpenSSL version
is not less than 0.9.8. By linking this target the above OpenSSL targets can
be linked even if the project has different MSVC runtime configurations with
the above OpenSSL targets. This target has no effect on platforms other than
MSVC.

NOTE: Due to how INTERFACE_SOURCES are consumed by the consuming target,
unless you certainly know what you are doing, it is always preferred to link
OpenSSL::applink target as PRIVATE and to make sure that this target is
linked at most once for the whole dependency graph of any library or
executable:

target_link_libraries(myTarget PRIVATE OpenSSL::applink)

Otherwise you would probably encounter unexpected random problems when building
and linking, as both the ISO C and the ISO C++ standard claims almost nothing
about what a link process should be.

Result Variables¶

This module will set the following variables in your project:

OPENSSL_FOUND

System has the OpenSSL library. If no components are requested it only
requires the crypto library.

OPENSSL_INCLUDE_DIR

The OpenSSL include directory.

OPENSSL_CRYPTO_LIBRARY

The OpenSSL crypto library.

OPENSSL_CRYPTO_LIBRARIES

The OpenSSL crypto library and its dependencies.

OPENSSL_SSL_LIBRARY

The OpenSSL SSL library.

OPENSSL_SSL_LIBRARIES

The OpenSSL SSL library and its dependencies.

OPENSSL_LIBRARIES

All OpenSSL libraries and their dependencies.

OPENSSL_VERSION

This is set to $major.$minor.$revision$patch (e.g. 0.9.8s).

OPENSSL_APPLINK_SOURCE

The sources in the target OpenSSL::applink that is mentioned above. This
variable shall always be undefined if found openssl version is less than
0.9.8 or if platform is not MSVC.

Hints¶

The following variables may be set to control search behavior:

OPENSSL_ROOT_DIR

Set to the root directory of an OpenSSL installation.

OPENSSL_USE_STATIC_LIBS

New in version 3.4.

Set to TRUE to look for static libraries.

OPENSSL_MSVC_STATIC_RT

New in version 3.5.

Set to TRUE to choose the MT version of the lib.

ENV{PKG_CONFIG_PATH}

On UNIX-like systems, pkg-config is used to locate the system OpenSSL.
Set the PKG_CONFIG_PATH environment variable to look in alternate
locations.  Useful on multi-lib systems.

Table of Contents

FindOpenSSL

Optional COMPONENTS

Imported Targets

Result Variables

Hints

Previous topic

FindOpenSP

Next topic

FindOpenThreads

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) »

FindOpenSSL

        © 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>FindOpenSceneGraph — 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="FindOpenSP" href="FindOpenSP.html" />
    <link rel="prev" title="FindOpenMP" href="FindOpenMP.html" />

Navigation

          index

          next |

          previous |

    CMake »

    3.29.0-rc3 Documentation »

cmake-modules(7) »

FindOpenSceneGraph

FindOpenSceneGraph¶

Find OpenSceneGraph (3D graphics application programming interface)

This module searches for the OpenSceneGraph core "osg" library as well
as FindOpenThreads, and whatever additional COMPONENTS
(nodekits) that you specify.

See http://www.openscenegraph.org

NOTE: To use this module effectively you must either require CMake >=
2.6.3 with  cmake_minimum_required(VERSION 2.6.3) or download
and place FindOpenThreads, Findosg functions,
Findosg and Find<etc>.cmake files into your
CMAKE_MODULE_PATH.

This module accepts the following variables (note mixed case)

OpenSceneGraph_DEBUG - Enable debugging output

OpenSceneGraph_MARK_AS_ADVANCED - Mark cache variables as advanced
                                  automatically

The following environment variables are also respected for finding the
OSG and it's various components.  CMAKE_PREFIX_PATH can also be
used for this (see find_library() CMake documentation).

<MODULE>_DIR

(where MODULE is of the form "OSGVOLUME" and there is
a FindosgVolume.cmake` file)

OSG_DIR

OSGDIR

OSG_ROOT

[CMake 2.8.10]: The CMake variable OSG_DIR can now be used as well to
influence detection, instead of needing to specify an environment
variable.

This module defines the following output variables:

OPENSCENEGRAPH_FOUND - Was the OSG and all of the specified components found?

OPENSCENEGRAPH_VERSION - The version of the OSG which was found

OPENSCENEGRAPH_INCLUDE_DIRS - Where to find the headers

OPENSCENEGRAPH_LIBRARIES - The OSG libraries

================================== Example Usage:

find_package(OpenSceneGraph 2.0.0 REQUIRED osgDB osgUtil)
    # libOpenThreads & libosg automatically searched
include_directories(${OPENSCENEGRAPH_INCLUDE_DIRS})

add_executable(foo foo.cc)
target_link_libraries(foo ${OPENSCENEGRAPH_LIBRARIES})

Previous topic

FindOpenMP

Next topic

FindOpenSP

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) »

FindOpenSceneGraph

        © 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>FindOpenThreads — 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="Findosg" href="Findosg.html" />
    <link rel="prev" title="FindOpenSSL" href="FindOpenSSL.html" />

Navigation

          index

          next |

          previous |

    CMake »

    3.29.0-rc3 Documentation »

cmake-modules(7) »

FindOpenThreads

FindOpenThreads¶

OpenThreads is a C++ based threading library.  Its largest userbase
seems to OpenSceneGraph so you might notice I accept OSGDIR as an
environment path.  I consider this part of the Findosg* suite used to
find OpenSceneGraph components.  Each component is separate and you
must opt in to each module.

This module defines:

OPENTHREADS_LIBRARY

OPENTHREADS_FOUND

if false, do not try to link to OpenThreads

OPENTHREADS_INCLUDE_DIR

where to find the headers

$OPENTHREADS_DIR is an environment variable that would correspond to the:

./configure --prefix=$OPENTHREADS_DIR

used in building osg.

New in version 2.8.10: The CMake variables OPENTHREADS_DIR or OSG_DIR can now
be used as well to influence detection, instead of needing to specify
an environment variable.

Previous topic

FindOpenSSL

Next topic

Findosg

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) »

FindOpenThreads

        © 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>FindPHP4 — 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="FindPhysFS" href="FindPhysFS.html" />
    <link rel="prev" title="FindPerlLibs" href="FindPerlLibs.html" />

Navigation

          index

          next |

          previous |

    CMake »

    3.29.0-rc3 Documentation »

cmake-modules(7) »

FindPHP4

FindPHP4¶

Find PHP4

This module finds if PHP4 is installed and determines where the
include files and libraries are.  It also determines what the name of
the library is.  This code sets the following variables:

PHP4_INCLUDE_PATH       = path to where php.h can be found
PHP4_EXECUTABLE         = full path to the php4 binary

Previous topic

FindPerlLibs

Next topic

FindPhysFS

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) »

FindPHP4

        © 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>FindPNG — 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="FindPostgreSQL" href="FindPostgreSQL.html" />
    <link rel="prev" title="FindPkgConfig" href="FindPkgConfig.html" />

Navigation

          index

          next |

          previous |

    CMake »

    3.29.0-rc3 Documentation »

cmake-modules(7) »

FindPNG

FindPNG¶

Find libpng, the official reference library for the PNG image format.

Imported targets¶

New in version 3.5.

This module defines the following IMPORTED target:

PNG::PNG

The libpng library, if found.

Result variables¶

This module will set the following variables in your project:

PNG_INCLUDE_DIRS

where to find png.h, etc.

PNG_LIBRARIES

the libraries to link against to use PNG.

PNG_DEFINITIONS

You should add_definitions(${PNG_DEFINITIONS}) before compiling code
that includes png library files.

PNG_FOUND

If false, do not try to use PNG.

PNG_VERSION_STRING

the version of the PNG library found (since CMake 2.8.8)

Obsolete variables¶

The following variables may also be set, for backwards compatibility:

PNG_LIBRARY

where to find the PNG library.

PNG_INCLUDE_DIR

where to find the PNG headers (same as PNG_INCLUDE_DIRS)

Since PNG depends on the ZLib compression library, none of the above
will be defined unless ZLib can be found.

Table of Contents

FindPNG

Imported targets

Result variables

Obsolete variables

Previous topic

FindPkgConfig

Next topic

FindPostgreSQL

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) »

FindPNG

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