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>CMAKE_<LANG>_FLAGS_DEBUG — 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="CMAKE_<LANG>_FLAGS_DEBUG_INIT" href="CMAKE_LANG_FLAGS_DEBUG_INIT.html" />
    <link rel="prev" title="CMAKE_<LANG>_FLAGS_<CONFIG>_INIT" href="CMAKE_LANG_FLAGS_CONFIG_INIT.html" />

Navigation

          index

          next |

          previous |

    CMake »

    3.29.0-rc3 Documentation »

cmake-variables(7) »

CMAKE_<LANG>_FLAGS_DEBUG

<span id="variable:CMAKE_<LANG>_FLAGS_DEBUG">
CMAKE_<LANG>_FLAGS_DEBUG¶

This variable is the Debug variant of the
CMAKE_<LANG>_FLAGS_<CONFIG> variable.

Previous topic

CMAKE_<LANG>_FLAGS_<CONFIG>_INIT

Next topic

CMAKE_<LANG>_FLAGS_DEBUG_INIT

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

CMAKE_<LANG>_FLAGS_DEBUG

        © 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>CMAKE_<LANG>_FLAGS_DEBUG_INIT — 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="CMAKE_<LANG>_FLAGS_INIT" href="CMAKE_LANG_FLAGS_INIT.html" />
    <link rel="prev" title="CMAKE_<LANG>_FLAGS_DEBUG" href="CMAKE_LANG_FLAGS_DEBUG.html" />

Navigation

          index

          next |

          previous |

    CMake »

    3.29.0-rc3 Documentation »

cmake-variables(7) »

CMAKE_<LANG>_FLAGS_DEBUG_INIT

<span id="variable:CMAKE_<LANG>_FLAGS_DEBUG_INIT">
CMAKE_<LANG>_FLAGS_DEBUG_INIT¶

New in version 3.7.

This variable is the Debug variant of the
CMAKE_<LANG>_FLAGS_<CONFIG>_INIT variable.

Previous topic

CMAKE_<LANG>_FLAGS_DEBUG

Next topic

CMAKE_<LANG>_FLAGS_INIT

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

CMAKE_<LANG>_FLAGS_DEBUG_INIT

        © 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>CMAKE_<LANG>_FLAGS_INIT — 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="CMAKE_<LANG>_FLAGS_MINSIZEREL" href="CMAKE_LANG_FLAGS_MINSIZEREL.html" />
    <link rel="prev" title="CMAKE_<LANG>_FLAGS_DEBUG_INIT" href="CMAKE_LANG_FLAGS_DEBUG_INIT.html" />

Navigation

          index

          next |

          previous |

    CMake »

    3.29.0-rc3 Documentation »

cmake-variables(7) »

CMAKE_<LANG>_FLAGS_INIT

<span id="variable:CMAKE_<LANG>_FLAGS_INIT">
CMAKE_<LANG>_FLAGS_INIT¶

New in version 3.7.

Value used to initialize the CMAKE_<LANG>_FLAGS cache entry
the first time a build tree is configured for language <LANG>.
This variable is meant to be set by a toolchain file.  CMake may prepend or append content to
the value based on the environment and target platform.  For example,
the contents of a xxxFLAGS environment variable will be prepended,
where xxx will be language-specific but not necessarily the same as
<LANG> (e.g. CXXFLAGS for CXX, FFLAGS for
Fortran, and so on).
This value is a command-line string fragment. Therefore, multiple options
should be separated by spaces, and options with spaces should be quoted.

See also the configuration-specific
CMAKE_<LANG>_FLAGS_<CONFIG>_INIT variable.

Previous topic

CMAKE_<LANG>_FLAGS_DEBUG_INIT

Next topic

CMAKE_<LANG>_FLAGS_MINSIZEREL

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

CMAKE_<LANG>_FLAGS_INIT

        © 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>CMAKE_<LANG>_FLAGS_MINSIZEREL — 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="CMAKE_<LANG>_FLAGS_MINSIZEREL_INIT" href="CMAKE_LANG_FLAGS_MINSIZEREL_INIT.html" />
    <link rel="prev" title="CMAKE_<LANG>_FLAGS_INIT" href="CMAKE_LANG_FLAGS_INIT.html" />

Navigation

          index

          next |

          previous |

    CMake »

    3.29.0-rc3 Documentation »

cmake-variables(7) »

CMAKE_<LANG>_FLAGS_MINSIZEREL

<span id="variable:CMAKE_<LANG>_FLAGS_MINSIZEREL">
CMAKE_<LANG>_FLAGS_MINSIZEREL¶

This variable is the MinSizeRel variant of the
CMAKE_<LANG>_FLAGS_<CONFIG> variable.

Previous topic

CMAKE_<LANG>_FLAGS_INIT

Next topic

CMAKE_<LANG>_FLAGS_MINSIZEREL_INIT

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

CMAKE_<LANG>_FLAGS_MINSIZEREL

        © 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>CMAKE_<LANG>_FLAGS_MINSIZEREL_INIT — 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="CMAKE_<LANG>_FLAGS_RELEASE" href="CMAKE_LANG_FLAGS_RELEASE.html" />
    <link rel="prev" title="CMAKE_<LANG>_FLAGS_MINSIZEREL" href="CMAKE_LANG_FLAGS_MINSIZEREL.html" />

Navigation

          index

          next |

          previous |

    CMake »

    3.29.0-rc3 Documentation »

cmake-variables(7) »

CMAKE_<LANG>_FLAGS_MINSIZEREL_INIT

<span id="variable:CMAKE_<LANG>_FLAGS_MINSIZEREL_INIT">
CMAKE_<LANG>_FLAGS_MINSIZEREL_INIT¶

New in version 3.7.

This variable is the MinSizeRel variant of the
CMAKE_<LANG>_FLAGS_<CONFIG>_INIT variable.

Previous topic

CMAKE_<LANG>_FLAGS_MINSIZEREL

Next topic

CMAKE_<LANG>_FLAGS_RELEASE

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

CMAKE_<LANG>_FLAGS_MINSIZEREL_INIT

        © 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>CMAKE_<LANG>_FLAGS_RELEASE — 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="CMAKE_<LANG>_FLAGS_RELEASE_INIT" href="CMAKE_LANG_FLAGS_RELEASE_INIT.html" />
    <link rel="prev" title="CMAKE_<LANG>_FLAGS_MINSIZEREL_INIT" href="CMAKE_LANG_FLAGS_MINSIZEREL_INIT.html" />

Navigation

          index

          next |

          previous |

    CMake »

    3.29.0-rc3 Documentation »

cmake-variables(7) »

CMAKE_<LANG>_FLAGS_RELEASE

<span id="variable:CMAKE_<LANG>_FLAGS_RELEASE">
CMAKE_<LANG>_FLAGS_RELEASE¶

This variable is the Release variant of the
CMAKE_<LANG>_FLAGS_<CONFIG> variable.

Previous topic

CMAKE_<LANG>_FLAGS_MINSIZEREL_INIT

Next topic

CMAKE_<LANG>_FLAGS_RELEASE_INIT

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

CMAKE_<LANG>_FLAGS_RELEASE

        © 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>CMAKE_<LANG>_FLAGS_RELEASE_INIT — 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="CMAKE_<LANG>_FLAGS_RELWITHDEBINFO" href="CMAKE_LANG_FLAGS_RELWITHDEBINFO.html" />
    <link rel="prev" title="CMAKE_<LANG>_FLAGS_RELEASE" href="CMAKE_LANG_FLAGS_RELEASE.html" />

Navigation

          index

          next |

          previous |

    CMake »

    3.29.0-rc3 Documentation »

cmake-variables(7) »

CMAKE_<LANG>_FLAGS_RELEASE_INIT

<span id="variable:CMAKE_<LANG>_FLAGS_RELEASE_INIT">
CMAKE_<LANG>_FLAGS_RELEASE_INIT¶

New in version 3.7.

This variable is the Release variant of the
CMAKE_<LANG>_FLAGS_<CONFIG>_INIT variable.

Previous topic

CMAKE_<LANG>_FLAGS_RELEASE

Next topic

CMAKE_<LANG>_FLAGS_RELWITHDEBINFO

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

CMAKE_<LANG>_FLAGS_RELEASE_INIT

        © 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>CMAKE_<LANG>_FLAGS_RELWITHDEBINFO — 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="CMAKE_<LANG>_FLAGS_RELWITHDEBINFO_INIT" href="CMAKE_LANG_FLAGS_RELWITHDEBINFO_INIT.html" />
    <link rel="prev" title="CMAKE_<LANG>_FLAGS_RELEASE_INIT" href="CMAKE_LANG_FLAGS_RELEASE_INIT.html" />

Navigation

          index

          next |

          previous |

    CMake »

    3.29.0-rc3 Documentation »

cmake-variables(7) »

CMAKE_<LANG>_FLAGS_RELWITHDEBINFO

<span id="variable:CMAKE_<LANG>_FLAGS_RELWITHDEBINFO">
CMAKE_<LANG>_FLAGS_RELWITHDEBINFO¶

This variable is the RelWithDebInfo variant of the
CMAKE_<LANG>_FLAGS_<CONFIG> variable.

Previous topic

CMAKE_<LANG>_FLAGS_RELEASE_INIT

Next topic

CMAKE_<LANG>_FLAGS_RELWITHDEBINFO_INIT

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

CMAKE_<LANG>_FLAGS_RELWITHDEBINFO

        © 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>CMAKE_<LANG>_FLAGS_RELWITHDEBINFO_INIT — 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="CMAKE_<LANG>_HOST_COMPILER" href="CMAKE_LANG_HOST_COMPILER.html" />
    <link rel="prev" title="CMAKE_<LANG>_FLAGS_RELWITHDEBINFO" href="CMAKE_LANG_FLAGS_RELWITHDEBINFO.html" />

Navigation

          index

          next |

          previous |

    CMake »

    3.29.0-rc3 Documentation »

cmake-variables(7) »

CMAKE_<LANG>_FLAGS_RELWITHDEBINFO_INIT

<span id="variable:CMAKE_<LANG>_FLAGS_RELWITHDEBINFO_INIT">
CMAKE_<LANG>_FLAGS_RELWITHDEBINFO_INIT¶

New in version 3.7.

This variable is the RelWithDebInfo variant of the
CMAKE_<LANG>_FLAGS_<CONFIG>_INIT variable.

Previous topic

CMAKE_<LANG>_FLAGS_RELWITHDEBINFO

Next topic

CMAKE_<LANG>_HOST_COMPILER

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

CMAKE_<LANG>_FLAGS_RELWITHDEBINFO_INIT

        © 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>CMAKE_<LANG>_HOST_COMPILER — 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="CMAKE_<LANG>_IGNORE_EXTENSIONS" href="CMAKE_LANG_IGNORE_EXTENSIONS.html" />
    <link rel="prev" title="CMAKE_<LANG>_FLAGS_RELWITHDEBINFO_INIT" href="CMAKE_LANG_FLAGS_RELWITHDEBINFO_INIT.html" />

Navigation

          index

          next |

          previous |

    CMake »

    3.29.0-rc3 Documentation »

cmake-variables(7) »

CMAKE_<LANG>_HOST_COMPILER

<span id="variable:CMAKE_<LANG>_HOST_COMPILER">
CMAKE_<LANG>_HOST_COMPILER¶

New in version 3.10: CMAKE_CUDA_HOST_COMPILER

New in version 3.28: CMAKE_HIP_HOST_COMPILER

This variable is available when <LANG> is CUDA or HIP.

When CMAKE_<LANG>_COMPILER_ID is
NVIDIA, CMAKE_<LANG>_HOST_COMPILER selects the compiler executable
to use when compiling host code for CUDA or HIP language files.
This maps to the nvcc -ccbin option.

The CMAKE_<LANG>_HOST_COMPILER variable may be set explicitly before CUDA
or HIP is first enabled by a project() or enable_language()
command.
This can be done via -DCMAKE_<LANG>_HOST_COMPILER=... on the command line
or in a toolchain file.  Or, one may set
the CUDAHOSTCXX or HIPHOSTCXX environment variable to
provide a default value.

Once the CUDA or HIP language is enabled, the CMAKE_<LANG>_HOST_COMPILER
variable is read-only and changes to it are undefined behavior.

Note

Since CMAKE_<LANG>_HOST_COMPILER is meaningful only when the
CMAKE_<LANG>_COMPILER_ID is NVIDIA,
it does not make sense to set CMAKE_<LANG>_HOST_COMPILER without also
setting CMAKE_<LANG>_COMPILER to NVCC.

Note

Projects should not try to set CMAKE_<LANG>_HOST_COMPILER to match
CMAKE_CXX_COMPILER themselves.
It is the end-user's responsibility, not the project's, to ensure that
NVCC targets the same ABI as the C++ compiler.

Note

Ignored when using Visual Studio Generators.

Previous topic

CMAKE_<LANG>_FLAGS_RELWITHDEBINFO_INIT

Next topic

CMAKE_<LANG>_IGNORE_EXTENSIONS

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

CMAKE_<LANG>_HOST_COMPILER

        © 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>CMAKE_<LANG>_IGNORE_EXTENSIONS — 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="CMAKE_<LANG>_IMPLICIT_INCLUDE_DIRECTORIES" href="CMAKE_LANG_IMPLICIT_INCLUDE_DIRECTORIES.html" />
    <link rel="prev" title="CMAKE_<LANG>_HOST_COMPILER" href="CMAKE_LANG_HOST_COMPILER.html" />

Navigation

          index

          next |

          previous |

    CMake »

    3.29.0-rc3 Documentation »

cmake-variables(7) »

CMAKE_<LANG>_IGNORE_EXTENSIONS

<span id="variable:CMAKE_<LANG>_IGNORE_EXTENSIONS">
CMAKE_<LANG>_IGNORE_EXTENSIONS¶

File extensions that should be ignored by the build.

This is a list of file extensions that may be part of a project for a
given language but are not compiled.

Previous topic

CMAKE_<LANG>_HOST_COMPILER

Next topic

CMAKE_<LANG>_IMPLICIT_INCLUDE_DIRECTORIES

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

CMAKE_<LANG>_IGNORE_EXTENSIONS

        © 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>CMAKE_<LANG>_IMPLICIT_INCLUDE_DIRECTORIES — 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="CMAKE_<LANG>_IMPLICIT_LINK_DIRECTORIES" href="CMAKE_LANG_IMPLICIT_LINK_DIRECTORIES.html" />
    <link rel="prev" title="CMAKE_<LANG>_IGNORE_EXTENSIONS" href="CMAKE_LANG_IGNORE_EXTENSIONS.html" />

Navigation

          index

          next |

          previous |

    CMake »

    3.29.0-rc3 Documentation »

cmake-variables(7) »

CMAKE_<LANG>_IMPLICIT_INCLUDE_DIRECTORIES

<span id="variable:CMAKE_<LANG>_IMPLICIT_INCLUDE_DIRECTORIES">
CMAKE_<LANG>_IMPLICIT_INCLUDE_DIRECTORIES¶

Directories implicitly searched by the compiler for header files.

CMake does not explicitly specify these directories on compiler
command lines for language <LANG>.  This prevents system include
directories from being treated as user include directories on some
compilers, which is important for C, CXX, and CUDA to
avoid overriding standard library headers.

This value is not used for Fortran because it has no standard
library headers and some compilers do not search their implicit
include directories for module .mod files.

Previous topic

CMAKE_<LANG>_IGNORE_EXTENSIONS

Next topic

CMAKE_<LANG>_IMPLICIT_LINK_DIRECTORIES

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

CMAKE_<LANG>_IMPLICIT_INCLUDE_DIRECTORIES

        © 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>CMAKE_<LANG>_IMPLICIT_LINK_DIRECTORIES — 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="CMAKE_<LANG>_IMPLICIT_LINK_FRAMEWORK_DIRECTORIES" href="CMAKE_LANG_IMPLICIT_LINK_FRAMEWORK_DIRECTORIES.html" />
    <link rel="prev" title="CMAKE_<LANG>_IMPLICIT_INCLUDE_DIRECTORIES" href="CMAKE_LANG_IMPLICIT_INCLUDE_DIRECTORIES.html" />

Navigation

          index

          next |

          previous |

    CMake »

    3.29.0-rc3 Documentation »

cmake-variables(7) »

CMAKE_<LANG>_IMPLICIT_LINK_DIRECTORIES

<span id="variable:CMAKE_<LANG>_IMPLICIT_LINK_DIRECTORIES">
CMAKE_<LANG>_IMPLICIT_LINK_DIRECTORIES¶

Implicit linker search path detected for language <LANG>.

Compilers typically pass directories containing language runtime
libraries and default library search paths when they invoke a linker.
These paths are implicit linker search directories for the compiler's
language.

For each language enabled by the project() or
enable_language() command, CMake automatically detects these
directories and reports the results in this variable.
The CMAKE_<LANG>_IMPLICIT_LINK_DIRECTORIES_EXCLUDE environment
variable may be set to exclude specific directories from the automatically
detected results.

When linking to a static library, CMake adds the implicit link directories
from this variable for each language used in the static library (except
the language whose compiler is used to drive linking).  In the case of an
imported static library, the IMPORTED_LINK_INTERFACE_LANGUAGES
target property lists the languages whose implicit link information is
needed.  If any of the languages is not enabled, its value for the
CMAKE_<LANG>_IMPLICIT_LINK_DIRECTORIES variable may instead be provided
by the project.  Or, a toolchain file
may set the variable to a value known for the specified toolchain.  It will
either be overridden when the language is enabled, or used as a fallback.

Some toolchains read implicit directories from an environment variable such as
LIBRARY_PATH.  If using such an environment variable, keep its value
consistent when operating in a given build tree because CMake saves the value
detected when first creating a build tree.

If policy CMP0060 is not set to NEW, then when a library in one
of these directories is given by full path to target_link_libraries()
CMake will generate the -l<name> form on link lines for historical
purposes.

See also the CMAKE_<LANG>_IMPLICIT_LINK_LIBRARIES variable.

Previous topic

CMAKE_<LANG>_IMPLICIT_INCLUDE_DIRECTORIES

Next topic

CMAKE_<LANG>_IMPLICIT_LINK_FRAMEWORK_DIRECTORIES

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

CMAKE_<LANG>_IMPLICIT_LINK_DIRECTORIES

        © 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>CMAKE_<LANG>_IMPLICIT_LINK_FRAMEWORK_DIRECTORIES — 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="CMAKE_<LANG>_IMPLICIT_LINK_LIBRARIES" href="CMAKE_LANG_IMPLICIT_LINK_LIBRARIES.html" />
    <link rel="prev" title="CMAKE_<LANG>_IMPLICIT_LINK_DIRECTORIES" href="CMAKE_LANG_IMPLICIT_LINK_DIRECTORIES.html" />

Navigation

          index

          next |

          previous |

    CMake »

    3.29.0-rc3 Documentation »

cmake-variables(7) »

CMAKE_<LANG>_IMPLICIT_LINK_FRAMEWORK_DIRECTORIES

<span id="variable:CMAKE_<LANG>_IMPLICIT_LINK_FRAMEWORK_DIRECTORIES">
CMAKE_<LANG>_IMPLICIT_LINK_FRAMEWORK_DIRECTORIES¶

Implicit linker framework search path detected for language <LANG>.

These paths are implicit linker framework search directories for the
compiler's language.  CMake automatically detects these directories
for each language and reports the results in this variable.

Previous topic

CMAKE_<LANG>_IMPLICIT_LINK_DIRECTORIES

Next topic

CMAKE_<LANG>_IMPLICIT_LINK_LIBRARIES

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

CMAKE_<LANG>_IMPLICIT_LINK_FRAMEWORK_DIRECTORIES

        © 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>CMAKE_<LANG>_IMPLICIT_LINK_LIBRARIES — 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="CMAKE_<LANG>_LIBRARY_ARCHITECTURE" href="CMAKE_LANG_LIBRARY_ARCHITECTURE.html" />
    <link rel="prev" title="CMAKE_<LANG>_IMPLICIT_LINK_FRAMEWORK_DIRECTORIES" href="CMAKE_LANG_IMPLICIT_LINK_FRAMEWORK_DIRECTORIES.html" />

Navigation

          index

          next |

          previous |

    CMake »

    3.29.0-rc3 Documentation »

cmake-variables(7) »

CMAKE_<LANG>_IMPLICIT_LINK_LIBRARIES

<span id="variable:CMAKE_<LANG>_IMPLICIT_LINK_LIBRARIES">
CMAKE_<LANG>_IMPLICIT_LINK_LIBRARIES¶

Implicit link libraries and flags detected for language <LANG>.

Compilers typically pass language runtime library names and other
flags when they invoke a linker.  These flags are implicit link
options for the compiler's language.  For each language enabled
by the project() or enable_language() command,
CMake automatically detects these libraries and flags and reports
the results in this variable.

When linking to a static library, CMake adds the implicit link libraries and
flags from this variable for each language used in the static library (except
the language whose compiler is used to drive linking).  In the case of an
imported static library, the IMPORTED_LINK_INTERFACE_LANGUAGES
target property lists the languages whose implicit link information is
needed.  If any of the languages is not enabled, its value for the
CMAKE_<LANG>_IMPLICIT_LINK_LIBRARIES variable may instead be provided
by the project.  Or, a toolchain file
may set the variable to a value known for the specified toolchain.  It will
either be overridden when the language is enabled, or used as a fallback.

See also the CMAKE_<LANG>_IMPLICIT_LINK_DIRECTORIES variable.

Previous topic

CMAKE_<LANG>_IMPLICIT_LINK_FRAMEWORK_DIRECTORIES

Next topic

CMAKE_<LANG>_LIBRARY_ARCHITECTURE

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

CMAKE_<LANG>_IMPLICIT_LINK_LIBRARIES

        © 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>CMAKE_<LANG>_INCLUDE_WHAT_YOU_USE — 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="CMAKE_<LANG>_LINK_GROUP_USING_<FEATURE>" href="CMAKE_LANG_LINK_GROUP_USING_FEATURE.html" />
    <link rel="prev" title="CMAKE_<LANG>_CPPLINT" href="CMAKE_LANG_CPPLINT.html" />

Navigation

          index

          next |

          previous |

    CMake »

    3.29.0-rc3 Documentation »

cmake-variables(7) »

CMAKE_<LANG>_INCLUDE_WHAT_YOU_USE

<span id="variable:CMAKE_<LANG>_INCLUDE_WHAT_YOU_USE">
CMAKE_<LANG>_INCLUDE_WHAT_YOU_USE¶

New in version 3.3.

Default value for <LANG>_INCLUDE_WHAT_YOU_USE target property.
This variable is used to initialize the property on each target as it is
created.  This is done only when <LANG> is C or CXX.

Previous topic

CMAKE_<LANG>_CPPLINT

Next topic

CMAKE_<LANG>_LINK_GROUP_USING_<FEATURE>

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

CMAKE_<LANG>_INCLUDE_WHAT_YOU_USE

        © 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>CMAKE_<LANG>_LIBRARY_ARCHITECTURE — 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="CMAKE_<LANG>_LINK_EXECUTABLE" href="CMAKE_LANG_LINK_EXECUTABLE.html" />
    <link rel="prev" title="CMAKE_<LANG>_IMPLICIT_LINK_LIBRARIES" href="CMAKE_LANG_IMPLICIT_LINK_LIBRARIES.html" />

Navigation

          index

          next |

          previous |

    CMake »

    3.29.0-rc3 Documentation »

cmake-variables(7) »

CMAKE_<LANG>_LIBRARY_ARCHITECTURE

<span id="variable:CMAKE_<LANG>_LIBRARY_ARCHITECTURE">
CMAKE_<LANG>_LIBRARY_ARCHITECTURE¶

Target architecture library directory name detected for <LANG>.

If the <LANG> compiler passes to the linker an architecture-specific
system library search directory such as <prefix>/lib/<arch> this
variable contains the <arch> name if/as detected by CMake.

Previous topic

CMAKE_<LANG>_IMPLICIT_LINK_LIBRARIES

Next topic

CMAKE_<LANG>_LINK_EXECUTABLE

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

CMAKE_<LANG>_LIBRARY_ARCHITECTURE

        © 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>CMAKE_<LANG>_LINKER_LAUNCHER — 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="CMAKE_<LANG>_USING_LINKER_MODE" href="CMAKE_LANG_USING_LINKER_MODE.html" />
    <link rel="prev" title="CMAKE_<LANG>_LINK_WHAT_YOU_USE_FLAG" href="CMAKE_LANG_LINK_WHAT_YOU_USE_FLAG.html" />

Navigation

          index

          next |

          previous |

    CMake »

    3.29.0-rc3 Documentation »

cmake-variables(7) »

CMAKE_<LANG>_LINKER_LAUNCHER

<span id="variable:CMAKE_<LANG>_LINKER_LAUNCHER">
CMAKE_<LANG>_LINKER_LAUNCHER¶

New in version 3.21.

Default value for <LANG>_LINKER_LAUNCHER target property. This
variable is used to initialize the property on each target as it is created.
This is done only when <LANG> is C, CXX, OBJC, or OBJCXX.

This variable is initialized to the CMAKE_<LANG>_LINKER_LAUNCHER
environment variable if it is set.

Previous topic

CMAKE_<LANG>_LINK_WHAT_YOU_USE_FLAG

Next topic

CMAKE_<LANG>_USING_LINKER_MODE

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

CMAKE_<LANG>_LINKER_LAUNCHER

        © 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>CMAKE_<LANG>_LINKER_PREFERENCE — 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="CMAKE_<LANG>_LINKER_PREFERENCE_PROPAGATES" href="CMAKE_LANG_LINKER_PREFERENCE_PROPAGATES.html" />
    <link rel="prev" title="CMAKE_<LANG>_COMPILER_VERSION_INTERNAL" href="CMAKE_LANG_COMPILER_VERSION_INTERNAL.html" />

Navigation

          index

          next |

          previous |

    CMake »

    3.29.0-rc3 Documentation »

cmake-variables(7) »

CMAKE_<LANG>_LINKER_PREFERENCE

<span id="variable:CMAKE_<LANG>_LINKER_PREFERENCE">
CMAKE_<LANG>_LINKER_PREFERENCE¶

An internal variable subject to change.

Preference value for linker language selection.

The "linker language" for executable, shared library, and module
targets is the language whose compiler will invoke the linker.  The
LINKER_LANGUAGE target property sets the language explicitly.
Otherwise, the linker language is that whose linker preference value
is highest among languages compiled and linked into the target.  See
also the CMAKE_<LANG>_LINKER_PREFERENCE_PROPAGATES variable.

Previous topic

CMAKE_<LANG>_COMPILER_VERSION_INTERNAL

Next topic

CMAKE_<LANG>_LINKER_PREFERENCE_PROPAGATES

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

CMAKE_<LANG>_LINKER_PREFERENCE

        © 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>CMAKE_<LANG>_LINKER_PREFERENCE_PROPAGATES — 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="CMAKE_<LANG>_PLATFORM_ID" href="CMAKE_LANG_PLATFORM_ID.html" />
    <link rel="prev" title="CMAKE_<LANG>_LINKER_PREFERENCE" href="CMAKE_LANG_LINKER_PREFERENCE.html" />

Navigation

          index

          next |

          previous |

    CMake »

    3.29.0-rc3 Documentation »

cmake-variables(7) »

CMAKE_<LANG>_LINKER_PREFERENCE_PROPAGATES

<span id="variable:CMAKE_<LANG>_LINKER_PREFERENCE_PROPAGATES">
CMAKE_<LANG>_LINKER_PREFERENCE_PROPAGATES¶

An internal variable subject to change.

True if CMAKE_<LANG>_LINKER_PREFERENCE propagates across targets.

This is used when CMake selects a linker language for a target.
Languages compiled directly into the target are always considered.  A
language compiled into static libraries linked by the target is
considered if this variable is true.

Previous topic

CMAKE_<LANG>_LINKER_PREFERENCE

Next topic

CMAKE_<LANG>_PLATFORM_ID

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

CMAKE_<LANG>_LINKER_PREFERENCE_PROPAGATES

        © 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>CMAKE_<LANG>_LINKER_WRAPPER_FLAG — 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="CMAKE_<LANG>_LINKER_WRAPPER_FLAG_SEP" href="CMAKE_LANG_LINKER_WRAPPER_FLAG_SEP.html" />
    <link rel="prev" title="CMAKE_<LANG>_LINK_EXECUTABLE" href="CMAKE_LANG_LINK_EXECUTABLE.html" />

Navigation

          index

          next |

          previous |

    CMake »

    3.29.0-rc3 Documentation »

cmake-variables(7) »

CMAKE_<LANG>_LINKER_WRAPPER_FLAG

<span id="variable:CMAKE_<LANG>_LINKER_WRAPPER_FLAG">
CMAKE_<LANG>_LINKER_WRAPPER_FLAG¶

New in version 3.13.

Defines the syntax of compiler driver option to pass options to the linker
tool. It will be used to translate the LINKER: prefix in the link options
(see add_link_options() and target_link_options()).

This variable holds a semicolon-separated list of tokens.
If a space (i.e. " ") is specified as last token, flag and LINKER:
arguments will be specified as separate arguments to the compiler driver.
The CMAKE_<LANG>_LINKER_WRAPPER_FLAG_SEP variable can be specified
to manage concatenation of arguments.

For example, for Clang we have:

set (CMAKE_C_LINKER_WRAPPER_FLAG "-Xlinker" " ")

Specifying "LINKER:-z,defs" will be transformed in
-Xlinker -z -Xlinker defs.

For GNU GCC:

set (CMAKE_C_LINKER_WRAPPER_FLAG "-Wl,")
set (CMAKE_C_LINKER_WRAPPER_FLAG_SEP ",")

Specifying "LINKER:-z,defs" will be transformed in -Wl,-z,defs.

And for SunPro:

set (CMAKE_C_LINKER_WRAPPER_FLAG "-Qoption" "ld" " ")
set (CMAKE_C_LINKER_WRAPPER_FLAG_SEP ",")

Specifying "LINKER:-z,defs" will be transformed in -Qoption ld -z,defs.

Previous topic

CMAKE_<LANG>_LINK_EXECUTABLE

Next topic

CMAKE_<LANG>_LINKER_WRAPPER_FLAG_SEP

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

CMAKE_<LANG>_LINKER_WRAPPER_FLAG

        © 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>CMAKE_<LANG>_LINKER_WRAPPER_FLAG_SEP — 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="CMAKE_<LANG>_OUTPUT_EXTENSION" href="CMAKE_LANG_OUTPUT_EXTENSION.html" />
    <link rel="prev" title="CMAKE_<LANG>_LINKER_WRAPPER_FLAG" href="CMAKE_LANG_LINKER_WRAPPER_FLAG.html" />

Navigation

          index

          next |

          previous |

    CMake »

    3.29.0-rc3 Documentation »

cmake-variables(7) »

CMAKE_<LANG>_LINKER_WRAPPER_FLAG_SEP

<span id="variable:CMAKE_<LANG>_LINKER_WRAPPER_FLAG_SEP">
CMAKE_<LANG>_LINKER_WRAPPER_FLAG_SEP¶

New in version 3.13.

This variable is used with CMAKE_<LANG>_LINKER_WRAPPER_FLAG
variable to format LINKER: prefix in the link options
(see add_link_options() and target_link_options()).

When specified, arguments of the LINKER: prefix will be concatenated using
this value as separator.

Previous topic

CMAKE_<LANG>_LINKER_WRAPPER_FLAG

Next topic

CMAKE_<LANG>_OUTPUT_EXTENSION

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

CMAKE_<LANG>_LINKER_WRAPPER_FLAG_SEP

        © 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>CMAKE_<LANG>_LINK_EXECUTABLE — 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="CMAKE_<LANG>_LINKER_WRAPPER_FLAG" href="CMAKE_LANG_LINKER_WRAPPER_FLAG.html" />
    <link rel="prev" title="CMAKE_<LANG>_LIBRARY_ARCHITECTURE" href="CMAKE_LANG_LIBRARY_ARCHITECTURE.html" />

Navigation

          index

          next |

          previous |

    CMake »

    3.29.0-rc3 Documentation »

cmake-variables(7) »

CMAKE_<LANG>_LINK_EXECUTABLE

<span id="variable:CMAKE_<LANG>_LINK_EXECUTABLE">
CMAKE_<LANG>_LINK_EXECUTABLE¶

Rule variable to link an executable.

Rule variable to link an executable for the given language.

Previous topic

CMAKE_<LANG>_LIBRARY_ARCHITECTURE

Next topic

CMAKE_<LANG>_LINKER_WRAPPER_FLAG

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

CMAKE_<LANG>_LINK_EXECUTABLE

        © 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>CMAKE_<LANG>_LINK_GROUP_USING_<FEATURE> — 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="CMAKE_<LANG>_LINK_GROUP_USING_<FEATURE>_SUPPORTED" href="CMAKE_LANG_LINK_GROUP_USING_FEATURE_SUPPORTED.html" />
    <link rel="prev" title="CMAKE_<LANG>_INCLUDE_WHAT_YOU_USE" href="CMAKE_LANG_INCLUDE_WHAT_YOU_USE.html" />

Navigation

          index

          next |

          previous |

    CMake »

    3.29.0-rc3 Documentation »

cmake-variables(7) »

CMAKE_<LANG>_LINK_GROUP_USING_<FEATURE>

<span id="variable:CMAKE_<LANG>_LINK_GROUP_USING_<FEATURE>">
CMAKE_<LANG>_LINK_GROUP_USING_<FEATURE>¶

New in version 3.24.

This variable defines how to link a group of libraries for the specified
<FEATURE> when a LINK_GROUP generator expression is used and
the link language for the target is <LANG>.
For this variable to have any effect, the associated
CMAKE_<LANG>_LINK_GROUP_USING_<FEATURE>_SUPPORTED variable
must be set to true.

The CMAKE_LINK_GROUP_USING_<FEATURE> variable should be defined
instead for features that are independent of the link language.

Feature names are case-sensitive and may only contain letters, numbers
and underscores.  Feature names defined in all uppercase are reserved for
CMake's own built-in features (see Predefined Features further below).

Feature Definitions¶

A group feature definition is a list that contains exactly two elements:

<PREFIX> <SUFFIX>

On the linker command line, <PREFIX> will precede the list of libraries
in the group and <SUFFIX> will follow after.

For the elements of this variable, the LINKER: prefix can be used.

To pass options to the linker tool, each compiler driver has its own syntax.
The LINKER: prefix and , separator can be used to specify, in a portable
way, options to pass to the linker tool. LINKER: is replaced by the
appropriate driver option and , by the appropriate driver separator.
The driver prefix and driver separator are given by the values of the
CMAKE_<LANG>_LINKER_WRAPPER_FLAG and
CMAKE_<LANG>_LINKER_WRAPPER_FLAG_SEP variables.

For example, "LINKER:-z,defs" becomes -Xlinker -z -Xlinker defs for
Clang and -Wl,-z,defs for GNU GCC.

The LINKER: prefix can be specified as part of a SHELL: prefix
expression.

The LINKER: prefix supports, as an alternative syntax, specification of
arguments using the SHELL: prefix and space as separator. The previous
example then becomes "LINKER:SHELL:-z defs".

Note

Specifying the SHELL: prefix anywhere other than at the beginning of the
LINKER: prefix is not supported.

Examples¶

Solving cross-references between two static libraries¶

A project may define two or more static libraries which have circular
dependencies between them.  In order for the linker to resolve all symbols
at link time, it may need to search repeatedly among the libraries until no
new undefined references are created.  Different linkers use different syntax
for achieving this.  The following example shows how this may be implemented
for some linkers.  Note that this is for illustration purposes only.
Projects should use the built-in RESCAN group feature instead
(see Predefined Features), which provides a more complete and more robust
implementation of this functionality.

set(CMAKE_C_LINK_GROUP_USING_cross_refs_SUPPORTED TRUE)
if(CMAKE_C_COMPILER_ID STREQUAL "GNU" AND CMAKE_SYSTEM_NAME STREQUAL "Linux")
  set(CMAKE_C_LINK_GROUP_USING_cross_refs
    "LINKER:--start-group"
    "LINKER:--end-group"
  )
elseif(CMAKE_C_COMPILER_ID STREQUAL "SunPro" AND CMAKE_SYSTEM_NAME STREQUAL "SunOS")
  set(CMAKE_C_LINK_GROUP_USING_cross_refs
    "LINKER:-z,rescan-start"
    "LINKER:-z,rescan-end"
  )
else()
  # feature not yet supported for the other environments
  set(CMAKE_C_LINK_GROUP_USING_cross_refs_SUPPORTED FALSE)
endif()

add_library(lib1 STATIC ...)
add_library(lib2 SHARED ...)

if(CMAKE_C_LINK_GROUP_USING_cross_refs_SUPPORTED)
  target_link_libraries(lib2 PRIVATE "$<LINK_GROUP:cross_refs,lib1,external>")
else()
  target_link_libraries(lib2 PRIVATE lib1 external)
endif()

CMake will generate the following linker command line fragments when linking
lib2:

GNU: -Wl,--start-group /path/to/lib1.a -lexternal -Wl,--end-group

SunPro: -Wl,-z,rescan-start /path/to/lib1.a -lexternal -Wl,-z,rescan-end

Predefined Features¶

The following built-in group features are pre-defined by CMake:

RESCAN

Some linkers are single-pass only.  For such linkers, circular references
between libraries typically result in unresolved symbols.  This feature
instructs the linker to search the specified static libraries repeatedly
until no new undefined references are created.

Normally, a static library is searched only once in the order that it is
specified on the command line.  If a symbol in that library is needed to
resolve an undefined symbol referred to by an object in a library that
appears later on the command line, the linker would not be able to resolve
that reference.  By grouping the static libraries with the RESCAN
feature, they will all be searched repeatedly until all possible references
are resolved.  This will use linker options like --start-group and
--end-group, or on SunOS, -z rescan-start and -z rescan-end.

Using this feature has a significant performance cost. It is best to use it
only when there are unavoidable circular references between two or more
static libraries.

This feature is available when using toolchains that target Linux, BSD, and
SunOS.  It can also be used when targeting Windows platforms if the GNU
toolchain is used.

Table of Contents

CMAKE_<LANG>_LINK_GROUP_USING_<FEATURE>

Feature Definitions

Examples

Solving cross-references between two static libraries

Predefined Features

Previous topic

CMAKE_<LANG>_INCLUDE_WHAT_YOU_USE

Next topic

CMAKE_<LANG>_LINK_GROUP_USING_<FEATURE>_SUPPORTED

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

CMAKE_<LANG>_LINK_GROUP_USING_<FEATURE>

        © 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>CMAKE_<LANG>_LINK_GROUP_USING_<FEATURE>_SUPPORTED — 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="CMAKE_<LANG>_LINK_LIBRARY_FILE_FLAG" href="CMAKE_LANG_LINK_LIBRARY_FILE_FLAG.html" />
    <link rel="prev" title="CMAKE_<LANG>_LINK_GROUP_USING_<FEATURE>" href="CMAKE_LANG_LINK_GROUP_USING_FEATURE.html" />

Navigation

          index

          next |

          previous |

    CMake »

    3.29.0-rc3 Documentation »

cmake-variables(7) »

CMAKE_<LANG>_LINK_GROUP_USING_<FEATURE>_SUPPORTED

<span id="variable:CMAKE_<LANG>_LINK_GROUP_USING_<FEATURE>_SUPPORTED">
CMAKE_<LANG>_LINK_GROUP_USING_<FEATURE>_SUPPORTED¶

New in version 3.24.

This variable specifies whether the <FEATURE> is supported for the link
language <LANG>.  If this variable is true, then the <FEATURE> must
be defined by CMAKE_<LANG>_LINK_GROUP_USING_<FEATURE>, and the
more generic CMAKE_LINK_GROUP_USING_<FEATURE>_SUPPORTED and
CMAKE_LINK_GROUP_USING_<FEATURE> variables are not used.

If CMAKE_<LANG>_LINK_GROUP_USING_<FEATURE>_SUPPORTED is false or is not
set, then the CMAKE_LINK_GROUP_USING_<FEATURE>_SUPPORTED variable
will determine whether <FEATURE> is deemed to be supported.

Previous topic

CMAKE_<LANG>_LINK_GROUP_USING_<FEATURE>

Next topic

CMAKE_<LANG>_LINK_LIBRARY_FILE_FLAG

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

CMAKE_<LANG>_LINK_GROUP_USING_<FEATURE>_SUPPORTED

        © 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>CMAKE_<LANG>_LINK_LIBRARY_FILE_FLAG — 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="CMAKE_<LANG>_LINK_LIBRARY_FLAG" href="CMAKE_LANG_LINK_LIBRARY_FLAG.html" />
    <link rel="prev" title="CMAKE_<LANG>_LINK_GROUP_USING_<FEATURE>_SUPPORTED" href="CMAKE_LANG_LINK_GROUP_USING_FEATURE_SUPPORTED.html" />

Navigation

          index

          next |

          previous |

    CMake »

    3.29.0-rc3 Documentation »

cmake-variables(7) »

CMAKE_<LANG>_LINK_LIBRARY_FILE_FLAG

<span id="variable:CMAKE_<LANG>_LINK_LIBRARY_FILE_FLAG">
CMAKE_<LANG>_LINK_LIBRARY_FILE_FLAG¶

New in version 3.16.

Language-specific flag to be used to link a library specified by
a path to its file.

The flag will be used before a library file path is given to the
linker.  This is needed only on very few platforms.

Previous topic

CMAKE_<LANG>_LINK_GROUP_USING_<FEATURE>_SUPPORTED

Next topic

CMAKE_<LANG>_LINK_LIBRARY_FLAG

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

CMAKE_<LANG>_LINK_LIBRARY_FILE_FLAG

        © 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>CMAKE_<LANG>_LINK_LIBRARY_FLAG — 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="CMAKE_<LANG>_LINK_LIBRARY_USING_<FEATURE>" href="CMAKE_LANG_LINK_LIBRARY_USING_FEATURE.html" />
    <link rel="prev" title="CMAKE_<LANG>_LINK_LIBRARY_FILE_FLAG" href="CMAKE_LANG_LINK_LIBRARY_FILE_FLAG.html" />

Navigation

          index

          next |

          previous |

    CMake »

    3.29.0-rc3 Documentation »

cmake-variables(7) »

CMAKE_<LANG>_LINK_LIBRARY_FLAG

<span id="variable:CMAKE_<LANG>_LINK_LIBRARY_FLAG">
CMAKE_<LANG>_LINK_LIBRARY_FLAG¶

New in version 3.16.

Flag to be used to link a library into a shared library or executable.

This flag will be used to specify a library to link to a shared library or an
executable for the specific language.  On most compilers this is -l.

Previous topic

CMAKE_<LANG>_LINK_LIBRARY_FILE_FLAG

Next topic

CMAKE_<LANG>_LINK_LIBRARY_USING_<FEATURE>

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

CMAKE_<LANG>_LINK_LIBRARY_FLAG

        © 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>CMAKE_<LANG>_LINK_LIBRARY_SUFFIX — 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="CMAKE_LINK_LIBRARY_SUFFIX" href="CMAKE_LINK_LIBRARY_SUFFIX.html" />
    <link rel="prev" title="CMAKE_<LANG>_COMPILER_RANLIB" href="CMAKE_LANG_COMPILER_RANLIB.html" />

Navigation

          index

          next |

          previous |

    CMake »

    3.29.0-rc3 Documentation »

cmake-variables(7) »

CMAKE_<LANG>_LINK_LIBRARY_SUFFIX

<span id="variable:CMAKE_<LANG>_LINK_LIBRARY_SUFFIX">
CMAKE_<LANG>_LINK_LIBRARY_SUFFIX¶

New in version 3.16.

Language-specific suffix for libraries that you link to.

The suffix to use for the end of a library filename, .lib on Windows.

Previous topic

CMAKE_<LANG>_COMPILER_RANLIB

Next topic

CMAKE_LINK_LIBRARY_SUFFIX

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

CMAKE_<LANG>_LINK_LIBRARY_SUFFIX

        © 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>CMAKE_<LANG>_LINK_LIBRARY_USING_<FEATURE> — 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="CMAKE_<LANG>_LINK_LIBRARY_USING_<FEATURE>_SUPPORTED" href="CMAKE_LANG_LINK_LIBRARY_USING_FEATURE_SUPPORTED.html" />
    <link rel="prev" title="CMAKE_<LANG>_LINK_LIBRARY_FLAG" href="CMAKE_LANG_LINK_LIBRARY_FLAG.html" />

Navigation

          index

          next |

          previous |

    CMake »

    3.29.0-rc3 Documentation »

cmake-variables(7) »

CMAKE_<LANG>_LINK_LIBRARY_USING_<FEATURE>

<span id="variable:CMAKE_<LANG>_LINK_LIBRARY_USING_<FEATURE>">
CMAKE_<LANG>_LINK_LIBRARY_USING_<FEATURE>¶

New in version 3.24.

This variable defines how to link a library or framework for the specified
<FEATURE> when a LINK_LIBRARY generator expression is used and
the link language for the target is <LANG>.
For this variable to have any effect, the associated
CMAKE_<LANG>_LINK_LIBRARY_USING_<FEATURE>_SUPPORTED variable
must be set to true.

The CMAKE_LINK_LIBRARY_USING_<FEATURE> variable should be defined
instead for features that are independent of the link language.

Feature names are case-sensitive and may only contain letters, numbers
and underscores.  Feature names defined in all uppercase are reserved for
CMake's own built-in features (see Predefined Features further below).

Feature Definitions¶

A library feature definition is a list that contains one or three elements:

[<PREFIX>] <LIBRARY_EXPRESSION> [<SUFFIX>]

When <PREFIX> and <SUFFIX> are specified, they precede and follow
respectively the whole list of libraries specified in the
LINK_LIBRARY expression, not each library item individually.
There is no guarantee that the list of specified libraries will be kept
grouped together though, so the <PREFIX> and <SUFFIX> may appear
more than once if the library list is reorganized by CMake to satisfy other
constraints.  This means constructs like --start-group and --end-group,
as supported by the GNU ld linker, cannot be used in this way.  The
LINK_GROUP generator expression should be used instead for such
constructs.

<LIBRARY_EXPRESSION> is used to specify the pattern for constructing the
corresponding fragment on the linker command line for each library.
The following placeholders can be used in the expression:

<LIBRARY> is expanded to the full path to the library for CMake targets,
or to a platform-specific value based on the item otherwise (the same as
<LINK_ITEM> on Windows, or the library base name for other platforms).

<LINK_ITEM> is expanded to how the library would normally be linked on
the linker command line.

<LIB_ITEM> is expanded to the full path to the library for CMake targets,
or the item itself exactly as specified in the <LIBRARY_EXPRESSION>
otherwise.

In addition to the above, it is possible to have one pattern for paths
(CMake targets and external libraries specified with file paths) and another
for other items specified by name only.  The PATH{} and NAME{} wrappers
can be used to provide the expansion for those two cases, respectively.
When wrappers are used, both must be present.  For example:

set(CMAKE_LINK_LIBRARY_USING_weak_library
    "PATH{-weak_library <LIBRARY>}NAME{LINKER:-weak-l<LIB_ITEM>}"
)

For all three elements of this variable (<PREFIX>, <LIBRARY_EXPRESSION>,
and <SUFFIX>), the LINKER: prefix can be used.

To pass options to the linker tool, each compiler driver has its own syntax.
The LINKER: prefix and , separator can be used to specify, in a portable
way, options to pass to the linker tool. LINKER: is replaced by the
appropriate driver option and , by the appropriate driver separator.
The driver prefix and driver separator are given by the values of the
CMAKE_<LANG>_LINKER_WRAPPER_FLAG and
CMAKE_<LANG>_LINKER_WRAPPER_FLAG_SEP variables.

For example, "LINKER:-z,defs" becomes -Xlinker -z -Xlinker defs for
Clang and -Wl,-z,defs for GNU GCC.

The LINKER: prefix can be specified as part of a SHELL: prefix
expression.

The LINKER: prefix supports, as an alternative syntax, specification of
arguments using the SHELL: prefix and space as separator. The previous
example then becomes "LINKER:SHELL:-z defs".

Note

Specifying the SHELL: prefix anywhere other than at the beginning of the
LINKER: prefix is not supported.

Examples¶

Loading a whole static library¶

A common need is to prevent the linker from discarding any symbols from a
static library.  Different linkers use different syntax for achieving this.
The following example shows how this may be implemented for some linkers.
Note that this is for illustration purposes only.  Projects should use the
built-in WHOLE_ARCHIVE feature instead (see Predefined Features), which
provides a more complete and more robust implementation of this functionality.

set(CMAKE_C_LINK_LIBRARY_USING_load_archive_SUPPORTED TRUE)
if(CMAKE_C_COMPILER_ID STREQUAL "AppleClang")
  set(CMAKE_C_LINK_LIBRARY_USING_load_archive "-force_load <LIB_ITEM>")
elseif(CMAKE_C_COMPILER_ID STREQUAL "GNU" AND CMAKE_SYSTEM_NAME STREQUAL "Linux")
  set(CMAKE_C_LINK_LIBRARY_USING_load_archive
    "LINKER:--push-state,--whole-archive"
    "<LINK_ITEM>"
    "LINKER:--pop-state"
  )
elseif(CMAKE_C_COMPILER_ID STREQUAL "MSVC")
  set(CMAKE_C_LINK_LIBRARY_USING_load_archive "/WHOLEARCHIVE:<LIBRARY>")
else()
  # feature not yet supported for the other environments
  set(CMAKE_C_LINK_LIBRARY_USING_load_archive_SUPPORTED FALSE)
endif()

add_library(lib1 STATIC ...)
add_library(lib2 SHARED ...)

if(CMAKE_C_LINK_LIBRARY_USING_load_archive_SUPPORTED)
  # The -force_load Apple linker option requires a file name
  set(external_lib
    "$<IF:$<LINK_LANG_AND_ID:C,AppleClang>,libexternal.a,external>"
  )
  target_link_libraries(lib2 PRIVATE
    "$<LINK_LIBRARY:load_archive,lib1,${external_lib}>"
  )
else()
  target_link_libraries(lib2 PRIVATE lib1 external)
endif()

CMake will generate the following link expressions:

AppleClang: -force_load /path/to/lib1.a -force_load libexternal.a

GNU: -Wl,--push-state,--whole-archive /path/to/lib1.a -lexternal -Wl,--pop-state

MSVC: /WHOLEARCHIVE:/path/to/lib1.lib /WHOLEARCHIVE:external.lib

Linking a library as weak¶

On macOS, it is possible to link a library in weak mode (the library and all
references are marked as weak imports).  Different flags must be used for a
library specified by file path compared to one specified by name.
This constraint can be solved using PATH{} and NAME{} wrappers.
Again, the following example shows how this may be implemented for some
linkers, but it is for illustration purposes only.  Projects should use the
built-in WEAK_FRAMEWORK or WEAK_LIBRARY features instead (see
Predefined Features), which provide more complete and more robust
implementations of this functionality.

if (CMAKE_C_COMPILER_ID STREQUAL "AppleClang")
  set(CMAKE_LINK_LIBRARY_USING_weak_library
      "PATH{-weak_library <LIBRARY>}NAME{LINKER:-weak-l<LIB_ITEM>}"
  )
  set(CMAKE_LINK_LIBRARY_USING_weak_library_SUPPORTED TRUE)
endif()

add_library(lib SHARED ...)
add_executable(main ...)
if(CMAKE_LINK_LIBRARY_USING_weak_library_SUPPORTED)
  target_link_libraries(main PRIVATE "$<LINK_LIBRARY:weak_library,lib,external>")
else()
  target_link_libraries(main PRIVATE lib external)
endif()

CMake will generate the following linker command line fragment when linking
main using the AppleClang toolchain:

-weak_library /path/to/lib -Xlinker -weak-lexternal.

Predefined Features¶

The following built-in library features are pre-defined by CMake:

DEFAULT

This feature corresponds to standard linking, essentially equivalent to
using no feature at all.  It is typically only used with the
LINK_LIBRARY_OVERRIDE and
LINK_LIBRARY_OVERRIDE_<LIBRARY> target properties.

WHOLE_ARCHIVE

Force inclusion of all members of a static library.  This feature is only
supported for the following platforms, with limitations as noted:

Linux.

All BSD variants.

SunOS.

All Apple variants.  The library must be specified as a CMake target name,
a library file name (such as libfoo.a), or a library file path (such as
/path/to/libfoo.a).  Due to a limitation of the Apple linker, it
cannot be specified as a plain library name like foo, where foo
is not a CMake target.

Windows.  When using a MSVC or MSVC-like toolchain, the MSVC version must
be greater than 1900.

Cygwin.

MSYS.

FRAMEWORK

This option tells the linker to search for the specified framework using
the -framework linker option.  It can only be used on Apple platforms,
and only with a linker that understands the option used (i.e. the linker
provided with Xcode, or one compatible with it).

The framework can be specified as a CMake framework target, a bare framework
name, or a file path.  If a target is given, that target must have the
FRAMEWORK target property set to true.  For a file path, if it
contains a directory part, that directory will be added as a framework
search path.

add_library(lib SHARED ...)
target_link_libraries(lib PRIVATE "$<LINK_LIBRARY:FRAMEWORK,/path/to/my_framework>")

# The constructed linker command line will contain:
#   -F/path/to -framework my_framework

File paths must conform to one of the following patterns (* is a
wildcard, and optional parts are shown as [...]):

[/path/to/]FwName[.framework]

[/path/to/]FwName.framework/FwName[suffix]

[/path/to/]FwName.framework/Versions/*/FwName[suffix]

Note that CMake recognizes and automatically handles framework targets,
even without using the $<LINK_LIBRARY:FRAMEWORK,...> expression.
The generator expression can still be used with a CMake target if the
project wants to be explicit about it, but it is not required to do so.
The linker command line may have some differences between using the
generator expression or not, but the final result should be the same.
On the other hand, if a file path is given, CMake will recognize some paths
automatically, but not all cases.  The project may want to use
$<LINK_LIBRARY:FRAMEWORK,...> for file paths so that the expected
behavior is clear.

New in version 3.25: The FRAMEWORK_MULTI_CONFIG_POSTFIX_<CONFIG> target property as
well as the suffix of the framework library name are now supported by
the FRAMEWORK features.

NEEDED_FRAMEWORK

This is similar to the FRAMEWORK feature, except it forces the linker
to link with the framework even if no symbols are used from it.  It uses
the -needed_framework option and has the same linker constraints as
FRAMEWORK.

REEXPORT_FRAMEWORK

This is similar to the FRAMEWORK feature, except it tells the linker
that the framework should be available to clients linking to the library
being created.  It uses the -reexport_framework option and has the
same linker constraints as FRAMEWORK.

WEAK_FRAMEWORK

This is similar to the FRAMEWORK feature, except it forces the linker
to mark the framework and all references to it as weak imports.  It uses
the -weak_framework option and has the same linker constraints as
FRAMEWORK.

NEEDED_LIBRARY

This is similar to the NEEDED_FRAMEWORK feature, except it is for use
with non-framework targets or libraries (Apple platforms only).
It uses the -needed_library or -needed-l option as appropriate,
and has the same linker constraints as NEEDED_FRAMEWORK.

REEXPORT_LIBRARY

This is similar to the REEXPORT_FRAMEWORK feature,  except it is for use
with non-framework targets or libraries (Apple platforms only).
It uses the -reexport_library or -reexport-l option as appropriate,
and has the same linker constraints as REEXPORT_FRAMEWORK.

WEAK_LIBRARY

This is similar to the WEAK_FRAMEWORK feature, except it is for use
with non-framework targets or libraries (Apple platforms only).
It uses the -weak_library or -weak-l option as appropriate,
and has the same linker constraints as WEAK_FRAMEWORK.

Table of Contents

CMAKE_<LANG>_LINK_LIBRARY_USING_<FEATURE>

Feature Definitions

Examples

Loading a whole static library

Linking a library as weak

Predefined Features

Previous topic

CMAKE_<LANG>_LINK_LIBRARY_FLAG

Next topic

CMAKE_<LANG>_LINK_LIBRARY_USING_<FEATURE>_SUPPORTED

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

CMAKE_<LANG>_LINK_LIBRARY_USING_<FEATURE>

        © 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>CMAKE_<LANG>_LINK_LIBRARY_USING_<FEATURE>_SUPPORTED — 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="CMAKE_<LANG>_LINK_WHAT_YOU_USE_FLAG" href="CMAKE_LANG_LINK_WHAT_YOU_USE_FLAG.html" />
    <link rel="prev" title="CMAKE_<LANG>_LINK_LIBRARY_USING_<FEATURE>" href="CMAKE_LANG_LINK_LIBRARY_USING_FEATURE.html" />

Navigation

          index

          next |

          previous |

    CMake »

    3.29.0-rc3 Documentation »

cmake-variables(7) »

CMAKE_<LANG>_LINK_LIBRARY_USING_<FEATURE>_SUPPORTED

<span id="variable:CMAKE_<LANG>_LINK_LIBRARY_USING_<FEATURE>_SUPPORTED">
CMAKE_<LANG>_LINK_LIBRARY_USING_<FEATURE>_SUPPORTED¶

New in version 3.24.

Set to TRUE if the <FEATURE>, as defined by variable
CMAKE_<LANG>_LINK_LIBRARY_USING_<FEATURE>, is supported for the
linker language <LANG>.

Note

This variable is evaluated before the more generic variable
CMAKE_LINK_LIBRARY_USING_<FEATURE>_SUPPORTED.

Previous topic

CMAKE_<LANG>_LINK_LIBRARY_USING_<FEATURE>

Next topic

CMAKE_<LANG>_LINK_WHAT_YOU_USE_FLAG

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

CMAKE_<LANG>_LINK_LIBRARY_USING_<FEATURE>_SUPPORTED

        © 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>CMAKE_<LANG>_LINK_WHAT_YOU_USE_FLAG — 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="CMAKE_<LANG>_LINKER_LAUNCHER" href="CMAKE_LANG_LINKER_LAUNCHER.html" />
    <link rel="prev" title="CMAKE_<LANG>_LINK_LIBRARY_USING_<FEATURE>_SUPPORTED" href="CMAKE_LANG_LINK_LIBRARY_USING_FEATURE_SUPPORTED.html" />

Navigation

          index

          next |

          previous |

    CMake »

    3.29.0-rc3 Documentation »

cmake-variables(7) »

CMAKE_<LANG>_LINK_WHAT_YOU_USE_FLAG

<span id="variable:CMAKE_<LANG>_LINK_WHAT_YOU_USE_FLAG">
CMAKE_<LANG>_LINK_WHAT_YOU_USE_FLAG¶

New in version 3.22.

Linker flag to be used to configure linker so that all specified libraries on
the command line will be linked into the target.

See also variable CMAKE_LINK_WHAT_YOU_USE_CHECK.

Previous topic

CMAKE_<LANG>_LINK_LIBRARY_USING_<FEATURE>_SUPPORTED

Next topic

CMAKE_<LANG>_LINKER_LAUNCHER

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

CMAKE_<LANG>_LINK_WHAT_YOU_USE_FLAG

        © 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>CMAKE_<LANG>_OUTPUT_EXTENSION — 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="CMAKE_<LANG>_SIMULATE_ID" href="CMAKE_LANG_SIMULATE_ID.html" />
    <link rel="prev" title="CMAKE_<LANG>_LINKER_WRAPPER_FLAG_SEP" href="CMAKE_LANG_LINKER_WRAPPER_FLAG_SEP.html" />

Navigation

          index

          next |

          previous |

    CMake »

    3.29.0-rc3 Documentation »

cmake-variables(7) »

CMAKE_<LANG>_OUTPUT_EXTENSION

<span id="variable:CMAKE_<LANG>_OUTPUT_EXTENSION">
CMAKE_<LANG>_OUTPUT_EXTENSION¶

Extension for the output of a compile for a single file.

This is the extension for an object file for the given <LANG>.  For
example .obj for C on Windows.

Previous topic

CMAKE_<LANG>_LINKER_WRAPPER_FLAG_SEP

Next topic

CMAKE_<LANG>_SIMULATE_ID

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

CMAKE_<LANG>_OUTPUT_EXTENSION

        © 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>CMAKE_<LANG>_PLATFORM_ID — 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="CMAKE_NOT_USING_CONFIG_FLAGS" href="CMAKE_NOT_USING_CONFIG_FLAGS.html" />
    <link rel="prev" title="CMAKE_<LANG>_LINKER_PREFERENCE_PROPAGATES" href="CMAKE_LANG_LINKER_PREFERENCE_PROPAGATES.html" />

Navigation

          index

          next |

          previous |

    CMake »

    3.29.0-rc3 Documentation »

cmake-variables(7) »

CMAKE_<LANG>_PLATFORM_ID

<span id="variable:CMAKE_<LANG>_PLATFORM_ID">
CMAKE_<LANG>_PLATFORM_ID¶

An internal variable subject to change.

This is used in determining the platform and is subject to change.

Previous topic

CMAKE_<LANG>_LINKER_PREFERENCE_PROPAGATES

Next topic

CMAKE_NOT_USING_CONFIG_FLAGS

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

CMAKE_<LANG>_PLATFORM_ID

        © 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>CMAKE_<LANG>_SIMULATE_ID — 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="CMAKE_<LANG>_SIMULATE_VERSION" href="CMAKE_LANG_SIMULATE_VERSION.html" />
    <link rel="prev" title="CMAKE_<LANG>_OUTPUT_EXTENSION" href="CMAKE_LANG_OUTPUT_EXTENSION.html" />

Navigation

          index

          next |

          previous |

    CMake »

    3.29.0-rc3 Documentation »

cmake-variables(7) »

CMAKE_<LANG>_SIMULATE_ID

<span id="variable:CMAKE_<LANG>_SIMULATE_ID">
CMAKE_<LANG>_SIMULATE_ID¶

Identification string of the "simulated" compiler.

Some compilers simulate other compilers to serve as drop-in
replacements.  When CMake detects such a compiler it sets this
variable to what would have been the CMAKE_<LANG>_COMPILER_ID for
the simulated compiler.

Note

In other words, this variable describes the ABI compatibility
of the generated code.

Previous topic

CMAKE_<LANG>_OUTPUT_EXTENSION

Next topic

CMAKE_<LANG>_SIMULATE_VERSION

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

CMAKE_<LANG>_SIMULATE_ID

        © 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>CMAKE_<LANG>_SIMULATE_VERSION — 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="CMAKE_<LANG>_SIZEOF_DATA_PTR" href="CMAKE_LANG_SIZEOF_DATA_PTR.html" />
    <link rel="prev" title="CMAKE_<LANG>_SIMULATE_ID" href="CMAKE_LANG_SIMULATE_ID.html" />

Navigation

          index

          next |

          previous |

    CMake »

    3.29.0-rc3 Documentation »

cmake-variables(7) »

CMAKE_<LANG>_SIMULATE_VERSION

<span id="variable:CMAKE_<LANG>_SIMULATE_VERSION">
CMAKE_<LANG>_SIMULATE_VERSION¶

Version string of "simulated" compiler.

Some compilers simulate other compilers to serve as drop-in
replacements.  When CMake detects such a compiler it sets this
variable to what would have been the CMAKE_<LANG>_COMPILER_VERSION
for the simulated compiler.

Previous topic

CMAKE_<LANG>_SIMULATE_ID

Next topic

CMAKE_<LANG>_SIZEOF_DATA_PTR

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

CMAKE_<LANG>_SIMULATE_VERSION

        © 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>CMAKE_<LANG>_SIZEOF_DATA_PTR — 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="CMAKE_<LANG>_SOURCE_FILE_EXTENSIONS" href="CMAKE_LANG_SOURCE_FILE_EXTENSIONS.html" />
    <link rel="prev" title="CMAKE_<LANG>_SIMULATE_VERSION" href="CMAKE_LANG_SIMULATE_VERSION.html" />

Navigation

          index

          next |

          previous |

    CMake »

    3.29.0-rc3 Documentation »

cmake-variables(7) »

CMAKE_<LANG>_SIZEOF_DATA_PTR

<span id="variable:CMAKE_<LANG>_SIZEOF_DATA_PTR">
CMAKE_<LANG>_SIZEOF_DATA_PTR¶

Size of pointer-to-data types for language <LANG>.

This holds the size (in bytes) of pointer-to-data types in the target
platform ABI.  It is defined for languages C and CXX (C++).

Previous topic

CMAKE_<LANG>_SIMULATE_VERSION

Next topic

CMAKE_<LANG>_SOURCE_FILE_EXTENSIONS

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

CMAKE_<LANG>_SIZEOF_DATA_PTR

        © 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>CMAKE_<LANG>_SOURCE_FILE_EXTENSIONS — 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="CMAKE_<LANG>_STANDARD" href="CMAKE_LANG_STANDARD.html" />
    <link rel="prev" title="CMAKE_<LANG>_SIZEOF_DATA_PTR" href="CMAKE_LANG_SIZEOF_DATA_PTR.html" />

Navigation

          index

          next |

          previous |

    CMake »

    3.29.0-rc3 Documentation »

cmake-variables(7) »

CMAKE_<LANG>_SOURCE_FILE_EXTENSIONS

<span id="variable:CMAKE_<LANG>_SOURCE_FILE_EXTENSIONS">
CMAKE_<LANG>_SOURCE_FILE_EXTENSIONS¶

Extensions of source files for the given language.

This is the list of extensions for a given language's source files.

Previous topic

CMAKE_<LANG>_SIZEOF_DATA_PTR

Next topic

CMAKE_<LANG>_STANDARD

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

CMAKE_<LANG>_SOURCE_FILE_EXTENSIONS

        © 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>CMAKE_<LANG>_STANDARD — 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="CMAKE_<LANG>_STANDARD_DEFAULT" href="CMAKE_LANG_STANDARD_DEFAULT.html" />
    <link rel="prev" title="CMAKE_<LANG>_SOURCE_FILE_EXTENSIONS" href="CMAKE_LANG_SOURCE_FILE_EXTENSIONS.html" />

Navigation

          index

          next |

          previous |

    CMake »

    3.29.0-rc3 Documentation »

cmake-variables(7) »

CMAKE_<LANG>_STANDARD

<span id="variable:CMAKE_<LANG>_STANDARD">
CMAKE_<LANG>_STANDARD¶

The variations are:

CMAKE_C_STANDARD

CMAKE_CXX_STANDARD

CMAKE_CUDA_STANDARD

CMAKE_HIP_STANDARD

CMAKE_OBJC_STANDARD

CMAKE_OBJCXX_STANDARD

Default values for <LANG>_STANDARD target properties if set when a
target is created.

For supported CMake versions see the respective pages.

See the cmake-compile-features(7) manual for information on
compile features and a list of supported compilers.

Previous topic

CMAKE_<LANG>_SOURCE_FILE_EXTENSIONS

Next topic

CMAKE_<LANG>_STANDARD_DEFAULT

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

CMAKE_<LANG>_STANDARD

        © 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>CMAKE_<LANG>_STANDARD_DEFAULT — 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="CMAKE_<LANG>_STANDARD_INCLUDE_DIRECTORIES" href="CMAKE_LANG_STANDARD_INCLUDE_DIRECTORIES.html" />
    <link rel="prev" title="CMAKE_<LANG>_STANDARD" href="CMAKE_LANG_STANDARD.html" />

Navigation

          index

          next |

          previous |

    CMake »

    3.29.0-rc3 Documentation »

cmake-variables(7) »

CMAKE_<LANG>_STANDARD_DEFAULT

<span id="variable:CMAKE_<LANG>_STANDARD_DEFAULT">
CMAKE_<LANG>_STANDARD_DEFAULT¶

New in version 3.9.

The compiler's default standard for the language <LANG>. Empty if the
compiler has no conception of standard levels.

Previous topic

CMAKE_<LANG>_STANDARD

Next topic

CMAKE_<LANG>_STANDARD_INCLUDE_DIRECTORIES

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

CMAKE_<LANG>_STANDARD_DEFAULT

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