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>AUTOMOC_DEPEND_FILTERS — 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="AUTOMOC_EXECUTABLE" href="AUTOMOC_EXECUTABLE.html" />
    <link rel="prev" title="AUTOMOC_COMPILER_PREDEFINES" href="AUTOMOC_COMPILER_PREDEFINES.html" />

Navigation

          index

          next |

          previous |

    CMake »

    3.29.0-rc3 Documentation »

cmake-properties(7) »

AUTOMOC_DEPEND_FILTERS

AUTOMOC_DEPEND_FILTERS¶

New in version 3.9.

Filter definitions used by AUTOMOC to extract file names from a
source file that are registered as additional dependencies for the
moc file of the source file.

Filters are defined as KEYWORD;REGULAR_EXPRESSION pairs. First the file
content is searched for KEYWORD. If it is found at least once, then file
names are extracted by successively searching for REGULAR_EXPRESSION and
taking the first match group.

The file name found in the first match group is searched for

first in the vicinity of the source file

and afterwards in the target's INCLUDE_DIRECTORIES.

If any of the extracted files changes, then the moc file for the source
file gets rebuilt even when the source file itself doesn't change.

If any of the extracted files is GENERATED or if it is not in the
target's sources, then it might be necessary to add it to the
The <ORIGIN>_autogen target target  dependencies.
See AUTOGEN_TARGET_DEPENDS for reference.

By default AUTOMOC_DEPEND_FILTERS is initialized from
CMAKE_AUTOMOC_DEPEND_FILTERS, which is empty by default.

From Qt 5.15.0 on this variable is ignored as moc is able to output the
correct dependencies.

See the cmake-qt(7) manual for more information on using CMake
with Qt.

Example 1¶

A header file my_class.hpp uses a custom macro JSON_FILE_MACRO which
is defined in an other header macros.hpp.
We want the moc file of my_class.hpp to depend on the file name
argument of JSON_FILE_MACRO:

// my_class.hpp
class My_Class : public QObject
{
  Q_OBJECT
  JSON_FILE_MACRO ( "info.json" )
...
};

In CMakeLists.txt we add a filter to
CMAKE_AUTOMOC_DEPEND_FILTERS like this:

list( APPEND CMAKE_AUTOMOC_DEPEND_FILTERS
  "JSON_FILE_MACRO"
  "[\n][ \t]*JSON_FILE_MACRO[ \t]*\\([ \t]*\"([^\"]+)\""
)

We assume info.json is a plain (not GENERATED) file that is
listed in the target's source.  Therefore we do not need to add it to
AUTOGEN_TARGET_DEPENDS.

Example 2¶

In the target my_target a header file complex_class.hpp uses a
custom macro JSON_BASED_CLASS which is defined in an other header
macros.hpp:

// macros.hpp
...
#define JSON_BASED_CLASS(name, json) \
class name : public QObject \
{ \
  Q_OBJECT \
  Q_PLUGIN_METADATA(IID "demo" FILE json) \
  name() {} \
};
...

// complex_class.hpp
#pragma once
JSON_BASED_CLASS(Complex_Class, "meta.json")
// end of file

Since complex_class.hpp doesn't contain a Q_OBJECT macro it would be
ignored by AUTOMOC.  We change this by adding JSON_BASED_CLASS
to CMAKE_AUTOMOC_MACRO_NAMES:

list(APPEND CMAKE_AUTOMOC_MACRO_NAMES "JSON_BASED_CLASS")

We want the moc file of complex_class.hpp to depend on
meta.json.  So we add a filter to
CMAKE_AUTOMOC_DEPEND_FILTERS:

list(APPEND CMAKE_AUTOMOC_DEPEND_FILTERS
  "JSON_BASED_CLASS"
  "[\n^][ \t]*JSON_BASED_CLASS[ \t]*\\([^,]*,[ \t]*\"([^\"]+)\""
)

Additionally we assume meta.json is GENERATED which is
why we have to add it to AUTOGEN_TARGET_DEPENDS:

set_property(TARGET my_target APPEND PROPERTY AUTOGEN_TARGET_DEPENDS "meta.json")

Table of Contents

AUTOMOC_DEPEND_FILTERS

Example 1

Example 2

Previous topic

AUTOMOC_COMPILER_PREDEFINES

Next topic

AUTOMOC_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-properties(7) »

AUTOMOC_DEPEND_FILTERS

        © 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>AUTOMOC_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="AUTOMOC_MACRO_NAMES" href="AUTOMOC_MACRO_NAMES.html" />
    <link rel="prev" title="AUTOMOC_DEPEND_FILTERS" href="AUTOMOC_DEPEND_FILTERS.html" />

Navigation

          index

          next |

          previous |

    CMake »

    3.29.0-rc3 Documentation »

cmake-properties(7) »

AUTOMOC_EXECUTABLE

AUTOMOC_EXECUTABLE¶

New in version 3.14.

AUTOMOC_EXECUTABLE is file path pointing to the moc
executable to use for AUTOMOC enabled files. Setting
this property will make CMake skip the automatic detection of the
moc binary as well as the sanity-tests normally run to ensure
that the binary is available and working as expected.

Usually this property does not need to be set. Only consider this
property if auto-detection of moc can not work -- e.g. because
you are building the moc binary as part of your project.

See the cmake-qt(7) manual for more information on using CMake
with Qt.

Previous topic

AUTOMOC_DEPEND_FILTERS

Next topic

AUTOMOC_MACRO_NAMES

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

AUTOMOC_EXECUTABLE

        © 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>AUTOMOC_MACRO_NAMES — 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="AUTOMOC_MOC_OPTIONS" href="AUTOMOC_MOC_OPTIONS.html" />
    <link rel="prev" title="AUTOMOC_EXECUTABLE" href="AUTOMOC_EXECUTABLE.html" />

Navigation

          index

          next |

          previous |

    CMake »

    3.29.0-rc3 Documentation »

cmake-properties(7) »

AUTOMOC_MACRO_NAMES

AUTOMOC_MACRO_NAMES¶

New in version 3.10.

A semicolon-separated list of macro names used by
AUTOMOC to determine if a C++ file needs to be processed by moc.

This property is only used if the AUTOMOC property is ON
for this target.

When running AUTOMOC, CMake searches for the strings listed in
AUTOMOC_MACRO_NAMES in C++ source and header files.
If any of the strings is found

as the first non space string on a new line or

as the first non space string after a { on a new line,

then the file will be processed by moc.

By default AUTOMOC_MACRO_NAMES is initialized from
CMAKE_AUTOMOC_MACRO_NAMES.

See also the INTERFACE_AUTOMOC_MACRO_NAMES target property.

See the cmake-qt(7) manual for more information on using CMake
with Qt.

Example¶

In this case the Q_OBJECT macro is hidden inside another macro
called CUSTOM_MACRO.  To let CMake know that source files that contain
CUSTOM_MACRO need to be moc processed, we call:

set_property(TARGET tgt APPEND PROPERTY AUTOMOC_MACRO_NAMES "CUSTOM_MACRO")

Table of Contents

AUTOMOC_MACRO_NAMES

Example

Previous topic

AUTOMOC_EXECUTABLE

Next topic

AUTOMOC_MOC_OPTIONS

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

AUTOMOC_MACRO_NAMES

        © 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>AUTOMOC_MOC_OPTIONS — 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="AUTOMOC_PATH_PREFIX" href="AUTOMOC_PATH_PREFIX.html" />
    <link rel="prev" title="AUTOMOC_MACRO_NAMES" href="AUTOMOC_MACRO_NAMES.html" />

Navigation

          index

          next |

          previous |

    CMake »

    3.29.0-rc3 Documentation »

cmake-properties(7) »

AUTOMOC_MOC_OPTIONS

AUTOMOC_MOC_OPTIONS¶

Additional options for moc when using AUTOMOC

This property is only used if the AUTOMOC property is ON
for this target.  In this case, it holds additional command line
options which will be used when moc is executed during the build, i.e.
it is equivalent to the optional OPTIONS argument of the
qt4_wrap_cpp() macro.

This property is initialized by the value of the
CMAKE_AUTOMOC_MOC_OPTIONS variable if it is set when a target
is created, or an empty string otherwise.

See the cmake-qt(7) manual for more information on using CMake
with Qt.

EXAMPLE¶

In this example, the moc tool is invoked with the -D_EXTRA_DEFINE
option when generating the moc file for object.cpp.

CMakeLists.txt

add_executable(mocOptions object.cpp main.cpp)
set_property(TARGET mocOptions PROPERTY AUTOMOC ON)
target_compile_options(mocOptions PRIVATE "-D_EXTRA_DEFINE")
set_property(TARGET mocOptions PROPERTY AUTOMOC_MOC_OPTIONS "-D_EXTRA_DEFINE")
target_link_libraries(mocOptions Qt6::Core)

object.hpp

#ifndef Object_HPP
#define Object_HPP

#include <QObject>

#ifdef _EXTRA_DEFINE
class Object : public QObject
{
Q_OBJECT
public:

  Object();

};
#endif

#endif

Table of Contents

AUTOMOC_MOC_OPTIONS

EXAMPLE

Previous topic

AUTOMOC_MACRO_NAMES

Next topic

AUTOMOC_PATH_PREFIX

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

AUTOMOC_MOC_OPTIONS

        © 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>AUTOMOC_PATH_PREFIX — 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="AUTORCC" href="AUTORCC.html" />
    <link rel="prev" title="AUTOMOC_MOC_OPTIONS" href="AUTOMOC_MOC_OPTIONS.html" />

Navigation

          index

          next |

          previous |

    CMake »

    3.29.0-rc3 Documentation »

cmake-properties(7) »

AUTOMOC_PATH_PREFIX

AUTOMOC_PATH_PREFIX¶

New in version 3.16.

When this property is ON, CMake will generate the -p path prefix
option for moc on AUTOMOC enabled Qt targets.

To generate the path prefix, CMake tests if the header compiled by moc
is in any of the target
include directories.  If so, CMake will
compute the relative path accordingly.  If the header is not in the
include directories, CMake will omit
the -p path prefix option.  moc usually generates a
relative include path in that case.

AUTOMOC_PATH_PREFIX is initialized from the variable
CMAKE_AUTOMOC_PATH_PREFIX, which is OFF by default.

See the cmake-qt(7) manual for more information on using CMake
with Qt.

Reproducible builds¶

For reproducible builds it is recommended to keep headers that are moc
compiled in one of the target
include directories and set
AUTOMOC_PATH_PREFIX to ON.  This ensures that:

moc output files are identical on different build setups,

moc output files will compile correctly when the source and/or
build directory is a symbolic link.

Table of Contents

AUTOMOC_PATH_PREFIX

Reproducible builds

Previous topic

AUTOMOC_MOC_OPTIONS

Next topic

AUTORCC

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

AUTOMOC_PATH_PREFIX

        © 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>AUTORCC — 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="AUTORCC_EXECUTABLE" href="AUTORCC_EXECUTABLE.html" />
    <link rel="prev" title="AUTOMOC_PATH_PREFIX" href="AUTOMOC_PATH_PREFIX.html" />

Navigation

          index

          next |

          previous |

    CMake »

    3.29.0-rc3 Documentation »

cmake-properties(7) »

AUTORCC

AUTORCC¶

Should the target be processed with auto-rcc (for Qt projects).

AUTORCC is a boolean specifying whether CMake will handle
the Qt rcc code generator automatically, i.e. without having to use
commands like QT4_ADD_RESOURCES(), qt5_add_resources(),
etc.  Currently, Qt versions 4 to 6 are supported.

When this property is ON, CMake will handle .qrc files added
as target sources at build time and invoke rcc accordingly.
This property is initialized by the value of the CMAKE_AUTORCC
variable if it is set when a target is created.

By default AUTORCC is processed by a
custom command.
If the .qrc file is GENERATED, a
custom target is used instead.

When there are multiple .qrc files with the same name, CMake will
generate unspecified unique output file names for rcc.  Therefore, if
Q_INIT_RESOURCE() or Q_CLEANUP_RESOURCE() need to be used, the
.qrc file name must be unique.

Modifiers¶

AUTORCC_EXECUTABLE:
The rcc executable will be detected automatically, but can be forced to
a certain binary by setting this target property.

AUTORCC_OPTIONS:
Additional command line options for rcc can be set via this target
property.  The corresponding AUTORCC_OPTIONS source file property
can be used to specify options to be applied only to a specific .qrc file.

SKIP_AUTORCC:
.qrc files can be excluded from AUTORCC processing by
setting this source file property.

SKIP_AUTOGEN:
Source files can be excluded from AUTOMOC,
AUTOUIC and AUTORCC processing by
setting this source file property.

AUTOGEN_SOURCE_GROUP:
This global property can be used to group files generated by
AUTOMOC or AUTORCC together in an IDE, e.g.  in MSVS.

AUTOGEN_TARGETS_FOLDER:
This global property can be used to group AUTOMOC,
AUTOUIC and AUTORCC targets together in an IDE,
e.g.  in MSVS.

CMAKE_GLOBAL_AUTORCC_TARGET:
A global autorcc target that depends on all AUTORCC targets
in the project will be generated when this variable is ON.

See the cmake-qt(7) manual for more information on using CMake
with Qt.

Table of Contents

AUTORCC

Modifiers

Previous topic

AUTOMOC_PATH_PREFIX

Next topic

AUTORCC_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-properties(7) »

AUTORCC

        © 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>AUTORCC_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="AUTORCC_OPTIONS" href="AUTORCC_OPTIONS.html" />
    <link rel="prev" title="AUTORCC" href="AUTORCC.html" />

Navigation

          index

          next |

          previous |

    CMake »

    3.29.0-rc3 Documentation »

cmake-properties(7) »

AUTORCC_EXECUTABLE

AUTORCC_EXECUTABLE¶

New in version 3.14.

AUTORCC_EXECUTABLE is file path pointing to the rcc
executable to use for AUTORCC enabled files. Setting
this property will make CMake skip the automatic detection of the
rcc binary as well as the sanity-tests normally run to ensure
that the binary is available and working as expected.

Usually this property does not need to be set. Only consider this
property if auto-detection of rcc can not work -- e.g. because
you are building the rcc binary as part of your project.

See the cmake-qt(7) manual for more information on using CMake
with Qt.

Previous topic

AUTORCC

Next topic

AUTORCC_OPTIONS

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

AUTORCC_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>AUTORCC_OPTIONS — 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="AUTOUIC" href="AUTOUIC.html" />
    <link rel="prev" title="AUTORCC_EXECUTABLE" href="AUTORCC_EXECUTABLE.html" />

Navigation

          index

          next |

          previous |

    CMake »

    3.29.0-rc3 Documentation »

cmake-properties(7) »

AUTORCC_OPTIONS

AUTORCC_OPTIONS¶

Additional options for rcc when using AUTORCC

This property holds additional command line options which will be used
when rcc is executed during the build via AUTORCC,
i.e. it is equivalent to the optional OPTIONS argument of the
qt4_add_resources() macro.

This property is initialized by the value of the
CMAKE_AUTORCC_OPTIONS variable if it is set when a target is
created, or an empty string otherwise.

The options set on the target may be overridden by AUTORCC_OPTIONS
set on the .qrc source file.

See the cmake-qt(7) manual for more information on using CMake
with Qt.

EXAMPLE¶

# ...
set_property(TARGET tgt PROPERTY AUTORCC_OPTIONS "--compress;9")
# ...

Table of Contents

AUTORCC_OPTIONS

EXAMPLE

Previous topic

AUTORCC_EXECUTABLE

Next topic

AUTOUIC

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

AUTORCC_OPTIONS

        © 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>AUTOUIC — 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="AUTOUIC_EXECUTABLE" href="AUTOUIC_EXECUTABLE.html" />
    <link rel="prev" title="AUTORCC_OPTIONS" href="AUTORCC_OPTIONS.html" />

Navigation

          index

          next |

          previous |

    CMake »

    3.29.0-rc3 Documentation »

cmake-properties(7) »

AUTOUIC

AUTOUIC¶

Should the target be processed with auto-uic (for Qt projects).

AUTOUIC is a boolean specifying whether CMake will handle
the Qt uic code generator automatically, i.e. without having to use
commands like QT4_WRAP_UI(), qt5_wrap_ui(), etc.
Currently, Qt versions 4 to 6 are supported.

This property is initialized by the value of the CMAKE_AUTOUIC
variable if it is set when a target is created.

When this property is ON, CMake will scan the header and source files at
build time and invoke uic accordingly.

Header and source file processing¶

At build time, CMake scans each header and source file from the
target's sources for include statements of the form

#include "ui_<ui_base>.h"

Once such an include statement is found in a file, CMake searches for the
uic input file <ui_base>.ui

in the vicinity of the file and

in the AUTOUIC_SEARCH_PATHS of the target.

If the <ui_base>.ui file was found, uic is called on it to generate
ui_<ui_base>.h in the directory

<AUTOGEN_BUILD_DIR>/include for single configuration generators or in

<AUTOGEN_BUILD_DIR>/include_<CONFIG> for
multi configuration generators.

Where <AUTOGEN_BUILD_DIR> is the value of the target property
AUTOGEN_BUILD_DIR.

The include directory is automatically added to the target's
INCLUDE_DIRECTORIES.

Modifiers¶

AUTOUIC_EXECUTABLE:
The uic executable will be detected automatically, but can be forced to
a certain binary using this target property.

AUTOUIC_OPTIONS:
Additional command line options for uic can be set via this target
property.  The corresponding AUTOUIC_OPTIONS source file property
can be used to specify options to be applied only to a specific
<base_name>.ui file.

SKIP_AUTOUIC:
Source files can be excluded from AUTOUIC processing by setting
this source file property.

SKIP_AUTOGEN:
Source files can be excluded from AUTOMOC,
AUTOUIC and AUTORCC processing by
setting this source file property.

AUTOGEN_TARGETS_FOLDER:
This global property can be used to group AUTOMOC,
AUTOUIC and AUTORCC targets together in an IDE,
e.g.  in MSVS.

CMAKE_GLOBAL_AUTOGEN_TARGET:
A global autogen target, that depends on all AUTOMOC or
AUTOUIC generated The <ORIGIN>_autogen target targets in the project,
will be generated when this variable is ON.

AUTOGEN_PARALLEL:
This target property controls the number of moc or uic processes to
start in parallel during builds.

AUTOGEN_COMMAND_LINE_LENGTH_MAX:
This target property controls the limit when to use response files for
moc or uic processes on Windows.

See the cmake-qt(7) manual for more information on using CMake
with Qt.

Table of Contents

AUTOUIC

Header and source file processing

Modifiers

Previous topic

AUTORCC_OPTIONS

Next topic

AUTOUIC_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-properties(7) »

AUTOUIC

        © 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>AUTOUIC_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="AUTOUIC_OPTIONS" href="AUTOUIC_OPTIONS.html" />
    <link rel="prev" title="AUTOUIC" href="AUTOUIC.html" />

Navigation

          index

          next |

          previous |

    CMake »

    3.29.0-rc3 Documentation »

cmake-properties(7) »

AUTOUIC_EXECUTABLE

AUTOUIC_EXECUTABLE¶

New in version 3.14.

AUTOUIC_EXECUTABLE is file path pointing to the uic
executable to use for AUTOUIC enabled files. Setting
this property will make CMake skip the automatic detection of the
uic binary as well as the sanity-tests normally run to ensure
that the binary is available and working as expected.

Usually this property does not need to be set. Only consider this
property if auto-detection of uic can not work -- e.g. because
you are building the uic binary as part of your project.

See the cmake-qt(7) manual for more information on using CMake
with Qt.

Previous topic

AUTOUIC

Next topic

AUTOUIC_OPTIONS

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

AUTOUIC_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>AUTOUIC_OPTIONS — 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="AUTOUIC_SEARCH_PATHS" href="AUTOUIC_SEARCH_PATHS.html" />
    <link rel="prev" title="AUTOUIC_EXECUTABLE" href="AUTOUIC_EXECUTABLE.html" />

Navigation

          index

          next |

          previous |

    CMake »

    3.29.0-rc3 Documentation »

cmake-properties(7) »

AUTOUIC_OPTIONS

AUTOUIC_OPTIONS¶

Additional options for uic when using AUTOUIC

This property holds additional command line options which will be used when
uic is executed during the build via AUTOUIC, i.e. it is
equivalent to the optional OPTIONS argument of the
qt4_wrap_ui() macro.

This property is initialized by the value of the
CMAKE_AUTOUIC_OPTIONS variable if it is set when a target is
created, or an empty string otherwise.

The options set on the target may be overridden by AUTOUIC_OPTIONS
set on the .ui source file.

This property may use "generator expressions" with the syntax $<...>.
See the cmake-generator-expressions(7) manual for available
expressions.

See the cmake-qt(7) manual for more information on using CMake
with Qt.

EXAMPLE¶

# ...
set_property(TARGET tgt PROPERTY AUTOUIC_OPTIONS "--no-protection")
# ...

Table of Contents

AUTOUIC_OPTIONS

EXAMPLE

Previous topic

AUTOUIC_EXECUTABLE

Next topic

AUTOUIC_SEARCH_PATHS

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

AUTOUIC_OPTIONS

        © 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>AUTOUIC_SEARCH_PATHS — 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="BINARY_DIR" href="BINARY_DIR.html" />
    <link rel="prev" title="AUTOUIC_OPTIONS" href="AUTOUIC_OPTIONS.html" />

Navigation

          index

          next |

          previous |

    CMake »

    3.29.0-rc3 Documentation »

cmake-properties(7) »

AUTOUIC_SEARCH_PATHS

AUTOUIC_SEARCH_PATHS¶

New in version 3.9.

Search path list used by AUTOUIC to find included
.ui files.

This property is initialized by the value of the
CMAKE_AUTOUIC_SEARCH_PATHS variable if it is set
when a target is created. Otherwise it is empty.

See the cmake-qt(7) manual for more information on using CMake
with Qt.

Previous topic

AUTOUIC_OPTIONS

Next topic

BINARY_DIR

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

AUTOUIC_SEARCH_PATHS

        © 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>BINARY_DIR — 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="BUILD_RPATH" href="BUILD_RPATH.html" />
    <link rel="prev" title="AUTOUIC_SEARCH_PATHS" href="AUTOUIC_SEARCH_PATHS.html" />

Navigation

          index

          next |

          previous |

    CMake »

    3.29.0-rc3 Documentation »

cmake-properties(7) »

BINARY_DIR

BINARY_DIR¶

New in version 3.4.

This read-only property reports the value of the
CMAKE_CURRENT_BINARY_DIR variable in the directory in which
the target was defined.

Previous topic

AUTOUIC_SEARCH_PATHS

Next topic

BUILD_RPATH

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

BINARY_DIR

        © 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>BUILD_RPATH — 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="BUILD_RPATH_USE_ORIGIN" href="BUILD_RPATH_USE_ORIGIN.html" />
    <link rel="prev" title="BINARY_DIR" href="BINARY_DIR.html" />

Navigation

          index

          next |

          previous |

    CMake »

    3.29.0-rc3 Documentation »

cmake-properties(7) »

BUILD_RPATH

BUILD_RPATH¶

New in version 3.8.

A semicolon-separated list specifying
runtime path (RPATH) entries to add to binaries linked in the
build tree (for platforms that support it).  By default, CMake sets
the runtime path of binaries in the build tree to contain search
paths it knows are needed to find the shared libraries they link.
Projects may set BUILD_RPATH to specify additional search paths.

The build-tree runtime path will not be used for binaries in the
install tree.  It will be replaced with the install-tree runtime path
during the installation step.  See also the INSTALL_RPATH
target property.

This property is initialized by the value of the variable
CMAKE_BUILD_RPATH if it is set when a target is created.

This property supports
generator expressions.

Other settings that affect the build-tree runtime path include:

The CMAKE_SKIP_RPATH variable completely disables runtime
paths in both the build tree and install tree.

The SKIP_BUILD_RPATH target property disables setting any
runtime path in the build tree.

The BUILD_RPATH_USE_ORIGIN target property causes the
automatically-generated runtime path to use entries relative to $ORIGIN.

The BUILD_WITH_INSTALL_RPATH target property causes binaries
in the build tree to be built with the install-tree runtime path.

Previous topic

BINARY_DIR

Next topic

BUILD_RPATH_USE_ORIGIN

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

BUILD_RPATH

        © 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>BUILD_RPATH_USE_ORIGIN — 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="BUILD_WITH_INSTALL_NAME_DIR" href="BUILD_WITH_INSTALL_NAME_DIR.html" />
    <link rel="prev" title="BUILD_RPATH" href="BUILD_RPATH.html" />

Navigation

          index

          next |

          previous |

    CMake »

    3.29.0-rc3 Documentation »

cmake-properties(7) »

BUILD_RPATH_USE_ORIGIN

BUILD_RPATH_USE_ORIGIN¶

New in version 3.14.

Whether to use relative paths for the build RPATH.

This property is initialized by the value of the variable
CMAKE_BUILD_RPATH_USE_ORIGIN.

On platforms that support runtime paths (RPATH) with the
$ORIGIN token, setting this property to TRUE enables relative
paths in the build RPATH for executables and shared libraries that
point to shared libraries in the same build tree.

Normally the build RPATH of a binary contains absolute paths
to the directory of each shared library it links to.  The RPATH
entries for directories contained within the build tree can be made
relative to enable relocatable builds and to help achieve reproducible
builds by omitting the build directory from the build environment.

This property has no effect on platforms that do not support the
$ORIGIN token in RPATH, or when the CMAKE_SKIP_RPATH
variable is set. The runtime path set through the
BUILD_RPATH target property is also unaffected by this
property.

Previous topic

BUILD_RPATH

Next topic

BUILD_WITH_INSTALL_NAME_DIR

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

BUILD_RPATH_USE_ORIGIN

        © 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>BUILD_WITH_INSTALL_NAME_DIR — 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="BUILD_WITH_INSTALL_RPATH" href="BUILD_WITH_INSTALL_RPATH.html" />
    <link rel="prev" title="BUILD_RPATH_USE_ORIGIN" href="BUILD_RPATH_USE_ORIGIN.html" />

Navigation

          index

          next |

          previous |

    CMake »

    3.29.0-rc3 Documentation »

cmake-properties(7) »

BUILD_WITH_INSTALL_NAME_DIR

BUILD_WITH_INSTALL_NAME_DIR¶

New in version 3.9.

BUILD_WITH_INSTALL_NAME_DIR is a boolean specifying whether the macOS
install_name of a target in the build tree uses the directory given by
INSTALL_NAME_DIR.  This setting only applies to targets on macOS.

This property is initialized by the value of the variable
CMAKE_BUILD_WITH_INSTALL_NAME_DIR if it is set when a target is
created.

If this property is not set and policy CMP0068 is not NEW, the
value of BUILD_WITH_INSTALL_RPATH is used in its place.

Previous topic

BUILD_RPATH_USE_ORIGIN

Next topic

BUILD_WITH_INSTALL_RPATH

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

BUILD_WITH_INSTALL_NAME_DIR

        © 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>BUILD_WITH_INSTALL_RPATH — 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="BUNDLE" href="BUNDLE.html" />
    <link rel="prev" title="BUILD_WITH_INSTALL_NAME_DIR" href="BUILD_WITH_INSTALL_NAME_DIR.html" />

Navigation

          index

          next |

          previous |

    CMake »

    3.29.0-rc3 Documentation »

cmake-properties(7) »

BUILD_WITH_INSTALL_RPATH

BUILD_WITH_INSTALL_RPATH¶

BUILD_WITH_INSTALL_RPATH is a boolean specifying whether to link the target
in the build tree with the INSTALL_RPATH.  This takes precedence
over SKIP_BUILD_RPATH and avoids the need for relinking before
installation.

This property is initialized by the value of the
CMAKE_BUILD_WITH_INSTALL_RPATH variable if it is set when a target
is created.

If policy CMP0068 is not NEW, this property also controls use of
INSTALL_NAME_DIR in the build tree on macOS.  Either way, the
BUILD_WITH_INSTALL_NAME_DIR target property takes precedence.

Previous topic

BUILD_WITH_INSTALL_NAME_DIR

Next topic

BUNDLE

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

BUILD_WITH_INSTALL_RPATH

        © 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>BUNDLE — 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="BUNDLE_EXTENSION" href="BUNDLE_EXTENSION.html" />
    <link rel="prev" title="BUILD_WITH_INSTALL_RPATH" href="BUILD_WITH_INSTALL_RPATH.html" />

Navigation

          index

          next |

          previous |

    CMake »

    3.29.0-rc3 Documentation »

cmake-properties(7) »

BUNDLE

BUNDLE¶

This target is a CFBundle on the macOS.

If a module library target has this property set to true it will be
built as a CFBundle when built on the mac.  It will have the directory
structure required for a CFBundle and will be suitable to be used for
creating Browser Plugins or other application resources.

Previous topic

BUILD_WITH_INSTALL_RPATH

Next topic

BUNDLE_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-properties(7) »

BUNDLE

        © 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>BUNDLE_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="C_EXTENSIONS" href="C_EXTENSIONS.html" />
    <link rel="prev" title="BUNDLE" href="BUNDLE.html" />

Navigation

          index

          next |

          previous |

    CMake »

    3.29.0-rc3 Documentation »

cmake-properties(7) »

BUNDLE_EXTENSION

BUNDLE_EXTENSION¶

The file extension used to name a BUNDLE, a FRAMEWORK,
or a MACOSX_BUNDLE target on the macOS and iOS.

The default value is bundle, framework, or app for the respective
target types.

Previous topic

BUNDLE

Next topic

C_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-properties(7) »

BUNDLE_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>COMMON_LANGUAGE_RUNTIME — 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="COMPATIBLE_INTERFACE_BOOL" href="COMPATIBLE_INTERFACE_BOOL.html" />
    <link rel="prev" title="C_STANDARD_REQUIRED" href="C_STANDARD_REQUIRED.html" />

Navigation

          index

          next |

          previous |

    CMake »

    3.29.0-rc3 Documentation »

cmake-properties(7) »

COMMON_LANGUAGE_RUNTIME

COMMON_LANGUAGE_RUNTIME¶

New in version 3.12.

By setting this target property, the target is configured to build with
C++/CLI support.

The Visual Studio generator defines the clr parameter depending on
the value of the COMMON_LANGUAGE_RUNTIME target property:

Not Set (default)

Native C++.

"" (set but empty)

Mixed unmanaged/managed C++ using .NET Framework.

netcore

New in version 3.26.

Mixed unmanaged/managed C++ using .NET Core.

This required VS 2019's v142 toolset or higher.

pure

Managed C++.

safe

Managed C++.

This property is only evaluated Visual Studio Generators for
VS 2010 and above.

To be able to build managed C++ targets with VS 2017 and above the component
C++/CLI support must be installed, which may not be done by default.

See also IMPORTED_COMMON_LANGUAGE_RUNTIME

Previous topic

C_STANDARD_REQUIRED

Next topic

COMPATIBLE_INTERFACE_BOOL

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

COMMON_LANGUAGE_RUNTIME

        © 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>COMPATIBLE_INTERFACE_BOOL — 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="COMPATIBLE_INTERFACE_NUMBER_MAX" href="COMPATIBLE_INTERFACE_NUMBER_MAX.html" />
    <link rel="prev" title="COMMON_LANGUAGE_RUNTIME" href="COMMON_LANGUAGE_RUNTIME.html" />

Navigation

          index

          next |

          previous |

    CMake »

    3.29.0-rc3 Documentation »

cmake-properties(7) »

COMPATIBLE_INTERFACE_BOOL

COMPATIBLE_INTERFACE_BOOL¶

Properties which must be compatible with their link interface

The COMPATIBLE_INTERFACE_BOOL property may contain a list of
properties for this target which must be consistent when evaluated as a
boolean with the INTERFACE variant of the property in all linked
dependees.  For example, if a property FOO appears in the list, then
for each dependee, the INTERFACE_FOO property content in all of its
dependencies must be consistent with each other, and with the FOO
property in the depender.

Consistency in this sense has the meaning that if the property is set,
then it must have the same boolean value as all others, and if the
property is not set, then it is ignored.

Note that for each dependee, the set of properties specified in this
property must not intersect with the set specified in any of the other
Compatible Interface Properties.

Previous topic

COMMON_LANGUAGE_RUNTIME

Next topic

COMPATIBLE_INTERFACE_NUMBER_MAX

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

COMPATIBLE_INTERFACE_BOOL

        © 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>COMPATIBLE_INTERFACE_NUMBER_MAX — 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="COMPATIBLE_INTERFACE_NUMBER_MIN" href="COMPATIBLE_INTERFACE_NUMBER_MIN.html" />
    <link rel="prev" title="COMPATIBLE_INTERFACE_BOOL" href="COMPATIBLE_INTERFACE_BOOL.html" />

Navigation

          index

          next |

          previous |

    CMake »

    3.29.0-rc3 Documentation »

cmake-properties(7) »

COMPATIBLE_INTERFACE_NUMBER_MAX

COMPATIBLE_INTERFACE_NUMBER_MAX¶

Properties whose maximum value from the link interface will be used.

The COMPATIBLE_INTERFACE_NUMBER_MAX property may contain a list of
properties for this target whose maximum value may be read at generate
time when evaluated in the INTERFACE variant of the property in all
linked dependees.  For example, if a property FOO appears in the list,
then for each dependee, the INTERFACE_FOO property content in all of
its dependencies will be compared with each other and with the FOO
property in the depender.  When reading the FOO property at generate
time, the maximum value will be returned. If the property is not set,
then it is ignored.

Note that for each dependee, the set of properties specified in this
property must not intersect with the set specified in any of the other
Compatible Interface Properties.

Previous topic

COMPATIBLE_INTERFACE_BOOL

Next topic

COMPATIBLE_INTERFACE_NUMBER_MIN

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

COMPATIBLE_INTERFACE_NUMBER_MAX

        © 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>COMPATIBLE_INTERFACE_NUMBER_MIN — 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="COMPATIBLE_INTERFACE_STRING" href="COMPATIBLE_INTERFACE_STRING.html" />
    <link rel="prev" title="COMPATIBLE_INTERFACE_NUMBER_MAX" href="COMPATIBLE_INTERFACE_NUMBER_MAX.html" />

Navigation

          index

          next |

          previous |

    CMake »

    3.29.0-rc3 Documentation »

cmake-properties(7) »

COMPATIBLE_INTERFACE_NUMBER_MIN

COMPATIBLE_INTERFACE_NUMBER_MIN¶

Properties whose minimum value from the link interface will be used.

The COMPATIBLE_INTERFACE_NUMBER_MIN property may contain a list of
properties for this target whose minimum value may be read at generate
time when evaluated in the INTERFACE variant of the property of all
linked dependees.  For example, if a
property FOO appears in the list, then for each dependee, the
INTERFACE_FOO property content in all of its dependencies will be
compared with each other and with the FOO property in the depender.
When reading the FOO property at generate time, the minimum value
will be returned.  If the property is not set, then it is ignored.

Note that for each dependee, the set of properties specified in this
property must not intersect with the set specified in any of the other
Compatible Interface Properties.

Previous topic

COMPATIBLE_INTERFACE_NUMBER_MAX

Next topic

COMPATIBLE_INTERFACE_STRING

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

COMPATIBLE_INTERFACE_NUMBER_MIN

        © 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>COMPATIBLE_INTERFACE_STRING — 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="COMPILE_DEFINITIONS" href="COMPILE_DEFINITIONS.html" />
    <link rel="prev" title="COMPATIBLE_INTERFACE_NUMBER_MIN" href="COMPATIBLE_INTERFACE_NUMBER_MIN.html" />

Navigation

          index

          next |

          previous |

    CMake »

    3.29.0-rc3 Documentation »

cmake-properties(7) »

COMPATIBLE_INTERFACE_STRING

COMPATIBLE_INTERFACE_STRING¶

Properties which must be string-compatible with their link interface

The COMPATIBLE_INTERFACE_STRING property may contain a list of
properties for this target which must be the same when evaluated as a
string in the INTERFACE variant of the property all linked dependees.
For example, if a property FOO appears in the list, then for each
dependee, the INTERFACE_FOO property content in all of its
dependencies must be equal with each other, and with the FOO property
in the depender.  If the property is not set, then it is ignored.

Note that for each dependee, the set of properties specified in this
property must not intersect with the set specified in any of the other
Compatible Interface Properties.

Previous topic

COMPATIBLE_INTERFACE_NUMBER_MIN

Next topic

COMPILE_DEFINITIONS

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

COMPATIBLE_INTERFACE_STRING

        © 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>COMPILE_DEFINITIONS — 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="COMPILE_FEATURES" href="COMPILE_FEATURES.html" />
    <link rel="prev" title="COMPATIBLE_INTERFACE_STRING" href="COMPATIBLE_INTERFACE_STRING.html" />

Navigation

          index

          next |

          previous |

    CMake »

    3.29.0-rc3 Documentation »

cmake-properties(7) »

COMPILE_DEFINITIONS

COMPILE_DEFINITIONS¶

Preprocessor definitions for compiling a target's sources.

The COMPILE_DEFINITIONS property may be set to a semicolon-separated
list of preprocessor definitions using the syntax VAR or VAR=value.
Function-style definitions are not supported.  CMake will
automatically escape the value correctly for the native build system
(note that CMake language syntax may require escapes to specify some
values).

CMake will automatically drop some definitions that are not supported
by the native build tool.

New in version 3.26: Any leading -D on an item will be removed.

Disclaimer: Most native build tools have poor support for escaping
certain values.  CMake has work-arounds for many cases but some values
may just not be possible to pass correctly.  If a value does not seem
to be escaped correctly, do not attempt to work-around the problem by
adding escape sequences to the value.  Your work-around may break in a
future version of CMake that has improved escape support.  Instead
consider defining the macro in a (configured) header file.  Then
report the limitation.  Known limitations include:

#          - broken almost everywhere
;          - broken in VS IDE 7.0 and Borland Makefiles
,          - broken in VS IDE
%          - broken in some cases in NMake
& |        - broken in some cases on MinGW
^ < > \"   - broken in most Make tools on Windows

CMake does not reject these values outright because they do work in
some cases.  Use with caution.

Contents of COMPILE_DEFINITIONS may use "generator expressions" with the
syntax $<...>.  See the cmake-generator-expressions(7) manual
for available expressions.  See the cmake-buildsystem(7) manual
for more on defining buildsystem properties.

The corresponding COMPILE_DEFINITIONS_<CONFIG> property may
be set to specify per-configuration definitions.  Generator expressions
should be preferred instead of setting the alternative property.

Previous topic

COMPATIBLE_INTERFACE_STRING

Next topic

COMPILE_FEATURES

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

COMPILE_DEFINITIONS

        © 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>COMPILE_DEFINITIONS_<CONFIG> — 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="IMPORTED_NO_SYSTEM" href="IMPORTED_NO_SYSTEM.html" />
    <link rel="prev" title="TEST_INCLUDE_FILE" href="../prop_dir/TEST_INCLUDE_FILE.html" />

Navigation

          index

          next |

          previous |

    CMake »

    3.29.0-rc3 Documentation »

cmake-properties(7) »

COMPILE_DEFINITIONS_<CONFIG>

<span id="prop_tgt:COMPILE_DEFINITIONS_<CONFIG>">
COMPILE_DEFINITIONS_<CONFIG>¶

Ignored.  See CMake Policy CMP0043.

Per-configuration preprocessor definitions on a target.

This is the configuration-specific version of COMPILE_DEFINITIONS
where <CONFIG> is an upper-case name (ex. COMPILE_DEFINITIONS_DEBUG).

Contents of COMPILE_DEFINITIONS_<CONFIG> may use "generator expressions"
with the syntax $<...>.  See the cmake-generator-expressions(7)
manual for available expressions.  See the cmake-buildsystem(7)
manual for more on defining buildsystem properties.

Generator expressions should be preferred instead of setting this property.

Previous topic

TEST_INCLUDE_FILE

Next topic

IMPORTED_NO_SYSTEM

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

COMPILE_DEFINITIONS_<CONFIG>

        © 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>COMPILE_FEATURES — 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="COMPILE_FLAGS" href="COMPILE_FLAGS.html" />
    <link rel="prev" title="COMPILE_DEFINITIONS" href="COMPILE_DEFINITIONS.html" />

Navigation

          index

          next |

          previous |

    CMake »

    3.29.0-rc3 Documentation »

cmake-properties(7) »

COMPILE_FEATURES

COMPILE_FEATURES¶

New in version 3.1.

Compiler features enabled for this target.

The list of features in this property are a subset of the features listed
in the CMAKE_C_COMPILE_FEATURES, CMAKE_CUDA_COMPILE_FEATURES, and
CMAKE_CXX_COMPILE_FEATURES variables.

Contents of COMPILE_FEATURES may use "generator expressions" with the
syntax $<...>.  See the cmake-generator-expressions(7) manual for
available expressions.  See the cmake-compile-features(7) manual
for information on compile features and a list of supported compilers.

Previous topic

COMPILE_DEFINITIONS

Next topic

COMPILE_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-properties(7) »

COMPILE_FEATURES

        © 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>COMPILE_FLAGS — 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="COMPILE_OPTIONS" href="COMPILE_OPTIONS.html" />
    <link rel="prev" title="COMPILE_FEATURES" href="COMPILE_FEATURES.html" />

Navigation

          index

          next |

          previous |

    CMake »

    3.29.0-rc3 Documentation »

cmake-properties(7) »

COMPILE_FLAGS

COMPILE_FLAGS¶

Additional flags to use when compiling this target's sources.

The COMPILE_FLAGS property sets additional compiler flags used to
build sources within the target.  Use COMPILE_DEFINITIONS
to pass additional preprocessor definitions.

This property is deprecated.  Use the COMPILE_OPTIONS
property or the target_compile_options() command instead.

Previous topic

COMPILE_FEATURES

Next topic

COMPILE_OPTIONS

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

COMPILE_FLAGS

        © 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>COMPILE_OPTIONS — 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="COMPILE_PDB_NAME" href="COMPILE_PDB_NAME.html" />
    <link rel="prev" title="COMPILE_FLAGS" href="COMPILE_FLAGS.html" />

Navigation

          index

          next |

          previous |

    CMake »

    3.29.0-rc3 Documentation »

cmake-properties(7) »

COMPILE_OPTIONS

COMPILE_OPTIONS¶

List of options to pass to the compiler.

This property holds a semicolon-separated list
of options specified so far for its target.  Use the
target_compile_options() command to append more options.
The options will be added after flags in the
CMAKE_<LANG>_FLAGS and CMAKE_<LANG>_FLAGS_<CONFIG>
variables, but before those propagated from dependencies by the
INTERFACE_COMPILE_OPTIONS property.

This property adds compile options for all languages in a target.
Use the COMPILE_LANGUAGE generator expression to specify
per-language compile options.

This property is initialized by the COMPILE_OPTIONS directory
property when a target is created, and is used by the generators to set
the options for the compiler.

Contents of COMPILE_OPTIONS may use "generator expressions" with the
syntax $<...>.  See the cmake-generator-expressions(7) manual
for available expressions.  See the cmake-buildsystem(7) manual
for more on defining buildsystem properties.

Option De-duplication¶

The final set of options used for a target is constructed by
accumulating options from the current target and the usage requirements of
its dependencies.  The set of options is de-duplicated to avoid repetition.

New in version 3.12: While beneficial for individual options, the de-duplication step can break
up option groups.  For example, -option A -option B becomes
-option A B.  One may specify a group of options using shell-like
quoting along with a SHELL: prefix.  The SHELL: prefix is dropped,
and the rest of the option string is parsed using the
separate_arguments() UNIX_COMMAND mode. For example,
"SHELL:-option A" "SHELL:-option B" becomes -option A -option B.

Table of Contents

COMPILE_OPTIONS

Option De-duplication

Previous topic

COMPILE_FLAGS

Next topic

COMPILE_PDB_NAME

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

COMPILE_OPTIONS

        © 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>COMPILE_PDB_NAME — 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="COMPILE_PDB_NAME_<CONFIG>" href="COMPILE_PDB_NAME_CONFIG.html" />
    <link rel="prev" title="COMPILE_OPTIONS" href="COMPILE_OPTIONS.html" />

Navigation

          index

          next |

          previous |

    CMake »

    3.29.0-rc3 Documentation »

cmake-properties(7) »

COMPILE_PDB_NAME

COMPILE_PDB_NAME¶

New in version 3.1.

Output name for the MS debug symbol .pdb file generated by the
compiler while building source files.

This property specifies the base name for the debug symbols file.
If not set, the default is unspecified.

Note

The compiler-generated program database files are specified by the
/Fd compiler flag and are not the same as linker-generated
program database files specified by the /pdb linker flag.
Use the PDB_NAME property to specify the latter.

Previous topic

COMPILE_OPTIONS

Next topic

COMPILE_PDB_NAME_<CONFIG>

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

COMPILE_PDB_NAME

        © 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>COMPILE_PDB_NAME_<CONFIG> — 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="COMPILE_PDB_OUTPUT_DIRECTORY" href="COMPILE_PDB_OUTPUT_DIRECTORY.html" />
    <link rel="prev" title="COMPILE_PDB_NAME" href="COMPILE_PDB_NAME.html" />

Navigation

          index

          next |

          previous |

    CMake »

    3.29.0-rc3 Documentation »

cmake-properties(7) »

COMPILE_PDB_NAME_<CONFIG>

<span id="prop_tgt:COMPILE_PDB_NAME_<CONFIG>">
COMPILE_PDB_NAME_<CONFIG>¶

New in version 3.1.

Per-configuration output name for the MS debug symbol .pdb file
generated by the compiler while building source files.

This is the configuration-specific version of COMPILE_PDB_NAME.

Note

The compiler-generated program database files are specified by the
/Fd compiler flag and are not the same as linker-generated
program database files specified by the /pdb linker flag.
Use the PDB_NAME_<CONFIG> property to specify the latter.

Previous topic

COMPILE_PDB_NAME

Next topic

COMPILE_PDB_OUTPUT_DIRECTORY

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

COMPILE_PDB_NAME_<CONFIG>

        © 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>COMPILE_PDB_OUTPUT_DIRECTORY — 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="COMPILE_PDB_OUTPUT_DIRECTORY_<CONFIG>" href="COMPILE_PDB_OUTPUT_DIRECTORY_CONFIG.html" />
    <link rel="prev" title="COMPILE_PDB_NAME_<CONFIG>" href="COMPILE_PDB_NAME_CONFIG.html" />

Navigation

          index

          next |

          previous |

    CMake »

    3.29.0-rc3 Documentation »

cmake-properties(7) »

COMPILE_PDB_OUTPUT_DIRECTORY

COMPILE_PDB_OUTPUT_DIRECTORY¶

New in version 3.1.

Output directory for the MS debug symbol .pdb file
generated by the compiler while building source files.

This property specifies the directory into which the MS debug symbols
will be placed by the compiler.  This property is initialized by the
value of the CMAKE_COMPILE_PDB_OUTPUT_DIRECTORY variable
if it is set when a target is created.

Note

The compiler-generated program database files are specified by the
/Fd compiler flag and are not the same as linker-generated
program database files specified by the /pdb linker flag.
Use the PDB_OUTPUT_DIRECTORY property to specify the latter.

Previous topic

COMPILE_PDB_NAME_<CONFIG>

Next topic

COMPILE_PDB_OUTPUT_DIRECTORY_<CONFIG>

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

COMPILE_PDB_OUTPUT_DIRECTORY

        © 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>COMPILE_PDB_OUTPUT_DIRECTORY_<CONFIG> — 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="COMPILE_WARNING_AS_ERROR" href="COMPILE_WARNING_AS_ERROR.html" />
    <link rel="prev" title="COMPILE_PDB_OUTPUT_DIRECTORY" href="COMPILE_PDB_OUTPUT_DIRECTORY.html" />

Navigation

          index

          next |

          previous |

    CMake »

    3.29.0-rc3 Documentation »

cmake-properties(7) »

COMPILE_PDB_OUTPUT_DIRECTORY_<CONFIG>

<span id="prop_tgt:COMPILE_PDB_OUTPUT_DIRECTORY_<CONFIG>">
COMPILE_PDB_OUTPUT_DIRECTORY_<CONFIG>¶

New in version 3.1.

Per-configuration output directory for the MS debug symbol .pdb file
generated by the compiler while building source files.

This is a per-configuration version of
COMPILE_PDB_OUTPUT_DIRECTORY,
but multi-configuration generators (Visual Studio, Xcode) do NOT append a
per-configuration subdirectory to the specified directory.  This
property is initialized by the value of the
CMAKE_COMPILE_PDB_OUTPUT_DIRECTORY_<CONFIG> variable
if it is set when a target is created.

Note

The compiler-generated program database files are specified by the
/Fd compiler flag and are not the same as linker-generated
program database files specified by the /pdb linker flag.
Use the PDB_OUTPUT_DIRECTORY_<CONFIG> property to specify the latter.

Previous topic

COMPILE_PDB_OUTPUT_DIRECTORY

Next topic

COMPILE_WARNING_AS_ERROR

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

COMPILE_PDB_OUTPUT_DIRECTORY_<CONFIG>

        © 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>COMPILE_WARNING_AS_ERROR — 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="<CONFIG>_OUTPUT_NAME" href="CONFIG_OUTPUT_NAME.html" />
    <link rel="prev" title="COMPILE_PDB_OUTPUT_DIRECTORY_<CONFIG>" href="COMPILE_PDB_OUTPUT_DIRECTORY_CONFIG.html" />

Navigation

          index

          next |

          previous |

    CMake »

    3.29.0-rc3 Documentation »

cmake-properties(7) »

COMPILE_WARNING_AS_ERROR

COMPILE_WARNING_AS_ERROR¶

New in version 3.24.

Specify whether to treat warnings on compile as errors.
If enabled, adds a flag to treat warnings on compile as errors.
If the cmake --compile-no-warning-as-error option is given
on the cmake(1) command line, this property is ignored.

This property is not implemented for all compilers.  It is silently ignored
if there is no implementation for the compiler being used.  The currently
implemented compiler IDs are:

GNU

Clang

AppleClang

Fujitsu

FujitsuClang

IBMClang

Intel

IntelLLVM

LCC

MSVC

NVHPC

NVIDIA (CUDA)

QCC

SunPro

Tasking

TI

VisualAge

XL

XLClang

This property is initialized by the value of the variable
CMAKE_COMPILE_WARNING_AS_ERROR if it is set when a target is
created.

Previous topic

COMPILE_PDB_OUTPUT_DIRECTORY_<CONFIG>

Next topic

<CONFIG>_OUTPUT_NAME

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

COMPILE_WARNING_AS_ERROR

        © 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><CONFIG>_OUTPUT_NAME — 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="<CONFIG>_POSTFIX" href="CONFIG_POSTFIX.html" />
    <link rel="prev" title="COMPILE_WARNING_AS_ERROR" href="COMPILE_WARNING_AS_ERROR.html" />

Navigation

          index

          next |

          previous |

    CMake »

    3.29.0-rc3 Documentation »

cmake-properties(7) »

<CONFIG>_OUTPUT_NAME

<span id="prop_tgt:<CONFIG>_OUTPUT_NAME">
<CONFIG>_OUTPUT_NAME¶

Old per-configuration target file base name.
Use OUTPUT_NAME_<CONFIG> instead.

This is a configuration-specific version of the OUTPUT_NAME
target property.

Previous topic

COMPILE_WARNING_AS_ERROR

Next topic

<CONFIG>_POSTFIX

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

<CONFIG>_OUTPUT_NAME

        © 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><CONFIG>_POSTFIX — 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="CROSSCOMPILING_EMULATOR" href="CROSSCOMPILING_EMULATOR.html" />
    <link rel="prev" title="<CONFIG>_OUTPUT_NAME" href="CONFIG_OUTPUT_NAME.html" />

Navigation

          index

          next |

          previous |

    CMake »

    3.29.0-rc3 Documentation »

cmake-properties(7) »

<CONFIG>_POSTFIX

<span id="prop_tgt:<CONFIG>_POSTFIX">
<CONFIG>_POSTFIX¶

Postfix to append to the target file name for configuration <CONFIG>.

When building with configuration <CONFIG> the value of this property
is appended to the target file name built on disk.  For non-executable
targets, this property is initialized by the value of the
CMAKE_<CONFIG>_POSTFIX variable if it is set when a target is
created.  This property is ignored on macOS for Frameworks and App Bundles.

For macOS see also the FRAMEWORK_MULTI_CONFIG_POSTFIX_<CONFIG>
target property.

Previous topic

<CONFIG>_OUTPUT_NAME

Next topic

CROSSCOMPILING_EMULATOR

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

<CONFIG>_POSTFIX

        © 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>CROSSCOMPILING_EMULATOR — 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="CUDA_ARCHITECTURES" href="CUDA_ARCHITECTURES.html" />
    <link rel="prev" title="<CONFIG>_POSTFIX" href="CONFIG_POSTFIX.html" />

Navigation

          index

          next |

          previous |

    CMake »

    3.29.0-rc3 Documentation »

cmake-properties(7) »

CROSSCOMPILING_EMULATOR

CROSSCOMPILING_EMULATOR¶

New in version 3.3.

Use the given emulator to run executables created when crosscompiling.
This command will be added as a prefix to add_test(),
add_custom_command(), and add_custom_target() commands
for built target system executables.

New in version 3.15: If this property contains a semicolon-separated list, then the first value is the command and remaining values are its
arguments.

New in version 3.29: Contents of CROSSCOMPILING_EMULATOR may use
generator expressions.

This property is initialized by the value of the
CMAKE_CROSSCOMPILING_EMULATOR variable if it is set when a target
is created.

Previous topic

<CONFIG>_POSTFIX

Next topic

CUDA_ARCHITECTURES

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

CROSSCOMPILING_EMULATOR

        © 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>CUDA_ARCHITECTURES — 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="CUDA_CUBIN_COMPILATION" href="CUDA_CUBIN_COMPILATION.html" />
    <link rel="prev" title="CROSSCOMPILING_EMULATOR" href="CROSSCOMPILING_EMULATOR.html" />

Navigation

          index

          next |

          previous |

    CMake »

    3.29.0-rc3 Documentation »

cmake-properties(7) »

CUDA_ARCHITECTURES

CUDA_ARCHITECTURES¶

New in version 3.18.

List of architectures to generate device code for.

An architecture can be suffixed by either -real or -virtual to specify
the kind of architecture to generate code for.
If no suffix is given then code is generated for both real and virtual
architectures.

A non-empty false value (e.g. OFF) disables adding architectures.
This is intended to support packagers and rare cases where full control
over the passed flags is required.

This property is initialized by the value of the CMAKE_CUDA_ARCHITECTURES
variable if it is set when a target is created.

The CUDA_ARCHITECTURES target property must be set to a non-empty value on targets
that compile CUDA sources, or it is an error.  See policy CMP0104.

The CUDA_ARCHITECTURES may be set to one of the following special values:

all

New in version 3.23.

Compile for all supported major and minor real architectures,
and the highest major virtual architecture.

all-major

New in version 3.23.

Compile for all supported major real architectures, and the highest
major virtual architecture.

native

New in version 3.24.

Compile for the architecture(s) of the host's GPU(s).

Examples¶

set_target_properties(tgt PROPERTIES CUDA_ARCHITECTURES "35;50;72")

Generates code for real and virtual architectures 30, 50 and 72.

set_property(TARGET tgt PROPERTY CUDA_ARCHITECTURES 70-real 72-virtual)

Generates code for real architecture 70 and virtual architecture 72.

set_property(TARGET tgt PROPERTY CUDA_ARCHITECTURES OFF)

CMake will not pass any architecture flags to the compiler.

Table of Contents

CUDA_ARCHITECTURES

Examples

Previous topic

CROSSCOMPILING_EMULATOR

Next topic

CUDA_CUBIN_COMPILATION

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

CUDA_ARCHITECTURES

        © 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>CUDA_CUBIN_COMPILATION — 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="CUDA_EXTENSIONS" href="CUDA_EXTENSIONS.html" />
    <link rel="prev" title="CUDA_ARCHITECTURES" href="CUDA_ARCHITECTURES.html" />

Navigation

          index

          next |

          previous |

    CMake »

    3.29.0-rc3 Documentation »

cmake-properties(7) »

CUDA_CUBIN_COMPILATION

CUDA_CUBIN_COMPILATION¶

New in version 3.27.

Compile CUDA sources to .cubin files instead of .obj files
within Object Libraries.

For example:

add_library(mycubin OBJECT a.cu b.cu)
set_property(TARGET mycubin PROPERTY CUDA_CUBIN_COMPILATION ON)

Previous topic

CUDA_ARCHITECTURES

Next topic

CUDA_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-properties(7) »

CUDA_CUBIN_COMPILATION

        © 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>CUDA_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="CUDA_FATBIN_COMPILATION" href="CUDA_FATBIN_COMPILATION.html" />
    <link rel="prev" title="CUDA_CUBIN_COMPILATION" href="CUDA_CUBIN_COMPILATION.html" />

Navigation

          index

          next |

          previous |

    CMake »

    3.29.0-rc3 Documentation »

cmake-properties(7) »

CUDA_EXTENSIONS

CUDA_EXTENSIONS¶

New in version 3.8.

Boolean specifying whether compiler specific extensions are requested.

This property specifies whether compiler specific extensions should be
used.  For some compilers, this results in adding a flag such
as -std=gnu++11 instead of -std=c++11 to the compile line.  This
property is ON by default. The basic CUDA/C++ standard level is
controlled by the CUDA_STANDARD target property.

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

This property is initialized by the value of
the CMAKE_CUDA_EXTENSIONS variable if set when a target is created
and otherwise by the value of
CMAKE_CUDA_EXTENSIONS_DEFAULT
(see CMP0128).

Previous topic

CUDA_CUBIN_COMPILATION

Next topic

CUDA_FATBIN_COMPILATION

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

CUDA_EXTENSIONS

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