code:
<!DOCTYPE html>

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

  <title>cmake-properties(7) — 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="ALLOW_DUPLICATE_CUSTOM_TARGETS" href="../prop_gbl/ALLOW_DUPLICATE_CUSTOM_TARGETS.html" />
    <link rel="prev" title="cmake-presets(7)" href="cmake-presets.7.html" />

Navigation

          index

          next |

          previous |

    CMake »

    3.29.0-rc3 Documentation »

cmake-properties(7)

cmake-properties(7)¶

Contents

cmake-properties(7)

Properties of Global Scope

Properties on Directories

Properties on Targets

Properties on Tests

Properties on Source Files

Properties on Cache Entries

Properties on Installed Files

Deprecated Properties on Directories

Deprecated Properties on Targets

Deprecated Properties on Source Files

Properties of Global Scope¶

ALLOW_DUPLICATE_CUSTOM_TARGETS

AUTOGEN_SOURCE_GROUP

AUTOGEN_TARGETS_FOLDER

AUTOMOC_SOURCE_GROUP

AUTOMOC_TARGETS_FOLDER

AUTORCC_SOURCE_GROUP

AUTOUIC_SOURCE_GROUP

CMAKE_C_KNOWN_FEATURES

CMAKE_CUDA_KNOWN_FEATURES

CMAKE_CXX_KNOWN_FEATURES

CMAKE_ROLE

DEBUG_CONFIGURATIONS

DISABLED_FEATURES

ECLIPSE_EXTRA_CPROJECT_CONTENTS

ECLIPSE_EXTRA_NATURES

ENABLED_FEATURES

ENABLED_LANGUAGES

FIND_LIBRARY_USE_LIB32_PATHS

FIND_LIBRARY_USE_LIB64_PATHS

FIND_LIBRARY_USE_LIBX32_PATHS

FIND_LIBRARY_USE_OPENBSD_VERSIONING

GENERATOR_IS_MULTI_CONFIG

GLOBAL_DEPENDS_DEBUG_MODE

GLOBAL_DEPENDS_NO_CYCLES

IN_TRY_COMPILE

JOB_POOLS

PACKAGES_FOUND

PACKAGES_NOT_FOUND

PREDEFINED_TARGETS_FOLDER

REPORT_UNDEFINED_PROPERTIES

RULE_LAUNCH_COMPILE

RULE_LAUNCH_CUSTOM

RULE_LAUNCH_LINK

RULE_MESSAGES

TARGET_ARCHIVES_MAY_BE_SHARED_LIBS

TARGET_MESSAGES

TARGET_SUPPORTS_SHARED_LIBS

USE_FOLDERS

XCODE_EMIT_EFFECTIVE_PLATFORM_NAME

Properties on Directories¶

ADDITIONAL_CLEAN_FILES

BINARY_DIR

BUILDSYSTEM_TARGETS

CACHE_VARIABLES

CLEAN_NO_CUSTOM

CMAKE_CONFIGURE_DEPENDS

COMPILE_DEFINITIONS

COMPILE_OPTIONS

DEFINITIONS

EXCLUDE_FROM_ALL

IMPLICIT_DEPENDS_INCLUDE_TRANSFORM

IMPORTED_TARGETS

INCLUDE_DIRECTORIES

INCLUDE_REGULAR_EXPRESSION

LABELS

LINK_DIRECTORIES

LINK_OPTIONS

LISTFILE_STACK

MACROS

PARENT_DIRECTORY

RULE_LAUNCH_COMPILE

RULE_LAUNCH_CUSTOM

RULE_LAUNCH_LINK

SOURCE_DIR

SUBDIRECTORIES

SYSTEM

TESTS

TEST_INCLUDE_FILES

VARIABLES

VS_GLOBAL_SECTION_POST_<section>

VS_GLOBAL_SECTION_PRE_<section>

VS_STARTUP_PROJECT

Properties on Targets¶

ADDITIONAL_CLEAN_FILES

AIX_EXPORT_ALL_SYMBOLS

ALIAS_GLOBAL

ALIASED_TARGET

ANDROID_ANT_ADDITIONAL_OPTIONS

ANDROID_API

ANDROID_API_MIN

ANDROID_ARCH

ANDROID_ASSETS_DIRECTORIES

ANDROID_GUI

ANDROID_JAR_DEPENDENCIES

ANDROID_JAR_DIRECTORIES

ANDROID_JAVA_SOURCE_DIR

ANDROID_NATIVE_LIB_DEPENDENCIES

ANDROID_NATIVE_LIB_DIRECTORIES

ANDROID_PROCESS_MAX

ANDROID_PROGUARD

ANDROID_PROGUARD_CONFIG_PATH

ANDROID_SECURE_PROPS_PATH

ANDROID_SKIP_ANT_STEP

ANDROID_STL_TYPE

ARCHIVE_OUTPUT_DIRECTORY

ARCHIVE_OUTPUT_DIRECTORY_<CONFIG>

ARCHIVE_OUTPUT_NAME

ARCHIVE_OUTPUT_NAME_<CONFIG>

AUTOGEN_BETTER_GRAPH_MULTI_CONFIG

AUTOGEN_BUILD_DIR

AUTOGEN_COMMAND_LINE_LENGTH_MAX

AUTOGEN_ORIGIN_DEPENDS

AUTOGEN_PARALLEL

AUTOGEN_TARGET_DEPENDS

AUTOGEN_USE_SYSTEM_INCLUDE

AUTOMOC

AUTOMOC_COMPILER_PREDEFINES

AUTOMOC_DEPEND_FILTERS

AUTOMOC_EXECUTABLE

AUTOMOC_MACRO_NAMES

AUTOMOC_MOC_OPTIONS

AUTOMOC_PATH_PREFIX

AUTORCC

AUTORCC_EXECUTABLE

AUTORCC_OPTIONS

AUTOUIC

AUTOUIC_EXECUTABLE

AUTOUIC_OPTIONS

AUTOUIC_SEARCH_PATHS

BINARY_DIR

BUILD_RPATH

BUILD_RPATH_USE_ORIGIN

BUILD_WITH_INSTALL_NAME_DIR

BUILD_WITH_INSTALL_RPATH

BUNDLE

BUNDLE_EXTENSION

C_EXTENSIONS

C_STANDARD

C_STANDARD_REQUIRED

COMMON_LANGUAGE_RUNTIME

COMPATIBLE_INTERFACE_BOOL

COMPATIBLE_INTERFACE_NUMBER_MAX

COMPATIBLE_INTERFACE_NUMBER_MIN

COMPATIBLE_INTERFACE_STRING

COMPILE_DEFINITIONS

COMPILE_FEATURES

COMPILE_FLAGS

COMPILE_OPTIONS

COMPILE_PDB_NAME

COMPILE_PDB_NAME_<CONFIG>

COMPILE_PDB_OUTPUT_DIRECTORY

COMPILE_PDB_OUTPUT_DIRECTORY_<CONFIG>

COMPILE_WARNING_AS_ERROR

<CONFIG>_OUTPUT_NAME

<CONFIG>_POSTFIX

CROSSCOMPILING_EMULATOR

CUDA_ARCHITECTURES

CUDA_CUBIN_COMPILATION

CUDA_EXTENSIONS

CUDA_FATBIN_COMPILATION

CUDA_OPTIX_COMPILATION

CUDA_PTX_COMPILATION

CUDA_RESOLVE_DEVICE_SYMBOLS

CUDA_RUNTIME_LIBRARY

CUDA_SEPARABLE_COMPILATION

CUDA_STANDARD

CUDA_STANDARD_REQUIRED

CXX_EXTENSIONS

CXX_MODULE_DIRS

CXX_MODULE_DIRS_<NAME>

CXX_MODULE_SET

CXX_MODULE_SET_<NAME>

CXX_MODULE_SETS

CXX_SCAN_FOR_MODULES

CXX_STANDARD

CXX_STANDARD_REQUIRED

DEBUG_POSTFIX

DEFINE_SYMBOL

DEPLOYMENT_ADDITIONAL_FILES

DEPLOYMENT_REMOTE_DIRECTORY

DEPRECATION

DISABLE_PRECOMPILE_HEADERS

DLL_NAME_WITH_SOVERSION

DOTNET_SDK

DOTNET_TARGET_FRAMEWORK

DOTNET_TARGET_FRAMEWORK_VERSION

EchoString

ENABLE_EXPORTS

EXCLUDE_FROM_ALL

EXCLUDE_FROM_DEFAULT_BUILD

EXCLUDE_FROM_DEFAULT_BUILD_<CONFIG>

EXPORT_COMPILE_COMMANDS

EXPORT_FIND_PACKAGE_NAME

EXPORT_NAME

EXPORT_NO_SYSTEM

EXPORT_PROPERTIES

FOLDER

Fortran_BUILDING_INSTRINSIC_MODULES

Fortran_FORMAT

Fortran_MODULE_DIRECTORY

Fortran_PREPROCESS

FRAMEWORK

FRAMEWORK_MULTI_CONFIG_POSTFIX_<CONFIG>

FRAMEWORK_VERSION

GENERATOR_FILE_NAME

GHS_INTEGRITY_APP

GHS_NO_SOURCE_GROUP_FILE

GNUtoMS

HAS_CXX

HEADER_DIRS

HEADER_DIRS_<NAME>

HEADER_SET

HEADER_SET_<NAME>

HEADER_SETS

HIP_ARCHITECTURES

HIP_EXTENSIONS

HIP_STANDARD

HIP_STANDARD_REQUIRED

IMPLICIT_DEPENDS_INCLUDE_TRANSFORM

IMPORTED

IMPORTED_COMMON_LANGUAGE_RUNTIME

IMPORTED_CONFIGURATIONS

IMPORTED_CXX_MODULES_COMPILE_DEFINITIONS

IMPORTED_CXX_MODULES_COMPILE_FEATURES

IMPORTED_CXX_MODULES_COMPILE_OPTIONS

IMPORTED_CXX_MODULES_INCLUDE_DIRECTORIES

IMPORTED_CXX_MODULES_LINK_LIBRARIES

IMPORTED_GLOBAL

IMPORTED_IMPLIB

IMPORTED_IMPLIB_<CONFIG>

IMPORTED_LIBNAME

IMPORTED_LIBNAME_<CONFIG>

IMPORTED_LINK_DEPENDENT_LIBRARIES

IMPORTED_LINK_DEPENDENT_LIBRARIES_<CONFIG>

IMPORTED_LINK_INTERFACE_LANGUAGES

IMPORTED_LINK_INTERFACE_LANGUAGES_<CONFIG>

IMPORTED_LINK_INTERFACE_LIBRARIES

IMPORTED_LINK_INTERFACE_LIBRARIES_<CONFIG>

IMPORTED_LINK_INTERFACE_MULTIPLICITY

IMPORTED_LINK_INTERFACE_MULTIPLICITY_<CONFIG>

IMPORTED_LOCATION

IMPORTED_LOCATION_<CONFIG>

IMPORTED_NO_SONAME

IMPORTED_NO_SONAME_<CONFIG>

IMPORTED_OBJECTS

IMPORTED_OBJECTS_<CONFIG>

IMPORTED_SONAME

IMPORTED_SONAME_<CONFIG>

IMPORT_PREFIX

IMPORT_SUFFIX

INCLUDE_DIRECTORIES

INSTALL_NAME_DIR

INSTALL_REMOVE_ENVIRONMENT_RPATH

INSTALL_RPATH

INSTALL_RPATH_USE_LINK_PATH

INTERFACE_AUTOMOC_MACRO_NAMES

INTERFACE_AUTOUIC_OPTIONS

INTERFACE_COMPILE_DEFINITIONS

INTERFACE_COMPILE_FEATURES

INTERFACE_COMPILE_OPTIONS

INTERFACE_CXX_MODULE_SETS

INTERFACE_HEADER_SETS

INTERFACE_HEADER_SETS_TO_VERIFY

INTERFACE_INCLUDE_DIRECTORIES

INTERFACE_LINK_DEPENDS

INTERFACE_LINK_DIRECTORIES

INTERFACE_LINK_LIBRARIES

INTERFACE_LINK_LIBRARIES_DIRECT

INTERFACE_LINK_LIBRARIES_DIRECT_EXCLUDE

INTERFACE_LINK_OPTIONS

INTERFACE_POSITION_INDEPENDENT_CODE

INTERFACE_PRECOMPILE_HEADERS

INTERFACE_SOURCES

INTERFACE_SYSTEM_INCLUDE_DIRECTORIES

INTERPROCEDURAL_OPTIMIZATION

INTERPROCEDURAL_OPTIMIZATION_<CONFIG>

ISPC_HEADER_DIRECTORY

ISPC_HEADER_SUFFIX

ISPC_INSTRUCTION_SETS

JOB_POOL_COMPILE

JOB_POOL_LINK

JOB_POOL_PRECOMPILE_HEADER

LABELS

<LANG>_CLANG_TIDY

<LANG>_CLANG_TIDY_EXPORT_FIXES_DIR

<LANG>_COMPILER_LAUNCHER

<LANG>_CPPCHECK

<LANG>_CPPLINT

<LANG>_EXTENSIONS

<LANG>_INCLUDE_WHAT_YOU_USE

<LANG>_LINKER_LAUNCHER

<LANG>_STANDARD

<LANG>_STANDARD_REQUIRED

<LANG>_VISIBILITY_PRESET

LIBRARY_OUTPUT_DIRECTORY

LIBRARY_OUTPUT_DIRECTORY_<CONFIG>

LIBRARY_OUTPUT_NAME

LIBRARY_OUTPUT_NAME_<CONFIG>

LINK_DEPENDS

LINK_DEPENDS_NO_SHARED

LINK_DIRECTORIES

LINK_FLAGS

LINK_FLAGS_<CONFIG>

LINK_INTERFACE_LIBRARIES

LINK_INTERFACE_LIBRARIES_<CONFIG>

LINK_INTERFACE_MULTIPLICITY

LINK_INTERFACE_MULTIPLICITY_<CONFIG>

LINK_LIBRARIES

LINK_LIBRARIES_ONLY_TARGETS

LINK_LIBRARY_OVERRIDE

LINK_LIBRARY_OVERRIDE_<LIBRARY>

LINK_OPTIONS

LINK_SEARCH_END_STATIC

LINK_SEARCH_START_STATIC

LINK_WHAT_YOU_USE

LINKER_LANGUAGE

LINKER_TYPE

LOCATION

LOCATION_<CONFIG>

MACHO_COMPATIBILITY_VERSION

MACHO_CURRENT_VERSION

MACOSX_BUNDLE

MACOSX_BUNDLE_INFO_PLIST

MACOSX_FRAMEWORK_INFO_PLIST

MACOSX_RPATH

MANUALLY_ADDED_DEPENDENCIES

MAP_IMPORTED_CONFIG_<CONFIG>

MSVC_DEBUG_INFORMATION_FORMAT

MSVC_RUNTIME_LIBRARY

NAME

NO_SONAME

NO_SYSTEM_FROM_IMPORTED

OBJC_EXTENSIONS

OBJC_STANDARD

OBJC_STANDARD_REQUIRED

OBJCXX_EXTENSIONS

OBJCXX_STANDARD

OBJCXX_STANDARD_REQUIRED

OPTIMIZE_DEPENDENCIES

OSX_ARCHITECTURES

OSX_ARCHITECTURES_<CONFIG>

OUTPUT_NAME

OUTPUT_NAME_<CONFIG>

PCH_INSTANTIATE_TEMPLATES

PCH_WARN_INVALID

PDB_NAME

PDB_NAME_<CONFIG>

PDB_OUTPUT_DIRECTORY

PDB_OUTPUT_DIRECTORY_<CONFIG>

POSITION_INDEPENDENT_CODE

PRECOMPILE_HEADERS

PRECOMPILE_HEADERS_REUSE_FROM

PREFIX

PRIVATE_HEADER

PROJECT_LABEL

PUBLIC_HEADER

RESOURCE

RULE_LAUNCH_COMPILE

RULE_LAUNCH_CUSTOM

RULE_LAUNCH_LINK

RUNTIME_OUTPUT_DIRECTORY

RUNTIME_OUTPUT_DIRECTORY_<CONFIG>

RUNTIME_OUTPUT_NAME

RUNTIME_OUTPUT_NAME_<CONFIG>

SKIP_BUILD_RPATH

SOURCE_DIR

SOURCES

SOVERSION

STATIC_LIBRARY_FLAGS

STATIC_LIBRARY_FLAGS_<CONFIG>

STATIC_LIBRARY_OPTIONS

SUFFIX

Swift_COMPILATION_MODE

Swift_DEPENDENCIES_FILE

Swift_LANGUAGE_VERSION

Swift_MODULE_DIRECTORY

Swift_MODULE_NAME

SYSTEM

TEST_LAUNCHER

TYPE

UNITY_BUILD

UNITY_BUILD_BATCH_SIZE

UNITY_BUILD_CODE_AFTER_INCLUDE

UNITY_BUILD_CODE_BEFORE_INCLUDE

UNITY_BUILD_MODE

UNITY_BUILD_UNIQUE_ID

VERIFY_INTERFACE_HEADER_SETS

VERSION

VISIBILITY_INLINES_HIDDEN

VS_CONFIGURATION_TYPE

VS_DEBUGGER_COMMAND

VS_DEBUGGER_COMMAND_ARGUMENTS

VS_DEBUGGER_ENVIRONMENT

VS_DEBUGGER_WORKING_DIRECTORY

VS_DESKTOP_EXTENSIONS_VERSION

VS_DOTNET_DOCUMENTATION_FILE

VS_DOTNET_REFERENCE_<refname>

VS_DOTNET_REFERENCEPROP_<refname>_TAG_<tagname>

VS_DOTNET_REFERENCES

VS_DOTNET_REFERENCES_COPY_LOCAL

VS_DOTNET_STARTUP_OBJECT

VS_DOTNET_TARGET_FRAMEWORK_VERSION

VS_DPI_AWARE

VS_GLOBAL_KEYWORD

VS_GLOBAL_PROJECT_TYPES

VS_GLOBAL_ROOTNAMESPACE

VS_GLOBAL_<variable>

VS_IOT_EXTENSIONS_VERSION

VS_IOT_STARTUP_TASK

VS_JUST_MY_CODE_DEBUGGING

VS_KEYWORD

VS_MOBILE_EXTENSIONS_VERSION

VS_NO_COMPILE_BATCHING

VS_NO_SOLUTION_DEPLOY

VS_PACKAGE_REFERENCES

VS_PLATFORM_TOOLSET

VS_PROJECT_IMPORT

VS_SCC_AUXPATH

VS_SCC_LOCALPATH

VS_SCC_PROJECTNAME

VS_SCC_PROVIDER

VS_SDK_REFERENCES

VS_SOLUTION_DEPLOY

VS_SOURCE_SETTINGS_<tool>

VS_USER_PROPS

VS_WINDOWS_TARGET_PLATFORM_MIN_VERSION

VS_WINRT_COMPONENT

VS_WINRT_REFERENCES

WATCOM_RUNTIME_LIBRARY

WIN32_EXECUTABLE

WINDOWS_EXPORT_ALL_SYMBOLS

XCODE_ATTRIBUTE_<an-attribute>

XCODE_EMBED_FRAMEWORKS_CODE_SIGN_ON_COPY

XCODE_EMBED_FRAMEWORKS_REMOVE_HEADERS_ON_COPY

XCODE_EMBED_<type>

XCODE_EMBED_<type>_CODE_SIGN_ON_COPY

XCODE_EMBED_<type>_PATH

XCODE_EMBED_<type>_REMOVE_HEADERS_ON_COPY

XCODE_EXPLICIT_FILE_TYPE

XCODE_GENERATE_SCHEME

XCODE_LINK_BUILD_PHASE_MODE

XCODE_PRODUCT_TYPE

XCODE_SCHEME_ADDRESS_SANITIZER

XCODE_SCHEME_ADDRESS_SANITIZER_USE_AFTER_RETURN

XCODE_SCHEME_ARGUMENTS

XCODE_SCHEME_DEBUG_AS_ROOT

XCODE_SCHEME_DEBUG_DOCUMENT_VERSIONING

XCODE_SCHEME_DISABLE_MAIN_THREAD_CHECKER

XCODE_SCHEME_DYNAMIC_LIBRARY_LOADS

XCODE_SCHEME_DYNAMIC_LINKER_API_USAGE

XCODE_SCHEME_ENABLE_GPU_API_VALIDATION

XCODE_SCHEME_ENABLE_GPU_FRAME_CAPTURE_MODE

XCODE_SCHEME_ENABLE_GPU_SHADER_VALIDATION

XCODE_SCHEME_ENVIRONMENT

XCODE_SCHEME_EXECUTABLE

XCODE_SCHEME_GUARD_MALLOC

XCODE_SCHEME_LAUNCH_CONFIGURATION

XCODE_SCHEME_LAUNCH_MODE

XCODE_SCHEME_MAIN_THREAD_CHECKER_STOP

XCODE_SCHEME_MALLOC_GUARD_EDGES

XCODE_SCHEME_MALLOC_SCRIBBLE

XCODE_SCHEME_MALLOC_STACK

XCODE_SCHEME_THREAD_SANITIZER

XCODE_SCHEME_THREAD_SANITIZER_STOP

XCODE_SCHEME_UNDEFINED_BEHAVIOUR_SANITIZER

XCODE_SCHEME_UNDEFINED_BEHAVIOUR_SANITIZER_STOP

XCODE_SCHEME_WORKING_DIRECTORY

XCODE_SCHEME_ZOMBIE_OBJECTS

XCODE_XCCONFIG

XCTEST

Properties on Tests¶

ATTACHED_FILES

ATTACHED_FILES_ON_FAIL

COST

DEPENDS

DISABLED

ENVIRONMENT

ENVIRONMENT_MODIFICATION

FAIL_REGULAR_EXPRESSION

FIXTURES_CLEANUP

FIXTURES_REQUIRED

FIXTURES_SETUP

GENERATED_RESOURCE_SPEC_FILE

LABELS

MEASUREMENT

PASS_REGULAR_EXPRESSION

PROCESSOR_AFFINITY

PROCESSORS

REQUIRED_FILES

RESOURCE_GROUPS

RESOURCE_LOCK

RUN_SERIAL

SKIP_REGULAR_EXPRESSION

SKIP_RETURN_CODE

TIMEOUT

TIMEOUT_AFTER_MATCH

TIMEOUT_SIGNAL_GRACE_PERIOD

TIMEOUT_SIGNAL_NAME

WILL_FAIL

WORKING_DIRECTORY

Properties on Source Files¶

ABSTRACT

AUTORCC_OPTIONS

AUTOUIC_OPTIONS

COMPILE_DEFINITIONS

COMPILE_FLAGS

COMPILE_OPTIONS

CXX_SCAN_FOR_MODULES

EXTERNAL_OBJECT

Fortran_FORMAT

Fortran_PREPROCESS

GENERATED

HEADER_FILE_ONLY

INCLUDE_DIRECTORIES

KEEP_EXTENSION

LABELS

LANGUAGE

LOCATION

MACOSX_PACKAGE_LOCATION

OBJECT_DEPENDS

OBJECT_OUTPUTS

SKIP_AUTOGEN

SKIP_AUTOMOC

SKIP_AUTORCC

SKIP_AUTOUIC

SKIP_LINTING

SKIP_PRECOMPILE_HEADERS

SKIP_UNITY_BUILD_INCLUSION

Swift_DEPENDENCIES_FILE

Swift_DIAGNOSTICS_FILE

SYMBOLIC

UNITY_GROUP

VS_COPY_TO_OUT_DIR

VS_CSHARP_<tagname>

VS_DEPLOYMENT_CONTENT

VS_DEPLOYMENT_LOCATION

VS_INCLUDE_IN_VSIX

VS_RESOURCE_GENERATOR

VS_SETTINGS

VS_SHADER_DISABLE_OPTIMIZATIONS

VS_SHADER_ENABLE_DEBUG

VS_SHADER_ENTRYPOINT

VS_SHADER_FLAGS

VS_SHADER_MODEL

VS_SHADER_OBJECT_FILE_NAME

VS_SHADER_OUTPUT_HEADER_FILE

VS_SHADER_TYPE

VS_SHADER_VARIABLE_NAME

VS_TOOL_OVERRIDE

VS_XAML_TYPE

WRAP_EXCLUDE

XCODE_EXPLICIT_FILE_TYPE

XCODE_FILE_ATTRIBUTES

XCODE_LAST_KNOWN_FILE_TYPE

Properties on Cache Entries¶

ADVANCED

HELPSTRING

MODIFIED

STRINGS

TYPE

VALUE

Properties on Installed Files¶

CPACK_DESKTOP_SHORTCUTS

CPACK_NEVER_OVERWRITE

CPACK_PERMANENT

CPACK_START_MENU_SHORTCUTS

CPACK_STARTUP_SHORTCUTS

CPACK_WIX_ACL

Deprecated Properties on Directories¶

ADDITIONAL_MAKE_CLEAN_FILES

COMPILE_DEFINITIONS_<CONFIG>

INTERPROCEDURAL_OPTIMIZATION

INTERPROCEDURAL_OPTIMIZATION_<CONFIG>

TEST_INCLUDE_FILE

Deprecated Properties on Targets¶

COMPILE_DEFINITIONS_<CONFIG>

IMPORTED_NO_SYSTEM

IOS_INSTALL_COMBINED

POST_INSTALL_SCRIPT

PRE_INSTALL_SCRIPT

VS_WINRT_EXTENSIONS

Deprecated Properties on Source Files¶

COMPILE_DEFINITIONS_<CONFIG>

Table of Contents

cmake-properties(7)

Properties of Global Scope

Properties on Directories

Properties on Targets

Properties on Tests

Properties on Source Files

Properties on Cache Entries

Properties on Installed Files

Deprecated Properties on Directories

Deprecated Properties on Targets

Deprecated Properties on Source Files

Previous topic

cmake-presets(7)

Next topic

ALLOW_DUPLICATE_CUSTOM_TARGETS

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)

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


code:
<!DOCTYPE html>

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

  <title>cmake-qt(7) — CMake 3.29.0-rc3 Documentation</title>

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

    <link rel="icon" href="../_static/cmake-favicon.ico"/>
    <link rel="index" title="Index" href="../genindex.html" />
    <link rel="search" title="Search" href="../search.html" />
    <link rel="next" title="cmake-server(7)" href="cmake-server.7.html" />
    <link rel="prev" title="COMPILE_DEFINITIONS_<CONFIG>" href="../prop_sf/COMPILE_DEFINITIONS_CONFIG.html" />

Navigation

          index

          next |

          previous |

    CMake »

    3.29.0-rc3 Documentation »

cmake-qt(7)

cmake-qt(7)¶

Contents

cmake-qt(7)

Introduction

Qt Build Tools

AUTOMOC

AUTOUIC

AUTORCC

The <ORIGIN>_autogen target

The <ORIGIN>_autogen_timestamp_deps target

Visual Studio Generators

qtmain.lib on Windows

Introduction¶

CMake can find and use Qt 4, Qt 5 and Qt 6 libraries. The Qt 4 libraries are
found by the FindQt4 find-module shipped with CMake, whereas the
Qt 5 and Qt 6 libraries are found using "Config-file Packages" shipped with
Qt 5 and Qt 6. See cmake-packages(7) for more information about CMake
packages, and see the Qt cmake manual for your Qt version.

Qt 4, Qt 5 and Qt 6 may be used together in the same
CMake buildsystem:

cmake_minimum_required(VERSION 3.16 FATAL_ERROR)

project(Qt4_5_6)

set(CMAKE_AUTOMOC ON)

find_package(Qt6 COMPONENTS Widgets DBus REQUIRED)
add_executable(publisher publisher.cpp)
target_link_libraries(publisher Qt6::Widgets Qt6::DBus)

find_package(Qt5 COMPONENTS Gui DBus REQUIRED)
add_executable(subscriber1 subscriber1.cpp)
target_link_libraries(subscriber1 Qt5::Gui Qt5::DBus)

find_package(Qt4 REQUIRED)
add_executable(subscriber2 subscriber2.cpp)
target_link_libraries(subscriber2 Qt4::QtGui Qt4::QtDBus)

A CMake target may not link to more than one Qt version.  A diagnostic is issued
if this is attempted or results from transitive target dependency evaluation.

Qt Build Tools¶

Qt relies on some bundled tools for code generation, such as moc for
meta-object code generation, uic for widget layout and population,
and rcc for virtual file system content generation.  These tools may be
automatically invoked by cmake(1) if the appropriate conditions
are met.  The automatic tool invocation may be used with Qt version 4 to 6.

AUTOMOC¶

The AUTOMOC target property controls whether cmake(1)
inspects the C++ files in the target to determine if they require moc to
be run, and to create rules to execute moc at the appropriate time.

If a macro from AUTOMOC_MACRO_NAMES is found in a header file,
moc will be run on the file.  The result will be put into a file named
according to moc_<basename>.cpp.
If the macro is found in a C++ implementation
file, the moc output will be put into a file named according to
<basename>.moc, following the Qt conventions.  The <basename>.moc must
be included by the user in the C++ implementation file with a preprocessor
#include.

Included moc_*.cpp and *.moc files will be generated in the
<AUTOGEN_BUILD_DIR>/include directory which is
automatically added to the target's INCLUDE_DIRECTORIES.

This differs from CMake 3.7 and below; see their documentation for details.

For multi configuration generators,
the include directory is <AUTOGEN_BUILD_DIR>/include_<CONFIG>.

See AUTOGEN_BUILD_DIR.

Not included moc_<basename>.cpp files will be generated in custom
folders to avoid name collisions and included in a separate
file which is compiled into the target, named either
<AUTOGEN_BUILD_DIR>/mocs_compilation.cpp or
<AUTOGEN_BUILD_DIR>/mocs_compilation_$<CONFIG>.cpp.

See AUTOGEN_BUILD_DIR.

The moc command line will consume the COMPILE_DEFINITIONS and
INCLUDE_DIRECTORIES target properties from the target it is being
invoked for, and for the appropriate build configuration.

The AUTOMOC target property may be pre-set for all
following targets by setting the CMAKE_AUTOMOC variable.  The
AUTOMOC_MOC_OPTIONS target property may be populated to set
options to pass to moc. The CMAKE_AUTOMOC_MOC_OPTIONS
variable may be populated to pre-set the options for all following targets.

Additional macro names to search for can be added to
AUTOMOC_MACRO_NAMES.

Additional moc dependency file names can be extracted from source code
by using AUTOMOC_DEPEND_FILTERS.

Source C++ files can be excluded from AUTOMOC processing by
enabling SKIP_AUTOMOC or the broader SKIP_AUTOGEN.

AUTOUIC¶

The AUTOUIC target property controls whether cmake(1)
inspects the C++ files in the target to determine if they require uic to
be run, and to create rules to execute uic at the appropriate time.

If a preprocessor #include directive is found which matches
<path>ui_<basename>.h, and a <basename>.ui file exists,
then uic will be executed to generate the appropriate file.
The <basename>.ui file is searched for in the following places

<source_dir>/<basename>.ui

<source_dir>/<path><basename>.ui

<AUTOUIC_SEARCH_PATHS>/<basename>.ui

<AUTOUIC_SEARCH_PATHS>/<path><basename>.ui

where <source_dir> is the directory of the C++ file and
AUTOUIC_SEARCH_PATHS is a list of additional search paths.

The generated generated ui_*.h files are placed in the
<AUTOGEN_BUILD_DIR>/include directory which is
automatically added to the target's INCLUDE_DIRECTORIES.

This differs from CMake 3.7 and below; see their documentation for details.

For multi configuration generators,
the include directory is <AUTOGEN_BUILD_DIR>/include_<CONFIG>.

See AUTOGEN_BUILD_DIR.

The AUTOUIC target property may be pre-set for all following
targets by setting the CMAKE_AUTOUIC variable.  The
AUTOUIC_OPTIONS target property may be populated to set options
to pass to uic.  The CMAKE_AUTOUIC_OPTIONS variable may be
populated to pre-set the options for all following targets.  The
AUTOUIC_OPTIONS source file property may be set on the
<basename>.ui file to set particular options for the file.  This
overrides options from the AUTOUIC_OPTIONS target property.

A target may populate the INTERFACE_AUTOUIC_OPTIONS target
property with options that should be used when invoking uic.  This must be
consistent with the AUTOUIC_OPTIONS target property content of the
depender target.  The CMAKE_DEBUG_TARGET_PROPERTIES variable may
be used to track the origin target of such
INTERFACE_AUTOUIC_OPTIONS.  This means that a library which
provides an alternative translation system for Qt may specify options which
should be used when running uic:

add_library(KI18n klocalizedstring.cpp)
target_link_libraries(KI18n Qt6::Core)

# KI18n uses the tr2i18n() function instead of tr().  That function is
# declared in the klocalizedstring.h header.
set(autouic_options
  -tr tr2i18n
  -include klocalizedstring.h
)

set_property(TARGET KI18n APPEND PROPERTY
  INTERFACE_AUTOUIC_OPTIONS ${autouic_options}
)

A consuming project linking to the target exported from upstream automatically
uses appropriate options when uic is run by AUTOUIC, as a
result of linking with the IMPORTED target:

set(CMAKE_AUTOUIC ON)
# Uses a libwidget.ui file:
add_library(LibWidget libwidget.cpp)
target_link_libraries(LibWidget
  KF5::KI18n
  Qt5::Widgets
)

Source files can be excluded from AUTOUIC processing by
enabling SKIP_AUTOUIC or the broader SKIP_AUTOGEN.

AUTORCC¶

The AUTORCC target property controls whether cmake(1)
creates rules to execute rcc at the appropriate time on source files
which have the suffix .qrc.

add_executable(myexe main.cpp resource_file.qrc)

The AUTORCC target property may be pre-set for all following targets
by setting the CMAKE_AUTORCC variable.  The
AUTORCC_OPTIONS target property may be populated to set options
to pass to rcc.  The CMAKE_AUTORCC_OPTIONS variable may be
populated to pre-set the options for all following targets.  The
AUTORCC_OPTIONS source file property may be set on the
<name>.qrc file to set particular options for the file.  This
overrides options from the AUTORCC_OPTIONS target property.

Source files can be excluded from AUTORCC processing by
enabling SKIP_AUTORCC or the broader SKIP_AUTOGEN.

The <ORIGIN>_autogen target¶

The moc and uic tools are executed as part of a synthesized
The <ORIGIN>_autogen target custom target generated by
CMake.  By default that The <ORIGIN>_autogen target target inherits the dependencies
of the <ORIGIN> target (see AUTOGEN_ORIGIN_DEPENDS).
Target dependencies may be added to the The <ORIGIN>_autogen target target by adding
them to the AUTOGEN_TARGET_DEPENDS target property.

Note

If Qt 5.15 or later is used and the generator is either Ninja or
Makefile Generators, see The <ORIGIN>_autogen_timestamp_deps target.

The <ORIGIN>_autogen_timestamp_deps target¶

If Qt 5.15 or later is used and the generator is either Ninja or
Makefile Generators, the <ORIGIN>_autogen_timestamp_deps target is
also created in addition to the The <ORIGIN>_autogen target target.  This target
does not have any sources or commands to execute, but it has dependencies that
were previously inherited by the pre-Qt 5.15 The <ORIGIN>_autogen target target.
These dependencies will serve as a list of order-only dependencies for the
custom command, without forcing the custom command to re-execute.

Visual Studio Generators¶

When using the Visual Studio generators, CMake
generates a PRE_BUILD custom command
instead of the The <ORIGIN>_autogen target
custom target (for AUTOMOC and
AUTOUIC).  This isn't always possible though and an
The <ORIGIN>_autogen target custom target is used,
when either

the <ORIGIN> target depends on GENERATED files which aren't
excluded from AUTOMOC and AUTOUIC by
SKIP_AUTOMOC, SKIP_AUTOUIC, SKIP_AUTOGEN
or CMP0071

AUTOGEN_TARGET_DEPENDS lists a source file

CMAKE_GLOBAL_AUTOGEN_TARGET is enabled

qtmain.lib on Windows¶

The Qt 4 and 5 IMPORTED targets for the QtGui libraries specify
that the qtmain.lib static library shipped with Qt will be linked by all
dependent executables which have the WIN32_EXECUTABLE enabled.

To disable this behavior, enable the Qt5_NO_LINK_QTMAIN target property for
Qt 5 based targets or QT4_NO_LINK_QTMAIN target property for Qt 4 based
targets.

add_executable(myexe WIN32 main.cpp)
target_link_libraries(myexe Qt4::QtGui)

add_executable(myexe_no_qtmain WIN32 main_no_qtmain.cpp)
set_property(TARGET main_no_qtmain PROPERTY QT4_NO_LINK_QTMAIN ON)
target_link_libraries(main_no_qtmain Qt4::QtGui)

Table of Contents

cmake-qt(7)

Introduction

Qt Build Tools

AUTOMOC

AUTOUIC

AUTORCC

The <ORIGIN>_autogen target

The <ORIGIN>_autogen_timestamp_deps target

Visual Studio Generators

qtmain.lib on Windows

Previous topic

COMPILE_DEFINITIONS_<CONFIG>

Next topic

cmake-server(7)

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-qt(7)

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

repo_name: lazytadpole/codenamesilverfish

license: mit


code:
<!DOCTYPE html>

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

  <title>cmake-server(7) — CMake 3.29.0-rc3 Documentation</title>

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

    <link rel="icon" href="../_static/cmake-favicon.ico"/>
    <link rel="index" title="Index" href="../genindex.html" />
    <link rel="search" title="Search" href="../search.html" />
    <link rel="next" title="cmake-toolchains(7)" href="cmake-toolchains.7.html" />
    <link rel="prev" title="cmake-qt(7)" href="cmake-qt.7.html" />

Navigation

          index

          next |

          previous |

    CMake »

    3.29.0-rc3 Documentation »

cmake-server(7)

cmake-server(7)¶

The cmake(1) server mode has been removed since CMake 3.20.
Clients should use the cmake-file-api(7) instead.

Previous topic

cmake-qt(7)

Next topic

cmake-toolchains(7)

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-server(7)

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


code:
<!DOCTYPE html>

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

  <title>cmake-toolchains(7) — CMake 3.29.0-rc3 Documentation</title>

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

    <link rel="icon" href="../_static/cmake-favicon.ico"/>
    <link rel="index" title="Index" href="../genindex.html" />
    <link rel="search" title="Search" href="../search.html" />
    <link rel="next" title="cmake-variables(7)" href="cmake-variables.7.html" />
    <link rel="prev" title="cmake-server(7)" href="cmake-server.7.html" />

Navigation

          index

          next |

          previous |

    CMake »

    3.29.0-rc3 Documentation »

cmake-toolchains(7)

cmake-toolchains(7)¶

Contents

cmake-toolchains(7)

Introduction

Languages

Variables and Properties

Toolchain Features

Cross Compiling

Cross Compiling for Linux

Cross Compiling for the Cray Linux Environment

Cross Compiling using Clang

Cross Compiling for QNX

Cross Compiling for Windows CE

Cross Compiling for Windows 10 Universal Applications

Cross Compiling for Windows Phone

Cross Compiling for Windows Store

Cross Compiling for ADSP SHARC/Blackfin

Cross Compiling for Android

Cross Compiling for Android with the NDK

Cross Compiling for Android with a Standalone Toolchain

Cross Compiling for Android with NVIDIA Nsight Tegra Visual Studio Edition

Cross Compiling for iOS, tvOS, visionOS, or watchOS

Code Signing

Switching Between Device and Simulator

Introduction¶

CMake uses a toolchain of utilities to compile, link libraries and create
archives, and other tasks to drive the build. The toolchain utilities available
are determined by the languages enabled. In normal builds, CMake automatically
determines the toolchain for host builds based on system introspection and
defaults. In cross-compiling scenarios, a toolchain file may be specified
with information about compiler and utility paths.

New in version 3.19: One may use cmake-presets(7) to specify toolchain files.

Languages¶

Languages are enabled by the project() command.  Language-specific
built-in variables, such as
CMAKE_CXX_COMPILER,
CMAKE_CXX_COMPILER_ID etc are set by
invoking the project() command.  If no project command
is in the top-level CMakeLists file, one will be implicitly generated. By default
the enabled languages are C and CXX:

project(C_Only C)

A special value of NONE can also be used with the project() command
to enable no languages:

project(MyProject NONE)

The enable_language() command can be used to enable languages after the
project() command:

enable_language(CXX)

When a language is enabled, CMake finds a compiler for that language, and
determines some information, such as the vendor and version of the compiler,
the target architecture and bitwidth, the location of corresponding utilities
etc.

The ENABLED_LANGUAGES global property contains the languages which
are currently enabled.

Variables and Properties¶

Several variables relate to the language components of a toolchain which are
enabled:

CMAKE_<LANG>_COMPILER

The full path to the compiler used for <LANG>

CMAKE_<LANG>_COMPILER_ID

The compiler identifier used by CMake

CMAKE_<LANG>_COMPILER_VERSION

The version of the compiler.

CMAKE_<LANG>_FLAGS

The variables and the configuration-specific equivalents contain flags that
will be added to the compile command when compiling a file of a particular
language.

CMake needs a way to determine which compiler to use to invoke the linker.
This is determined by the LANGUAGE property of source files of the
target, and in the case of static libraries,
the LANGUAGE of the dependent libraries. The choice CMake makes may be overridden
with the LINKER_LANGUAGE target property.

Toolchain Features¶

CMake provides the try_compile() command and wrapper macros such as
CheckSourceCompiles, CheckCXXSymbolExists and
CheckIncludeFile to test capability and availability of various
toolchain features. These APIs test the toolchain in some way and cache the
result so that the test does not have to be performed again the next time
CMake runs.

Some toolchain features have built-in handling in CMake, and do not require
compile-tests. For example, POSITION_INDEPENDENT_CODE allows
specifying that a target should be built as position-independent code, if
the compiler supports that feature. The <LANG>_VISIBILITY_PRESET
and VISIBILITY_INLINES_HIDDEN target properties add flags for
hidden visibility, if supported by the compiler.

Cross Compiling¶

If cmake(1) is invoked with the command line parameter
--toolchain path/to/file or
-DCMAKE_TOOLCHAIN_FILE=path/to/file, the
file will be loaded early to set values for the compilers.
The CMAKE_CROSSCOMPILING variable is set to true when CMake is
cross-compiling.

Note that using the CMAKE_SOURCE_DIR or CMAKE_BINARY_DIR
variables inside a toolchain file is typically undesirable.  The toolchain
file is used in contexts where these variables have different values when used
in different places (e.g. as part of a call to try_compile()).  In most
cases, where there is a need to evaluate paths inside a toolchain file, the more
appropriate variable to use would be CMAKE_CURRENT_LIST_DIR, since
it always has an unambiguous, predictable value.

Cross Compiling for Linux¶

A typical cross-compiling toolchain for Linux has content such
as:

set(CMAKE_SYSTEM_NAME Linux)
set(CMAKE_SYSTEM_PROCESSOR arm)

set(CMAKE_SYSROOT /home/devel/rasp-pi-rootfs)
set(CMAKE_STAGING_PREFIX /home/devel/stage)

set(tools /home/devel/gcc-4.7-linaro-rpi-gnueabihf)
set(CMAKE_C_COMPILER ${tools}/bin/arm-linux-gnueabihf-gcc)
set(CMAKE_CXX_COMPILER ${tools}/bin/arm-linux-gnueabihf-g++)

set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
set(CMAKE_FIND_ROOT_PATH_MODE_PACKAGE ONLY)

Where:

CMAKE_SYSTEM_NAME

is the CMake-identifier of the target platform to build for.

CMAKE_SYSTEM_PROCESSOR

is the CMake-identifier of the target architecture.

CMAKE_SYSROOT

is optional, and may be specified if a sysroot is available.

CMAKE_STAGING_PREFIX

is also optional. It may be used to specify a path on the host to install to.
The CMAKE_INSTALL_PREFIX is always the runtime installation
location, even when cross-compiling.

CMAKE_<LANG>_COMPILER

variable may be set to full paths, or to names of compilers to search for
in standard locations.  For toolchains that do not support linking binaries
without custom flags or scripts one may set the
CMAKE_TRY_COMPILE_TARGET_TYPE variable to STATIC_LIBRARY to
tell CMake not to try to link executables during its checks.

CMake find_* commands will look in the sysroot, and the CMAKE_FIND_ROOT_PATH
entries by default in all cases, as well as looking in the host system root prefix.
Although this can be controlled on a case-by-case basis, when cross-compiling, it
can be useful to exclude looking in either the host or the target for particular
artifacts. Generally, includes, libraries and packages should be found in the
target system prefixes, whereas executables which must be run as part of the build
should be found only on the host and not on the target. This is the purpose of
the CMAKE_FIND_ROOT_PATH_MODE_* variables.

Cross Compiling for the Cray Linux Environment¶

Cross compiling for compute nodes in the Cray Linux Environment can be done
without needing a separate toolchain file.  Specifying
-DCMAKE_SYSTEM_NAME=CrayLinuxEnvironment on the CMake command line will
ensure that the appropriate build settings and search paths are configured.
The platform will pull its configuration from the current environment
variables and will configure a project to use the compiler wrappers from the
Cray Programming Environment's PrgEnv-* modules if present and loaded.

The default configuration of the Cray Programming Environment is to only
support static libraries.  This can be overridden and shared libraries
enabled by setting the CRAYPE_LINK_TYPE environment variable to
dynamic.

Running CMake without specifying CMAKE_SYSTEM_NAME will
run the configure step in host mode assuming a standard Linux environment.
If not overridden, the PrgEnv-* compiler wrappers will end up getting used,
which if targeting the either the login node or compute node, is likely not the
desired behavior.  The exception to this would be if you are building directly
on a NID instead of cross-compiling from a login node. If trying to build
software for a login node, you will need to either first unload the
currently loaded PrgEnv-* module or explicitly tell CMake to use the
system compilers in /usr/bin instead of the Cray wrappers.  If instead
targeting a compute node is desired, just specify the
CMAKE_SYSTEM_NAME as mentioned above.

Cross Compiling using Clang¶

Some compilers such as Clang are inherently cross compilers.
The CMAKE_<LANG>_COMPILER_TARGET can be set to pass a
value to those supported compilers when compiling:

set(CMAKE_SYSTEM_NAME Linux)
set(CMAKE_SYSTEM_PROCESSOR arm)

set(triple arm-linux-gnueabihf)

set(CMAKE_C_COMPILER clang)
set(CMAKE_C_COMPILER_TARGET ${triple})
set(CMAKE_CXX_COMPILER clang++)
set(CMAKE_CXX_COMPILER_TARGET ${triple})

Similarly, some compilers do not ship their own supplementary utilities
such as linkers, but provide a way to specify the location of the external
toolchain which will be used by the compiler driver. The
CMAKE_<LANG>_COMPILER_EXTERNAL_TOOLCHAIN variable can be set in a
toolchain file to pass the path to the compiler driver.

Cross Compiling for QNX¶

As the Clang compiler the QNX QCC compile is inherently a cross compiler.
And the CMAKE_<LANG>_COMPILER_TARGET can be set to pass a
value to those supported compilers when compiling:

set(CMAKE_SYSTEM_NAME QNX)

set(arch gcc_ntoarmv7le)

set(CMAKE_C_COMPILER qcc)
set(CMAKE_C_COMPILER_TARGET ${arch})
set(CMAKE_CXX_COMPILER QCC)
set(CMAKE_CXX_COMPILER_TARGET ${arch})

set(CMAKE_SYSROOT $ENV{QNX_TARGET})

Cross Compiling for Windows CE¶

Cross compiling for Windows CE requires the corresponding SDK being
installed on your system.  These SDKs are usually installed under
C:/Program Files (x86)/Windows CE Tools/SDKs.

A toolchain file to configure a Visual Studio generator for
Windows CE may look like this:

set(CMAKE_SYSTEM_NAME WindowsCE)

set(CMAKE_SYSTEM_VERSION 8.0)
set(CMAKE_SYSTEM_PROCESSOR arm)

set(CMAKE_GENERATOR_TOOLSET CE800) # Can be omitted for 8.0
set(CMAKE_GENERATOR_PLATFORM SDK_AM335X_SK_WEC2013_V310)

The CMAKE_GENERATOR_PLATFORM tells the generator which SDK to use.
Further CMAKE_SYSTEM_VERSION tells the generator what version of
Windows CE to use.  Currently version 8.0 (Windows Embedded Compact 2013) is
supported out of the box.  Other versions may require one to set
CMAKE_GENERATOR_TOOLSET to the correct value.

Cross Compiling for Windows 10 Universal Applications¶

A toolchain file to configure Visual Studio Generators for a
Windows 10 Universal Application may look like this:

set(CMAKE_SYSTEM_NAME WindowsStore)
set(CMAKE_SYSTEM_VERSION 10.0)

A Windows 10 Universal Application targets both Windows Store and
Windows Phone.  Specify the CMAKE_SYSTEM_VERSION variable
to be 10.0 or higher.

CMake selects a Windows SDK as described by documentation of the
CMAKE_VS_WINDOWS_TARGET_PLATFORM_VERSION variable.

Cross Compiling for Windows Phone¶

A toolchain file to configure a Visual Studio generator for
Windows Phone may look like this:

set(CMAKE_SYSTEM_NAME WindowsPhone)
set(CMAKE_SYSTEM_VERSION 8.1)

Cross Compiling for Windows Store¶

A toolchain file to configure a Visual Studio generator for
Windows Store may look like this:

set(CMAKE_SYSTEM_NAME WindowsStore)
set(CMAKE_SYSTEM_VERSION 8.1)

Cross Compiling for ADSP SHARC/Blackfin¶

Cross-compiling for ADSP SHARC or Blackfin can be configured
by setting the CMAKE_SYSTEM_NAME variable to ADSP
and the CMAKE_SYSTEM_PROCESSOR variable
to the "part number", excluding the ADSP- prefix,
for example, 21594, SC589, etc.
This value is case insensitive.

CMake will automatically search for CCES or VDSP++ installs
in their default install locations
and select the most recent version found.
CCES will be selected over VDSP++ if both are installed.
Custom install paths can be set via the CMAKE_ADSP_ROOT variable
or the ADSP_ROOT environment variable.

The compiler (cc21k vs. ccblkfn) is selected automatically
based on the CMAKE_SYSTEM_PROCESSOR value provided.

Cross Compiling for Android¶

A toolchain file may configure cross-compiling for Android by setting the
CMAKE_SYSTEM_NAME variable to Android.  Further configuration
is specific to the Android development environment to be used.

For Visual Studio Generators, CMake expects NVIDIA Nsight Tegra
Visual Studio Edition or the Visual Studio tools for Android to be installed. See those sections
for further configuration details.

For Makefile Generators and the Ninja generator,
CMake expects one of these environments:

NDK

Standalone Toolchain

CMake uses the following steps to select one of the environments:

If the CMAKE_ANDROID_NDK variable is set, the NDK at the
specified location will be used.

Else, if the CMAKE_ANDROID_STANDALONE_TOOLCHAIN variable
is set, the Standalone Toolchain at the specified location will be used.

Else, if the CMAKE_SYSROOT variable is set to a directory
of the form <ndk>/platforms/android-<api>/arch-<arch>, the <ndk>
part will be used as the value of CMAKE_ANDROID_NDK and the
NDK will be used.

Else, if the CMAKE_SYSROOT variable is set to a directory of the
form <standalone-toolchain>/sysroot, the <standalone-toolchain> part
will be used as the value of CMAKE_ANDROID_STANDALONE_TOOLCHAIN
and the Standalone Toolchain will be used.

Else, if a cmake variable ANDROID_NDK is set it will be used
as the value of CMAKE_ANDROID_NDK, and the NDK will be used.

Else, if a cmake variable ANDROID_STANDALONE_TOOLCHAIN is set, it will be
used as the value of CMAKE_ANDROID_STANDALONE_TOOLCHAIN, and the
Standalone Toolchain will be used.

Else, if an environment variable ANDROID_NDK_ROOT or
ANDROID_NDK is set, it will be used as the value of
CMAKE_ANDROID_NDK, and the NDK will be used.

Else, if an environment variable ANDROID_STANDALONE_TOOLCHAIN is
set then it will be used as the value of
CMAKE_ANDROID_STANDALONE_TOOLCHAIN, and the Standalone
Toolchain will be used.

Else, an error diagnostic will be issued that neither the NDK or
Standalone Toolchain can be found.

New in version 3.20: If an Android NDK is selected, its version number is reported
in the CMAKE_ANDROID_NDK_VERSION variable.

Cross Compiling for Android with the NDK¶

A toolchain file may configure Makefile Generators,
Ninja Generators, or Visual Studio Generators to target
Android for cross-compiling.

Configure use of an Android NDK with the following variables:

CMAKE_SYSTEM_NAME

Set to Android.  Must be specified to enable cross compiling
for Android.

CMAKE_SYSTEM_VERSION

Set to the Android API level.  If not specified, the value is
determined as follows:

If the CMAKE_ANDROID_API variable is set, its value
is used as the API level.

If the CMAKE_SYSROOT variable is set, the API level is
detected from the NDK directory structure containing the sysroot.

Otherwise, the latest API level available in the NDK is used.

CMAKE_ANDROID_ARCH_ABI

Set to the Android ABI (architecture).  If not specified, this
variable will default to the first supported ABI in the list of
armeabi, armeabi-v7a and arm64-v8a.
The CMAKE_ANDROID_ARCH variable will be computed
from CMAKE_ANDROID_ARCH_ABI automatically.
Also see the CMAKE_ANDROID_ARM_MODE and
CMAKE_ANDROID_ARM_NEON variables.

CMAKE_ANDROID_NDK

Set to the absolute path to the Android NDK root directory.
If not specified, a default for this variable will be chosen
as specified above.

CMAKE_ANDROID_NDK_DEPRECATED_HEADERS

Set to a true value to use the deprecated per-api-level headers
instead of the unified headers.  If not specified, the default will
be false unless using a NDK that does not provide unified headers.

CMAKE_ANDROID_NDK_TOOLCHAIN_VERSION

On NDK r19 or above, this variable must be unset or set to clang.
On NDK r18 or below, set this to the version of the NDK toolchain to
be selected as the compiler.  If not specified, the default will be
the latest available GCC toolchain.

CMAKE_ANDROID_STL_TYPE

Set to specify which C++ standard library to use.  If not specified,
a default will be selected as described in the variable documentation.

The following variables will be computed and provided automatically:

CMAKE_<LANG>_ANDROID_TOOLCHAIN_PREFIX

The absolute path prefix to the binutils in the NDK toolchain.

CMAKE_<LANG>_ANDROID_TOOLCHAIN_SUFFIX

The host platform suffix of the binutils in the NDK toolchain.

For example, a toolchain file might contain:

set(CMAKE_SYSTEM_NAME Android)
set(CMAKE_SYSTEM_VERSION 21) # API level
set(CMAKE_ANDROID_ARCH_ABI arm64-v8a)
set(CMAKE_ANDROID_NDK /path/to/android-ndk)
set(CMAKE_ANDROID_STL_TYPE gnustl_static)

Alternatively one may specify the values without a toolchain file:

$ cmake ../src \
  -DCMAKE_SYSTEM_NAME=Android \
  -DCMAKE_SYSTEM_VERSION=21 \
  -DCMAKE_ANDROID_ARCH_ABI=arm64-v8a \
  -DCMAKE_ANDROID_NDK=/path/to/android-ndk \
  -DCMAKE_ANDROID_STL_TYPE=gnustl_static

Cross Compiling for Android with a Standalone Toolchain¶

A toolchain file may configure Makefile Generators or the
Ninja generator to target Android for cross-compiling
using a standalone toolchain.

Configure use of an Android standalone toolchain with the following variables:

CMAKE_SYSTEM_NAME

Set to Android.  Must be specified to enable cross compiling
for Android.

CMAKE_ANDROID_STANDALONE_TOOLCHAIN

Set to the absolute path to the standalone toolchain root directory.
A ${CMAKE_ANDROID_STANDALONE_TOOLCHAIN}/sysroot directory
must exist.
If not specified, a default for this variable will be chosen
as specified above.

CMAKE_ANDROID_ARM_MODE

When the standalone toolchain targets ARM, optionally set this to ON
to target 32-bit ARM instead of 16-bit Thumb.
See variable documentation for details.

CMAKE_ANDROID_ARM_NEON

When the standalone toolchain targets ARM v7, optionally set thisto ON
to target ARM NEON devices.  See variable documentation for details.

The following variables will be computed and provided automatically:

CMAKE_SYSTEM_VERSION

The Android API level detected from the standalone toolchain.

CMAKE_ANDROID_ARCH_ABI

The Android ABI detected from the standalone toolchain.

CMAKE_<LANG>_ANDROID_TOOLCHAIN_PREFIX

The absolute path prefix to the binutils in the standalone toolchain.

CMAKE_<LANG>_ANDROID_TOOLCHAIN_SUFFIX

The host platform suffix of the binutils in the standalone toolchain.

For example, a toolchain file might contain:

set(CMAKE_SYSTEM_NAME Android)
set(CMAKE_ANDROID_STANDALONE_TOOLCHAIN /path/to/android-toolchain)

Alternatively one may specify the values without a toolchain file:

$ cmake ../src \
  -DCMAKE_SYSTEM_NAME=Android \
  -DCMAKE_ANDROID_STANDALONE_TOOLCHAIN=/path/to/android-toolchain

Cross Compiling for Android with NVIDIA Nsight Tegra Visual Studio Edition¶

A toolchain file to configure one of the Visual Studio Generators
to build using NVIDIA Nsight Tegra targeting Android may look like this:

set(CMAKE_SYSTEM_NAME Android)

The CMAKE_GENERATOR_TOOLSET may be set to select
the Nsight Tegra "Toolchain Version" value.

See also target properties:

ANDROID_ANT_ADDITIONAL_OPTIONS

ANDROID_API_MIN

ANDROID_API

ANDROID_ARCH

ANDROID_ASSETS_DIRECTORIES

ANDROID_GUI

ANDROID_JAR_DEPENDENCIES

ANDROID_JAR_DIRECTORIES

ANDROID_JAVA_SOURCE_DIR

ANDROID_NATIVE_LIB_DEPENDENCIES

ANDROID_NATIVE_LIB_DIRECTORIES

ANDROID_PROCESS_MAX

ANDROID_PROGUARD_CONFIG_PATH

ANDROID_PROGUARD

ANDROID_SECURE_PROPS_PATH

ANDROID_SKIP_ANT_STEP

ANDROID_STL_TYPE

Cross Compiling for iOS, tvOS, visionOS, or watchOS¶

For cross-compiling to iOS, tvOS, visionOS, or watchOS, the Xcode
generator is recommended.  The Unix Makefiles or
Ninja generators can also be used, but they require the
project to handle more areas like target CPU selection and code signing.

Any of the Apple device platforms can be targeted by setting the
CMAKE_SYSTEM_NAME variable to a value from the table below.
By default, the latest Device SDK is chosen.  As for all Apple platforms,
a different SDK (e.g. a simulator) can be selected by setting the
CMAKE_OSX_SYSROOT variable, although this should rarely be
necessary (see Switching Between Device and Simulator below).
A list of available SDKs can be obtained by running xcodebuild -showsdks.

OS

CMAKE_SYSTEM_NAME

Device SDK (default)

Simulator SDK

iOS

iOS

iphoneos

iphonesimulator

tvOS

tvOS

appletvos

appletvsimulator

visionOS

visionOS

xros

xrsimulator

watchOS

watchOS

watchos

watchsimulator

For example, to create a CMake configuration for iOS, the following
command is sufficient:

cmake .. -GXcode -DCMAKE_SYSTEM_NAME=iOS

Variable CMAKE_OSX_ARCHITECTURES can be used to set architectures
for both device and simulator. Variable CMAKE_OSX_DEPLOYMENT_TARGET
can be used to set an iOS/tvOS/visionOS/watchOS deployment target.

The next example installs five architectures in a universal binary for an iOS
library.  It adds the relevant -miphoneos-version-min=9.3 or
-mios-simulator-version-min=9.3 compiler flag where appropriate.
Note that the CMAKE_IOS_INSTALL_COMBINED variable used in the
example is now deprecated, so this approach is no longer recommended.

$ cmake -S. -B_builds -GXcode \
    -DCMAKE_SYSTEM_NAME=iOS \
    "-DCMAKE_OSX_ARCHITECTURES=armv7;armv7s;arm64;i386;x86_64" \
    -DCMAKE_OSX_DEPLOYMENT_TARGET=9.3 \
    -DCMAKE_INSTALL_PREFIX=`</span><span class="nb">pwd</span><span class="sb">`/_install \
    -DCMAKE_XCODE_ATTRIBUTE_ONLY_ACTIVE_ARCH=NO \
    -DCMAKE_IOS_INSTALL_COMBINED=YES

Example:

# CMakeLists.txt
cmake_minimum_required(VERSION 3.14)
project(foo)
add_library(foo foo.cpp)
install(TARGETS foo DESTINATION lib)

Install:

$ cmake --build _builds --config Release --target install

Check library:

$ lipo -info _install/lib/libfoo.a
Architectures in the fat file: _install/lib/libfoo.a are: i386 armv7 armv7s x86_64 arm64

$ otool -l _install/lib/libfoo.a | grep -A2 LC_VERSION_MIN_IPHONEOS
      cmd LC_VERSION_MIN_IPHONEOS
  cmdsize 16
  version 9.3

Code Signing¶

Some build artifacts for the embedded Apple platforms require mandatory
code signing.  If the Xcode generator is being used and
code signing is required or desired, the development team ID can be
specified via the CMAKE_XCODE_ATTRIBUTE_DEVELOPMENT_TEAM CMake variable.
This team ID will then be included in the generated Xcode project.
By default, CMake avoids the need for code signing during the internal
configuration phase (i.e compiler ID and feature detection).

Switching Between Device and Simulator¶

When configuring for any of the embedded platforms, one can target either
real devices or the simulator.  Both have their own separate SDK, but CMake
only supports specifying a single SDK for the configuration phase.  This
means the developer must select one or the other at configuration time.
When using the Xcode generator, this is less of a limitation
because Xcode still allows you to build for either a device or a simulator,
even though configuration was only performed for one of the two.  From
within the Xcode IDE, builds are performed for the selected "destination"
platform.  When building from the command line, the desired sdk can be
specified directly by passing a -sdk option to the underlying build
tool (xcodebuild).  For example:

$ cmake --build ... -- -sdk iphonesimulator

Please note that checks made during configuration were performed against
the configure-time SDK and might not hold true for other SDKs.  Commands
like find_package(), find_library(), etc. store and use
details only for the configured SDK/platform, so they can be problematic
if wanting to switch between device and simulator builds. You can follow
the next rules to make device + simulator configuration work:

Use explicit -l linker flag,
e.g. target_link_libraries(foo PUBLIC "-lz")

Use explicit -framework linker flag,
e.g. target_link_libraries(foo PUBLIC "-framework CoreFoundation")

Use find_package() only for libraries installed with
CMAKE_IOS_INSTALL_COMBINED feature

Table of Contents

cmake-toolchains(7)

Introduction

Languages

Variables and Properties

Toolchain Features

Cross Compiling

Cross Compiling for Linux

Cross Compiling for the Cray Linux Environment

Cross Compiling using Clang

Cross Compiling for QNX

Cross Compiling for Windows CE

Cross Compiling for Windows 10 Universal Applications

Cross Compiling for Windows Phone

Cross Compiling for Windows Store

Cross Compiling for ADSP SHARC/Blackfin

Cross Compiling for Android

Cross Compiling for Android with the NDK

Cross Compiling for Android with a Standalone Toolchain

Cross Compiling for Android with NVIDIA Nsight Tegra Visual Studio Edition

Cross Compiling for iOS, tvOS, visionOS, or watchOS

Code Signing

Switching Between Device and Simulator

Previous topic

cmake-server(7)

Next topic

cmake-variables(7)

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-toolchains(7)

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


code:
<!DOCTYPE html>

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

  <title>cmake-variables(7) — CMake 3.29.0-rc3 Documentation</title>

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

    <link rel="icon" href="../_static/cmake-favicon.ico"/>
    <link rel="index" title="Index" href="../genindex.html" />
    <link rel="search" title="Search" href="../search.html" />
    <link rel="next" title="CMAKE_AR" href="../variable/CMAKE_AR.html" />
    <link rel="prev" title="cmake-toolchains(7)" href="cmake-toolchains.7.html" />

Navigation

          index

          next |

          previous |

    CMake »

    3.29.0-rc3 Documentation »

cmake-variables(7)

cmake-variables(7)¶

Contents

cmake-variables(7)

Variables that Provide Information

Variables that Change Behavior

Variables that Describe the System

Variables that Control the Build

Variables for Languages

Variables for CTest

Variables for CPack

Variable Expansion Operators

Internal Variables

Deprecated Variables that Provide Information

Deprecated Variables that Change Behavior

Deprecated Variables that Describe the System

Deprecated Variables that Control the Build

Deprecated Variables for Languages

Deprecated Variables for CTest

This page documents variables that are provided by CMake
or have meaning to CMake when set by project code.

For general information on variables, see the
Variables
section in the cmake-language manual.

Note

CMake reserves identifiers that:

begin with CMAKE_ (upper-, lower-, or mixed-case), or

begin with _CMAKE_ (upper-, lower-, or mixed-case), or

begin with _ followed by the name of any CMake Command.

Variables that Provide Information¶

CMAKE_AR

CMAKE_ARGC

CMAKE_ARGV0

CMAKE_BINARY_DIR

CMAKE_BUILD_TOOL

CMAKE_CACHE_MAJOR_VERSION

CMAKE_CACHE_MINOR_VERSION

CMAKE_CACHE_PATCH_VERSION

CMAKE_CACHEFILE_DIR

CMAKE_CFG_INTDIR

CMAKE_COMMAND

CMAKE_CPACK_COMMAND

CMAKE_CROSSCOMPILING

CMAKE_CROSSCOMPILING_EMULATOR

CMAKE_CTEST_COMMAND

CMAKE_CURRENT_BINARY_DIR

CMAKE_CURRENT_FUNCTION

CMAKE_CURRENT_FUNCTION_LIST_DIR

CMAKE_CURRENT_FUNCTION_LIST_FILE

CMAKE_CURRENT_FUNCTION_LIST_LINE

CMAKE_CURRENT_LIST_DIR

CMAKE_CURRENT_LIST_FILE

CMAKE_CURRENT_LIST_LINE

CMAKE_CURRENT_SOURCE_DIR

CMAKE_DEBUG_TARGET_PROPERTIES

CMAKE_DIRECTORY_LABELS

CMAKE_DL_LIBS

CMAKE_DOTNET_SDK

CMAKE_DOTNET_TARGET_FRAMEWORK

CMAKE_DOTNET_TARGET_FRAMEWORK_VERSION

CMAKE_EDIT_COMMAND

CMAKE_EXECUTABLE_SUFFIX

CMAKE_EXECUTABLE_SUFFIX_<LANG>

CMAKE_EXTRA_SHARED_LIBRARY_SUFFIXES

CMAKE_FIND_DEBUG_MODE

CMAKE_FIND_PACKAGE_NAME

CMAKE_FIND_PACKAGE_REDIRECTS_DIR

CMAKE_FIND_PACKAGE_SORT_DIRECTION

CMAKE_FIND_PACKAGE_SORT_ORDER

CMAKE_GENERATOR

CMAKE_GENERATOR_INSTANCE

CMAKE_GENERATOR_PLATFORM

CMAKE_GENERATOR_TOOLSET

CMAKE_IMPORT_LIBRARY_PREFIX

CMAKE_IMPORT_LIBRARY_SUFFIX

CMAKE_JOB_POOL_COMPILE

CMAKE_JOB_POOL_LINK

CMAKE_JOB_POOL_PRECOMPILE_HEADER

CMAKE_JOB_POOLS

CMAKE_<LANG>_COMPILER_AR

CMAKE_<LANG>_COMPILER_FRONTEND_VARIANT

CMAKE_<LANG>_COMPILER_LINKER

CMAKE_<LANG>_COMPILER_LINKER_FRONTEND_VARIANT

CMAKE_<LANG>_COMPILER_LINKER_ID

CMAKE_<LANG>_COMPILER_LINKER_VERSION

CMAKE_<LANG>_COMPILER_RANLIB

CMAKE_<LANG>_LINK_LIBRARY_SUFFIX

CMAKE_LINK_LIBRARY_SUFFIX

CMAKE_LINK_SEARCH_END_STATIC

CMAKE_LINK_SEARCH_START_STATIC

CMAKE_MAJOR_VERSION

CMAKE_MAKE_PROGRAM

CMAKE_MATCH_COUNT

CMAKE_MATCH_<n>

CMAKE_MINIMUM_REQUIRED_VERSION

CMAKE_MINOR_VERSION

CMAKE_NETRC

CMAKE_NETRC_FILE

CMAKE_PARENT_LIST_FILE

CMAKE_PATCH_VERSION

CMAKE_PROJECT_DESCRIPTION

CMAKE_PROJECT_HOMEPAGE_URL

CMAKE_PROJECT_NAME

CMAKE_PROJECT_VERSION

CMAKE_PROJECT_VERSION_MAJOR

CMAKE_PROJECT_VERSION_MINOR

CMAKE_PROJECT_VERSION_PATCH

CMAKE_PROJECT_VERSION_TWEAK

CMAKE_RANLIB

CMAKE_ROOT

CMAKE_RULE_MESSAGES

CMAKE_SCRIPT_MODE_FILE

CMAKE_SHARED_LIBRARY_PREFIX

CMAKE_SHARED_LIBRARY_SUFFIX

CMAKE_SHARED_MODULE_PREFIX

CMAKE_SHARED_MODULE_SUFFIX

CMAKE_SIZEOF_VOID_P

CMAKE_SKIP_INSTALL_RULES

CMAKE_SKIP_RPATH

CMAKE_SOURCE_DIR

CMAKE_STATIC_LIBRARY_PREFIX

CMAKE_STATIC_LIBRARY_SUFFIX

CMAKE_Swift_COMPILATION_MODE

CMAKE_Swift_MODULE_DIRECTORY

CMAKE_Swift_NUM_THREADS

CMAKE_TEST_LAUNCHER

CMAKE_TOOLCHAIN_FILE

CMAKE_TWEAK_VERSION

CMAKE_VERBOSE_MAKEFILE

CMAKE_VERSION

CMAKE_VS_DEVENV_COMMAND

CMAKE_VS_MSBUILD_COMMAND

CMAKE_VS_NsightTegra_VERSION

CMAKE_VS_NUGET_PACKAGE_RESTORE

CMAKE_VS_PLATFORM_NAME

CMAKE_VS_PLATFORM_NAME_DEFAULT

CMAKE_VS_PLATFORM_TOOLSET

CMAKE_VS_PLATFORM_TOOLSET_CUDA

CMAKE_VS_PLATFORM_TOOLSET_CUDA_CUSTOM_DIR

CMAKE_VS_PLATFORM_TOOLSET_FORTRAN

CMAKE_VS_PLATFORM_TOOLSET_HOST_ARCHITECTURE

CMAKE_VS_PLATFORM_TOOLSET_VERSION

CMAKE_VS_TARGET_FRAMEWORK_IDENTIFIER

CMAKE_VS_TARGET_FRAMEWORK_TARGETS_VERSION

CMAKE_VS_TARGET_FRAMEWORK_VERSION

CMAKE_VS_VERSION_BUILD_NUMBER

CMAKE_VS_WINDOWS_TARGET_PLATFORM_MIN_VERSION

CMAKE_VS_WINDOWS_TARGET_PLATFORM_VERSION

CMAKE_VS_WINDOWS_TARGET_PLATFORM_VERSION_MAXIMUM

CMAKE_XCODE_BUILD_SYSTEM

CMAKE_XCODE_PLATFORM_TOOLSET

<PROJECT-NAME>_BINARY_DIR

<PROJECT-NAME>_DESCRIPTION

<PROJECT-NAME>_HOMEPAGE_URL

<PROJECT-NAME>_IS_TOP_LEVEL

<PROJECT-NAME>_SOURCE_DIR

<PROJECT-NAME>_VERSION

<PROJECT-NAME>_VERSION_MAJOR

<PROJECT-NAME>_VERSION_MINOR

<PROJECT-NAME>_VERSION_PATCH

<PROJECT-NAME>_VERSION_TWEAK

PROJECT_BINARY_DIR

PROJECT_DESCRIPTION

PROJECT_HOMEPAGE_URL

PROJECT_IS_TOP_LEVEL

PROJECT_NAME

PROJECT_SOURCE_DIR

PROJECT_VERSION

PROJECT_VERSION_MAJOR

PROJECT_VERSION_MINOR

PROJECT_VERSION_PATCH

PROJECT_VERSION_TWEAK

Variables that Change Behavior¶

BUILD_SHARED_LIBS

CMAKE_ABSOLUTE_DESTINATION_FILES

CMAKE_ADD_CUSTOM_COMMAND_DEPENDS_EXPLICIT_ONLY

CMAKE_APPBUNDLE_PATH

CMAKE_BUILD_TYPE

CMAKE_CLANG_VFS_OVERLAY

CMAKE_CODEBLOCKS_COMPILER_ID

CMAKE_CODEBLOCKS_EXCLUDE_EXTERNAL_FILES

CMAKE_CODELITE_USE_TARGETS

CMAKE_COLOR_DIAGNOSTICS

CMAKE_COLOR_MAKEFILE

CMAKE_CONFIGURATION_TYPES

CMAKE_DEPENDS_IN_PROJECT_ONLY

CMAKE_DISABLE_FIND_PACKAGE_<PackageName>

CMAKE_ECLIPSE_GENERATE_LINKED_RESOURCES

CMAKE_ECLIPSE_GENERATE_SOURCE_PROJECT

CMAKE_ECLIPSE_MAKE_ARGUMENTS

CMAKE_ECLIPSE_RESOURCE_ENCODING

CMAKE_ECLIPSE_VERSION

CMAKE_ERROR_DEPRECATED

CMAKE_ERROR_ON_ABSOLUTE_INSTALL_DESTINATION

CMAKE_EXECUTE_PROCESS_COMMAND_ECHO

CMAKE_EXPORT_COMPILE_COMMANDS

CMAKE_EXPORT_PACKAGE_REGISTRY

CMAKE_EXPORT_NO_PACKAGE_REGISTRY

CMAKE_FIND_APPBUNDLE

CMAKE_FIND_FRAMEWORK

CMAKE_FIND_LIBRARY_CUSTOM_LIB_SUFFIX

CMAKE_FIND_LIBRARY_PREFIXES

CMAKE_FIND_LIBRARY_SUFFIXES

CMAKE_FIND_NO_INSTALL_PREFIX

CMAKE_FIND_PACKAGE_PREFER_CONFIG

CMAKE_FIND_PACKAGE_RESOLVE_SYMLINKS

CMAKE_FIND_PACKAGE_TARGETS_GLOBAL

CMAKE_FIND_PACKAGE_WARN_NO_MODULE

CMAKE_FIND_ROOT_PATH

CMAKE_FIND_ROOT_PATH_MODE_INCLUDE

CMAKE_FIND_ROOT_PATH_MODE_LIBRARY

CMAKE_FIND_ROOT_PATH_MODE_PACKAGE

CMAKE_FIND_ROOT_PATH_MODE_PROGRAM

CMAKE_FIND_USE_CMAKE_ENVIRONMENT_PATH

CMAKE_FIND_USE_CMAKE_PATH

CMAKE_FIND_USE_CMAKE_SYSTEM_PATH

CMAKE_FIND_USE_INSTALL_PREFIX

CMAKE_FIND_USE_PACKAGE_REGISTRY

CMAKE_FIND_USE_PACKAGE_ROOT_PATH

CMAKE_FIND_USE_SYSTEM_ENVIRONMENT_PATH

CMAKE_FIND_USE_SYSTEM_PACKAGE_REGISTRY

CMAKE_FRAMEWORK_PATH

CMAKE_IGNORE_PATH

CMAKE_IGNORE_PREFIX_PATH

CMAKE_INCLUDE_DIRECTORIES_BEFORE

CMAKE_INCLUDE_DIRECTORIES_PROJECT_BEFORE

CMAKE_INCLUDE_PATH

CMAKE_INSTALL_DEFAULT_COMPONENT_NAME

CMAKE_INSTALL_DEFAULT_DIRECTORY_PERMISSIONS

CMAKE_INSTALL_MESSAGE

CMAKE_INSTALL_PREFIX

CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT

CMAKE_KATE_FILES_MODE

CMAKE_KATE_MAKE_ARGUMENTS

CMAKE_LIBRARY_PATH

CMAKE_LINK_DIRECTORIES_BEFORE

CMAKE_LINK_LIBRARIES_ONLY_TARGETS

CMAKE_MAXIMUM_RECURSION_DEPTH

CMAKE_MESSAGE_CONTEXT

CMAKE_MESSAGE_CONTEXT_SHOW

CMAKE_MESSAGE_INDENT

CMAKE_MESSAGE_LOG_LEVEL

CMAKE_MFC_FLAG

CMAKE_MODULE_PATH

CMAKE_POLICY_DEFAULT_CMP<NNNN>

CMAKE_POLICY_WARNING_CMP<NNNN>

CMAKE_PREFIX_PATH

CMAKE_PROGRAM_PATH

CMAKE_PROJECT_INCLUDE

CMAKE_PROJECT_INCLUDE_BEFORE

CMAKE_PROJECT_<PROJECT-NAME>_INCLUDE

CMAKE_PROJECT_<PROJECT-NAME>_INCLUDE_BEFORE

CMAKE_PROJECT_TOP_LEVEL_INCLUDES

CMAKE_REQUIRE_FIND_PACKAGE_<PackageName>

CMAKE_SKIP_INSTALL_ALL_DEPENDENCY

CMAKE_SKIP_TEST_ALL_DEPENDENCY

CMAKE_STAGING_PREFIX

CMAKE_SUBLIME_TEXT_2_ENV_SETTINGS

CMAKE_SUBLIME_TEXT_2_EXCLUDE_BUILD_TREE

CMAKE_SUPPRESS_REGENERATION

CMAKE_SYSROOT

CMAKE_SYSROOT_COMPILE

CMAKE_SYSROOT_LINK

CMAKE_SYSTEM_APPBUNDLE_PATH

CMAKE_SYSTEM_FRAMEWORK_PATH

CMAKE_SYSTEM_IGNORE_PATH

CMAKE_SYSTEM_IGNORE_PREFIX_PATH

CMAKE_SYSTEM_INCLUDE_PATH

CMAKE_SYSTEM_LIBRARY_PATH

CMAKE_SYSTEM_PREFIX_PATH

CMAKE_SYSTEM_PROGRAM_PATH

CMAKE_TLS_CAINFO

CMAKE_TLS_VERIFY

CMAKE_USER_MAKE_RULES_OVERRIDE

CMAKE_WARN_DEPRECATED

CMAKE_WARN_ON_ABSOLUTE_INSTALL_DESTINATION

CMAKE_XCODE_GENERATE_SCHEME

CMAKE_XCODE_GENERATE_TOP_LEVEL_PROJECT_ONLY

CMAKE_XCODE_LINK_BUILD_PHASE_MODE

CMAKE_XCODE_SCHEME_ADDRESS_SANITIZER

CMAKE_XCODE_SCHEME_ADDRESS_SANITIZER_USE_AFTER_RETURN

CMAKE_XCODE_SCHEME_DEBUG_DOCUMENT_VERSIONING

CMAKE_XCODE_SCHEME_DISABLE_MAIN_THREAD_CHECKER

CMAKE_XCODE_SCHEME_DYNAMIC_LIBRARY_LOADS

CMAKE_XCODE_SCHEME_DYNAMIC_LINKER_API_USAGE

CMAKE_XCODE_SCHEME_ENABLE_GPU_API_VALIDATION

CMAKE_XCODE_SCHEME_ENABLE_GPU_FRAME_CAPTURE_MODE

CMAKE_XCODE_SCHEME_ENABLE_GPU_SHADER_VALIDATION

CMAKE_XCODE_SCHEME_ENVIRONMENT

CMAKE_XCODE_SCHEME_GUARD_MALLOC

CMAKE_XCODE_SCHEME_LAUNCH_CONFIGURATION

CMAKE_XCODE_SCHEME_LAUNCH_MODE

CMAKE_XCODE_SCHEME_MAIN_THREAD_CHECKER_STOP

CMAKE_XCODE_SCHEME_MALLOC_GUARD_EDGES

CMAKE_XCODE_SCHEME_MALLOC_SCRIBBLE

CMAKE_XCODE_SCHEME_MALLOC_STACK

CMAKE_XCODE_SCHEME_THREAD_SANITIZER

CMAKE_XCODE_SCHEME_THREAD_SANITIZER_STOP

CMAKE_XCODE_SCHEME_UNDEFINED_BEHAVIOUR_SANITIZER

CMAKE_XCODE_SCHEME_UNDEFINED_BEHAVIOUR_SANITIZER_STOP

CMAKE_XCODE_SCHEME_WORKING_DIRECTORY

CMAKE_XCODE_SCHEME_ZOMBIE_OBJECTS

CMAKE_XCODE_XCCONFIG

<PackageName>_ROOT

Variables that Describe the System¶

ANDROID

APPLE

BORLAND

BSD

CMAKE_ANDROID_NDK_VERSION

CMAKE_CL_64

CMAKE_COMPILER_2005

CMAKE_HOST_APPLE

CMAKE_HOST_BSD

CMAKE_HOST_LINUX

CMAKE_HOST_SOLARIS

CMAKE_HOST_SYSTEM

CMAKE_HOST_SYSTEM_NAME

CMAKE_HOST_SYSTEM_PROCESSOR

CMAKE_HOST_SYSTEM_VERSION

CMAKE_HOST_UNIX

CMAKE_HOST_WIN32

CMAKE_LIBRARY_ARCHITECTURE

CMAKE_LIBRARY_ARCHITECTURE_REGEX

CMAKE_OBJECT_PATH_MAX

CMAKE_SYSTEM

CMAKE_SYSTEM_NAME

CMAKE_SYSTEM_PROCESSOR

CMAKE_SYSTEM_VERSION

CYGWIN

GHSMULTI

IOS

LINUX

MINGW

MSVC

MSVC_IDE

MSVC_TOOLSET_VERSION

MSVC_VERSION

MSYS

UNIX

WIN32

WINCE

WINDOWS_PHONE

WINDOWS_STORE

XCODE

XCODE_VERSION

Variables that Control the Build¶

CMAKE_ADSP_ROOT

CMAKE_AIX_EXPORT_ALL_SYMBOLS

CMAKE_ANDROID_ANT_ADDITIONAL_OPTIONS

CMAKE_ANDROID_API

CMAKE_ANDROID_API_MIN

CMAKE_ANDROID_ARCH

CMAKE_ANDROID_ARCH_ABI

CMAKE_ANDROID_ARM_MODE

CMAKE_ANDROID_ARM_NEON

CMAKE_ANDROID_ASSETS_DIRECTORIES

CMAKE_ANDROID_EXCEPTIONS

CMAKE_ANDROID_GUI

CMAKE_ANDROID_JAR_DEPENDENCIES

CMAKE_ANDROID_JAR_DIRECTORIES

CMAKE_ANDROID_JAVA_SOURCE_DIR

CMAKE_ANDROID_NATIVE_LIB_DEPENDENCIES

CMAKE_ANDROID_NATIVE_LIB_DIRECTORIES

CMAKE_ANDROID_NDK

CMAKE_ANDROID_NDK_DEPRECATED_HEADERS

CMAKE_ANDROID_NDK_TOOLCHAIN_HOST_TAG

CMAKE_ANDROID_NDK_TOOLCHAIN_VERSION

CMAKE_ANDROID_PROCESS_MAX

CMAKE_ANDROID_PROGUARD

CMAKE_ANDROID_PROGUARD_CONFIG_PATH

CMAKE_ANDROID_RTTI

CMAKE_ANDROID_SECURE_PROPS_PATH

CMAKE_ANDROID_SKIP_ANT_STEP

CMAKE_ANDROID_STANDALONE_TOOLCHAIN

CMAKE_ANDROID_STL_TYPE

CMAKE_APPLE_SILICON_PROCESSOR

CMAKE_ARCHIVE_OUTPUT_DIRECTORY

CMAKE_ARCHIVE_OUTPUT_DIRECTORY_<CONFIG>

CMAKE_AUTOGEN_BETTER_GRAPH_MULTI_CONFIG

CMAKE_AUTOGEN_COMMAND_LINE_LENGTH_MAX

CMAKE_AUTOGEN_ORIGIN_DEPENDS

CMAKE_AUTOGEN_PARALLEL

CMAKE_AUTOGEN_USE_SYSTEM_INCLUDE

CMAKE_AUTOGEN_VERBOSE

CMAKE_AUTOMOC

CMAKE_AUTOMOC_COMPILER_PREDEFINES

CMAKE_AUTOMOC_DEPEND_FILTERS

CMAKE_AUTOMOC_MACRO_NAMES

CMAKE_AUTOMOC_MOC_OPTIONS

CMAKE_AUTOMOC_PATH_PREFIX

CMAKE_AUTOMOC_EXECUTABLE

CMAKE_AUTORCC

CMAKE_AUTORCC_OPTIONS

CMAKE_AUTORCC_EXECUTABLE

CMAKE_AUTOUIC

CMAKE_AUTOUIC_OPTIONS

CMAKE_AUTOUIC_SEARCH_PATHS

CMAKE_AUTOUIC_EXECUTABLE

CMAKE_BUILD_RPATH

CMAKE_BUILD_RPATH_USE_ORIGIN

CMAKE_BUILD_WITH_INSTALL_NAME_DIR

CMAKE_BUILD_WITH_INSTALL_RPATH

CMAKE_COMPILE_PDB_OUTPUT_DIRECTORY

CMAKE_COMPILE_PDB_OUTPUT_DIRECTORY_<CONFIG>

CMAKE_COMPILE_WARNING_AS_ERROR

CMAKE_<CONFIG>_POSTFIX

CMAKE_CROSS_CONFIGS

CMAKE_CTEST_ARGUMENTS

CMAKE_CUDA_RESOLVE_DEVICE_SYMBOLS

CMAKE_CUDA_RUNTIME_LIBRARY

CMAKE_CUDA_SEPARABLE_COMPILATION

CMAKE_CXX_SCAN_FOR_MODULES

CMAKE_DEBUG_POSTFIX

CMAKE_DEFAULT_BUILD_TYPE

CMAKE_DEFAULT_CONFIGS

CMAKE_DEPENDS_USE_COMPILER

CMAKE_DISABLE_PRECOMPILE_HEADERS

CMAKE_DLL_NAME_WITH_SOVERSION

CMAKE_ENABLE_EXPORTS

CMAKE_EXECUTABLE_ENABLE_EXPORTS

CMAKE_EXE_LINKER_FLAGS

CMAKE_EXE_LINKER_FLAGS_<CONFIG>

CMAKE_EXE_LINKER_FLAGS_<CONFIG>_INIT

CMAKE_EXE_LINKER_FLAGS_INIT

CMAKE_EXPORT_FIND_PACKAGE_NAME

CMAKE_FOLDER

CMAKE_Fortran_FORMAT

CMAKE_Fortran_MODULE_DIRECTORY

CMAKE_Fortran_PREPROCESS

CMAKE_FRAMEWORK

CMAKE_FRAMEWORK_MULTI_CONFIG_POSTFIX_<CONFIG>

CMAKE_GHS_NO_SOURCE_GROUP_FILE

CMAKE_GLOBAL_AUTOGEN_TARGET

CMAKE_GLOBAL_AUTOGEN_TARGET_NAME

CMAKE_GLOBAL_AUTORCC_TARGET

CMAKE_GLOBAL_AUTORCC_TARGET_NAME

CMAKE_GNUtoMS

CMAKE_INCLUDE_CURRENT_DIR

CMAKE_INCLUDE_CURRENT_DIR_IN_INTERFACE

CMAKE_INSTALL_NAME_DIR

CMAKE_INSTALL_REMOVE_ENVIRONMENT_RPATH

CMAKE_INSTALL_RPATH

CMAKE_INSTALL_RPATH_USE_LINK_PATH

CMAKE_INTERPROCEDURAL_OPTIMIZATION

CMAKE_INTERPROCEDURAL_OPTIMIZATION_<CONFIG>

CMAKE_<LANG>_CLANG_TIDY

CMAKE_<LANG>_CLANG_TIDY_EXPORT_FIXES_DIR

CMAKE_<LANG>_COMPILER_LAUNCHER

CMAKE_<LANG>_CPPCHECK

CMAKE_<LANG>_CPPLINT

CMAKE_<LANG>_INCLUDE_WHAT_YOU_USE

CMAKE_<LANG>_LINK_GROUP_USING_<FEATURE>

CMAKE_<LANG>_LINK_GROUP_USING_<FEATURE>_SUPPORTED

CMAKE_<LANG>_LINK_LIBRARY_FILE_FLAG

CMAKE_<LANG>_LINK_LIBRARY_FLAG

CMAKE_<LANG>_LINK_LIBRARY_USING_<FEATURE>

CMAKE_<LANG>_LINK_LIBRARY_USING_<FEATURE>_SUPPORTED

CMAKE_<LANG>_LINK_WHAT_YOU_USE_FLAG

CMAKE_<LANG>_LINKER_LAUNCHER

CMAKE_<LANG>_USING_LINKER_MODE

CMAKE_<LANG>_USING_LINKER_<TYPE>

CMAKE_<LANG>_VISIBILITY_PRESET

CMAKE_LIBRARY_OUTPUT_DIRECTORY

CMAKE_LIBRARY_OUTPUT_DIRECTORY_<CONFIG>

CMAKE_LIBRARY_PATH_FLAG

CMAKE_LINK_DEF_FILE_FLAG

CMAKE_LINK_DEPENDS_NO_SHARED

CMAKE_LINK_DEPENDS_USE_LINKER

CMAKE_LINK_GROUP_USING_<FEATURE>

CMAKE_LINK_GROUP_USING_<FEATURE>_SUPPORTED

CMAKE_LINK_INTERFACE_LIBRARIES

CMAKE_LINK_LIBRARY_FILE_FLAG

CMAKE_LINK_LIBRARY_FLAG

CMAKE_LINK_LIBRARY_USING_<FEATURE>

CMAKE_LINK_LIBRARY_USING_<FEATURE>_SUPPORTED

CMAKE_LINK_WHAT_YOU_USE

CMAKE_LINK_WHAT_YOU_USE_CHECK

CMAKE_LINKER_TYPE

CMAKE_MACOSX_BUNDLE

CMAKE_MACOSX_RPATH

CMAKE_MAP_IMPORTED_CONFIG_<CONFIG>

CMAKE_MODULE_LINKER_FLAGS

CMAKE_MODULE_LINKER_FLAGS_<CONFIG>

CMAKE_MODULE_LINKER_FLAGS_<CONFIG>_INIT

CMAKE_MODULE_LINKER_FLAGS_INIT

CMAKE_MSVC_DEBUG_INFORMATION_FORMAT

CMAKE_MSVC_RUNTIME_LIBRARY

CMAKE_MSVCIDE_RUN_PATH

CMAKE_NINJA_OUTPUT_PATH_PREFIX

CMAKE_NO_BUILTIN_CHRPATH

CMAKE_NO_SYSTEM_FROM_IMPORTED

CMAKE_OPTIMIZE_DEPENDENCIES

CMAKE_OSX_ARCHITECTURES

CMAKE_OSX_DEPLOYMENT_TARGET

CMAKE_OSX_SYSROOT

CMAKE_PCH_INSTANTIATE_TEMPLATES

CMAKE_PCH_WARN_INVALID

CMAKE_PDB_OUTPUT_DIRECTORY

CMAKE_PDB_OUTPUT_DIRECTORY_<CONFIG>

CMAKE_PLATFORM_NO_VERSIONED_SONAME

CMAKE_POSITION_INDEPENDENT_CODE

CMAKE_RUNTIME_OUTPUT_DIRECTORY

CMAKE_RUNTIME_OUTPUT_DIRECTORY_<CONFIG>

CMAKE_SHARED_LIBRARY_ENABLE_EXPORTS

CMAKE_SHARED_LINKER_FLAGS

CMAKE_SHARED_LINKER_FLAGS_<CONFIG>

CMAKE_SHARED_LINKER_FLAGS_<CONFIG>_INIT

CMAKE_SHARED_LINKER_FLAGS_INIT

CMAKE_SKIP_BUILD_RPATH

CMAKE_SKIP_INSTALL_RPATH

CMAKE_STATIC_LINKER_FLAGS

CMAKE_STATIC_LINKER_FLAGS_<CONFIG>

CMAKE_STATIC_LINKER_FLAGS_<CONFIG>_INIT

CMAKE_STATIC_LINKER_FLAGS_INIT

CMAKE_TASKING_TOOLSET

CMAKE_TRY_COMPILE_CONFIGURATION

CMAKE_TRY_COMPILE_NO_PLATFORM_VARIABLES

CMAKE_TRY_COMPILE_PLATFORM_VARIABLES

CMAKE_TRY_COMPILE_TARGET_TYPE

CMAKE_UNITY_BUILD

CMAKE_UNITY_BUILD_BATCH_SIZE

CMAKE_UNITY_BUILD_UNIQUE_ID

CMAKE_VERIFY_INTERFACE_HEADER_SETS

CMAKE_VISIBILITY_INLINES_HIDDEN

CMAKE_VS_DEBUGGER_COMMAND

CMAKE_VS_DEBUGGER_COMMAND_ARGUMENTS

CMAKE_VS_DEBUGGER_ENVIRONMENT

CMAKE_VS_DEBUGGER_WORKING_DIRECTORY

CMAKE_VS_GLOBALS

CMAKE_VS_INCLUDE_INSTALL_TO_DEFAULT_BUILD

CMAKE_VS_INCLUDE_PACKAGE_TO_DEFAULT_BUILD

CMAKE_VS_JUST_MY_CODE_DEBUGGING

CMAKE_VS_NO_COMPILE_BATCHING

CMAKE_VS_SDK_EXCLUDE_DIRECTORIES

CMAKE_VS_SDK_EXECUTABLE_DIRECTORIES

CMAKE_VS_SDK_INCLUDE_DIRECTORIES

CMAKE_VS_SDK_LIBRARY_DIRECTORIES

CMAKE_VS_SDK_LIBRARY_WINRT_DIRECTORIES

CMAKE_VS_SDK_REFERENCE_DIRECTORIES

CMAKE_VS_SDK_SOURCE_DIRECTORIES

CMAKE_VS_WINRT_BY_DEFAULT

CMAKE_WATCOM_RUNTIME_LIBRARY

CMAKE_WIN32_EXECUTABLE

CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS

CMAKE_XCODE_ATTRIBUTE_<an-attribute>

EXECUTABLE_OUTPUT_PATH

LIBRARY_OUTPUT_PATH

Variables for Languages¶

CMAKE_C_COMPILE_FEATURES

CMAKE_C_EXTENSIONS

CMAKE_C_STANDARD

CMAKE_C_STANDARD_REQUIRED

CMAKE_CUDA_ARCHITECTURES

CMAKE_CUDA_COMPILE_FEATURES

CMAKE_CUDA_EXTENSIONS

CMAKE_CUDA_HOST_COMPILER

CMAKE_CUDA_STANDARD

CMAKE_CUDA_STANDARD_REQUIRED

CMAKE_CUDA_TOOLKIT_INCLUDE_DIRECTORIES

CMAKE_CXX_COMPILE_FEATURES

CMAKE_CXX_EXTENSIONS

CMAKE_CXX_STANDARD

CMAKE_CXX_STANDARD_REQUIRED

CMAKE_Fortran_MODDIR_DEFAULT

CMAKE_Fortran_MODDIR_FLAG

CMAKE_Fortran_MODOUT_FLAG

CMAKE_HIP_ARCHITECTURES

CMAKE_HIP_EXTENSIONS

CMAKE_HIP_PLATFORM

CMAKE_HIP_STANDARD

CMAKE_HIP_STANDARD_REQUIRED

CMAKE_ISPC_HEADER_DIRECTORY

CMAKE_ISPC_HEADER_SUFFIX

CMAKE_ISPC_INSTRUCTION_SETS

CMAKE_<LANG>_ANDROID_TOOLCHAIN_MACHINE

CMAKE_<LANG>_ANDROID_TOOLCHAIN_PREFIX

CMAKE_<LANG>_ANDROID_TOOLCHAIN_SUFFIX

CMAKE_<LANG>_ARCHIVE_APPEND

CMAKE_<LANG>_ARCHIVE_CREATE

CMAKE_<LANG>_ARCHIVE_FINISH

CMAKE_<LANG>_BYTE_ORDER

CMAKE_<LANG>_COMPILE_OBJECT

CMAKE_<LANG>_COMPILER

CMAKE_<LANG>_COMPILER_EXTERNAL_TOOLCHAIN

CMAKE_<LANG>_COMPILER_ID

CMAKE_<LANG>_COMPILER_LOADED

CMAKE_<LANG>_COMPILER_PREDEFINES_COMMAND

CMAKE_<LANG>_COMPILER_TARGET

CMAKE_<LANG>_COMPILER_VERSION

CMAKE_<LANG>_CREATE_SHARED_LIBRARY

CMAKE_<LANG>_CREATE_SHARED_MODULE

CMAKE_<LANG>_CREATE_STATIC_LIBRARY

CMAKE_<LANG>_EXTENSIONS

CMAKE_<LANG>_EXTENSIONS_DEFAULT

CMAKE_<LANG>_FLAGS

CMAKE_<LANG>_FLAGS_<CONFIG>

CMAKE_<LANG>_FLAGS_<CONFIG>_INIT

CMAKE_<LANG>_FLAGS_DEBUG

CMAKE_<LANG>_FLAGS_DEBUG_INIT

CMAKE_<LANG>_FLAGS_INIT

CMAKE_<LANG>_FLAGS_MINSIZEREL

CMAKE_<LANG>_FLAGS_MINSIZEREL_INIT

CMAKE_<LANG>_FLAGS_RELEASE

CMAKE_<LANG>_FLAGS_RELEASE_INIT

CMAKE_<LANG>_FLAGS_RELWITHDEBINFO

CMAKE_<LANG>_FLAGS_RELWITHDEBINFO_INIT

CMAKE_<LANG>_HOST_COMPILER

CMAKE_<LANG>_IGNORE_EXTENSIONS

CMAKE_<LANG>_IMPLICIT_INCLUDE_DIRECTORIES

CMAKE_<LANG>_IMPLICIT_LINK_DIRECTORIES

CMAKE_<LANG>_IMPLICIT_LINK_FRAMEWORK_DIRECTORIES

CMAKE_<LANG>_IMPLICIT_LINK_LIBRARIES

CMAKE_<LANG>_LIBRARY_ARCHITECTURE

CMAKE_<LANG>_LINK_EXECUTABLE

CMAKE_<LANG>_LINKER_WRAPPER_FLAG

CMAKE_<LANG>_LINKER_WRAPPER_FLAG_SEP

CMAKE_<LANG>_OUTPUT_EXTENSION

CMAKE_<LANG>_SIMULATE_ID

CMAKE_<LANG>_SIMULATE_VERSION

CMAKE_<LANG>_SIZEOF_DATA_PTR

CMAKE_<LANG>_SOURCE_FILE_EXTENSIONS

CMAKE_<LANG>_STANDARD

CMAKE_<LANG>_STANDARD_DEFAULT

CMAKE_<LANG>_STANDARD_INCLUDE_DIRECTORIES

CMAKE_<LANG>_STANDARD_LIBRARIES

CMAKE_<LANG>_STANDARD_REQUIRED

CMAKE_OBJC_EXTENSIONS

CMAKE_OBJC_STANDARD

CMAKE_OBJC_STANDARD_REQUIRED

CMAKE_OBJCXX_EXTENSIONS

CMAKE_OBJCXX_STANDARD

CMAKE_OBJCXX_STANDARD_REQUIRED

CMAKE_Swift_LANGUAGE_VERSION

CMAKE_USER_MAKE_RULES_OVERRIDE_<LANG>

Variables for CTest¶

CTEST_BINARY_DIRECTORY

CTEST_BUILD_COMMAND

CTEST_BUILD_NAME

CTEST_BZR_COMMAND

CTEST_BZR_UPDATE_OPTIONS

CTEST_CHANGE_ID

CTEST_CHECKOUT_COMMAND

CTEST_CONFIGURATION_TYPE

CTEST_CONFIGURE_COMMAND

CTEST_COVERAGE_COMMAND

CTEST_COVERAGE_EXTRA_FLAGS

CTEST_CURL_OPTIONS

CTEST_CUSTOM_COVERAGE_EXCLUDE

CTEST_CUSTOM_ERROR_EXCEPTION

CTEST_CUSTOM_ERROR_MATCH

CTEST_CUSTOM_ERROR_POST_CONTEXT

CTEST_CUSTOM_ERROR_PRE_CONTEXT

CTEST_CUSTOM_MAXIMUM_FAILED_TEST_OUTPUT_SIZE

CTEST_CUSTOM_MAXIMUM_NUMBER_OF_ERRORS

CTEST_CUSTOM_MAXIMUM_NUMBER_OF_WARNINGS

CTEST_CUSTOM_MAXIMUM_PASSED_TEST_OUTPUT_SIZE

CTEST_CUSTOM_MEMCHECK_IGNORE

CTEST_CUSTOM_POST_MEMCHECK

CTEST_CUSTOM_POST_TEST

CTEST_CUSTOM_PRE_MEMCHECK

CTEST_CUSTOM_PRE_TEST

CTEST_CUSTOM_TEST_OUTPUT_TRUNCATION

CTEST_CUSTOM_TESTS_IGNORE

CTEST_CUSTOM_WARNING_EXCEPTION

CTEST_CUSTOM_WARNING_MATCH

CTEST_CVS_COMMAND

CTEST_CVS_UPDATE_OPTIONS

CTEST_DROP_LOCATION

CTEST_DROP_METHOD

CTEST_DROP_SITE

CTEST_DROP_SITE_CDASH

CTEST_DROP_SITE_PASSWORD

CTEST_DROP_SITE_USER

CTEST_EXTRA_COVERAGE_GLOB

CTEST_GIT_COMMAND

CTEST_GIT_INIT_SUBMODULES

CTEST_GIT_UPDATE_CUSTOM

CTEST_GIT_UPDATE_OPTIONS

CTEST_HG_COMMAND

CTEST_HG_UPDATE_OPTIONS

CTEST_LABELS_FOR_SUBPROJECTS

CTEST_MEMORYCHECK_COMMAND

CTEST_MEMORYCHECK_COMMAND_OPTIONS

CTEST_MEMORYCHECK_SANITIZER_OPTIONS

CTEST_MEMORYCHECK_SUPPRESSIONS_FILE

CTEST_MEMORYCHECK_TYPE

CTEST_NIGHTLY_START_TIME

CTEST_P4_CLIENT

CTEST_P4_COMMAND

CTEST_P4_OPTIONS

CTEST_P4_UPDATE_OPTIONS

CTEST_RESOURCE_SPEC_FILE

CTEST_RUN_CURRENT_SCRIPT

CTEST_SCRIPT_DIRECTORY

CTEST_SITE

CTEST_SOURCE_DIRECTORY

CTEST_SUBMIT_INACTIVITY_TIMEOUT

CTEST_SUBMIT_URL

CTEST_SVN_COMMAND

CTEST_SVN_OPTIONS

CTEST_SVN_UPDATE_OPTIONS

CTEST_TEST_LOAD

CTEST_TEST_TIMEOUT

CTEST_UPDATE_COMMAND

CTEST_UPDATE_OPTIONS

CTEST_UPDATE_VERSION_ONLY

CTEST_UPDATE_VERSION_OVERRIDE

CTEST_USE_LAUNCHERS

Variables for CPack¶

CPACK_ABSOLUTE_DESTINATION_FILES

CPACK_COMPONENT_INCLUDE_TOPLEVEL_DIRECTORY

CPACK_CUSTOM_INSTALL_VARIABLES

CPACK_ERROR_ON_ABSOLUTE_INSTALL_DESTINATION

CPACK_INCLUDE_TOPLEVEL_DIRECTORY

CPACK_INSTALL_DEFAULT_DIRECTORY_PERMISSIONS

CPACK_PACKAGING_INSTALL_PREFIX

CPACK_SET_DESTDIR

CPACK_WARN_ON_ABSOLUTE_INSTALL_DESTINATION

Variable Expansion Operators¶

CACHE

ENV

Internal Variables¶

CMake has many internal variables.  Most of them are undocumented.
Some of them, however, were at some point described as normal
variables, and therefore may be encountered in legacy code. They
are subject to change, and not recommended for use in project code.

CMAKE_HOME_DIRECTORY

CMAKE_INTERNAL_PLATFORM_ABI

CMAKE_<LANG>_COMPILER_ABI

CMAKE_<LANG>_COMPILER_ARCHITECTURE_ID

CMAKE_<LANG>_COMPILER_VERSION_INTERNAL

CMAKE_<LANG>_LINKER_PREFERENCE

CMAKE_<LANG>_LINKER_PREFERENCE_PROPAGATES

CMAKE_<LANG>_PLATFORM_ID

CMAKE_NOT_USING_CONFIG_FLAGS

CMAKE_VS_INTEL_Fortran_PROJECT_VERSION

Deprecated Variables that Provide Information¶

CMAKE_EXTRA_GENERATOR

Deprecated Variables that Change Behavior¶

CMAKE_AUTOMOC_RELAXED_MODE

CMAKE_BACKWARDS_COMPATIBILITY

CMAKE_FIND_PACKAGE_NO_PACKAGE_REGISTRY

CMAKE_FIND_PACKAGE_NO_SYSTEM_PACKAGE_REGISTRY

Deprecated Variables that Describe the System¶

MSVC10

MSVC11

MSVC12

MSVC14

MSVC60

MSVC70

MSVC71

MSVC80

MSVC90

Deprecated Variables that Control the Build¶

CMAKE_IOS_INSTALL_COMBINED

CMAKE_USE_RELATIVE_PATHS

Deprecated Variables for Languages¶

CMAKE_COMPILER_IS_GNUCC

CMAKE_COMPILER_IS_GNUCXX

CMAKE_COMPILER_IS_GNUG77

Deprecated Variables for CTest¶

CTEST_CVS_CHECKOUT

CTEST_SCP_COMMAND

CTEST_TRIGGER_SITE

Table of Contents

cmake-variables(7)

Variables that Provide Information

Variables that Change Behavior

Variables that Describe the System

Variables that Control the Build

Variables for Languages

Variables for CTest

Variables for CPack

Variable Expansion Operators

Internal Variables

Deprecated Variables that Provide Information

Deprecated Variables that Change Behavior

Deprecated Variables that Describe the System

Deprecated Variables that Control the Build

Deprecated Variables for Languages

Deprecated Variables for CTest

Previous topic

cmake-toolchains(7)

Next topic

CMAKE_AR

This Page

Show Source

Quick search

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

Navigation

          index

          next |

          previous |

    CMake »

    3.29.0-rc3 Documentation »

cmake-variables(7)

        © 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>cpack-generators(7) — 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="CPack Archive Generator" href="../cpack_gen/archive.html" />
    <link rel="prev" title="CTEST_TRIGGER_SITE" href="../variable/CTEST_TRIGGER_SITE.html" />

Navigation

          index

          next |

          previous |

    CMake »

    3.29.0-rc3 Documentation »

cpack-generators(7)

cpack-generators(7)¶

Contents

cpack-generators(7)

Generators

Generators¶

CPack Archive Generator

CPack Bundle Generator

CPack Cygwin Generator

CPack DEB Generator

CPack DragNDrop Generator

CPack External Generator

CPack FreeBSD Generator

CPack Inno Setup Generator

CPack IFW Generator

CPack NSIS Generator

CPack NuGet Generator

CPack PackageMaker Generator

CPack productbuild Generator

CPack RPM Generator

CPack WIX Generator

Table of Contents

cpack-generators(7)

Generators

Previous topic

CTEST_TRIGGER_SITE

Next topic

CPack Archive Generator

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 »

cpack-generators(7)

        © 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>AddFileDependencies — 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="CMakeDetermineVSServicePack" href="CMakeDetermineVSServicePack.html" />
    <link rel="prev" title="FindZLIB" href="FindZLIB.html" />

Navigation

          index

          next |

          previous |

    CMake »

    3.29.0-rc3 Documentation »

cmake-modules(7) »

AddFileDependencies

AddFileDependencies¶

Deprecated since version 3.20.

Add dependencies to a source file.

add_file_dependencies(<source> <files>...)

Adds the given <files> to the dependencies of file <source>.

Do not use this command in new code.  It is just a wrapper around:

set_property(SOURCE <source> APPEND PROPERTY OBJECT_DEPENDS <files>...)

Instead use the set_property() command to append to the
OBJECT_DEPENDS source file property directly.

Previous topic

FindZLIB

Next topic

CMakeDetermineVSServicePack

This Page

Show Source

Quick search

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

Navigation

          index

          next |

          previous |

    CMake »

    3.29.0-rc3 Documentation »

cmake-modules(7) »

AddFileDependencies

        © 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>AndroidTestUtilities — 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="BundleUtilities" href="BundleUtilities.html" />
    <link rel="prev" title="cmake-modules(7)" href="../manual/cmake-modules.7.html" />

Navigation

          index

          next |

          previous |

    CMake »

    3.29.0-rc3 Documentation »

cmake-modules(7) »

AndroidTestUtilities

AndroidTestUtilities¶

New in version 3.7.

Create a test that automatically loads specified data onto an Android device.

Introduction¶

Use this module to push data needed for testing an Android device behavior
onto a connected Android device. The module will accept files and libraries as
well as separate destinations for each. It will create a test that loads the
files into a device object store and link to them from the specified
destination. The files are only uploaded if they are not already in the object
store.

For example:

include(AndroidTestUtilities)
android_add_test_data(
  example_setup_test
  FILES <files>...
  LIBS <libs>...
  DEVICE_TEST_DIR "/data/local/tests/example"
  DEVICE_OBJECT_STORE "/sdcard/.ExternalData/SHA"
  )

At build time a test named "example_setup_test" will be created.  Run this test
on the command line with ctest(1) to load the data onto the Android
device.

Module Functions¶

android_add_test_data¶

android_add_test_data(<test-name>
  [FILES <files>...] [FILES_DEST <device-dir>]
  [LIBS <libs>...]   [LIBS_DEST <device-dir>]
  [DEVICE_OBJECT_STORE <device-dir>]
  [DEVICE_TEST_DIR <device-dir>]
  [NO_LINK_REGEX <strings>...]
  )

The android_add_test_data function is used to copy files and libraries
needed to run project-specific tests. On the host operating system, this is
done at build time. For on-device testing, the files are loaded onto the
device by the manufactured test at run time.

This function accepts the following named parameters:

FILES <files>...

zero or more files needed for testing

LIBS <libs>...

zero or more libraries needed for testing

FILES_DEST <device-dir>

absolute path where the data files are expected to be

LIBS_DEST <device-dir>

absolute path where the libraries are expected to be

DEVICE_OBJECT_STORE <device-dir>

absolute path to the location where the data is stored on-device

DEVICE_TEST_DIR <device-dir>

absolute path to the root directory of the on-device test location

NO_LINK_REGEX <strings>...

list of regex strings matching the names of files that should be
copied from the object store to the testing directory

Table of Contents

AndroidTestUtilities

Introduction

Module Functions

Previous topic

cmake-modules(7)

Next topic

BundleUtilities

This Page

Show Source

Quick search

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

Navigation

          index

          next |

          previous |

    CMake »

    3.29.0-rc3 Documentation »

cmake-modules(7) »

AndroidTestUtilities

        © 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>BundleUtilities — 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="CheckCCompilerFlag" href="CheckCCompilerFlag.html" />
    <link rel="prev" title="AndroidTestUtilities" href="AndroidTestUtilities.html" />

Navigation

          index

          next |

          previous |

    CMake »

    3.29.0-rc3 Documentation »

cmake-modules(7) »

BundleUtilities

BundleUtilities¶

Functions to help assemble a standalone bundle application.

A collection of CMake utility functions useful for dealing with .app
bundles on the Mac and bundle-like directories on any OS.

The following functions are provided by this module:

fixup_bundle
copy_and_fixup_bundle
verify_app
get_bundle_main_executable
get_dotapp_dir
get_bundle_and_executable
get_bundle_all_executables
get_item_key
get_item_rpaths
clear_bundle_keys
set_bundle_key_values
get_bundle_keys
copy_resolved_item_into_bundle
copy_resolved_framework_into_bundle
fixup_bundle_item
verify_bundle_prerequisites
verify_bundle_symlinks

Requires CMake 2.6 or greater because it uses function, break and
PARENT_SCOPE.  Also depends on GetPrerequisites.cmake.

DO NOT USE THESE FUNCTIONS AT CONFIGURE TIME (from CMakeLists.txt)!
Instead, invoke them from an install(CODE) or
install(SCRIPT) rule.

fixup_bundle(<app> <libs> <dirs>)

Fix up <app> bundle in-place and make it standalone, such that it can be
drag-n-drop copied to another machine and run on that machine as long
as all of the system libraries are compatible.

If you pass plugins to fixup_bundle as the libs parameter, you should
install them or copy them into the bundle before calling fixup_bundle.
The <libs> parameter is a list of libraries that must be fixed up, but
that cannot be determined by otool output analysis  (i.e. plugins).

Gather all the keys for all the executables and libraries in a bundle,
and then, for each key, copy each prerequisite into the bundle.  Then
fix each one up according to its own list of prerequisites.

Then clear all the keys and call verify_app on the final bundle to
ensure that it is truly standalone.

New in version 3.6: As an optional parameter (IGNORE_ITEM) a list of file names can be passed,
which are then ignored
(e.g. IGNORE_ITEM "vcredist_x86.exe;vcredist_x64.exe").

copy_and_fixup_bundle(<src> <dst> <libs> <dirs>)

Makes a copy of the bundle <src> at location <dst> and then fixes up
the new copied bundle in-place at <dst>.

verify_app(<app>)

Verifies that an application <app> appears valid based on running
analysis tools on it.  Calls message(FATAL_ERROR) if the application
is not verified.

New in version 3.6: As an optional parameter (IGNORE_ITEM) a list of file names can be passed,
which are then ignored
(e.g. IGNORE_ITEM "vcredist_x86.exe;vcredist_x64.exe")

get_bundle_main_executable(<bundle> <result_var>)

The result will be the full path name of the bundle's main executable
file or an error: prefixed string if it could not be determined.

get_dotapp_dir(<exe> <dotapp_dir_var>)

Returns the nearest parent dir whose name ends with .app given the
full path to an executable.  If there is no such parent dir, then
simply return the dir containing the executable.

The returned directory may or may not exist.

get_bundle_and_executable(<app> <bundle_var> <executable_var> <valid_var>)

Takes either a .app directory name or the name of an executable
nested inside a .app directory and returns the path to the .app
directory in <bundle_var> and the path to its main executable in
<executable_var>.

get_bundle_all_executables(<bundle> <exes_var>)

Scans <bundle> bundle recursively for all <exes_var> executable
files and accumulates them into a variable.

get_item_key(<item> <key_var>)

Given <item> file name, generate <key_var> key that should be unique
considering the set of libraries that need copying or fixing up to
make a bundle standalone.  This is essentially the file name including
extension with . replaced by _

This key is used as a prefix for CMake variables so that we can
associate a set of variables with a given item based on its key.

clear_bundle_keys(<keys_var>)

Loop over the <keys_var> list of keys, clearing all the variables
associated with each key.  After the loop, clear the list of keys itself.

Caller of get_bundle_keys should call clear_bundle_keys when done with
list of keys.

set_bundle_key_values(<keys_var> <context> <item> <exepath> <dirs>
                      <copyflag> [<rpaths>])

Add <keys_var> key to the list (if necessary) for the given item.
If added, also set all the variables associated with that key.

get_bundle_keys(<app> <libs> <dirs> <keys_var>)

Loop over all the executable and library files within <app> bundle (and
given as extra <libs>) and accumulate a list of keys representing
them.  Set values associated with each key such that we can loop over
all of them and copy prerequisite libs into the bundle and then do
appropriate install_name_tool fixups.

New in version 3.6: As an optional parameter (IGNORE_ITEM) a list of file names can be passed,
which are then ignored
(e.g. IGNORE_ITEM "vcredist_x86.exe;vcredist_x64.exe")

copy_resolved_item_into_bundle(<resolved_item> <resolved_embedded_item>)

Copy a resolved item into the bundle if necessary.
Copy is not necessary, if the <resolved_item> is "the same as" the
<resolved_embedded_item>.

copy_resolved_framework_into_bundle(<resolved_item> <resolved_embedded_item>)

Copy a resolved framework into the bundle if necessary.
Copy is not necessary, if the <resolved_item> is "the same as" the
<resolved_embedded_item>.

By default, BU_COPY_FULL_FRAMEWORK_CONTENTS is not set.  If you want
full frameworks embedded in your bundles, set
BU_COPY_FULL_FRAMEWORK_CONTENTS to ON before calling fixup_bundle.  By
default, COPY_RESOLVED_FRAMEWORK_INTO_BUNDLE copies the framework
dylib itself plus the framework Resources directory.

fixup_bundle_item(<resolved_embedded_item> <exepath> <dirs>)

Get the direct/non-system prerequisites of the <resolved_embedded_item>.
For each prerequisite, change the way it is referenced to the value of
the _EMBEDDED_ITEM keyed variable for that prerequisite.  (Most likely
changing to an @executable_path style reference.)

This function requires that the <resolved_embedded_item> be inside
the bundle already.  In other words, if you pass plugins to fixup_bundle
as the libs parameter, you should install them or copy them into the
bundle before calling fixup_bundle.  The libs parameter is a list of
libraries that must be fixed up, but that cannot be determined by
otool output analysis.  (i.e., plugins)

Also, change the id of the item being fixed up to its own
_EMBEDDED_ITEM value.

Accumulate changes in a local variable and make one call to
install_name_tool at the end of the function with all the changes at
once.

If the BU_CHMOD_BUNDLE_ITEMS variable is set then bundle items will be
marked writable before install_name_tool tries to change them.

verify_bundle_prerequisites(<bundle> <result_var> <info_var>)

Verifies that the sum of all prerequisites of all files inside the
bundle are contained within the bundle or are system libraries,
presumed to exist everywhere.

New in version 3.6: As an optional parameter (IGNORE_ITEM) a list of file names can be passed,
which are then ignored
(e.g. IGNORE_ITEM "vcredist_x86.exe;vcredist_x64.exe")

verify_bundle_symlinks(<bundle> <result_var> <info_var>)

Verifies that any symlinks found in the <bundle> bundle point to other files
that are already also in the bundle...  Anything that points to an
external file causes this function to fail the verification.

Previous topic

AndroidTestUtilities

Next topic

CheckCCompilerFlag

This Page

Show Source

Quick search

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

Navigation

          index

          next |

          previous |

    CMake »

    3.29.0-rc3 Documentation »

cmake-modules(7) »

BundleUtilities

        © 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>CMakeAddFortranSubdirectory — 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="CMakeBackwardCompatibilityCXX" href="CMakeBackwardCompatibilityCXX.html" />
    <link rel="prev" title="CheckVariableExists" href="CheckVariableExists.html" />

Navigation

          index

          next |

          previous |

    CMake »

    3.29.0-rc3 Documentation »

cmake-modules(7) »

CMakeAddFortranSubdirectory

CMakeAddFortranSubdirectory¶

Add a fortran-only subdirectory, find a fortran compiler, and build.

The cmake_add_fortran_subdirectory function adds a subdirectory
to a project that contains a fortran-only subproject.  The module will
check the current compiler and see if it can support fortran.  If no
fortran compiler is found and the compiler is MSVC, then this module
will find the MinGW gfortran.  It will then use an external project to
build with the MinGW tools.  It will also create imported targets for
the libraries created.  This will only work if the fortran code is
built into a dll, so BUILD_SHARED_LIBS is turned on in
the project.  In addition the CMAKE_GNUtoMS option is set
to on, so that Microsoft .lib files are created.  Usage is as follows:

cmake_add_fortran_subdirectory(
 <subdir>                # name of subdirectory
 PROJECT <project_name>  # project name in subdir top CMakeLists.txt
 ARCHIVE_DIR <dir>       # dir where project places .lib files
 RUNTIME_DIR <dir>       # dir where project places .dll files
 LIBRARIES <lib>...      # names of library targets to import
 LINK_LIBRARIES          # link interface libraries for LIBRARIES
  [LINK_LIBS <lib> <dep>...]...
 CMAKE_COMMAND_LINE ...  # extra command line flags to pass to cmake
 NO_EXTERNAL_INSTALL     # skip installation of external project
 )

Relative paths in ARCHIVE_DIR and RUNTIME_DIR are interpreted with
respect to the build directory corresponding to the source directory
in which the function is invoked.

Limitations:

NO_EXTERNAL_INSTALL is required for forward compatibility with a
future version that supports installation of the external project
binaries during make install.

Previous topic

CheckVariableExists

Next topic

CMakeBackwardCompatibilityCXX

This Page

Show Source

Quick search

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

Navigation

          index

          next |

          previous |

    CMake »

    3.29.0-rc3 Documentation »

cmake-modules(7) »

CMakeAddFortranSubdirectory

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