.\" Man page generated from reStructuredText. . .TH "CMAKE-PROPERTIES" "7" "January 15, 2017" "3.7.2" "CMake" .SH NAME cmake-properties \- CMake Properties Reference . .nr rst2man-indent-level 0 . .de1 rstReportMargin \\$1 \\n[an-margin] level \\n[rst2man-indent-level] level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] - \\n[rst2man-indent0] \\n[rst2man-indent1] \\n[rst2man-indent2] .. .de1 INDENT .\" .rstReportMargin pre: . RS \\$1 . nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin] . nr rst2man-indent-level +1 .\" .rstReportMargin post: .. .de UNINDENT . RE .\" indent \\n[an-margin] .\" old: \\n[rst2man-indent\\n[rst2man-indent-level]] .nr rst2man-indent-level -1 .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] .in \\n[rst2man-indent\\n[rst2man-indent-level]]u .. .SH PROPERTIES OF GLOBAL SCOPE .SS ALLOW_DUPLICATE_CUSTOM_TARGETS .sp Allow duplicate custom targets to be created. .sp Normally CMake requires that all targets built in a project have globally unique logical names (see policy CMP0002). This is necessary to generate meaningful project file names in Xcode and VS IDE generators. It also allows the target names to be referenced unambiguously. .sp Makefile generators are capable of supporting duplicate custom target names. For projects that care only about Makefile generators and do not wish to support Xcode or VS IDE generators, one may set this property to true to allow duplicate custom targets. The property allows multiple add_custom_target command calls in different directories to specify the same target name. However, setting this property will cause non\-Makefile generators to produce an error and refuse to generate the project. .SS AUTOGEN_TARGETS_FOLDER .sp Name of \fBFOLDER\fP for \fB*_automoc\fP targets that are added automatically by CMake for targets for which \fBAUTOMOC\fP is enabled. .sp If not set, CMake uses the \fBFOLDER\fP property of the parent target as a default value for this property. See also the documentation for the \fBFOLDER\fP target property and the \fBAUTOMOC\fP target property. .SS AUTOMOC_TARGETS_FOLDER .sp Name of \fBFOLDER\fP for \fB*_automoc\fP targets that are added automatically by CMake for targets for which \fBAUTOMOC\fP is enabled. .sp This property is obsolete. Use \fBAUTOGEN_TARGETS_FOLDER\fP instead. .sp If not set, CMake uses the \fBFOLDER\fP property of the parent target as a default value for this property. See also the documentation for the \fBFOLDER\fP target property and the \fBAUTOMOC\fP target property. .SS CMAKE_C_KNOWN_FEATURES .sp List of C features known to this version of CMake. .sp The features listed in this global property may be known to be available to the C compiler. If the feature is available with the C compiler, it will be listed in the \fBCMAKE_C_COMPILE_FEATURES\fP variable. .sp The features listed here may be used with the \fBtarget_compile_features()\fP command. See the \fBcmake\-compile\-features(7)\fP manual for information on compile features and a list of supported compilers. .sp The features known to this version of CMake are: .INDENT 0.0 .TP .B \fBc_function_prototypes\fP Function prototypes, as defined in \fBISO/IEC 9899:1990\fP\&. .TP .B \fBc_restrict\fP \fBrestrict\fP keyword, as defined in \fBISO/IEC 9899:1999\fP\&. .TP .B \fBc_static_assert\fP Static assert, as defined in \fBISO/IEC 9899:2011\fP\&. .TP .B \fBc_variadic_macros\fP Variadic macros, as defined in \fBISO/IEC 9899:1999\fP\&. .UNINDENT .SS CMAKE_CXX_KNOWN_FEATURES .sp List of C++ features known to this version of CMake. .sp The features listed in this global property may be known to be available to the C++ compiler. If the feature is available with the C++ compiler, it will be listed in the \fBCMAKE_CXX_COMPILE_FEATURES\fP variable. .sp The features listed here may be used with the \fBtarget_compile_features()\fP command. See the \fBcmake\-compile\-features(7)\fP manual for information on compile features and a list of supported compilers. .sp The features known to this version of CMake are: .INDENT 0.0 .TP .B \fBcxx_aggregate_default_initializers\fP Aggregate default initializers, as defined in \fI\%N3605\fP\&. .TP .B \fBcxx_alias_templates\fP Template aliases, as defined in \fI\%N2258\fP\&. .TP .B \fBcxx_alignas\fP Alignment control \fBalignas\fP, as defined in \fI\%N2341\fP\&. .TP .B \fBcxx_alignof\fP Alignment control \fBalignof\fP, as defined in \fI\%N2341\fP\&. .TP .B \fBcxx_attributes\fP Generic attributes, as defined in \fI\%N2761\fP\&. .TP .B \fBcxx_attribute_deprecated\fP \fB[[deprecated]]\fP attribute, as defined in \fI\%N3760\fP\&. .TP .B \fBcxx_auto_type\fP Automatic type deduction, as defined in \fI\%N1984\fP\&. .TP .B \fBcxx_binary_literals\fP Binary literals, as defined in \fI\%N3472\fP\&. .TP .B \fBcxx_constexpr\fP Constant expressions, as defined in \fI\%N2235\fP\&. .TP .B \fBcxx_contextual_conversions\fP Contextual conversions, as defined in \fI\%N3323\fP\&. .TP .B \fBcxx_decltype_incomplete_return_types\fP Decltype on incomplete return types, as defined in \fI\%N3276\fP\&. .TP .B \fBcxx_decltype\fP Decltype, as defined in \fI\%N2343\fP\&. .TP .B \fBcxx_decltype_auto\fP \fBdecltype(auto)\fP semantics, as defined in \fI\%N3638\fP\&. .TP .B \fBcxx_default_function_template_args\fP Default template arguments for function templates, as defined in \fI\%DR226\fP .TP .B \fBcxx_defaulted_functions\fP Defaulted functions, as defined in \fI\%N2346\fP\&. .TP .B \fBcxx_defaulted_move_initializers\fP Defaulted move initializers, as defined in \fI\%N3053\fP\&. .TP .B \fBcxx_delegating_constructors\fP Delegating constructors, as defined in \fI\%N1986\fP\&. .TP .B \fBcxx_deleted_functions\fP Deleted functions, as defined in \fI\%N2346\fP\&. .TP .B \fBcxx_digit_separators\fP Digit separators, as defined in \fI\%N3781\fP\&. .TP .B \fBcxx_enum_forward_declarations\fP Enum forward declarations, as defined in \fI\%N2764\fP\&. .TP .B \fBcxx_explicit_conversions\fP Explicit conversion operators, as defined in \fI\%N2437\fP\&. .TP .B \fBcxx_extended_friend_declarations\fP Extended friend declarations, as defined in \fI\%N1791\fP\&. .TP .B \fBcxx_extern_templates\fP Extern templates, as defined in \fI\%N1987\fP\&. .TP .B \fBcxx_final\fP Override control \fBfinal\fP keyword, as defined in \fI\%N2928\fP, \fI\%N3206\fP and \fI\%N3272\fP\&. .TP .B \fBcxx_func_identifier\fP Predefined \fB__func__\fP identifier, as defined in \fI\%N2340\fP\&. .TP .B \fBcxx_generalized_initializers\fP Initializer lists, as defined in \fI\%N2672\fP\&. .TP .B \fBcxx_generic_lambdas\fP Generic lambdas, as defined in \fI\%N3649\fP\&. .TP .B \fBcxx_inheriting_constructors\fP Inheriting constructors, as defined in \fI\%N2540\fP\&. .TP .B \fBcxx_inline_namespaces\fP Inline namespaces, as defined in \fI\%N2535\fP\&. .TP .B \fBcxx_lambdas\fP Lambda functions, as defined in \fI\%N2927\fP\&. .TP .B \fBcxx_lambda_init_captures\fP Initialized lambda captures, as defined in \fI\%N3648\fP\&. .TP .B \fBcxx_local_type_template_args\fP Local and unnamed types as template arguments, as defined in \fI\%N2657\fP\&. .TP .B \fBcxx_long_long_type\fP \fBlong long\fP type, as defined in \fI\%N1811\fP\&. .TP .B \fBcxx_noexcept\fP Exception specifications, as defined in \fI\%N3050\fP\&. .TP .B \fBcxx_nonstatic_member_init\fP Non\-static data member initialization, as defined in \fI\%N2756\fP\&. .TP .B \fBcxx_nullptr\fP Null pointer, as defined in \fI\%N2431\fP\&. .TP .B \fBcxx_override\fP Override control \fBoverride\fP keyword, as defined in \fI\%N2928\fP, \fI\%N3206\fP and \fI\%N3272\fP\&. .TP .B \fBcxx_range_for\fP Range\-based for, as defined in \fI\%N2930\fP\&. .TP .B \fBcxx_raw_string_literals\fP Raw string literals, as defined in \fI\%N2442\fP\&. .TP .B \fBcxx_reference_qualified_functions\fP Reference qualified functions, as defined in \fI\%N2439\fP\&. .TP .B \fBcxx_relaxed_constexpr\fP Relaxed constexpr, as defined in \fI\%N3652\fP\&. .TP .B \fBcxx_return_type_deduction\fP Return type deduction on normal functions, as defined in \fI\%N3386\fP\&. .TP .B \fBcxx_right_angle_brackets\fP Right angle bracket parsing, as defined in \fI\%N1757\fP\&. .TP .B \fBcxx_rvalue_references\fP R\-value references, as defined in \fI\%N2118\fP\&. .TP .B \fBcxx_sizeof_member\fP Size of non\-static data members, as defined in \fI\%N2253\fP\&. .TP .B \fBcxx_static_assert\fP Static assert, as defined in \fI\%N1720\fP\&. .TP .B \fBcxx_strong_enums\fP Strongly typed enums, as defined in \fI\%N2347\fP\&. .TP .B \fBcxx_thread_local\fP Thread\-local variables, as defined in \fI\%N2659\fP\&. .TP .B \fBcxx_trailing_return_types\fP Automatic function return type, as defined in \fI\%N2541\fP\&. .TP .B \fBcxx_unicode_literals\fP Unicode string literals, as defined in \fI\%N2442\fP\&. .TP .B \fBcxx_uniform_initialization\fP Uniform initialization, as defined in \fI\%N2640\fP\&. .TP .B \fBcxx_unrestricted_unions\fP Unrestricted unions, as defined in \fI\%N2544\fP\&. .TP .B \fBcxx_user_literals\fP User\-defined literals, as defined in \fI\%N2765\fP\&. .TP .B \fBcxx_variable_templates\fP Variable templates, as defined in \fI\%N3651\fP\&. .TP .B \fBcxx_variadic_macros\fP Variadic macros, as defined in \fI\%N1653\fP\&. .TP .B \fBcxx_variadic_templates\fP Variadic templates, as defined in \fI\%N2242\fP\&. .TP .B \fBcxx_template_template_parameters\fP Template template parameters, as defined in \fBISO/IEC 14882:1998\fP\&. .UNINDENT .SS DEBUG_CONFIGURATIONS .sp Specify which configurations are for debugging. .sp The value must be a semi\-colon separated list of configuration names. Currently this property is used only by the target_link_libraries command (see its documentation for details). Additional uses may be defined in the future. .sp This property must be set at the top level of the project and before the first target_link_libraries command invocation. If any entry in the list does not match a valid configuration for the project the behavior is undefined. .SS DISABLED_FEATURES .sp List of features which are disabled during the CMake run. .sp List of features which are disabled during the CMake run. By default it contains the names of all packages which were not found. This is determined using the _FOUND variables. Packages which are searched QUIET are not listed. A project can add its own features to this list. This property is used by the macros in FeatureSummary.cmake. .SS ENABLED_FEATURES .sp List of features which are enabled during the CMake run. .sp List of features which are enabled during the CMake run. By default it contains the names of all packages which were found. This is determined using the _FOUND variables. Packages which are searched QUIET are not listed. A project can add its own features to this list. This property is used by the macros in FeatureSummary.cmake. .SS ENABLED_LANGUAGES .sp Read\-only property that contains the list of currently enabled languages .sp Set to list of currently enabled languages. .SS FIND_LIBRARY_USE_LIB32_PATHS .sp Whether the \fBfind_library()\fP command should automatically search \fBlib32\fP directories. .sp \fBFIND_LIBRARY_USE_LIB32_PATHS\fP is a boolean specifying whether the \fBfind_library()\fP command should automatically search the \fBlib32\fP variant of directories called \fBlib\fP in the search path when building 32\-bit binaries. .SS FIND_LIBRARY_USE_LIB64_PATHS .sp Whether \fBfind_library()\fP should automatically search lib64 directories. .sp FIND_LIBRARY_USE_LIB64_PATHS is a boolean specifying whether the \fBfind_library()\fP command should automatically search the lib64 variant of directories called lib in the search path when building 64\-bit binaries. .SS FIND_LIBRARY_USE_OPENBSD_VERSIONING .sp Whether \fBfind_library()\fP should find OpenBSD\-style shared libraries. .sp This property is a boolean specifying whether the \fBfind_library()\fP command should find shared libraries with OpenBSD\-style versioned extension: ".so..". The property is set to true on OpenBSD and false on other platforms. .SS GLOBAL_DEPENDS_DEBUG_MODE .sp Enable global target dependency graph debug mode. .sp CMake automatically analyzes the global inter\-target dependency graph at the beginning of native build system generation. This property causes it to display details of its analysis to stderr. .SS GLOBAL_DEPENDS_NO_CYCLES .sp Disallow global target dependency graph cycles. .sp CMake automatically analyzes the global inter\-target dependency graph at the beginning of native build system generation. It reports an error if the dependency graph contains a cycle that does not consist of all STATIC library targets. This property tells CMake to disallow all cycles completely, even among static libraries. .SS IN_TRY_COMPILE .sp Read\-only property that is true during a try\-compile configuration. .sp True when building a project inside a \fBtry_compile()\fP or \fBtry_run()\fP command. .SS PACKAGES_FOUND .sp List of packages which were found during the CMake run. .sp List of packages which were found during the CMake run. Whether a package has been found is determined using the _FOUND variables. .SS PACKAGES_NOT_FOUND .sp List of packages which were not found during the CMake run. .sp List of packages which were not found during the CMake run. Whether a package has been found is determined using the _FOUND variables. .SS JOB_POOLS .sp Ninja only: List of available pools. .sp A pool is a named integer property and defines the maximum number of concurrent jobs which can be started by a rule assigned to the pool. The \fI\%JOB_POOLS\fP property is a semicolon\-separated list of pairs using the syntax NAME=integer (without a space after the equality sign). .sp For instance: .INDENT 0.0 .INDENT 3.5 .sp .nf .ft C set_property(GLOBAL PROPERTY JOB_POOLS two_jobs=2 ten_jobs=10) .ft P .fi .UNINDENT .UNINDENT .sp Defined pools could be used globally by setting \fBCMAKE_JOB_POOL_COMPILE\fP and \fBCMAKE_JOB_POOL_LINK\fP or per target by setting the target properties \fBJOB_POOL_COMPILE\fP and \fBJOB_POOL_LINK\fP\&. .sp Build targets provided by CMake that are meant for individual interactive use, such as \fBinstall\fP, are placed in the \fBconsole\fP pool automatically. .SS PREDEFINED_TARGETS_FOLDER .sp Name of FOLDER for targets that are added automatically by CMake. .sp If not set, CMake uses "CMakePredefinedTargets" as a default value for this property. Targets such as INSTALL, PACKAGE and RUN_TESTS will be organized into this FOLDER. See also the documentation for the \fBFOLDER\fP target property. .SS ECLIPSE_EXTRA_NATURES .sp List of natures to add to the generated Eclipse project file. .sp Eclipse projects specify language plugins by using natures. This property should be set to the unique identifier for a nature (which looks like a Java package name). .SS REPORT_UNDEFINED_PROPERTIES .sp If set, report any undefined properties to this file. .sp If this property is set to a filename then when CMake runs it will report any properties or variables that were accessed but not defined into the filename specified in this property. .SS RULE_LAUNCH_COMPILE .sp Specify a launcher for compile rules. .sp Makefile Generators and the \fBNinja\fP generator prefix compiler commands with the given launcher command line. This is intended to allow launchers to intercept build problems with high granularity. Other generators ignore this property because their underlying build systems provide no hook to wrap individual commands with a launcher. .SS RULE_LAUNCH_CUSTOM .sp Specify a launcher for custom rules. .sp Makefile Generators and the \fBNinja\fP generator prefix custom commands with the given launcher command line. This is intended to allow launchers to intercept build problems with high granularity. Other generators ignore this property because their underlying build systems provide no hook to wrap individual commands with a launcher. .SS RULE_LAUNCH_LINK .sp Specify a launcher for link rules. .sp Makefile Generators and the \fBNinja\fP generator prefix link and archive commands with the given launcher command line. This is intended to allow launchers to intercept build problems with high granularity. Other generators ignore this property because their underlying build systems provide no hook to wrap individual commands with a launcher. .SS RULE_MESSAGES .sp Specify whether to report a message for each make rule. .sp This property specifies whether Makefile generators should add a progress message describing what each build rule does. If the property is not set the default is ON. Set the property to OFF to disable granular messages and report only as each target completes. This is intended to allow scripted builds to avoid the build time cost of detailed reports. If a \fBCMAKE_RULE_MESSAGES\fP cache entry exists its value initializes the value of this property. Non\-Makefile generators currently ignore this property. .SS TARGET_ARCHIVES_MAY_BE_SHARED_LIBS .sp Set if shared libraries may be named like archives. .sp On AIX shared libraries may be named "lib.a". This property is set to true on such platforms. .SS TARGET_MESSAGES .sp Specify whether to report the completion of each target. .sp This property specifies whether Makefile Generators should add a progress message describing that each target has been completed. If the property is not set the default is \fBON\fP\&. Set the property to \fBOFF\fP to disable target completion messages. .sp This option is intended to reduce build output when little or no work needs to be done to bring the build tree up to date. .sp If a \fBCMAKE_TARGET_MESSAGES\fP cache entry exists its value initializes the value of this property. .sp Non\-Makefile generators currently ignore this property. .sp See the counterpart property \fBRULE_MESSAGES\fP to disable everything except for target completion messages. .SS TARGET_SUPPORTS_SHARED_LIBS .sp Does the target platform support shared libraries. .sp TARGET_SUPPORTS_SHARED_LIBS is a boolean specifying whether the target platform supports shared libraries. Basically all current general general purpose OS do so, the exception are usually embedded systems with no or special OSs. .SS USE_FOLDERS .sp Use the \fBFOLDER\fP target property to organize targets into folders. .sp If not set, CMake treats this property as OFF by default. CMake generators that are capable of organizing into a hierarchy of folders use the values of the \fBFOLDER\fP target property to name those folders. See also the documentation for the FOLDER target property. .SH PROPERTIES ON DIRECTORIES .SS ADDITIONAL_MAKE_CLEAN_FILES .sp Additional files to clean during the make clean stage. .sp A list of files that will be cleaned as a part of the "make clean" stage. .SS BINARY_DIR .sp This read\-only directory property reports absolute path to the binary directory corresponding to the source on which it is read. .SS BUILDSYSTEM_TARGETS .sp This read\-only directory property contains a ;\-list of buildsystem targets added in the directory by calls to the \fBadd_library()\fP, \fBadd_executable()\fP, and \fBadd_custom_target()\fP commands. The list does not include any Imported Targets or Alias Targets, but does include Interface Libraries\&. Each entry in the list is the logical name of a target, suitable to pass to the \fBget_property()\fP command \fBTARGET\fP option. .SS CACHE_VARIABLES .sp List of cache variables available in the current directory. .sp This read\-only property specifies the list of CMake cache variables currently defined. It is intended for debugging purposes. .SS CLEAN_NO_CUSTOM .sp Set to true to tell Makefile Generators not to remove the outputs of custom commands for this directory during the \fBmake clean\fP operation. This is ignored on other generators because it is not possible to implement. .SS CMAKE_CONFIGURE_DEPENDS .sp Tell CMake about additional input files to the configuration process. If any named file is modified the build system will re\-run CMake to re\-configure the file and generate the build system again. .sp Specify files as a semicolon\-separated list of paths. Relative paths are interpreted as relative to the current source directory. .SS COMPILE_DEFINITIONS .sp Preprocessor definitions for compiling a directory\(aqs sources. .sp This property specifies the list of options given so far to the \fBadd_definitions()\fP command. .sp The \fBCOMPILE_DEFINITIONS\fP property may be set to a semicolon\-separated list of preprocessor definitions using the syntax \fBVAR\fP or \fBVAR=value\fP\&. Function\-style definitions are not supported. CMake will automatically escape the value correctly for the native build system (note that CMake language syntax may require escapes to specify some values). .sp This property will be initialized in each directory by its value in the directory\(aqs parent. .sp CMake will automatically drop some definitions that are not supported by the native build tool. .sp Disclaimer: Most native build tools have poor support for escaping certain values. CMake has work\-arounds for many cases but some values may just not be possible to pass correctly. If a value does not seem to be escaped correctly, do not attempt to work\-around the problem by adding escape sequences to the value. Your work\-around may break in a future version of CMake that has improved escape support. Instead consider defining the macro in a (configured) header file. Then report the limitation. Known limitations include: .INDENT 0.0 .INDENT 3.5 .sp .nf .ft C # \- broken almost everywhere ; \- broken in VS IDE 7.0 and Borland Makefiles , \- broken in VS IDE % \- broken in some cases in NMake & | \- broken in some cases on MinGW ^ < > \e" \- broken in most Make tools on Windows .ft P .fi .UNINDENT .UNINDENT .sp CMake does not reject these values outright because they do work in some cases. Use with caution. .sp Contents of \fBCOMPILE_DEFINITIONS\fP may use "generator expressions" with the syntax \fB$<...>\fP\&. See the \fBcmake\-generator\-expressions(7)\fP manual for available expressions. See the \fBcmake\-buildsystem(7)\fP manual for more on defining buildsystem properties. .sp The corresponding \fBCOMPILE_DEFINITIONS_\fP property may be set to specify per\-configuration definitions. Generator expressions should be preferred instead of setting the alternative property. .SS COMPILE_OPTIONS .sp List of options to pass to the compiler. .sp This property holds a ;\-list of options given so far to the \fBadd_compile_options()\fP command. .sp This property is used to initialize the \fBCOMPILE_OPTIONS\fP target property when a target is created, which is used by the generators to set the options for the compiler. .sp Contents of \fBCOMPILE_OPTIONS\fP may use "generator expressions" with the syntax \fB$<...>\fP\&. See the \fBcmake\-generator\-expressions(7)\fP manual for available expressions. See the \fBcmake\-buildsystem(7)\fP manual for more on defining buildsystem properties. .SS DEFINITIONS .sp For CMake 2.4 compatibility only. Use \fBCOMPILE_DEFINITIONS\fP instead. .sp This read\-only property specifies the list of flags given so far to the \fBadd_definitions()\fP command. It is intended for debugging purposes. Use the \fBCOMPILE_DEFINITIONS\fP directory property instead. .sp This built\-in read\-only property does not exist if policy \fBCMP0059\fP is set to \fBNEW\fP\&. .SS EXCLUDE_FROM_ALL .sp Exclude the directory from the all target of its parent. .sp A property on a directory that indicates if its targets are excluded from the default build target. If it is not, then with a Makefile for example typing make will cause the targets to be built. The same concept applies to the default build of other generators. .SS IMPLICIT_DEPENDS_INCLUDE_TRANSFORM .sp Specify #include line transforms for dependencies in a directory. .sp This property specifies rules to transform macro\-like #include lines during implicit dependency scanning of C and C++ source files. The list of rules must be semicolon\-separated with each entry of the form "A_MACRO(%)=value\-with\-%" (the % must be literal). During dependency scanning occurrences of A_MACRO(...) on #include lines will be replaced by the value given with the macro argument substituted for \(aq%\(aq. For example, the entry .INDENT 0.0 .INDENT 3.5 .sp .nf .ft C MYDIR(%)= .ft P .fi .UNINDENT .UNINDENT .sp will convert lines of the form .INDENT 0.0 .INDENT 3.5 .sp .nf .ft C #include MYDIR(myheader.h) .ft P .fi .UNINDENT .UNINDENT .sp to .INDENT 0.0 .INDENT 3.5 .sp .nf .ft C #include .ft P .fi .UNINDENT .UNINDENT .sp allowing the dependency to be followed. .sp This property applies to sources in all targets within a directory. The property value is initialized in each directory by its value in the directory\(aqs parent. .SS INCLUDE_DIRECTORIES .sp List of preprocessor include file search directories. .sp This property specifies the list of directories given so far to the \fBinclude_directories()\fP command. .sp This property is used to populate the \fBINCLUDE_DIRECTORIES\fP target property, which is used by the generators to set the include directories for the compiler. .sp In addition to accepting values from that command, values may be set directly on any directory using the \fBset_property()\fP command. A directory gets its initial value from its parent directory if it has one. The initial value of the \fBINCLUDE_DIRECTORIES\fP target property comes from the value of this property. Both directory and target property values are adjusted by calls to the \fBinclude_directories()\fP command. .sp The target property values are used by the generators to set the include paths for the compiler. .sp Contents of \fBINCLUDE_DIRECTORIES\fP may use "generator expressions" with the syntax \fB$<...>\fP\&. See the \fBcmake\-generator\-expressions(7)\fP manual for available expressions. See the \fBcmake\-buildsystem(7)\fP manual for more on defining buildsystem properties. .SS INCLUDE_REGULAR_EXPRESSION .sp Include file scanning regular expression. .sp This property specifies the regular expression used during dependency scanning to match include files that should be followed. See the \fBinclude_regular_expression()\fP command for a high\-level interface to set this property. .SS INTERPROCEDURAL_OPTIMIZATION_ .sp Per\-configuration interprocedural optimization for a directory. .sp This is a per\-configuration version of INTERPROCEDURAL_OPTIMIZATION. If set, this property overrides the generic property for the named configuration. .SS INTERPROCEDURAL_OPTIMIZATION .sp Enable interprocedural optimization for targets in a directory. .sp If set to true, enables interprocedural optimizations if they are known to be supported by the compiler. .SS LINK_DIRECTORIES .sp List of linker search directories. .sp This read\-only property specifies the list of directories given so far to the link_directories command. It is intended for debugging purposes. .SS LISTFILE_STACK .sp The current stack of listfiles being processed. .sp This property is mainly useful when trying to debug errors in your CMake scripts. It returns a list of what list files are currently being processed, in order. So if one listfile does an \fBinclude()\fP command then that is effectively pushing the included listfile onto the stack. .SS MACROS .sp List of macro commands available in the current directory. .sp This read\-only property specifies the list of CMake macros currently defined. It is intended for debugging purposes. See the macro command. .SS PARENT_DIRECTORY .sp Source directory that added current subdirectory. .sp This read\-only property specifies the source directory that added the current source directory as a subdirectory of the build. In the top\-level directory the value is the empty\-string. .SS RULE_LAUNCH_COMPILE .sp Specify a launcher for compile rules. .sp See the global property of the same name for details. This overrides the global property for a directory. .SS RULE_LAUNCH_CUSTOM .sp Specify a launcher for custom rules. .sp See the global property of the same name for details. This overrides the global property for a directory. .SS RULE_LAUNCH_LINK .sp Specify a launcher for link rules. .sp See the global property of the same name for details. This overrides the global property for a directory. .SS SOURCE_DIR .sp This read\-only directory property reports absolute path to the source directory on which it is read. .SS SUBDIRECTORIES .sp This read\-only directory property contains a ;\-list of subdirectories processed so far by the \fBadd_subdirectory()\fP or \fBsubdirs()\fP commands. Each entry is the absolute path to the source directory (containing the \fBCMakeLists.txt\fP file). This is suitable to pass to the \fBget_property()\fP command \fBDIRECTORY\fP option. .sp \fBNOTE:\fP .INDENT 0.0 .INDENT 3.5 The \fBsubdirs()\fP command does not process its arguments until after the calling directory is fully processed. Therefore looking up this property in the current directory will not see them. .UNINDENT .UNINDENT .SS TEST_INCLUDE_FILE .sp A cmake file that will be included when ctest is run. .sp If you specify TEST_INCLUDE_FILE, that file will be included and processed when ctest is run on the directory. .SS VARIABLES .sp List of variables defined in the current directory. .sp This read\-only property specifies the list of CMake variables currently defined. It is intended for debugging purposes. .SS VS_GLOBAL_SECTION_POST_
.sp Specify a postSolution global section in Visual Studio. .sp Setting a property like this generates an entry of the following form in the solution file: .INDENT 0.0 .INDENT 3.5 .sp .nf .ft C GlobalSection(
) = postSolution EndGlobalSection .ft P .fi .UNINDENT .UNINDENT .sp The property must be set to a semicolon\-separated list of key=value pairs. Each such pair will be transformed into an entry in the solution global section. Whitespace around key and value is ignored. List elements which do not contain an equal sign are skipped. .sp This property only works for Visual Studio 7 and above; it is ignored on other generators. The property only applies when set on a directory whose CMakeLists.txt contains a project() command. .sp Note that CMake generates postSolution sections ExtensibilityGlobals and ExtensibilityAddIns by default. If you set the corresponding property, it will override the default section. For example, setting VS_GLOBAL_SECTION_POST_ExtensibilityGlobals will override the default contents of the ExtensibilityGlobals section, while keeping ExtensibilityAddIns on its default. .SS VS_GLOBAL_SECTION_PRE_
.sp Specify a preSolution global section in Visual Studio. .sp Setting a property like this generates an entry of the following form in the solution file: .INDENT 0.0 .INDENT 3.5 .sp .nf .ft C GlobalSection(
) = preSolution EndGlobalSection .ft P .fi .UNINDENT .UNINDENT .sp The property must be set to a semicolon\-separated list of key=value pairs. Each such pair will be transformed into an entry in the solution global section. Whitespace around key and value is ignored. List elements which do not contain an equal sign are skipped. .sp This property only works for Visual Studio 7 and above; it is ignored on other generators. The property only applies when set on a directory whose CMakeLists.txt contains a project() command. .SS VS_STARTUP_PROJECT .sp Specify the default startup project in a Visual Studio solution. .sp The Visual Studio Generators create a \fB\&.sln\fP file for each directory whose \fBCMakeLists.txt\fP file calls the \fBproject()\fP command. Set this property in the same directory as a \fBproject()\fP command call (e.g. in the top\-level \fBCMakeLists.txt\fP file) to specify the default startup project for the correpsonding solution file. .sp The property must be set to the name of an existing target. This will cause that project to be listed first in the generated solution file causing Visual Studio to make it the startup project if the solution has never been opened before. .sp If this property is not specified, then the \fBALL_BUILD\fP project will be the default. .SH PROPERTIES ON TARGETS .SS ALIASED_TARGET .sp Name of target aliased by this target. .sp If this is an Alias Target, this property contains the name of the target aliased. .SS ANDROID_ANT_ADDITIONAL_OPTIONS .sp Set the additional options for Android Ant build system. This is a string value containing all command line options for the Ant build. This property is initialized by the value of the \fBCMAKE_ANDROID_ANT_ADDITIONAL_OPTIONS\fP variable if it is set when a target is created. .SS ANDROID_API .sp When Cross Compiling for Android with NVIDIA Nsight Tegra Visual Studio Edition, this property sets the Android target API version (e.g. \fB15\fP). The version number must be a positive decimal integer. This property is initialized by the value of the \fBCMAKE_ANDROID_API\fP variable if it is set when a target is created. .SS ANDROID_API_MIN .sp Set the Android MIN API version (e.g. \fB9\fP). The version number must be a positive decimal integer. This property is initialized by the value of the \fBCMAKE_ANDROID_API_MIN\fP variable if it is set when a target is created. Native code builds using this API version. .SS ANDROID_ARCH .sp When Cross Compiling for Android with NVIDIA Nsight Tegra Visual Studio Edition, this property sets the Android target architecture. .sp This is a string property that could be set to the one of the following values: .INDENT 0.0 .IP \(bu 2 \fBarmv7\-a\fP: "ARMv7\-A (armv7\-a)" .IP \(bu 2 \fBarmv7\-a\-hard\fP: "ARMv7\-A, hard\-float ABI (armv7\-a)" .IP \(bu 2 \fBarm64\-v8a\fP: "ARMv8\-A, 64bit (arm64\-v8a)" .IP \(bu 2 \fBx86\fP: "x86 (x86)" .IP \(bu 2 \fBx86_64\fP: "x86_64 (x86_64)" .UNINDENT .sp This property is initialized by the value of the \fBCMAKE_ANDROID_ARCH\fP variable if it is set when a target is created. .SS ANDROID_ASSETS_DIRECTORIES .sp Set the Android assets directories to copy into the main assets folder before build. This a string property that contains the directory paths separated by semicolon. This property is initialized by the value of the \fBCMAKE_ANDROID_ASSETS_DIRECTORIES\fP variable if it is set when a target is created. .SS ANDROID_GUI .sp When Cross Compiling for Android with NVIDIA Nsight Tegra Visual Studio Edition, this property specifies whether to build an executable as an application package on Android. .sp When this property is set to true the executable when built for Android will be created as an application package. This property is initialized by the value of the \fBCMAKE_ANDROID_GUI\fP variable if it is set when a target is created. .sp Add the \fBAndroidManifest.xml\fP source file explicitly to the target \fBadd_executable()\fP command invocation to specify the root directory of the application package source. .SS ANDROID_JAR_DEPENDENCIES .sp Set the Android property that specifies JAR dependencies. This is a string value property. This property is initialized by the value of the \fBCMAKE_ANDROID_JAR_DEPENDENCIES\fP variable if it is set when a target is created. .SS ANDROID_JAR_DIRECTORIES .sp Set the Android property that specifies directories to search for the JAR libraries. .sp This a string property that contains the directory paths separated by semicolons. This property is initialized by the value of the \fBCMAKE_ANDROID_JAR_DIRECTORIES\fP variable if it is set when a target is created. .sp Contents of \fBANDROID_JAR_DIRECTORIES\fP may use "generator expressions" with the syntax \fB$<...>\fP\&. See the \fBcmake\-generator\-expressions(7)\fP manual for available expressions. .SS ANDROID_JAVA_SOURCE_DIR .sp Set the Android property that defines the Java source code root directories. This a string property that contains the directory paths separated by semicolon. This property is initialized by the value of the \fBCMAKE_ANDROID_JAVA_SOURCE_DIR\fP variable if it is set when a target is created. .SS ANDROID_NATIVE_LIB_DEPENDENCIES .sp Set the Android property that specifies the .so dependencies. This is a string property. .sp This property is initialized by the value of the \fBCMAKE_ANDROID_NATIVE_LIB_DEPENDENCIES\fP variable if it is set when a target is created. .sp Contents of \fBANDROID_NATIVE_LIB_DEPENDENCIES\fP may use "generator expressions" with the syntax \fB$<...>\fP\&. See the \fBcmake\-generator\-expressions(7)\fP manual for available expressions. .SS ANDROID_NATIVE_LIB_DIRECTORIES .sp Set the Android property that specifies directories to search for the .sp This a string property that contains the directory paths separated by semicolons. .sp This property is initialized by the value of the \fBCMAKE_ANDROID_NATIVE_LIB_DIRECTORIES\fP variable if it is set when a target is created. .sp Contents of \fBANDROID_NATIVE_LIB_DIRECTORIES\fP may use "generator expressions" with the syntax \fB$<...>\fP\&. See the \fBcmake\-generator\-expressions(7)\fP manual for available expressions. .SS ANDROID_PROCESS_MAX .sp Set the Android property that defines the maximum number of a parallel Android NDK compiler processes (e.g. \fB4\fP). This property is initialized by the value of the \fBCMAKE_ANDROID_PROCESS_MAX\fP variable if it is set when a target is created. .SS ANDROID_PROGUARD .sp When this property is set to true that enables the ProGuard tool to shrink, optimize, and obfuscate the code by removing unused code and renaming classes, fields, and methods with semantically obscure names. This property is initialized by the value of the \fBCMAKE_ANDROID_PROGUARD\fP variable if it is set when a target is created. .SS ANDROID_PROGUARD_CONFIG_PATH .sp Set the Android property that specifies the location of the ProGuard config file. Leave empty to use the default one. This a string property that contains the path to ProGuard config file. This property is initialized by the value of the \fBCMAKE_ANDROID_PROGUARD_CONFIG_PATH\fP variable if it is set when a target is created. .SS ANDROID_SECURE_PROPS_PATH .sp Set the Android property that states the location of the secure properties file. This is a string property that contains the file path. This property is initialized by the value of the \fBCMAKE_ANDROID_SECURE_PROPS_PATH\fP variable if it is set when a target is created. .SS ANDROID_SKIP_ANT_STEP .sp Set the Android property that defines whether or not to skip the Ant build step. This is a boolean property initialized by the value of the \fBCMAKE_ANDROID_SKIP_ANT_STEP\fP variable if it is set when a target is created. .SS ANDROID_STL_TYPE .sp When Cross Compiling for Android with NVIDIA Nsight Tegra Visual Studio Edition, this property specifies the type of STL support for the project. This is a string property that could set to the one of the following values: .INDENT 0.0 .TP .B \fBnone\fP No C++ Support .TP .B \fBsystem\fP Minimal C++ without STL .TP .B \fBgabi++_static\fP GAbi++ Static .TP .B \fBgabi++_shared\fP GAbi++ Shared .TP .B \fBgnustl_static\fP GNU libstdc++ Static .TP .B \fBgnustl_shared\fP GNU libstdc++ Shared .TP .B \fBstlport_static\fP STLport Static .TP .B \fBstlport_shared\fP STLport Shared .UNINDENT .sp This property is initialized by the value of the \fBCMAKE_ANDROID_STL_TYPE\fP variable if it is set when a target is created. .SS ARCHIVE_OUTPUT_DIRECTORY_ .sp Per\-configuration output directory for ARCHIVE target files. .sp This is a per\-configuration version of the \fBARCHIVE_OUTPUT_DIRECTORY\fP target property, but multi\-configuration generators (VS, Xcode) do NOT append a per\-configuration subdirectory to the specified directory. This property is initialized by the value of the \fBCMAKE_ARCHIVE_OUTPUT_DIRECTORY_\fP variable if it is set when a target is created. .sp Contents of \fBARCHIVE_OUTPUT_DIRECTORY_\fP may use \fBgenerator expressions\fP\&. .SS ARCHIVE_OUTPUT_DIRECTORY .sp Output directory in which to build ARCHIVE target files. .sp This property specifies the directory into which archive target files should be built. The property value may use \fBgenerator expressions\fP\&. Multi\-configuration generators (VS, Xcode) append a per\-configuration subdirectory to the specified directory unless a generator expression is used. .sp This property is initialized by the value of the variable CMAKE_ARCHIVE_OUTPUT_DIRECTORY if it is set when a target is created. .sp See also the \fBARCHIVE_OUTPUT_DIRECTORY_\fP target property. .SS ARCHIVE_OUTPUT_NAME_ .sp Per\-configuration output name for ARCHIVE target files. .sp This is the configuration\-specific version of the \fBARCHIVE_OUTPUT_NAME\fP target property. .SS ARCHIVE_OUTPUT_NAME .sp Output name for ARCHIVE target files. .sp This property specifies the base name for archive target files. It overrides \fBOUTPUT_NAME\fP and \fBOUTPUT_NAME_\fP properties. .sp See also the \fBARCHIVE_OUTPUT_NAME_\fP target property. .SS AUTOGEN_TARGET_DEPENDS .sp Target dependencies of the corresponding \fB_automoc\fP target. .sp Targets which have their \fBAUTOMOC\fP target \fBON\fP have a corresponding \fB_automoc\fP target which is used to autogenerate generate moc files. As this \fB_automoc\fP target is created at generate\-time, it is not possible to define dependencies of it, such as to create inputs for the \fBmoc\fP executable. .sp The \fBAUTOGEN_TARGET_DEPENDS\fP target property can be set instead to a list of dependencies for the \fB_automoc\fP target. The buildsystem will be generated to depend on its contents. .sp See the \fBcmake\-qt(7)\fP manual for more information on using CMake with Qt. .SS AUTOMOC_MOC_OPTIONS .sp Additional options for moc when using \fBAUTOMOC\fP .sp This property is only used if the \fBAUTOMOC\fP property is \fBON\fP for this target. In this case, it holds additional command line options which will be used when \fBmoc\fP is executed during the build, i.e. it is equivalent to the optional \fBOPTIONS\fP argument of the \fBqt4_wrap_cpp()\fP macro. .sp By default it is empty. .sp See the \fBcmake\-qt(7)\fP manual for more information on using CMake with Qt. .SS AUTOMOC .sp Should the target be processed with automoc (for Qt projects). .sp AUTOMOC is a boolean specifying whether CMake will handle the Qt \fBmoc\fP preprocessor automatically, i.e. without having to use the \fBQT4_WRAP_CPP()\fP or QT5_WRAP_CPP() macro. Currently Qt4 and Qt5 are supported. .sp When this property is set \fBON\fP, CMake will scan the source files at build time and invoke moc accordingly. .INDENT 0.0 .IP \(bu 2 If an \fB#include\fP statement like \fB#include "moc_foo.cpp"\fP is found, the \fBQ_OBJECT\fP class declaration is expected in the header, and \fBmoc\fP is run on the header file. A \fBmoc_foo.cpp\fP file will be generated from the source\(aqs header into the \fBCMAKE_CURRENT_BINARY_DIR\fP directory. This allows the compiler to find the included \fBmoc_foo.cpp\fP file regardless of the location the original source. However, if multiple source files in different directories do this then their generated moc files would collide. In this case a diagnostic will be issued. .IP \(bu 2 If an \fB#include\fP statement like \fB#include "foo.moc"\fP is found, then a \fBQ_OBJECT\fP is expected in the current source file and \fBmoc\fP is run on the file itself. Additionally, header files with the same base name (like \fBfoo.h\fP) or \fB_p\fP appended to the base name (like \fBfoo_p.h\fP) are parsed for \fBQ_OBJECT\fP macros, and if found, \fBmoc\fP is also executed on those files. \fBAUTOMOC\fP checks multiple header alternative extensions, such as \fBhpp\fP, \fBhxx\fP etc when searching for headers. The resulting moc files, which are not included as shown above in any of the source files are included in a generated \fB_automoc.cpp\fP file, which is compiled as part of the target. .UNINDENT .sp This property is initialized by the value of the \fBCMAKE_AUTOMOC\fP variable if it is set when a target is created. .sp Additional command line options for moc can be set via the \fBAUTOMOC_MOC_OPTIONS\fP property. .sp By enabling the \fBCMAKE_AUTOMOC_RELAXED_MODE\fP variable the rules for searching the files which will be processed by moc can be relaxed. See the documentation for this variable for more details. .sp The global property \fBAUTOGEN_TARGETS_FOLDER\fP can be used to group the automoc targets together in an IDE, e.g. in MSVS. .sp See the \fBcmake\-qt(7)\fP manual for more information on using CMake with Qt. .SS AUTOUIC .sp Should the target be processed with autouic (for Qt projects). .sp \fBAUTOUIC\fP is a boolean specifying whether CMake will handle the Qt \fBuic\fP code generator automatically, i.e. without having to use the \fBQT4_WRAP_UI()\fP or \fBQT5_WRAP_UI()\fP macro. Currently Qt4 and Qt5 are supported. .sp When this property is \fBON\fP, CMake will scan the source files at build time and invoke \fBuic\fP accordingly. If an \fB#include\fP statement like \fB#include "ui_foo.h"\fP is found in \fBfoo.cpp\fP, a \fBfoo.ui\fP file is expected next to \fBfoo.cpp\fP, and \fBuic\fP is run on the \fBfoo.ui\fP file. This property is initialized by the value of the \fBCMAKE_AUTOUIC\fP variable if it is set when a target is created. .sp Additional command line options for \fBuic\fP can be set via the \fBAUTOUIC_OPTIONS\fP source file property on the \fBfoo.ui\fP file. The global property \fBAUTOGEN_TARGETS_FOLDER\fP can be used to group the autouic targets together in an IDE, e.g. in MSVS. .sp See the \fBcmake\-qt(7)\fP manual for more information on using CMake with Qt. .SS AUTOUIC_OPTIONS .sp Additional options for uic when using \fBAUTOUIC\fP .sp This property holds additional command line options which will be used when \fBuic\fP is executed during the build via \fBAUTOUIC\fP, i.e. it is equivalent to the optional \fBOPTIONS\fP argument of the \fBqt4_wrap_ui()\fP macro. .sp By default it is empty. .sp This property is initialized by the value of the \fBCMAKE_AUTOUIC_OPTIONS\fP variable if it is set when a target is created. .sp The options set on the target may be overridden by \fBAUTOUIC_OPTIONS\fP set on the \fB\&.ui\fP source file. .sp This property may use "generator expressions" with the syntax \fB$<...>\fP\&. See the \fBcmake\-generator\-expressions(7)\fP manual for available expressions. .sp See the \fBcmake\-qt(7)\fP manual for more information on using CMake with Qt. .SS AUTORCC .sp Should the target be processed with autorcc (for Qt projects). .sp \fBAUTORCC\fP is a boolean specifying whether CMake will handle the Qt \fBrcc\fP code generator automatically, i.e. without having to use the \fBQT4_ADD_RESOURCES()\fP or \fBQT5_ADD_RESOURCES()\fP macro. Currently Qt4 and Qt5 are supported. .sp When this property is \fBON\fP, CMake will handle \fB\&.qrc\fP files added as target sources at build time and invoke \fBrcc\fP accordingly. This property is initialized by the value of the \fBCMAKE_AUTORCC\fP variable if it is set when a target is created. .sp Additional command line options for rcc can be set via the \fBAUTORCC_OPTIONS\fP source file property on the \fB\&.qrc\fP file. .sp The global property \fBAUTOGEN_TARGETS_FOLDER\fP can be used to group the autorcc targets together in an IDE, e.g. in MSVS. .sp When there are multiple \fB\&.qrc\fP files with the same name, CMake will generate unspecified unique names for \fBrcc\fP\&. Therefore if \fBQ_INIT_RESOURCE()\fP or \fBQ_CLEANUP_RESOURCE()\fP need to be used the \fB\&.qrc\fP file name must be unique. .sp See the \fBcmake\-qt(7)\fP manual for more information on using CMake with Qt. .SS AUTORCC_OPTIONS .sp Additional options for \fBrcc\fP when using \fBAUTORCC\fP .sp This property holds additional command line options which will be used when \fBrcc\fP is executed during the build via \fBAUTORCC\fP, i.e. it is equivalent to the optional \fBOPTIONS\fP argument of the \fBqt4_add_resources()\fP macro. .sp By default it is empty. .sp This property is initialized by the value of the \fBCMAKE_AUTORCC_OPTIONS\fP variable if it is set when a target is created. .sp The options set on the target may be overridden by \fBAUTORCC_OPTIONS\fP set on the \fB\&.qrc\fP source file. .sp See the \fBcmake\-qt(7)\fP manual for more information on using CMake with Qt. .SS BINARY_DIR .sp This read\-only property reports the value of the \fBCMAKE_CURRENT_BINARY_DIR\fP variable in the directory in which the target was defined. .SS BUILD_WITH_INSTALL_RPATH .sp Should build tree targets have install tree rpaths. .sp BUILD_WITH_INSTALL_RPATH is a boolean specifying whether to link the target in the build tree with the INSTALL_RPATH. This takes precedence over SKIP_BUILD_RPATH and avoids the need for relinking before installation. This property is initialized by the value of the variable CMAKE_BUILD_WITH_INSTALL_RPATH if it is set when a target is created. .SS BUNDLE_EXTENSION .sp The file extension used to name a \fBBUNDLE\fP, a \fBFRAMEWORK\fP, or a \fBMACOSX_BUNDLE\fP target on the OS X and iOS. .sp The default value is \fBbundle\fP, \fBframework\fP, or \fBapp\fP for the respective target types. .SS BUNDLE .sp This target is a \fBCFBundle\fP on the OS X. .sp If a module library target has this property set to true it will be built as a \fBCFBundle\fP when built on the mac. It will have the directory structure required for a \fBCFBundle\fP and will be suitable to be used for creating Browser Plugins or other application resources. .SS C_EXTENSIONS .sp Boolean specifying whether compiler specific extensions are requested. .sp This property specifies whether compiler specific extensions should be used. For some compilers, this results in adding a flag such as \fB\-std=gnu11\fP instead of \fB\-std=c11\fP to the compile line. This property is \fBON\fP by default. The basic C standard level is controlled by the \fBC_STANDARD\fP target property. .sp See the \fBcmake\-compile\-features(7)\fP manual for information on compile features and a list of supported compilers. .sp This property is initialized by the value of the \fBCMAKE_C_EXTENSIONS\fP variable if it is set when a target is created. .SS C_STANDARD .sp The C standard whose features are requested to build this target. .sp This property specifies the C standard whose features are requested to build this target. For some compilers, this results in adding a flag such as \fB\-std=gnu11\fP to the compile line. For compilers that have no notion of a standard level, such as MSVC, this has no effect. .sp Supported values are \fB90\fP, \fB99\fP and \fB11\fP\&. .sp If the value requested does not result in a compile flag being added for the compiler in use, a previous standard flag will be added instead. This means that using: .INDENT 0.0 .INDENT 3.5 .sp .nf .ft C set_property(TARGET tgt PROPERTY C_STANDARD 11) .ft P .fi .UNINDENT .UNINDENT .sp with a compiler which does not support \fB\-std=gnu11\fP or an equivalent flag will not result in an error or warning, but will instead add the \fB\-std=gnu99\fP or \fB\-std=gnu90\fP flag if supported. This "decay" behavior may be controlled with the \fBC_STANDARD_REQUIRED\fP target property. Additionally, the \fBC_EXTENSIONS\fP target property may be used to control whether compiler\-specific extensions are enabled on a per\-target basis. .sp See the \fBcmake\-compile\-features(7)\fP manual for information on compile features and a list of supported compilers. .sp This property is initialized by the value of the \fBCMAKE_C_STANDARD\fP variable if it is set when a target is created. .SS C_STANDARD_REQUIRED .sp Boolean describing whether the value of \fBC_STANDARD\fP is a requirement. .sp If this property is set to \fBON\fP, then the value of the \fBC_STANDARD\fP target property is treated as a requirement. If this property is \fBOFF\fP or unset, the \fBC_STANDARD\fP target property is treated as optional and may "decay" to a previous standard if the requested is not available. For compilers that have no notion of a standard level, such as MSVC, this has no effect. .sp See the \fBcmake\-compile\-features(7)\fP manual for information on compile features and a list of supported compilers. .sp This property is initialized by the value of the \fBCMAKE_C_STANDARD_REQUIRED\fP variable if it is set when a target is created. .SS COMPATIBLE_INTERFACE_BOOL .sp Properties which must be compatible with their link interface .sp The \fBCOMPATIBLE_INTERFACE_BOOL\fP property may contain a list of properties for this target which must be consistent when evaluated as a boolean with the \fBINTERFACE\fP variant of the property in all linked dependees. For example, if a property \fBFOO\fP appears in the list, then for each dependee, the \fBINTERFACE_FOO\fP property content in all of its dependencies must be consistent with each other, and with the \fBFOO\fP property in the depender. .sp Consistency in this sense has the meaning that if the property is set, then it must have the same boolean value as all others, and if the property is not set, then it is ignored. .sp Note that for each dependee, the set of properties specified in this property must not intersect with the set specified in any of the other Compatible Interface Properties\&. .SS COMPATIBLE_INTERFACE_NUMBER_MAX .sp Properties whose maximum value from the link interface will be used. .sp The \fBCOMPATIBLE_INTERFACE_NUMBER_MAX\fP property may contain a list of properties for this target whose maximum value may be read at generate time when evaluated in the \fBINTERFACE\fP variant of the property in all linked dependees. For example, if a property \fBFOO\fP appears in the list, then for each dependee, the \fBINTERFACE_FOO\fP property content in all of its dependencies will be compared with each other and with the \fBFOO\fP property in the depender. When reading the \fBFOO\fP property at generate time, the maximum value will be returned. If the property is not set, then it is ignored. .sp Note that for each dependee, the set of properties specified in this property must not intersect with the set specified in any of the other Compatible Interface Properties\&. .SS COMPATIBLE_INTERFACE_NUMBER_MIN .sp Properties whose maximum value from the link interface will be used. .sp The \fBCOMPATIBLE_INTERFACE_NUMBER_MIN\fP property may contain a list of properties for this target whose minimum value may be read at generate time when evaluated in the \fBINTERFACE\fP variant of the property of all linked dependees. For example, if a property \fBFOO\fP appears in the list, then for each dependee, the \fBINTERFACE_FOO\fP property content in all of its dependencies will be compared with each other and with the \fBFOO\fP property in the depender. When reading the \fBFOO\fP property at generate time, the minimum value will be returned. If the property is not set, then it is ignored. .sp Note that for each dependee, the set of properties specified in this property must not intersect with the set specified in any of the other Compatible Interface Properties\&. .SS COMPATIBLE_INTERFACE_STRING .sp Properties which must be string\-compatible with their link interface .sp The \fBCOMPATIBLE_INTERFACE_STRING\fP property may contain a list of properties for this target which must be the same when evaluated as a string in the \fBINTERFACE\fP variant of the property all linked dependees. For example, if a property \fBFOO\fP appears in the list, then for each dependee, the \fBINTERFACE_FOO\fP property content in all of its dependencies must be equal with each other, and with the \fBFOO\fP property in the depender. If the property is not set, then it is ignored. .sp Note that for each dependee, the set of properties specified in this property must not intersect with the set specified in any of the other Compatible Interface Properties\&. .SS COMPILE_DEFINITIONS .sp Preprocessor definitions for compiling a target\(aqs sources. .sp The \fBCOMPILE_DEFINITIONS\fP property may be set to a semicolon\-separated list of preprocessor definitions using the syntax \fBVAR\fP or \fBVAR=value\fP\&. Function\-style definitions are not supported. CMake will automatically escape the value correctly for the native build system (note that CMake language syntax may require escapes to specify some values). .sp CMake will automatically drop some definitions that are not supported by the native build tool. .sp Disclaimer: Most native build tools have poor support for escaping certain values. CMake has work\-arounds for many cases but some values may just not be possible to pass correctly. If a value does not seem to be escaped correctly, do not attempt to work\-around the problem by adding escape sequences to the value. Your work\-around may break in a future version of CMake that has improved escape support. Instead consider defining the macro in a (configured) header file. Then report the limitation. Known limitations include: .INDENT 0.0 .INDENT 3.5 .sp .nf .ft C # \- broken almost everywhere ; \- broken in VS IDE 7.0 and Borland Makefiles , \- broken in VS IDE % \- broken in some cases in NMake & | \- broken in some cases on MinGW ^ < > \e" \- broken in most Make tools on Windows .ft P .fi .UNINDENT .UNINDENT .sp CMake does not reject these values outright because they do work in some cases. Use with caution. .sp Contents of \fBCOMPILE_DEFINITIONS\fP may use "generator expressions" with the syntax \fB$<...>\fP\&. See the \fBcmake\-generator\-expressions(7)\fP manual for available expressions. See the \fBcmake\-buildsystem(7)\fP manual for more on defining buildsystem properties. .sp The corresponding \fBCOMPILE_DEFINITIONS_\fP property may be set to specify per\-configuration definitions. Generator expressions should be preferred instead of setting the alternative property. .SS COMPILE_FEATURES .sp Compiler features enabled for this target. .sp The list of features in this property are a subset of the features listed in the \fBCMAKE_CXX_COMPILE_FEATURES\fP variable. .sp Contents of \fBCOMPILE_FEATURES\fP may use "generator expressions" with the syntax \fB$<...>\fP\&. See the \fBcmake\-generator\-expressions(7)\fP manual for available expressions. See the \fBcmake\-compile\-features(7)\fP manual for information on compile features and a list of supported compilers. .SS COMPILE_FLAGS .sp Additional flags to use when compiling this target\(aqs sources. .sp The \fBCOMPILE_FLAGS\fP property sets additional compiler flags used to build sources within the target. Use \fBCOMPILE_DEFINITIONS\fP to pass additional preprocessor definitions. .sp This property is deprecated. Use the \fBCOMPILE_OPTIONS\fP property or the command:\fItarget_compile_options\fP command instead. .SS COMPILE_OPTIONS .sp List of options to pass to the compiler. .sp This property holds a ;\-list of options specified so far for its target. Use the \fBtarget_compile_options()\fP command to append more options. .sp This property is initialized by the \fBCOMPILE_OPTIONS\fP directory property when a target is created, and is used by the generators to set the options for the compiler. .sp Contents of \fBCOMPILE_OPTIONS\fP may use "generator expressions" with the syntax \fB$<...>\fP\&. See the \fBcmake\-generator\-expressions(7)\fP manual for available expressions. See the \fBcmake\-buildsystem(7)\fP manual for more on defining buildsystem properties. .SS COMPILE_PDB_NAME .sp Output name for the MS debug symbol \fB\&.pdb\fP file generated by the compiler while building source files. .sp This property specifies the base name for the debug symbols file. If not set, the default is unspecified. .sp \fBNOTE:\fP .INDENT 0.0 .INDENT 3.5 The compiler\-generated program database files are specified by the \fB/Fd\fP compiler flag and are not the same as linker\-generated program database files specified by the \fB/pdb\fP linker flag. Use the \fBPDB_NAME\fP property to specify the latter. .UNINDENT .UNINDENT .SS COMPILE_PDB_NAME_ .sp Per\-configuration output name for the MS debug symbol \fB\&.pdb\fP file generated by the compiler while building source files. .sp This is the configuration\-specific version of \fBCOMPILE_PDB_NAME\fP\&. .sp \fBNOTE:\fP .INDENT 0.0 .INDENT 3.5 The compiler\-generated program database files are specified by the \fB/Fd\fP compiler flag and are not the same as linker\-generated program database files specified by the \fB/pdb\fP linker flag. Use the \fBPDB_NAME_\fP property to specify the latter. .UNINDENT .UNINDENT .SS COMPILE_PDB_OUTPUT_DIRECTORY .sp Output directory for the MS debug symbol \fB\&.pdb\fP file generated by the compiler while building source files. .sp This property specifies the directory into which the MS debug symbols will be placed by the compiler. This property is initialized by the value of the \fBCMAKE_COMPILE_PDB_OUTPUT_DIRECTORY\fP variable if it is set when a target is created. .sp \fBNOTE:\fP .INDENT 0.0 .INDENT 3.5 The compiler\-generated program database files are specified by the \fB/Fd\fP compiler flag and are not the same as linker\-generated program database files specified by the \fB/pdb\fP linker flag. Use the \fBPDB_OUTPUT_DIRECTORY\fP property to specify the latter. .UNINDENT .UNINDENT .SS COMPILE_PDB_OUTPUT_DIRECTORY_ .sp Per\-configuration output directory for the MS debug symbol \fB\&.pdb\fP file generated by the compiler while building source files. .sp This is a per\-configuration version of \fBCOMPILE_PDB_OUTPUT_DIRECTORY\fP, but multi\-configuration generators (VS, Xcode) do NOT append a per\-configuration subdirectory to the specified directory. This property is initialized by the value of the \fBCMAKE_COMPILE_PDB_OUTPUT_DIRECTORY_\fP variable if it is set when a target is created. .sp \fBNOTE:\fP .INDENT 0.0 .INDENT 3.5 The compiler\-generated program database files are specified by the \fB/Fd\fP compiler flag and are not the same as linker\-generated program database files specified by the \fB/pdb\fP linker flag. Use the \fBPDB_OUTPUT_DIRECTORY_\fP property to specify the latter. .UNINDENT .UNINDENT .SS _OUTPUT_NAME .sp Old per\-configuration target file base name. Use \fBOUTPUT_NAME_\fP instead. .sp This is a configuration\-specific version of the \fBOUTPUT_NAME\fP target property. .SS _POSTFIX .sp Postfix to append to the target file name for configuration . .sp When building with configuration the value of this property is appended to the target file name built on disk. For non\-executable targets, this property is initialized by the value of the variable CMAKE__POSTFIX if it is set when a target is created. This property is ignored on the Mac for Frameworks and App Bundles. .SS CROSSCOMPILING_EMULATOR .sp Use the given emulator to run executables created when crosscompiling. This command will be added as a prefix to \fBadd_test()\fP, \fBadd_custom_command()\fP, and \fBadd_custom_target()\fP commands for built target system executables. .SS CXX_EXTENSIONS .sp Boolean specifying whether compiler specific extensions are requested. .sp This property specifies whether compiler specific extensions should be used. For some compilers, this results in adding a flag such as \fB\-std=gnu++11\fP instead of \fB\-std=c++11\fP to the compile line. This property is \fBON\fP by default. The basic C++ standard level is controlled by the \fBCXX_STANDARD\fP target property. .sp See the \fBcmake\-compile\-features(7)\fP manual for information on compile features and a list of supported compilers. .sp This property is initialized by the value of the \fBCMAKE_CXX_EXTENSIONS\fP variable if it is set when a target is created. .SS CXX_STANDARD .sp The C++ standard whose features are requested to build this target. .sp This property specifies the C++ standard whose features are requested to build this target. For some compilers, this results in adding a flag such as \fB\-std=gnu++11\fP to the compile line. For compilers that have no notion of a standard level, such as MSVC, this has no effect. .sp Supported values are \fB98\fP, \fB11\fP and \fB14\fP\&. .sp If the value requested does not result in a compile flag being added for the compiler in use, a previous standard flag will be added instead. This means that using: .INDENT 0.0 .INDENT 3.5 .sp .nf .ft C set_property(TARGET tgt PROPERTY CXX_STANDARD 11) .ft P .fi .UNINDENT .UNINDENT .sp with a compiler which does not support \fB\-std=gnu++11\fP or an equivalent flag will not result in an error or warning, but will instead add the \fB\-std=gnu++98\fP flag if supported. This "decay" behavior may be controlled with the \fBCXX_STANDARD_REQUIRED\fP target property. Additionally, the \fBCXX_EXTENSIONS\fP target property may be used to control whether compiler\-specific extensions are enabled on a per\-target basis. .sp See the \fBcmake\-compile\-features(7)\fP manual for information on compile features and a list of supported compilers. .sp This property is initialized by the value of the \fBCMAKE_CXX_STANDARD\fP variable if it is set when a target is created. .SS CXX_STANDARD_REQUIRED .sp Boolean describing whether the value of \fBCXX_STANDARD\fP is a requirement. .sp If this property is set to \fBON\fP, then the value of the \fBCXX_STANDARD\fP target property is treated as a requirement. If this property is \fBOFF\fP or unset, the \fBCXX_STANDARD\fP target property is treated as optional and may "decay" to a previous standard if the requested is not available. For compilers that have no notion of a standard level, such as MSVC, this has no effect. .sp See the \fBcmake\-compile\-features(7)\fP manual for information on compile features and a list of supported compilers. .sp This property is initialized by the value of the \fBCMAKE_CXX_STANDARD_REQUIRED\fP variable if it is set when a target is created. .SS DEBUG_POSTFIX .sp See target property _POSTFIX. .sp This property is a special case of the more\-general _POSTFIX property for the DEBUG configuration. .SS DEFINE_SYMBOL .sp Define a symbol when compiling this target\(aqs sources. .sp DEFINE_SYMBOL sets the name of the preprocessor symbol defined when compiling sources in a shared library. If not set here then it is set to target_EXPORTS by default (with some substitutions if the target is not a valid C identifier). This is useful for headers to know whether they are being included from inside their library or outside to properly setup dllexport/dllimport decorations. .SS DEPLOYMENT_REMOTE_DIRECTORY .sp Set the WinCE project \fBRemoteDirectory\fP in \fBDeploymentTool\fP and \fBRemoteExecutable\fP in \fBDebuggerTool\fP in \fB\&.vcproj\fP files generated by the \fBVisual Studio 9 2008\fP and \fBVisual Studio 8 2005\fP generators. This is useful when you want to debug on remote WinCE device. For example: .INDENT 0.0 .INDENT 3.5 .sp .nf .ft C set_property(TARGET ${TARGET} PROPERTY DEPLOYMENT_REMOTE_DIRECTORY "\e\eFlashStorage") .ft P .fi .UNINDENT .UNINDENT .sp produces: .INDENT 0.0 .INDENT 3.5 .sp .nf .ft C .ft P .fi .UNINDENT .UNINDENT .SS EchoString .sp A message to be displayed when the target is built. .sp A message to display on some generators (such as makefiles) when the target is built. .SS ENABLE_EXPORTS .sp Specify whether an executable exports symbols for loadable modules. .sp Normally an executable does not export any symbols because it is the final program. It is possible for an executable to export symbols to be used by loadable modules. When this property is set to true CMake will allow other targets to "link" to the executable with the \fBTARGET_LINK_LIBRARIES()\fP command. On all platforms a target\-level dependency on the executable is created for targets that link to it. For DLL platforms an import library will be created for the exported symbols and then used for linking. All Windows\-based systems including Cygwin are DLL platforms. For non\-DLL platforms that require all symbols to be resolved at link time, such as OS X, the module will "link" to the executable using a flag like \fB\-bundle_loader\fP\&. For other non\-DLL platforms the link rule is simply ignored since the dynamic loader will automatically bind symbols when the module is loaded. .sp This property is initialized by the value of the variable \fBCMAKE_ENABLE_EXPORTS\fP if it is set when a target is created. .SS EXCLUDE_FROM_ALL .sp Exclude the target from the all target. .sp A property on a target that indicates if the target is excluded from the default build target. If it is not, then with a Makefile for example typing make will cause this target to be built. The same concept applies to the default build of other generators. Installing a target with EXCLUDE_FROM_ALL set to true has undefined behavior. .SS EXCLUDE_FROM_DEFAULT_BUILD_ .sp Per\-configuration version of target exclusion from "Build Solution". .sp This is the configuration\-specific version of EXCLUDE_FROM_DEFAULT_BUILD. If the generic EXCLUDE_FROM_DEFAULT_BUILD is also set on a target, EXCLUDE_FROM_DEFAULT_BUILD_ takes precedence in configurations for which it has a value. .SS EXCLUDE_FROM_DEFAULT_BUILD .sp Exclude target from "Build Solution". .sp This property is only used by Visual Studio generators 7 and above. When set to TRUE, the target will not be built when you press "Build Solution". .SS EXPORT_NAME .sp Exported name for target files. .sp This sets the name for the IMPORTED target generated when it this target is is exported. If not set, the logical target name is used by default. .SS FOLDER .sp Set the folder name. Use to organize targets in an IDE. .sp Targets with no FOLDER property will appear as top level entities in IDEs like Visual Studio. Targets with the same FOLDER property value will appear next to each other in a folder of that name. To nest folders, use FOLDER values such as \(aqGUI/Dialogs\(aq with \(aq/\(aq characters separating folder levels. .SS Fortran_FORMAT .sp Set to FIXED or FREE to indicate the Fortran source layout. .sp This property tells CMake whether the Fortran source files in a target use fixed\-format or free\-format. CMake will pass the corresponding format flag to the compiler. Use the source\-specific Fortran_FORMAT property to change the format of a specific source file. If the variable CMAKE_Fortran_FORMAT is set when a target is created its value is used to initialize this property. .SS Fortran_MODULE_DIRECTORY .sp Specify output directory for Fortran modules provided by the target. .sp If the target contains Fortran source files that provide modules and the compiler supports a module output directory this specifies the directory in which the modules will be placed. When this property is not set the modules will be placed in the build directory corresponding to the target\(aqs source directory. If the variable CMAKE_Fortran_MODULE_DIRECTORY is set when a target is created its value is used to initialize this property. .sp Note that some compilers will automatically search the module output directory for modules USEd during compilation but others will not. If your sources USE modules their location must be specified by INCLUDE_DIRECTORIES regardless of this property. .SS FRAMEWORK .sp Build \fBSHARED\fP library as Framework Bundle on the OS X and iOS. .sp If a \fBSHARED\fP library target has this property set to \fBTRUE\fP it will be built as a framework when built on the OS X and iOS. It will have the directory structure required for a framework and will be suitable to be used with the \fB\-framework\fP option .sp To customize \fBInfo.plist\fP file in the framework, use \fBMACOSX_FRAMEWORK_INFO_PLIST\fP target property. .sp For OS X see also the \fBFRAMEWORK_VERSION\fP target property. .sp Example of creation \fBdynamicFramework\fP: .INDENT 0.0 .INDENT 3.5 .sp .nf .ft C add_library(dynamicFramework SHARED dynamicFramework.c dynamicFramework.h ) set_target_properties(dynamicFramework PROPERTIES FRAMEWORK TRUE FRAMEWORK_VERSION C MACOSX_FRAMEWORK_IDENTIFIER com.cmake.dynamicFramework MACOSX_FRAMEWORK_INFO_PLIST Info.plist # "current version" in semantic format in Mach\-O binary file VERSION 16.4.0 # "compatibility version" in semantic format in Mach\-O binary file SOVERSION 1.0.0 PUBLIC_HEADER dynamicFramework.h XCODE_ATTRIBUTE_CODE_SIGN_IDENTITY "iPhone Developer" ) .ft P .fi .UNINDENT .UNINDENT .SS FRAMEWORK_VERSION .sp Version of a framework created using the \fBFRAMEWORK\fP target property (e.g. \fBA\fP). .sp This property only affects OS X, as iOS doesn\(aqt have versioned directory structure. .SS GENERATOR_FILE_NAME .sp Generator\(aqs file for this target. .sp An internal property used by some generators to record the name of the project or dsp file associated with this target. Note that at configure time, this property is only set for targets created by include_external_msproject(). .SS GNUtoMS .sp Convert GNU import library (.dll.a) to MS format (.lib). .sp When linking a shared library or executable that exports symbols using GNU tools on Windows (MinGW/MSYS) with Visual Studio installed convert the import library (.dll.a) from GNU to MS format (.lib). Both import libraries will be installed by install(TARGETS) and exported by install(EXPORT) and export() to be linked by applications with either GNU\- or MS\-compatible tools. .sp If the variable CMAKE_GNUtoMS is set when a target is created its value is used to initialize this property. The variable must be set prior to the first command that enables a language such as project() or enable_language(). CMake provides the variable as an option to the user automatically when configuring on Windows with GNU tools. .SS HAS_CXX .sp Link the target using the C++ linker tool (obsolete). .sp This is equivalent to setting the LINKER_LANGUAGE property to CXX. See that property\(aqs documentation for details. .SS IMPLICIT_DEPENDS_INCLUDE_TRANSFORM .sp Specify #include line transforms for dependencies in a target. .sp This property specifies rules to transform macro\-like #include lines during implicit dependency scanning of C and C++ source files. The list of rules must be semicolon\-separated with each entry of the form "A_MACRO(%)=value\-with\-%" (the % must be literal). During dependency scanning occurrences of A_MACRO(...) on #include lines will be replaced by the value given with the macro argument substituted for \(aq%\(aq. For example, the entry .INDENT 0.0 .INDENT 3.5 .sp .nf .ft C MYDIR(%)= .ft P .fi .UNINDENT .UNINDENT .sp will convert lines of the form .INDENT 0.0 .INDENT 3.5 .sp .nf .ft C #include MYDIR(myheader.h) .ft P .fi .UNINDENT .UNINDENT .sp to .INDENT 0.0 .INDENT 3.5 .sp .nf .ft C #include .ft P .fi .UNINDENT .UNINDENT .sp allowing the dependency to be followed. .sp This property applies to sources in the target on which it is set. .SS IMPORTED_CONFIGURATIONS .sp Configurations provided for an IMPORTED target. .sp Set this to the list of configuration names available for an IMPORTED target. The names correspond to configurations defined in the project from which the target is imported. If the importing project uses a different set of configurations the names may be mapped using the MAP_IMPORTED_CONFIG_ property. Ignored for non\-imported targets. .SS IMPORTED_IMPLIB_ .sp \-specific version of IMPORTED_IMPLIB property. .sp Configuration names correspond to those provided by the project from which the target is imported. .SS IMPORTED_IMPLIB .sp Full path to the import library for an IMPORTED target. .sp Set this to the location of the ".lib" part of a windows DLL. Ignored for non\-imported targets. .SS IMPORTED_LINK_DEPENDENT_LIBRARIES_ .sp \-specific version of IMPORTED_LINK_DEPENDENT_LIBRARIES. .sp Configuration names correspond to those provided by the project from which the target is imported. If set, this property completely overrides the generic property for the named configuration. .SS IMPORTED_LINK_DEPENDENT_LIBRARIES .sp Dependent shared libraries of an imported shared library. .sp Shared libraries may be linked to other shared libraries as part of their implementation. On some platforms the linker searches for the dependent libraries of shared libraries they are including in the link. Set this property to the list of dependent shared libraries of an imported library. The list should be disjoint from the list of interface libraries in the INTERFACE_LINK_LIBRARIES property. On platforms requiring dependent shared libraries to be found at link time CMake uses this list to add appropriate files or paths to the link command line. Ignored for non\-imported targets. .SS IMPORTED_LINK_INTERFACE_LANGUAGES_ .sp \-specific version of IMPORTED_LINK_INTERFACE_LANGUAGES. .sp Configuration names correspond to those provided by the project from which the target is imported. If set, this property completely overrides the generic property for the named configuration. .SS IMPORTED_LINK_INTERFACE_LANGUAGES .sp Languages compiled into an IMPORTED static library. .sp Set this to the list of languages of source files compiled to produce a STATIC IMPORTED library (such as "C" or "CXX"). CMake accounts for these languages when computing how to link a target to the imported library. For example, when a C executable links to an imported C++ static library CMake chooses the C++ linker to satisfy language runtime dependencies of the static library. .sp This property is ignored for targets that are not STATIC libraries. This property is ignored for non\-imported targets. .SS IMPORTED_LINK_INTERFACE_LIBRARIES_ .sp \-specific version of IMPORTED_LINK_INTERFACE_LIBRARIES. .sp Configuration names correspond to those provided by the project from which the target is imported. If set, this property completely overrides the generic property for the named configuration. .sp This property is ignored if the target also has a non\-empty INTERFACE_LINK_LIBRARIES property. .sp This property is deprecated. Use INTERFACE_LINK_LIBRARIES instead. .SS IMPORTED_LINK_INTERFACE_LIBRARIES .sp Transitive link interface of an IMPORTED target. .sp Set this to the list of libraries whose interface is included when an IMPORTED library target is linked to another target. The libraries will be included on the link line for the target. Unlike the LINK_INTERFACE_LIBRARIES property, this property applies to all imported target types, including STATIC libraries. This property is ignored for non\-imported targets. .sp This property is ignored if the target also has a non\-empty INTERFACE_LINK_LIBRARIES property. .sp This property is deprecated. Use INTERFACE_LINK_LIBRARIES instead. .SS IMPORTED_LINK_INTERFACE_MULTIPLICITY_ .sp \-specific version of IMPORTED_LINK_INTERFACE_MULTIPLICITY. .sp If set, this property completely overrides the generic property for the named configuration. .SS IMPORTED_LINK_INTERFACE_MULTIPLICITY .sp Repetition count for cycles of IMPORTED static libraries. .sp This is LINK_INTERFACE_MULTIPLICITY for IMPORTED targets. .SS IMPORTED_LOCATION_ .sp \-specific version of IMPORTED_LOCATION property. .sp Configuration names correspond to those provided by the project from which the target is imported. .SS IMPORTED_LOCATION .sp Full path to the main file on disk for an IMPORTED target. .sp Set this to the location of an IMPORTED target file on disk. For executables this is the location of the executable file. For bundles on OS X this is the location of the executable file inside Contents/MacOS under the application bundle folder. For static libraries and modules this is the location of the library or module. For shared libraries on non\-DLL platforms this is the location of the shared library. For frameworks on OS X this is the location of the library file symlink just inside the framework folder. For DLLs this is the location of the ".dll" part of the library. For UNKNOWN libraries this is the location of the file to be linked. Ignored for non\-imported targets. .sp Projects may skip IMPORTED_LOCATION if the configuration\-specific property IMPORTED_LOCATION_ is set. To get the location of an imported target read one of the LOCATION or LOCATION_ properties. .SS IMPORTED_NO_SONAME_ .sp \-specific version of IMPORTED_NO_SONAME property. .sp Configuration names correspond to those provided by the project from which the target is imported. .SS IMPORTED_NO_SONAME .sp Specifies that an IMPORTED shared library target has no "soname". .sp Set this property to true for an imported shared library file that has no "soname" field. CMake may adjust generated link commands for some platforms to prevent the linker from using the path to the library in place of its missing soname. Ignored for non\-imported targets. .SS IMPORTED .sp Read\-only indication of whether a target is IMPORTED. .sp The boolean value of this property is \fBTrue\fP for targets created with the IMPORTED option to \fBadd_executable()\fP or \fBadd_library()\fP\&. It is \fBFalse\fP for targets built within the project. .SS IMPORTED_SONAME_ .sp \-specific version of IMPORTED_SONAME property. .sp Configuration names correspond to those provided by the project from which the target is imported. .SS IMPORTED_SONAME .sp The "soname" of an IMPORTED target of shared library type. .sp Set this to the "soname" embedded in an imported shared library. This is meaningful only on platforms supporting the feature. Ignored for non\-imported targets. .SS IMPORT_PREFIX .sp What comes before the import library name. .sp Similar to the target property PREFIX, but used for import libraries (typically corresponding to a DLL) instead of regular libraries. A target property that can be set to override the prefix (such as "lib") on an import library name. .SS IMPORT_SUFFIX .sp What comes after the import library name. .sp Similar to the target property SUFFIX, but used for import libraries (typically corresponding to a DLL) instead of regular libraries. A target property that can be set to override the suffix (such as ".lib") on an import library name. .SS INCLUDE_DIRECTORIES .sp List of preprocessor include file search directories. .sp This property specifies the list of directories given so far to the \fBtarget_include_directories()\fP command. In addition to accepting values from that command, values may be set directly on any target using the \fBset_property()\fP command. A target gets its initial value for this property from the value of the \fBINCLUDE_DIRECTORIES\fP directory property. Both directory and target property values are adjusted by calls to the \fBinclude_directories()\fP command. .sp The value of this property is used by the generators to set the include paths for the compiler. .sp Relative paths should not be added to this property directly. Use one of the commands above instead to handle relative paths. .sp Contents of \fBINCLUDE_DIRECTORIES\fP may use "generator expressions" with the syntax \fB$<...>\fP\&. See the \fBcmake\-generator\-expressions(7)\fP manual for available expressions. See the \fBcmake\-buildsystem(7)\fP manual for more on defining buildsystem properties. .SS INSTALL_NAME_DIR .sp Mac OSX directory name for installed targets. .sp INSTALL_NAME_DIR is a string specifying the directory portion of the "install_name" field of shared libraries on Mac OSX to use in the installed targets. .SS INSTALL_RPATH .sp The rpath to use for installed targets. .sp A semicolon\-separated list specifying the rpath to use in installed targets (for platforms that support it). This property is initialized by the value of the variable CMAKE_INSTALL_RPATH if it is set when a target is created. .SS INSTALL_RPATH_USE_LINK_PATH .sp Add paths to linker search and installed rpath. .sp INSTALL_RPATH_USE_LINK_PATH is a boolean that if set to true will append directories in the linker search path and outside the project to the INSTALL_RPATH. This property is initialized by the value of the variable CMAKE_INSTALL_RPATH_USE_LINK_PATH if it is set when a target is created. .SS INTERFACE_AUTOUIC_OPTIONS .sp List of interface options to pass to uic. .sp Targets may populate this property to publish the options required to use when invoking \fBuic\fP\&. Consuming targets can add entries to their own \fBAUTOUIC_OPTIONS\fP property such as \fB$\fP to use the uic options specified in the interface of \fBfoo\fP\&. This is done automatically by the \fBtarget_link_libraries()\fP command. .sp This property supports generator expressions. See the \fBcmake\-generator\-expressions(7)\fP manual for available expressions. .SS INTERFACE_COMPILE_DEFINITIONS .sp List of public compile definitions requirements for a library. .sp Targets may populate this property to publish the compile definitions required to compile against the headers for the target. The \fBtarget_compile_definitions()\fP command populates this property with values given to the \fBPUBLIC\fP and \fBINTERFACE\fP keywords. Projects may also get and set the property directly. .sp When target dependencies are specified using \fBtarget_link_libraries()\fP, CMake will read this property from all target dependencies to determine the build properties of the consumer. .sp Contents of \fBINTERFACE_COMPILE_DEFINITIONS\fP may use "generator expressions" with the syntax \fB$<...>\fP\&. See the \fBcmake\-generator\-expressions(7)\fP manual for available expressions. See the \fBcmake\-buildsystem(7)\fP \-manual for more on defining buildsystem properties. .SS INTERFACE_COMPILE_FEATURES .sp List of public compile features requirements for a library. .sp Targets may populate this property to publish the compile features required to compile against the headers for the target. The \fBtarget_compile_features()\fP command populates this property with values given to the \fBPUBLIC\fP and \fBINTERFACE\fP keywords. Projects may also get and set the property directly. .sp When target dependencies are specified using \fBtarget_link_libraries()\fP, CMake will read this property from all target dependencies to determine the build properties of the consumer. .sp Contents of \fBINTERFACE_COMPILE_FEATURES\fP may use "generator expressions" with the syntax \fB$<...>\fP\&. See the \fBcmake\-generator\-expressions(7)\fP manual for available expressions. See the \fBcmake\-buildsystem(7)\fP \-manual for more on defining buildsystem properties. .sp See the \fBcmake\-compile\-features(7)\fP manual for information on compile features and a list of supported compilers. .SS INTERFACE_COMPILE_OPTIONS .sp List of public compile options requirements for a library. .sp Targets may populate this property to publish the compile options required to compile against the headers for the target. The \fBtarget_compile_options()\fP command populates this property with values given to the \fBPUBLIC\fP and \fBINTERFACE\fP keywords. Projects may also get and set the property directly. .sp When target dependencies are specified using \fBtarget_link_libraries()\fP, CMake will read this property from all target dependencies to determine the build properties of the consumer. .sp Contents of \fBINTERFACE_COMPILE_OPTIONS\fP may use "generator expressions" with the syntax \fB$<...>\fP\&. See the \fBcmake\-generator\-expressions(7)\fP manual for available expressions. See the \fBcmake\-buildsystem(7)\fP \-manual for more on defining buildsystem properties. .SS INTERFACE_INCLUDE_DIRECTORIES .sp List of public include directories requirements for a library. .sp Targets may populate this property to publish the include directories required to compile against the headers for the target. The \fBtarget_include_directories()\fP command populates this property with values given to the \fBPUBLIC\fP and \fBINTERFACE\fP keywords. Projects may also get and set the property directly. .sp When target dependencies are specified using \fBtarget_link_libraries()\fP, CMake will read this property from all target dependencies to determine the build properties of the consumer. .sp Contents of \fBINTERFACE_INCLUDE_DIRECTORIES\fP may use "generator expressions" with the syntax \fB$<...>\fP\&. See the \fBcmake\-generator\-expressions(7)\fP manual for available expressions. See the \fBcmake\-buildsystem(7)\fP \-manual for more on defining buildsystem properties. .sp Include directories usage requirements commonly differ between the build\-tree and the install\-tree. The \fBBUILD_INTERFACE\fP and \fBINSTALL_INTERFACE\fP generator expressions can be used to describe separate usage requirements based on the usage location. Relative paths are allowed within the \fBINSTALL_INTERFACE\fP expression and are interpreted relative to the installation prefix. For example: .INDENT 0.0 .INDENT 3.5 .sp .nf .ft C target_include_directories(mylib INTERFACE $ $ # /include/mylib ) .ft P .fi .UNINDENT .UNINDENT .SS Creating Relocatable Packages .sp Note that it is not advisable to populate the \fBINSTALL_INTERFACE\fP of the \fBINTERFACE_INCLUDE_DIRECTORIES\fP of a target with absolute paths to the include directories of dependencies. That would hard\-code into installed packages the include directory paths for dependencies \fBas found on the machine the package was made on\fP\&. .sp The \fBINSTALL_INTERFACE\fP of the \fBINTERFACE_INCLUDE_DIRECTORIES\fP is only suitable for specifying the required include directories for headers provided with the target itself, not those provided by the transitive dependencies listed in its \fBINTERFACE_LINK_LIBRARIES\fP target property. Those dependencies should themselves be targets that specify their own header locations in \fBINTERFACE_INCLUDE_DIRECTORIES\fP\&. .sp See the Creating Relocatable Packages section of the \fBcmake\-packages(7)\fP manual for discussion of additional care that must be taken when specifying usage requirements while creating packages for redistribution. .SS INTERFACE_LINK_LIBRARIES .sp List public interface libraries for a library. .sp This property contains the list of transitive link dependencies. When the target is linked into another target using the \fBtarget_link_libraries()\fP command, the libraries listed (and recursively their link interface libraries) will be provided to the other target also. This property is overridden by the \fBLINK_INTERFACE_LIBRARIES\fP or \fBLINK_INTERFACE_LIBRARIES_\fP property if policy \fBCMP0022\fP is \fBOLD\fP or unset. .sp Contents of \fBINTERFACE_LINK_LIBRARIES\fP may use "generator expressions" with the syntax \fB$<...>\fP\&. See the \fBcmake\-generator\-expressions(7)\fP manual for available expressions. See the \fBcmake\-buildsystem(7)\fP manual for more on defining buildsystem properties. .SS Creating Relocatable Packages .sp Note that it is not advisable to populate the \fBINTERFACE_LINK_LIBRARIES\fP of a target with absolute paths to dependencies. That would hard\-code into installed packages the library file paths for dependencies \fBas found on the machine the package was made on\fP\&. .sp See the Creating Relocatable Packages section of the \fBcmake\-packages(7)\fP manual for discussion of additional care that must be taken when specifying usage requirements while creating packages for redistribution. .SS INTERFACE_POSITION_INDEPENDENT_CODE .sp Whether consumers need to create a position\-independent target .sp The \fBINTERFACE_POSITION_INDEPENDENT_CODE\fP property informs consumers of this target whether they must set their \fBPOSITION_INDEPENDENT_CODE\fP property to \fBON\fP\&. If this property is set to \fBON\fP, then the \fBPOSITION_INDEPENDENT_CODE\fP property on all consumers will be set to \fBON\fP\&. Similarly, if this property is set to \fBOFF\fP, then the \fBPOSITION_INDEPENDENT_CODE\fP property on all consumers will be set to \fBOFF\fP\&. If this property is undefined, then consumers will determine their \fBPOSITION_INDEPENDENT_CODE\fP property by other means. Consumers must ensure that the targets that they link to have a consistent requirement for their \fBINTERFACE_POSITION_INDEPENDENT_CODE\fP property. .SS INTERFACE_SOURCES .sp List of interface sources to compile into consuming targets. .sp Targets may populate this property to publish the sources for consuming targets to compile. The \fBtarget_sources()\fP command populates this property with values given to the \fBPUBLIC\fP and \fBINTERFACE\fP keywords. Projects may also get and set the property directly. .sp When target dependencies are specified using \fBtarget_link_libraries()\fP, CMake will read this property from all target dependencies to determine the sources of the consumer. .sp Contents of \fBINTERFACE_SOURCES\fP may use "generator expressions" with the syntax \fB$<...>\fP\&. See the \fBcmake\-generator\-expressions(7)\fP manual for available expressions. See the \fBcmake\-buildsystem(7)\fP manual for more on defining buildsystem properties. .SS INTERFACE_SYSTEM_INCLUDE_DIRECTORIES .sp List of public system include directories for a library. .sp Targets may populate this property to publish the include directories which contain system headers, and therefore should not result in compiler warnings. The \fBtarget_include_directories(SYSTEM)\fP command signature populates this property with values given to the \fBPUBLIC\fP and \fBINTERFACE\fP keywords. .sp Projects may also get and set the property directly, but must be aware that adding directories to this property does not make those directories used during compilation. Adding directories to this property marks directories as \fBSYSTEM\fP which otherwise would be used in a non\-\fBSYSTEM\fP manner. This can appear similar to \(aqduplication\(aq, so prefer the high\-level \fBtarget_include_directories(SYSTEM)\fP command and avoid setting the property by low\-level means. .sp When target dependencies are specified using \fBtarget_link_libraries()\fP, CMake will read this property from all target dependencies to mark the same include directories as containing system headers. .sp Contents of \fBINTERFACE_SYSTEM_INCLUDE_DIRECTORIES\fP may use "generator expressions" with the syntax \fB$<...>\fP\&. See the \fBcmake\-generator\-expressions(7)\fP manual for available expressions. See the \fBcmake\-buildsystem(7)\fP manual for more on defining buildsystem properties. .SS INTERPROCEDURAL_OPTIMIZATION_ .sp Per\-configuration interprocedural optimization for a target. .sp This is a per\-configuration version of INTERPROCEDURAL_OPTIMIZATION. If set, this property overrides the generic property for the named configuration. .SS INTERPROCEDURAL_OPTIMIZATION .sp Enable interprocedural optimization for a target. .sp If set to true, enables interprocedural optimizations if they are known to be supported by the compiler. .SS IOS_INSTALL_COMBINED .sp Build a combined (device and simulator) target when installing. .sp When this property is set to set to false (which is the default) then it will either be built with the device SDK or the simulator SDK depending on the SDK set. But if this property is set to true then the target will at install time also be built for the corresponding SDK and combined into one library. .sp This feature requires at least Xcode version 6. .SS JOB_POOL_COMPILE .sp Ninja only: Pool used for compiling. .sp The number of parallel compile processes could be limited by defining pools with the global \fBJOB_POOLS\fP property and then specifying here the pool name. .sp For instance: .INDENT 0.0 .INDENT 3.5 .sp .nf .ft C set_property(TARGET myexe PROPERTY JOB_POOL_COMPILE ten_jobs) .ft P .fi .UNINDENT .UNINDENT .sp This property is initialized by the value of \fBCMAKE_JOB_POOL_COMPILE\fP\&. .SS JOB_POOL_LINK .sp Ninja only: Pool used for linking. .sp The number of parallel link processes could be limited by defining pools with the global \fBJOB_POOLS\fP property and then specifying here the pool name. .sp For instance: .INDENT 0.0 .INDENT 3.5 .sp .nf .ft C set_property(TARGET myexe PROPERTY JOB_POOL_LINK two_jobs) .ft P .fi .UNINDENT .UNINDENT .sp This property is initialized by the value of \fBCMAKE_JOB_POOL_LINK\fP\&. .SS LABELS .sp Specify a list of text labels associated with a target. .sp Target label semantics are currently unspecified. .SS _CLANG_TIDY .sp This property is implemented only when \fB\fP is \fBC\fP or \fBCXX\fP\&. .sp Specify a ;\-list containing a command line for the \fBclang\-tidy\fP tool. The Makefile Generators and the \fBNinja\fP generator will run this tool along with the compiler and report a warning if the tool reports any problems. .sp This property is initialized by the value of the \fBCMAKE__CLANG_TIDY\fP variable if it is set when a target is created. .SS _COMPILER_LAUNCHER .sp This property is implemented only when \fB\fP is \fBC\fP or \fBCXX\fP\&. .sp Specify a ;\-list containing a command line for a compiler launching tool. The Makefile Generators and the \fBNinja\fP generator will run this tool and pass the compiler and its arguments to the tool. Some example tools are distcc and ccache. .sp This property is initialized by the value of the \fBCMAKE__COMPILER_LAUNCHER\fP variable if it is set when a target is created. .SS _INCLUDE_WHAT_YOU_USE .sp This property is implemented only when \fB\fP is \fBC\fP or \fBCXX\fP\&. .sp Specify a ;\-list containing a command line for the \fBinclude\-what\-you\-use\fP tool. The Makefile Generators and the \fBNinja\fP generator will run this tool along with the compiler and report a warning if the tool reports any problems. .sp This property is initialized by the value of the \fBCMAKE__INCLUDE_WHAT_YOU_USE\fP variable if it is set when a target is created. .SS _VISIBILITY_PRESET .sp Value for symbol visibility compile flags .sp The \fB_VISIBILITY_PRESET\fP property determines the value passed in a visibility related compile option, such as \fB\-fvisibility=\fP for \fB\fP\&. This property affects compilation in sources of all types of targets (subject to policy \fBCMP0063\fP). .sp This property is initialized by the value of the \fBCMAKE__VISIBILITY_PRESET\fP variable if it is set when a target is created. .SS LIBRARY_OUTPUT_DIRECTORY_ .sp Per\-configuration output directory for LIBRARY target files. .sp This is a per\-configuration version of the \fBLIBRARY_OUTPUT_DIRECTORY\fP target property, but multi\-configuration generators (VS, Xcode) do NOT append a per\-configuration subdirectory to the specified directory. This property is initialized by the value of the \fBCMAKE_LIBRARY_OUTPUT_DIRECTORY_\fP variable if it is set when a target is created. .sp Contents of \fBLIBRARY_OUTPUT_DIRECTORY_\fP may use \fBgenerator expressions\fP\&. .SS LIBRARY_OUTPUT_DIRECTORY .sp Output directory in which to build LIBRARY target files. .sp This property specifies the directory into which library target files should be built. The property value may use \fBgenerator expressions\fP\&. Multi\-configuration generators (VS, Xcode) append a per\-configuration subdirectory to the specified directory unless a generator expression is used. .sp This property is initialized by the value of the variable CMAKE_LIBRARY_OUTPUT_DIRECTORY if it is set when a target is created. .sp See also the \fBLIBRARY_OUTPUT_DIRECTORY_\fP target property. .SS LIBRARY_OUTPUT_NAME_ .sp Per\-configuration output name for LIBRARY target files. .sp This is the configuration\-specific version of the \fBLIBRARY_OUTPUT_NAME\fP target property. .SS LIBRARY_OUTPUT_NAME .sp Output name for LIBRARY target files. .sp This property specifies the base name for library target files. It overrides \fBOUTPUT_NAME\fP and \fBOUTPUT_NAME_\fP properties. .sp See also the \fBLIBRARY_OUTPUT_NAME_\fP target property. .SS LINK_DEPENDS_NO_SHARED .sp Do not depend on linked shared library files. .sp Set this property to true to tell CMake generators not to add file\-level dependencies on the shared library files linked by this target. Modification to the shared libraries will not be sufficient to re\-link this target. Logical target\-level dependencies will not be affected so the linked shared libraries will still be brought up to date before this target is built. .sp This property is initialized by the value of the variable CMAKE_LINK_DEPENDS_NO_SHARED if it is set when a target is created. .SS LINK_DEPENDS .sp Additional files on which a target binary depends for linking. .sp Specifies a semicolon\-separated list of full\-paths to files on which the link rule for this target depends. The target binary will be linked if any of the named files is newer than it. .sp This property is ignored by non\-Makefile generators. It is intended to specify dependencies on "linker scripts" for custom Makefile link rules. .SS LINKER_LANGUAGE .sp Specifies language whose compiler will invoke the linker. .sp For executables, shared libraries, and modules, this sets the language whose compiler is used to link the target (such as "C" or "CXX"). A typical value for an executable is the language of the source file providing the program entry point (main). If not set, the language with the highest linker preference value is the default. See documentation of CMAKE__LINKER_PREFERENCE variables. .sp If this property is not set by the user, it will be calculated at generate\-time by CMake. .SS LINK_FLAGS_ .sp Per\-configuration linker flags for a target. .sp This is the configuration\-specific version of LINK_FLAGS. .SS LINK_FLAGS .sp Additional flags to use when linking this target. .sp The LINK_FLAGS property can be used to add extra flags to the link step of a target. LINK_FLAGS_ will add to the configuration , for example, DEBUG, RELEASE, MINSIZEREL, RELWITHDEBINFO. .SS LINK_INTERFACE_LIBRARIES_ .sp Per\-configuration list of public interface libraries for a target. .sp This is the configuration\-specific version of \fBLINK_INTERFACE_LIBRARIES\fP\&. If set, this property completely overrides the generic property for the named configuration. .sp This property is overridden by the \fBINTERFACE_LINK_LIBRARIES\fP property if policy \fBCMP0022\fP is \fBNEW\fP\&. .sp This property is deprecated. Use \fBINTERFACE_LINK_LIBRARIES\fP instead. .SS Creating Relocatable Packages .sp Note that it is not advisable to populate the \fBLINK_INTERFACE_LIBRARIES_\fP of a target with absolute paths to dependencies. That would hard\-code into installed packages the library file paths for dependencies \fBas found on the machine the package was made on\fP\&. .sp See the Creating Relocatable Packages section of the \fBcmake\-packages(7)\fP manual for discussion of additional care that must be taken when specifying usage requirements while creating packages for redistribution. .SS LINK_INTERFACE_LIBRARIES .sp List public interface libraries for a shared library or executable. .sp By default linking to a shared library target transitively links to targets with which the library itself was linked. For an executable with exports (see the \fBENABLE_EXPORTS\fP target property) no default transitive link dependencies are used. This property replaces the default transitive link dependencies with an explicit list. When the target is linked into another target using the \fBtarget_link_libraries()\fP command, the libraries listed (and recursively their link interface libraries) will be provided to the other target also. If the list is empty then no transitive link dependencies will be incorporated when this target is linked into another target even if the default set is non\-empty. This property is initialized by the value of the \fBCMAKE_LINK_INTERFACE_LIBRARIES\fP variable if it is set when a target is created. This property is ignored for \fBSTATIC\fP libraries. .sp This property is overridden by the \fBINTERFACE_LINK_LIBRARIES\fP property if policy \fBCMP0022\fP is \fBNEW\fP\&. .sp This property is deprecated. Use \fBINTERFACE_LINK_LIBRARIES\fP instead. .SS Creating Relocatable Packages .sp Note that it is not advisable to populate the \fBLINK_INTERFACE_LIBRARIES\fP of a target with absolute paths to dependencies. That would hard\-code into installed packages the library file paths for dependencies \fBas found on the machine the package was made on\fP\&. .sp See the Creating Relocatable Packages section of the \fBcmake\-packages(7)\fP manual for discussion of additional care that must be taken when specifying usage requirements while creating packages for redistribution. .SS LINK_INTERFACE_MULTIPLICITY_ .sp Per\-configuration repetition count for cycles of STATIC libraries. .sp This is the configuration\-specific version of LINK_INTERFACE_MULTIPLICITY. If set, this property completely overrides the generic property for the named configuration. .SS LINK_INTERFACE_MULTIPLICITY .sp Repetition count for STATIC libraries with cyclic dependencies. .sp When linking to a STATIC library target with cyclic dependencies the linker may need to scan more than once through the archives in the strongly connected component of the dependency graph. CMake by default constructs the link line so that the linker will scan through the component at least twice. This property specifies the minimum number of scans if it is larger than the default. CMake uses the largest value specified by any target in a component. .SS LINK_LIBRARIES .sp List of direct link dependencies. .sp This property specifies the list of libraries or targets which will be used for linking. In addition to accepting values from the \fBtarget_link_libraries()\fP command, values may be set directly on any target using the \fBset_property()\fP command. .sp The value of this property is used by the generators to set the link libraries for the compiler. .sp Contents of \fBLINK_LIBRARIES\fP may use "generator expressions" with the syntax \fB$<...>\fP\&. See the \fBcmake\-generator\-expressions(7)\fP manual for available expressions. See the \fBcmake\-buildsystem(7)\fP manual for more on defining buildsystem properties. .SS LINK_SEARCH_END_STATIC .sp End a link line such that static system libraries are used. .sp Some linkers support switches such as \-Bstatic and \-Bdynamic to determine whether to use static or shared libraries for \-lXXX options. CMake uses these options to set the link type for libraries whose full paths are not known or (in some cases) are in implicit link directories for the platform. By default CMake adds an option at the end of the library list (if necessary) to set the linker search type back to its starting type. This property switches the final linker search type to \-Bstatic regardless of how it started. .sp This property is initialized by the value of the variable CMAKE_LINK_SEARCH_END_STATIC if it is set when a target is created. .sp See also LINK_SEARCH_START_STATIC. .SS LINK_SEARCH_START_STATIC .sp Assume the linker looks for static libraries by default. .sp Some linkers support switches such as \-Bstatic and \-Bdynamic to determine whether to use static or shared libraries for \-lXXX options. CMake uses these options to set the link type for libraries whose full paths are not known or (in some cases) are in implicit link directories for the platform. By default the linker search type is assumed to be \-Bdynamic at the beginning of the library list. This property switches the assumption to \-Bstatic. It is intended for use when linking an executable statically (e.g. with the GNU \-static option). .sp This property is initialized by the value of the variable CMAKE_LINK_SEARCH_START_STATIC if it is set when a target is created. .sp See also LINK_SEARCH_END_STATIC. .SS LINK_WHAT_YOU_USE .sp This is a boolean option that when set to \fBTRUE\fP will automatically run \fBldd \-r \-u\fP on the target after it is linked. In addition, the linker flag \fB\-Wl,\-\-no\-as\-needed\fP will be passed to the target with the link command so that all libraries specified on the command line will be linked into the target. This will result in the link producing a list of libraries that provide no symbols used by this target but are being linked to it. This is only applicable to executable and shared library targets and will only work when ld and ldd accept the flags used. .sp This property is initialized by the value of the \fBCMAKE_LINK_WHAT_YOU_USE\fP variable if it is set when a target is created. .SS LOCATION_ .sp Read\-only property providing a target location on disk. .sp A read\-only property that indicates where a target\(aqs main file is located on disk for the configuration . The property is defined only for library and executable targets. An imported target may provide a set of configurations different from that of the importing project. By default CMake looks for an exact\-match but otherwise uses an arbitrary available configuration. Use the MAP_IMPORTED_CONFIG_ property to map imported configurations explicitly. .sp Do not set properties that affect the location of a target after reading this property. These include properties whose names match "(RUNTIME|LIBRARY|ARCHIVE)_OUTPUT_(NAME|DIRECTORY)(_)?", \fB(IMPLIB_)?(PREFIX|SUFFIX)\fP, or "LINKER_LANGUAGE". Failure to follow this rule is not diagnosed and leaves the location of the target undefined. .SS LOCATION .sp Read\-only location of a target on disk. .sp For an imported target, this read\-only property returns the value of the LOCATION_ property for an unspecified configuration provided by the target. .sp For a non\-imported target, this property is provided for compatibility with CMake 2.4 and below. It was meant to get the location of an executable target\(aqs output file for use in add_custom_command. The path may contain a build\-system\-specific portion that is replaced at build time with the configuration getting built (such as "$(ConfigurationName)" in VS). In CMake 2.6 and above add_custom_command automatically recognizes a target name in its COMMAND and DEPENDS options and computes the target location. In CMake 2.8.4 and above add_custom_command recognizes generator expressions to refer to target locations anywhere in the command. Therefore this property is not needed for creating custom commands. .sp Do not set properties that affect the location of a target after reading this property. These include properties whose names match "(RUNTIME|LIBRARY|ARCHIVE)_OUTPUT_(NAME|DIRECTORY)(_)?", \fB(IMPLIB_)?(PREFIX|SUFFIX)\fP, or "LINKER_LANGUAGE". Failure to follow this rule is not diagnosed and leaves the location of the target undefined. .SS MACOSX_BUNDLE_INFO_PLIST .sp Specify a custom \fBInfo.plist\fP template for a OS X and iOS Application Bundle. .sp An executable target with \fBMACOSX_BUNDLE\fP enabled will be built as an application bundle on OS X. By default its \fBInfo.plist\fP file is created by configuring a template called \fBMacOSXBundleInfo.plist.in\fP located in the \fBCMAKE_MODULE_PATH\fP\&. This property specifies an alternative template file name which may be a full path. .sp The following target properties may be set to specify content to be configured into the file: .INDENT 0.0 .TP .B \fBMACOSX_BUNDLE_BUNDLE_NAME\fP Sets \fBCFBundleName\fP\&. .TP .B \fBMACOSX_BUNDLE_BUNDLE_VERSION\fP Sets \fBCFBundleVersion\fP\&. .TP .B \fBMACOSX_BUNDLE_COPYRIGHT\fP Sets \fBNSHumanReadableCopyright\fP\&. .TP .B \fBMACOSX_BUNDLE_GUI_IDENTIFIER\fP Sets \fBCFBundleIdentifier\fP\&. .TP .B \fBMACOSX_BUNDLE_ICON_FILE\fP Sets \fBCFBundleIconFile\fP\&. .TP .B \fBMACOSX_BUNDLE_INFO_STRING\fP Sets \fBCFBundleGetInfoString\fP\&. .TP .B \fBMACOSX_BUNDLE_LONG_VERSION_STRING\fP Sets \fBCFBundleLongVersionString\fP\&. .TP .B \fBMACOSX_BUNDLE_SHORT_VERSION_STRING\fP Sets \fBCFBundleShortVersionString\fP\&. .UNINDENT .sp CMake variables of the same name may be set to affect all targets in a directory that do not have each specific property set. If a custom \fBInfo.plist\fP is specified by this property it may of course hard\-code all the settings instead of using the target properties. .SS MACOSX_BUNDLE .sp Build an executable as an Application Bundle on OS X or iOS. .sp When this property is set to \fBTRUE\fP the executable when built on OS X or iOS will be created as an application bundle. This makes it a GUI executable that can be launched from the Finder. See the \fBMACOSX_FRAMEWORK_INFO_PLIST\fP target property for information about creation of the \fBInfo.plist\fP file for the application bundle. This property is initialized by the value of the variable \fBCMAKE_MACOSX_BUNDLE\fP if it is set when a target is created. .SS MACOSX_FRAMEWORK_INFO_PLIST .sp Specify a custom \fBInfo.plist\fP template for a OS X and iOS Framework. .sp A library target with \fBFRAMEWORK\fP enabled will be built as a framework on OS X. By default its \fBInfo.plist\fP file is created by configuring a template called \fBMacOSXFrameworkInfo.plist.in\fP located in the \fBCMAKE_MODULE_PATH\fP\&. This property specifies an alternative template file name which may be a full path. .sp The following target properties may be set to specify content to be configured into the file: .INDENT 0.0 .TP .B \fBMACOSX_FRAMEWORK_BUNDLE_VERSION\fP Sets \fBCFBundleVersion\fP\&. .TP .B \fBMACOSX_FRAMEWORK_ICON_FILE\fP Sets \fBCFBundleIconFile\fP\&. .TP .B \fBMACOSX_FRAMEWORK_IDENTIFIER\fP Sets \fBCFBundleIdentifier\fP\&. .TP .B \fBMACOSX_FRAMEWORK_SHORT_VERSION_STRING\fP Sets \fBCFBundleShortVersionString\fP\&. .UNINDENT .sp CMake variables of the same name may be set to affect all targets in a directory that do not have each specific property set. If a custom \fBInfo.plist\fP is specified by this property it may of course hard\-code all the settings instead of using the target properties. .SS MACOSX_RPATH .sp Whether this target on OS X or iOS is located at runtime using rpaths. .sp When this property is set to \fBTRUE\fP, the directory portion of the \fBinstall_name\fP field of this shared library will be \fB@rpath\fP unless overridden by \fBINSTALL_NAME_DIR\fP\&. This indicates the shared library is to be found at runtime using runtime paths (rpaths). .sp This property is initialized by the value of the variable \fBCMAKE_MACOSX_RPATH\fP if it is set when a target is created. .sp Runtime paths will also be embedded in binaries using this target and can be controlled by the \fBINSTALL_RPATH\fP target property on the target linking to this target. .sp Policy \fBCMP0042\fP was introduced to change the default value of \fBMACOSX_RPATH\fP to \fBTRUE\fP\&. This is because use of \fB@rpath\fP is a more flexible and powerful alternative to \fB@executable_path\fP and \fB@loader_path\fP\&. .SS MAP_IMPORTED_CONFIG_ .sp Map from project configuration to IMPORTED target\(aqs configuration. .sp Set this to the list of configurations of an imported target that may be used for the current project\(aqs configuration. Targets imported from another project may not provide the same set of configuration names available in the current project. Setting this property tells CMake what imported configurations are suitable for use when building the configuration. The first configuration in the list found to be provided by the imported target is selected. If this property is set and no matching configurations are available, then the imported target is considered to be not found. This property is ignored for non\-imported targets. .sp This property is initialized by the value of the variable CMAKE_MAP_IMPORTED_CONFIG_ if it is set when a target is created. .SS NAME .sp Logical name for the target. .sp Read\-only logical name for the target as used by CMake. .SS NO_SONAME .sp Whether to set "soname" when linking a shared library. .sp Enable this boolean property if a generated shared library should not have "soname" set. Default is to set "soname" on all shared libraries as long as the platform supports it. Generally, use this property only for leaf private libraries or plugins. If you use it on normal shared libraries which other targets link against, on some platforms a linker will insert a full path to the library (as specified at link time) into the dynamic section of the dependent binary. Therefore, once installed, dynamic loader may eventually fail to locate the library for the binary. .SS NO_SYSTEM_FROM_IMPORTED .sp Do not treat includes from IMPORTED target interfaces as SYSTEM. .sp The contents of the INTERFACE_INCLUDE_DIRECTORIES of IMPORTED targets are treated as SYSTEM includes by default. If this property is enabled, the contents of the INTERFACE_INCLUDE_DIRECTORIES of IMPORTED targets are not treated as system includes. This property is initialized by the value of the variable CMAKE_NO_SYSTEM_FROM_IMPORTED if it is set when a target is created. .SS OSX_ARCHITECTURES_ .sp Per\-configuration OS X and iOS binary architectures for a target. .sp This property is the configuration\-specific version of \fBOSX_ARCHITECTURES\fP\&. .SS OSX_ARCHITECTURES .sp Target specific architectures for OS X. .sp The \fBOSX_ARCHITECTURES\fP property sets the target binary architecture for targets on OS X (\fB\-arch\fP). This property is initialized by the value of the variable \fBCMAKE_OSX_ARCHITECTURES\fP if it is set when a target is created. Use \fBOSX_ARCHITECTURES_\fP to set the binary architectures on a per\-configuration basis, where \fB\fP is an upper\-case name (e.g. \fBOSX_ARCHITECTURES_DEBUG\fP). .SS OUTPUT_NAME_ .sp Per\-configuration target file base name. .sp This is the configuration\-specific version of the \fBOUTPUT_NAME\fP target property. .SS OUTPUT_NAME .sp Output name for target files. .sp This sets the base name for output files created for an executable or library target. If not set, the logical target name is used by default. .sp Contents of \fBOUTPUT_NAME\fP and the variants listed below may use \fBgenerator expressions\fP\&. .sp See also the variants: .INDENT 0.0 .IP \(bu 2 \fBOUTPUT_NAME_\fP .IP \(bu 2 \fBARCHIVE_OUTPUT_NAME_\fP .IP \(bu 2 \fBARCHIVE_OUTPUT_NAME\fP .IP \(bu 2 \fBLIBRARY_OUTPUT_NAME_\fP .IP \(bu 2 \fBLIBRARY_OUTPUT_NAME\fP .IP \(bu 2 \fBRUNTIME_OUTPUT_NAME_\fP .IP \(bu 2 \fBRUNTIME_OUTPUT_NAME\fP .UNINDENT .SS PDB_NAME_ .sp Per\-configuration output name for the MS debug symbol \fB\&.pdb\fP file generated by the linker for an executable or shared library target. .sp This is the configuration\-specific version of \fBPDB_NAME\fP\&. .sp \fBNOTE:\fP .INDENT 0.0 .INDENT 3.5 This property does not apply to STATIC library targets because no linker is invoked to produce them so they have no linker\-generated \fB\&.pdb\fP file containing debug symbols. .sp The linker\-generated program database files are specified by the \fB/pdb\fP linker flag and are not the same as compiler\-generated program database files specified by the \fB/Fd\fP compiler flag. Use the \fBCOMPILE_PDB_NAME_\fP property to specify the latter. .UNINDENT .UNINDENT .SS PDB_NAME .sp Output name for the MS debug symbol \fB\&.pdb\fP file generated by the linker for an executable or shared library target. .sp This property specifies the base name for the debug symbols file. If not set, the \fBOUTPUT_NAME\fP target property value or logical target name is used by default. .sp \fBNOTE:\fP .INDENT 0.0 .INDENT 3.5 This property does not apply to STATIC library targets because no linker is invoked to produce them so they have no linker\-generated \fB\&.pdb\fP file containing debug symbols. .sp The linker\-generated program database files are specified by the \fB/pdb\fP linker flag and are not the same as compiler\-generated program database files specified by the \fB/Fd\fP compiler flag. Use the \fBCOMPILE_PDB_NAME\fP property to specify the latter. .UNINDENT .UNINDENT .SS PDB_OUTPUT_DIRECTORY_ .sp Per\-configuration output directory for the MS debug symbol \fB\&.pdb\fP file generated by the linker for an executable or shared library target. .sp This is a per\-configuration version of \fBPDB_OUTPUT_DIRECTORY\fP, but multi\-configuration generators (VS, Xcode) do NOT append a per\-configuration subdirectory to the specified directory. This property is initialized by the value of the \fBCMAKE_PDB_OUTPUT_DIRECTORY_\fP variable if it is set when a target is created. .sp \fBNOTE:\fP .INDENT 0.0 .INDENT 3.5 This property does not apply to STATIC library targets because no linker is invoked to produce them so they have no linker\-generated \fB\&.pdb\fP file containing debug symbols. .sp The linker\-generated program database files are specified by the \fB/pdb\fP linker flag and are not the same as compiler\-generated program database files specified by the \fB/Fd\fP compiler flag. Use the \fBCOMPILE_PDB_OUTPUT_DIRECTORY_\fP property to specify the latter. .UNINDENT .UNINDENT .SS PDB_OUTPUT_DIRECTORY .sp Output directory for the MS debug symbols \fB\&.pdb\fP file generated by the linker for an executable or shared library target. .sp This property specifies the directory into which the MS debug symbols will be placed by the linker. This property is initialized by the value of the \fBCMAKE_PDB_OUTPUT_DIRECTORY\fP variable if it is set when a target is created. .sp \fBNOTE:\fP .INDENT 0.0 .INDENT 3.5 This property does not apply to STATIC library targets because no linker is invoked to produce them so they have no linker\-generated \fB\&.pdb\fP file containing debug symbols. .sp The linker\-generated program database files are specified by the \fB/pdb\fP linker flag and are not the same as compiler\-generated program database files specified by the \fB/Fd\fP compiler flag. Use the \fBCOMPILE_PDB_OUTPUT_DIRECTORY\fP property to specify the latter. .UNINDENT .UNINDENT .SS POSITION_INDEPENDENT_CODE .sp Whether to create a position\-independent target .sp The \fBPOSITION_INDEPENDENT_CODE\fP property determines whether position independent executables or shared libraries will be created. This property is \fBTrue\fP by default for \fBSHARED\fP and \fBMODULE\fP library targets and \fBFalse\fP otherwise. This property is initialized by the value of the \fBCMAKE_POSITION_INDEPENDENT_CODE\fP variable if it is set when a target is created. .SS PREFIX .sp What comes before the library name. .sp A target property that can be set to override the prefix (such as "lib") on a library name. .SS PRIVATE_HEADER .sp Specify private header files in a \fBFRAMEWORK\fP shared library target. .sp Shared library targets marked with the \fBFRAMEWORK\fP property generate frameworks on OS X, iOS and normal shared libraries on other platforms. This property may be set to a list of header files to be placed in the PrivateHeaders directory inside the framework folder. On non\-Apple platforms these headers may be installed using the \fBPRIVATE_HEADER\fP option to the \fBinstall(TARGETS)\fP command. .SS PROJECT_LABEL .sp Change the name of a target in an IDE. .sp Can be used to change the name of the target in an IDE like Visual Studio. .SS PUBLIC_HEADER .sp Specify public header files in a \fBFRAMEWORK\fP shared library target. .sp Shared library targets marked with the \fBFRAMEWORK\fP property generate frameworks on OS X, iOS and normal shared libraries on other platforms. This property may be set to a list of header files to be placed in the \fBHeaders\fP directory inside the framework folder. On non\-Apple platforms these headers may be installed using the \fBPUBLIC_HEADER\fP option to the \fBinstall(TARGETS)\fP command. .SS RESOURCE .sp Specify resource files in a \fBFRAMEWORK\fP or \fBBUNDLE\fP\&. .sp Target marked with the \fBFRAMEWORK\fP or \fBBUNDLE\fP property generate framework or application bundle (both OS X and iOS is supported) or normal shared libraries on other platforms. This property may be set to a list of files to be placed in the corresponding directory (eg. \fBResources\fP directory for OS X) inside the bundle. On non\-Apple platforms these files may be installed using the \fBRESOURCE\fP option to the \fBinstall(TARGETS)\fP command. .sp Following example of Application Bundle: .INDENT 0.0 .INDENT 3.5 .sp .nf .ft C add_executable(ExecutableTarget addDemo.c resourcefile.txt appresourcedir/appres.txt ) target_link_libraries(ExecutableTarget heymath mul) set(RESOURCE_FILES resourcefile.txt appresourcedir/appres.txt ) set_target_properties(ExecutableTarget PROPERTIES MACOSX_BUNDLE TRUE MACOSX_FRAMEWORK_IDENTIFIER org.cmake.ExecutableTarget RESOURCE "${RESOURCE_FILES}" ) .ft P .fi .UNINDENT .UNINDENT .sp will produce flat structure for iOS systems: .INDENT 0.0 .INDENT 3.5 .sp .nf .ft C ExecutableTarget.app appres.txt ExecutableTarget Info.plist resourcefile.txt .ft P .fi .UNINDENT .UNINDENT .sp For OS X systems it will produce following directory structure: .INDENT 0.0 .INDENT 3.5 .sp .nf .ft C ExecutableTarget.app/ Contents Info.plist MacOS ExecutableTarget Resources appres.txt resourcefile.txt .ft P .fi .UNINDENT .UNINDENT .sp For Linux, such cmake script produce following files: .INDENT 0.0 .INDENT 3.5 .sp .nf .ft C ExecutableTarget Resources appres.txt resourcefile.txt .ft P .fi .UNINDENT .UNINDENT .SS RULE_LAUNCH_COMPILE .sp Specify a launcher for compile rules. .sp See the global property of the same name for details. This overrides the global and directory property for a target. .SS RULE_LAUNCH_CUSTOM .sp Specify a launcher for custom rules. .sp See the global property of the same name for details. This overrides the global and directory property for a target. .SS RULE_LAUNCH_LINK .sp Specify a launcher for link rules. .sp See the global property of the same name for details. This overrides the global and directory property for a target. .SS RUNTIME_OUTPUT_DIRECTORY_ .sp Per\-configuration output directory for RUNTIME target files. .sp This is a per\-configuration version of the \fBRUNTIME_OUTPUT_DIRECTORY\fP target property, but multi\-configuration generators (VS, Xcode) do NOT append a per\-configuration subdirectory to the specified directory. This property is initialized by the value of the \fBCMAKE_RUNTIME_OUTPUT_DIRECTORY_\fP variable if it is set when a target is created. .sp Contents of \fBRUNTIME_OUTPUT_DIRECTORY_\fP may use \fBgenerator expressions\fP\&. .SS RUNTIME_OUTPUT_DIRECTORY .sp Output directory in which to build RUNTIME target files. .sp This property specifies the directory into which runtime target files should be built. The property value may use \fBgenerator expressions\fP\&. Multi\-configuration generators (VS, Xcode) append a per\-configuration subdirectory to the specified directory unless a generator expression is used. .sp This property is initialized by the value of the variable CMAKE_RUNTIME_OUTPUT_DIRECTORY if it is set when a target is created. .sp See also the \fBRUNTIME_OUTPUT_DIRECTORY_\fP target property. .SS RUNTIME_OUTPUT_NAME_ .sp Per\-configuration output name for RUNTIME target files. .sp This is the configuration\-specific version of the \fBRUNTIME_OUTPUT_NAME\fP target property. .SS RUNTIME_OUTPUT_NAME .sp Output name for RUNTIME target files. .sp This property specifies the base name for runtime target files. It overrides \fBOUTPUT_NAME\fP and \fBOUTPUT_NAME_\fP properties. .sp See also the \fBRUNTIME_OUTPUT_NAME_\fP target property. .SS SKIP_BUILD_RPATH .sp Should rpaths be used for the build tree. .sp SKIP_BUILD_RPATH is a boolean specifying whether to skip automatic generation of an rpath allowing the target to run from the build tree. This property is initialized by the value of the variable CMAKE_SKIP_BUILD_RPATH if it is set when a target is created. .SS SOURCE_DIR .sp This read\-only property reports the value of the \fBCMAKE_CURRENT_SOURCE_DIR\fP variable in the directory in which the target was defined. .SS SOURCES .sp Source names specified for a target. .sp List of sources specified for a target. .SS SOVERSION .sp What version number is this target. .sp For shared libraries \fBVERSION\fP and \fBSOVERSION\fP can be used to specify the build version and API version respectively. When building or installing appropriate symlinks are created if the platform supports symlinks and the linker supports so\-names. If only one of both is specified the missing is assumed to have the same version number. \fBSOVERSION\fP is ignored if \fBNO_SONAME\fP property is set. .SS Windows Versions .sp For shared libraries and executables on Windows the \fBVERSION\fP attribute is parsed to extract a \fB.\fP version number. These numbers are used as the image version of the binary. .SS Mach\-O Versions .sp For shared libraries and executables on Mach\-O systems (e.g. OS X, iOS), the \fBSOVERSION\fP property corresponds to \fIcompatibility version\fP and \fBVERSION\fP to \fIcurrent version\fP\&. See the \fBFRAMEWORK\fP target property for an example. Versions of Mach\-O binaries may be checked with the \fBotool \-L \fP command. .SS STATIC_LIBRARY_FLAGS_ .sp Per\-configuration flags for creating a static library. .sp This is the configuration\-specific version of STATIC_LIBRARY_FLAGS. .SS STATIC_LIBRARY_FLAGS .sp Extra flags to use when linking static libraries. .sp Extra flags to use when linking a static library. .SS SUFFIX .sp What comes after the target name. .sp A target property that can be set to override the suffix (such as ".so" or ".exe") on the name of a library, module or executable. .SS TYPE .sp The type of the target. .sp This read\-only property can be used to test the type of the given target. It will be one of STATIC_LIBRARY, MODULE_LIBRARY, SHARED_LIBRARY, INTERFACE_LIBRARY, EXECUTABLE or one of the internal target types. .SS VERSION .sp What version number is this target. .sp For shared libraries \fBVERSION\fP and \fBSOVERSION\fP can be used to specify the build version and API version respectively. When building or installing appropriate symlinks are created if the platform supports symlinks and the linker supports so\-names. If only one of both is specified the missing is assumed to have the same version number. For executables \fBVERSION\fP can be used to specify the build version. When building or installing appropriate symlinks are created if the platform supports symlinks. .SS Windows Versions .sp For shared libraries and executables on Windows the \fBVERSION\fP attribute is parsed to extract a \fB.\fP version number. These numbers are used as the image version of the binary. .SS Mach\-O Versions .sp For shared libraries and executables on Mach\-O systems (e.g. OS X, iOS), the \fBSOVERSION\fP property correspond to \fIcompatibility version\fP and \fBVERSION\fP to \fIcurrent version\fP\&. See the \fBFRAMEWORK\fP target property for an example. Versions of Mach\-O binaries may be checked with the \fBotool \-L \fP command. .SS VISIBILITY_INLINES_HIDDEN .sp Whether to add a compile flag to hide symbols of inline functions .sp The \fBVISIBILITY_INLINES_HIDDEN\fP property determines whether a flag for hiding symbols for inline functions, such as \fB\-fvisibility\-inlines\-hidden\fP, should be used when invoking the compiler. This property affects compilation in sources of all types of targets (subject to policy \fBCMP0063\fP). .sp This property is initialized by the value of the \fBCMAKE_VISIBILITY_INLINES_HIDDEN\fP variable if it is set when a target is created. .SS VS_CONFIGURATION_TYPE .sp Visual Studio project configuration type. .sp Sets the \fBConfigurationType\fP attribute for a generated Visual Studio project. If this property is set, it overrides the default setting that is based on the target type (e.g. \fBStaticLibrary\fP, \fBApplication\fP, ...). .sp Supported on Visual Studio Generators for VS 2010 and higher. .SS VS_DESKTOP_EXTENSIONS_VERSION .sp Visual Studio Windows 10 Desktop Extensions Version .sp Specifies the version of the Desktop Extensions that should be included in the target. For example \fB10.0.10240.0\fP\&. If the value is not specified, the Desktop Extensions will not be included. To use the same version of the extensions as the Windows 10 SDK that is being used, you can use the \fBCMAKE_VS_WINDOWS_TARGET_PLATFORM_VERSION\fP variable. .SS VS_DOTNET_REFERENCES .sp Visual Studio managed project .NET references .sp Adds one or more semicolon\-delimited .NET references to a generated Visual Studio project. For example, "System;System.Windows.Forms". .SS VS_DOTNET_TARGET_FRAMEWORK_VERSION .sp Specify the .NET target framework version. .sp Used to specify the .NET target framework version for C++/CLI. For example, "v4.5". .SS VS_GLOBAL_KEYWORD .sp Visual Studio project keyword for VS 10 (2010) and newer. .sp Sets the "keyword" attribute for a generated Visual Studio project. Defaults to "Win32Proj". You may wish to override this value with "ManagedCProj", for example, in a Visual Studio managed C++ unit test project. .sp Use the \fBVS_KEYWORD\fP target property to set the keyword for Visual Studio 9 (2008) and older. .SS VS_GLOBAL_PROJECT_TYPES .sp Visual Studio project type(s). .sp Can be set to one or more UUIDs recognized by Visual Studio to indicate the type of project. This value is copied verbatim into the generated project file. Example for a managed C++ unit testing project: .INDENT 0.0 .INDENT 3.5 .sp .nf .ft C {3AC096D0\-A1C2\-E12C\-1390\-A8335801FDAB};{8BC9CEB8\-8B4A\-11D0\-8D11\-00A0C91BC942} .ft P .fi .UNINDENT .UNINDENT .sp UUIDs are semicolon\-delimited. .SS VS_GLOBAL_ROOTNAMESPACE .sp Visual Studio project root namespace. .sp Sets the "RootNamespace" attribute for a generated Visual Studio project. The attribute will be generated only if this is set. .SS VS_GLOBAL_ .sp Visual Studio project\-specific global variable. .sp Tell the Visual Studio generator to set the global variable \(aq\(aq to a given value in the generated Visual Studio project. Ignored on other generators. Qt integration works better if VS_GLOBAL_QtVersion is set to the version FindQt4.cmake found. For example, "4.7.3" .SS VS_IOT_EXTENSIONS_VERSION .sp Visual Studio Windows 10 IoT Extensions Version .sp Specifies the version of the IoT Extensions that should be included in the target. For example \fB10.0.10240.0\fP\&. If the value is not specified, the IoT Extensions will not be included. To use the same version of the extensions as the Windows 10 SDK that is being used, you can use the \fBCMAKE_VS_WINDOWS_TARGET_PLATFORM_VERSION\fP variable. .SS VS_IOT_STARTUP_TASK .sp Visual Studio Windows 10 IoT Continuous Background Task .sp Specifies that the target should be compiled as a Continuous Background Task library. .SS VS_KEYWORD .sp Visual Studio project keyword for VS 9 (2008) and older. .sp Can be set to change the visual studio keyword, for example Qt integration works better if this is set to Qt4VSv1.0. .sp Use the \fBVS_GLOBAL_KEYWORD\fP target property to set the keyword for Visual Studio 10 (2010) and newer. .SS VS_MOBILE_EXTENSIONS_VERSION .sp Visual Studio Windows 10 Mobile Extensions Version .sp Specifies the version of the Mobile Extensions that should be included in the target. For example \fB10.0.10240.0\fP\&. If the value is not specified, the Mobile Extensions will not be included. To use the same version of the extensions as the Windows 10 SDK that is being used, you can use the \fBCMAKE_VS_WINDOWS_TARGET_PLATFORM_VERSION\fP variable. .SS VS_SCC_AUXPATH .sp Visual Studio Source Code Control Aux Path. .sp Can be set to change the visual studio source code control auxpath property. .SS VS_SCC_LOCALPATH .sp Visual Studio Source Code Control Local Path. .sp Can be set to change the visual studio source code control local path property. .SS VS_SCC_PROJECTNAME .sp Visual Studio Source Code Control Project. .sp Can be set to change the visual studio source code control project name property. .SS VS_SCC_PROVIDER .sp Visual Studio Source Code Control Provider. .sp Can be set to change the visual studio source code control provider property. .SS VS_SDK_REFERENCES .sp Visual Studio project SDK references. Specify a ;\-list of SDK references to be added to a generated Visual Studio project, e.g. \fBMicrosoft.AdMediatorWindows81, Version=1.0\fP\&. .SS VS_WINDOWS_TARGET_PLATFORM_MIN_VERSION .sp Visual Studio Windows Target Platform Minimum Version .sp For Windows 10. Specifies the minimum version of the OS that is being targeted. For example \fB10.0.10240.0\fP\&. If the value is not specified, the value of \fBCMAKE_VS_WINDOWS_TARGET_PLATFORM_VERSION\fP will be used on WindowsStore projects otherwise the target platform minimum version will not be specified for the project. .SS VS_WINRT_COMPONENT .sp Mark a target as a Windows Runtime component for the Visual Studio generator. Compile the target with \fBC++/CX\fP language extensions for Windows Runtime. For \fBSHARED\fP and \fBMODULE\fP libraries, this also defines the \fB_WINRT_DLL\fP preprocessor macro. .sp \fBNOTE:\fP .INDENT 0.0 .INDENT 3.5 Currently this is implemented only by Visual Studio generators. Support may be added to other generators in the future. .UNINDENT .UNINDENT .SS VS_WINRT_EXTENSIONS .sp Deprecated. Use \fBVS_WINRT_COMPONENT\fP instead. This property was an experimental partial implementation of that one. .SS VS_WINRT_REFERENCES .sp Visual Studio project Windows Runtime Metadata references .sp Adds one or more semicolon\-delimited WinRT references to a generated Visual Studio project. For example, "Windows;Windows.UI.Core". .SS WIN32_EXECUTABLE .sp Build an executable with a WinMain entry point on windows. .sp When this property is set to true the executable when linked on Windows will be created with a WinMain() entry point instead of just main(). This makes it a GUI executable instead of a console application. See the CMAKE_MFC_FLAG variable documentation to configure use of MFC for WinMain executables. This property is initialized by the value of the variable CMAKE_WIN32_EXECUTABLE if it is set when a target is created. .SS WINDOWS_EXPORT_ALL_SYMBOLS .sp This property is implemented only for MS\-compatible tools on Windows. .sp Enable this boolean property to automatically create a module definition (\fB\&.def\fP) file with all global symbols found in the input \fB\&.obj\fP files for a \fBSHARED\fP library (or executable with \fBENABLE_EXPORTS\fP) on Windows. The module definition file will be passed to the linker causing all symbols to be exported from the \fB\&.dll\fP\&. For global \fIdata\fP symbols, \fB__declspec(dllimport)\fP must still be used when compiling against the code in the \fB\&.dll\fP\&. All other function symbols will be automatically exported and imported by callers. This simplifies porting projects to Windows by reducing the need for explicit \fBdllexport\fP markup, even in \fBC++\fP classes. .sp This property is initialized by the value of the \fBCMAKE_WINDOWS_EXPORT_ALL_SYMBOLS\fP variable if it is set when a target is created. .SS XCODE_ATTRIBUTE_ .sp Set Xcode target attributes directly. .sp Tell the Xcode generator to set \(aq\(aq to a given value in the generated Xcode project. Ignored on other generators. .sp See the \fBCMAKE_XCODE_ATTRIBUTE_\fP variable to set attributes on all targets in a directory tree. .sp Contents of \fBXCODE_ATTRIBUTE_\fP may use "generator expressions" with the syntax \fB$<...>\fP\&. See the \fBcmake\-generator\-expressions(7)\fP manual for available expressions. See the \fBcmake\-buildsystem(7)\fP manual for more on defining buildsystem properties. .SS XCTEST .sp This target is a XCTest CFBundle on the Mac. .sp This property will usually get set via the \fBxctest_add_bundle()\fP macro in \fBFindXCTest\fP module. .sp If a module library target has this property set to true it will be built as a CFBundle when built on the Mac. It will have the directory structure required for a CFBundle. .sp This property depends on \fBBUNDLE\fP to be effective. .SH PROPERTIES ON TESTS .SS ATTACHED_FILES_ON_FAIL .sp Attach a list of files to a dashboard submission if the test fails. .sp Same as \fBATTACHED_FILES\fP, but these files will only be included if the test does not pass. .SS ATTACHED_FILES .sp Attach a list of files to a dashboard submission. .sp Set this property to a list of files that will be encoded and submitted to the dashboard as an addition to the test result. .SS COST .sp Set this to a floating point value. Tests in a test set will be run in descending order of cost. .sp This property describes the cost of a test. You can explicitly set this value; tests with higher COST values will run first. .SS DEPENDS .sp Specifies that this test should only be run after the specified list of tests. .sp Set this to a list of tests that must finish before this test is run. The results of those tests are not considered, the dependency relationship is purely for order of execution (i.e. it is really just a \fIrun after\fP relationship). Consider using test fixtures with setup tests if a dependency with successful completion is required (see \fBFIXTURES_REQUIRED\fP). .SS ENVIRONMENT .sp Specify environment variables that should be defined for running a test. .sp If set to a list of environment variables and values of the form MYVAR=value those environment variables will be defined while running the test. The environment is restored to its previous state after the test is done. .SS FAIL_REGULAR_EXPRESSION .sp If the output matches this regular expression the test will fail. .sp If set, if the output matches one of specified regular expressions, the test will fail. Example: .INDENT 0.0 .INDENT 3.5 .sp .nf .ft C set_tests_properties(mytest PROPERTIES FAIL_REGULAR_EXPRESSION "[^a\-z]Error;ERROR;Failed" ) .ft P .fi .UNINDENT .UNINDENT .sp \fBFAIL_REGULAR_EXPRESSION\fP expects a list of regular expressions. .SS FIXTURES_CLEANUP .sp Specifies a list of fixtures for which the test is to be treated as a cleanup test. .sp Fixture cleanup tests are ordinary tests with all of the usual test functionality. Setting the \fBFIXTURES_CLEANUP\fP property for a test has two primary effects: .INDENT 0.0 .IP \(bu 2 CTest will ensure the test executes after all other tests which list any of the fixtures in its \fBFIXTURES_REQUIRED\fP property. .IP \(bu 2 If CTest is asked to run only a subset of tests (e.g. using regular expressions or the \fB\-\-rerun\-failed\fP option) and the cleanup test is not in the set of tests to run, it will automatically be added if any tests in the set require any fixture listed in \fBFIXTURES_CLEANUP\fP\&. .UNINDENT .sp A cleanup test can have multiple fixtures listed in its \fBFIXTURES_CLEANUP\fP property. It will execute only once for the whole CTest run, not once for each fixture. A fixture can also have more than one cleanup test defined. If there are multiple cleanup tests for a fixture, projects can control their order with the usual \fBDEPENDS\fP test property if necessary. .sp A cleanup test is allowed to require other fixtures, but not any fixture listed in its \fBFIXTURES_CLEANUP\fP property. For example: .INDENT 0.0 .INDENT 3.5 .sp .nf .ft C # Ok: Dependent fixture is different to cleanup set_tests_properties(cleanupFoo PROPERTIES FIXTURES_CLEANUP Foo FIXTURES_REQUIRED Bar ) # Error: cannot require same fixture as cleanup set_tests_properties(cleanupFoo PROPERTIES FIXTURES_CLEANUP Foo FIXTURES_REQUIRED Foo ) .ft P .fi .UNINDENT .UNINDENT .sp Cleanup tests will execute even if setup or regular tests for that fixture fail or are skipped. .sp See \fBFIXTURES_REQUIRED\fP for a more complete discussion of how to use test fixtures. .SS FIXTURES_REQUIRED .sp Specifies a list of fixtures the test requires. Fixture names are case sensitive. .sp Fixtures are a way to attach setup and cleanup tasks to a set of tests. If a test requires a given fixture, then all tests marked as setup tasks for that fixture will be executed first (once for the whole set of tests, not once per test requiring the fixture). After all tests requiring a particular fixture have completed, CTest will ensure all tests marked as cleanup tasks for that fixture are then executed. Tests are marked as setup tasks with the \fBFIXTURES_SETUP\fP property and as cleanup tasks with the \fBFIXTURES_CLEANUP\fP property. If any of a fixture\(aqs setup tests fail, all tests listing that fixture in their \fBFIXTURES_REQUIRED\fP property will not be executed. The cleanup tests for the fixture will always be executed, even if some setup tests fail. .sp When CTest is asked to execute only a subset of tests (e.g. by the use of regular expressions or when run with the \fB\-\-rerun\-failed\fP command line option), it will automatically add any setup or cleanup tests for fixtures required by any of the tests that are in the execution set. .sp Since setup and cleanup tasks are also tests, they can have an ordering specified by the \fBDEPENDS\fP test property just like any other tests. This can be exploited to implement setup or cleanup using multiple tests for a single fixture to modularise setup or cleanup logic. .sp The concept of a fixture is different to that of a resource specified by \fBRESOURCE_LOCK\fP, but they may be used together. A fixture defines a set of tests which share setup and cleanup requirements, whereas a resource lock has the effect of ensuring a particular set of tests do not run in parallel. Some situations may need both, such as setting up a database, serialising test access to that database and deleting the database again at the end. For such cases, tests would populate both \fBFIXTURES_REQUIRED\fP and \fBRESOURCE_LOCK\fP to combine the two behaviours. Names used for \fBRESOURCE_LOCK\fP have no relationship with names of fixtures, so note that a resource lock does not imply a fixture and vice versa. .sp Consider the following example which represents a database test scenario similar to that mentioned above: .INDENT 0.0 .INDENT 3.5 .sp .nf .ft C add_test(NAME testsDone COMMAND emailResults) add_test(NAME fooOnly COMMAND testFoo) add_test(NAME dbOnly COMMAND testDb) add_test(NAME dbWithFoo COMMAND testDbWithFoo) add_test(NAME createDB COMMAND initDB) add_test(NAME setupUsers COMMAND userCreation) add_test(NAME cleanupDB COMMAND deleteDB) add_test(NAME cleanupFoo COMMAND removeFoos) set_tests_properties(setupUsers PROPERTIES DEPENDS createDB) set_tests_properties(createDB PROPERTIES FIXTURES_SETUP DB) set_tests_properties(setupUsers PROPERTIES FIXTURES_SETUP DB) set_tests_properties(cleanupDB PROPERTIES FIXTURES_CLEANUP DB) set_tests_properties(cleanupFoo PROPERTIES FIXTURES_CLEANUP Foo) set_tests_properties(testsDone PROPERTIES FIXTURES_CLEANUP "DB;Foo") set_tests_properties(fooOnly PROPERTIES FIXTURES_REQUIRED Foo) set_tests_properties(dbOnly PROPERTIES FIXTURES_REQUIRED DB) set_tests_properties(dbWithFoo PROPERTIES FIXTURES_REQUIRED "DB;Foo") set_tests_properties(dbOnly dbWithFoo createDB setupUsers cleanupDB PROPERTIES RESOURCE_LOCK DbAccess) .ft P .fi .UNINDENT .UNINDENT .sp Key points from this example: .INDENT 0.0 .IP \(bu 2 Two fixtures are defined: \fBDB\fP and \fBFoo\fP\&. Tests can require a single fixture as \fBfooOnly\fP and \fBdbOnly\fP do, or they can depend on multiple fixtures like \fBdbWithFoo\fP does. .IP \(bu 2 A \fBDEPENDS\fP relationship is set up to ensure \fBsetupUsers\fP happens after \fBcreateDB\fP, both of which are setup tests for the \fBDB\fP fixture and will therefore be executed before the \fBdbOnly\fP and \fBdbWithFoo\fP tests automatically. .IP \(bu 2 No explicit \fBDEPENDS\fP relationships were needed to make the setup tests run before or the cleanup tests run after the regular tests. .IP \(bu 2 The \fBFoo\fP fixture has no setup tests defined, only a single cleanup test. .IP \(bu 2 \fBtestsDone\fP is a cleanup test for both the \fBDB\fP and \fBFoo\fP fixtures. Therefore, it will only execute once regular tests for both fixtures have finished (i.e. after \fBfooOnly\fP, \fBdbOnly\fP and \fBdbWithFoo\fP). No \fBDEPENDS\fP relationship was specified for \fBtestsDone\fP, so it is free to run before, after or concurrently with other cleanup tests for either fixture. .IP \(bu 2 The setup and cleanup tests never list the fixtures they are for in their own \fBFIXTURES_REQUIRED\fP property, as that would result in a dependency on themselves and be considered an error. .UNINDENT .SS FIXTURES_SETUP .sp Specifies a list of fixtures for which the test is to be treated as a setup test. .sp Fixture setup tests are ordinary tests with all of the usual test functionality. Setting the \fBFIXTURES_SETUP\fP property for a test has two primary effects: .INDENT 0.0 .IP \(bu 2 CTest will ensure the test executes before any other test which lists the fixture(s) in its \fBFIXTURES_REQUIRED\fP property. .IP \(bu 2 If CTest is asked to run only a subset of tests (e.g. using regular expressions or the \fB\-\-rerun\-failed\fP option) and the setup test is not in the set of tests to run, it will automatically be added if any tests in the set require any fixture listed in \fBFIXTURES_SETUP\fP\&. .UNINDENT .sp A setup test can have multiple fixtures listed in its \fBFIXTURES_SETUP\fP property. It will execute only once for the whole CTest run, not once for each fixture. A fixture can also have more than one setup test defined. If there are multiple setup tests for a fixture, projects can control their order with the usual \fBDEPENDS\fP test property if necessary. .sp A setup test is allowed to require other fixtures, but not any fixture listed in its \fBFIXTURES_SETUP\fP property. For example: .INDENT 0.0 .INDENT 3.5 .sp .nf .ft C # Ok: dependent fixture is different to setup set_tests_properties(setupFoo PROPERTIES FIXTURES_SETUP Foo FIXTURES_REQUIRED Bar ) # Error: cannot require same fixture as setup set_tests_properties(setupFoo PROPERTIES FIXTURES_SETUP Foo FIXTURES_REQUIRED Foo ) .ft P .fi .UNINDENT .UNINDENT .sp If any of a fixture\(aqs setup tests fail, none of the tests listing that fixture in its \fBFIXTURES_REQUIRED\fP property will be run. Cleanup tests will, however, still be executed. .sp See \fBFIXTURES_REQUIRED\fP for a more complete discussion of how to use test fixtures. .SS LABELS .sp Specify a list of text labels associated with a test. .sp The list is reported in dashboard submissions. .SS MEASUREMENT .sp Specify a CDASH measurement and value to be reported for a test. .sp If set to a name then that name will be reported to CDASH as a named measurement with a value of 1. You may also specify a value by setting MEASUREMENT to "measurement=value". .SS PASS_REGULAR_EXPRESSION .sp The output must match this regular expression for the test to pass. .sp If set, the test output will be checked against the specified regular expressions and at least one of the regular expressions has to match, otherwise the test will fail. Example: .INDENT 0.0 .INDENT 3.5 .sp .nf .ft C set_tests_properties(mytest PROPERTIES PASS_REGULAR_EXPRESSION "TestPassed;All ok" ) .ft P .fi .UNINDENT .UNINDENT .sp \fBPASS_REGULAR_EXPRESSION\fP expects a list of regular expressions. .SS PROCESSORS .sp How many process slots this test requires .sp Denotes the number of processors that this test will require. This is typically used for MPI tests, and should be used in conjunction with the ctest_test PARALLEL_LEVEL option. .SS REQUIRED_FILES .sp List of files required to run the test. .sp If set to a list of files, the test will not be run unless all of the files exist. .SS RESOURCE_LOCK .sp Specify a list of resources that are locked by this test. .sp If multiple tests specify the same resource lock, they are guaranteed not to run concurrently. .sp See also \fBFIXTURES_REQUIRED\fP if the resource requires any setup or cleanup steps. .SS RUN_SERIAL .sp Do not run this test in parallel with any other test. .sp Use this option in conjunction with the ctest_test PARALLEL_LEVEL option to specify that this test should not be run in parallel with any other tests. .SS SKIP_RETURN_CODE .sp Return code to mark a test as skipped. .sp Sometimes only a test itself can determine if all requirements for the test are met. If such a situation should not be considered a hard failure a return code of the process can be specified that will mark the test as "Not Run" if it is encountered. .SS TIMEOUT .sp How many seconds to allow for this test. .sp This property if set will limit a test to not take more than the specified number of seconds to run. If it exceeds that the test process will be killed and ctest will move to the next test. This setting takes precedence over \fBCTEST_TEST_TIMEOUT\fP\&. .SS TIMEOUT_AFTER_MATCH .sp Change a test\(aqs timeout duration after a matching line is encountered in its output. .SS Usage .INDENT 0.0 .INDENT 3.5 .sp .nf .ft C add_test(mytest ...) set_property(TEST mytest PROPERTY TIMEOUT_AFTER_MATCH "${seconds}" "${regex}") .ft P .fi .UNINDENT .UNINDENT .SS Description .sp Allow a test \fBseconds\fP to complete after \fBregex\fP is encountered in its output. .sp When the test outputs a line that matches \fBregex\fP its start time is reset to the current time and its timeout duration is changed to \fBseconds\fP\&. Prior to this, the timeout duration is determined by the \fBTIMEOUT\fP property or the \fBCTEST_TEST_TIMEOUT\fP variable if either of these are set. .sp \fI\%TIMEOUT_AFTER_MATCH\fP is useful for avoiding spurious timeouts when your test must wait for some system resource to become available before it can execute. Set \fBTIMEOUT\fP to a longer duration that accounts for resource acquisition and use \fI\%TIMEOUT_AFTER_MATCH\fP to control how long the actual test is allowed to run. .sp If the required resource can be controlled by CTest you should use \fBRESOURCE_LOCK\fP instead of \fI\%TIMEOUT_AFTER_MATCH\fP\&. This property should be used when only the test itself can determine when its required resources are available. .SS WILL_FAIL .sp If set to true, this will invert the pass/fail flag of the test. .sp This property can be used for tests that are expected to fail and return a non zero return code. .SS WORKING_DIRECTORY .sp The directory from which the test executable will be called. .sp If this is not set it is called from the directory the test executable is located in. .SH PROPERTIES ON SOURCE FILES .SS ABSTRACT .sp Is this source file an abstract class. .sp A property on a source file that indicates if the source file represents a class that is abstract. This only makes sense for languages that have a notion of an abstract class and it is only used by some tools that wrap classes into other languages. .SS AUTOUIC_OPTIONS .sp Additional options for \fBuic\fP when using \fBAUTOUIC\fP .sp This property holds additional command line options which will be used when \fBuic\fP is executed during the build via \fBAUTOUIC\fP, i.e. it is equivalent to the optional \fBOPTIONS\fP argument of the \fBqt4_wrap_ui()\fP macro. .sp By default it is empty. .sp The options set on the \fB\&.ui\fP source file may override \fBAUTOUIC_OPTIONS\fP set on the target. .SS AUTORCC_OPTIONS .sp Additional options for \fBrcc\fP when using \fBAUTORCC\fP .sp This property holds additional command line options which will be used when \fBrcc\fP is executed during the build via \fBAUTORCC\fP, i.e. it is equivalent to the optional \fBOPTIONS\fP argument of the \fBqt4_add_resources()\fP macro. .sp By default it is empty. .sp The options set on the \fB\&.qrc\fP source file may override \fBAUTORCC_OPTIONS\fP set on the target. .SS COMPILE_DEFINITIONS .sp Preprocessor definitions for compiling a source file. .sp The COMPILE_DEFINITIONS property may be set to a semicolon\-separated list of preprocessor definitions using the syntax VAR or VAR=value. Function\-style definitions are not supported. CMake will automatically escape the value correctly for the native build system (note that CMake language syntax may require escapes to specify some values). This property may be set on a per\-configuration basis using the name COMPILE_DEFINITIONS_ where is an upper\-case name (ex. "COMPILE_DEFINITIONS_DEBUG"). .sp CMake will automatically drop some definitions that are not supported by the native build tool. Xcode does not support per\-configuration definitions on source files. .sp Disclaimer: Most native build tools have poor support for escaping certain values. CMake has work\-arounds for many cases but some values may just not be possible to pass correctly. If a value does not seem to be escaped correctly, do not attempt to work\-around the problem by adding escape sequences to the value. Your work\-around may break in a future version of CMake that has improved escape support. Instead consider defining the macro in a (configured) header file. Then report the limitation. Known limitations include: .INDENT 0.0 .INDENT 3.5 .sp .nf .ft C # \- broken almost everywhere ; \- broken in VS IDE 7.0 and Borland Makefiles , \- broken in VS IDE % \- broken in some cases in NMake & | \- broken in some cases on MinGW ^ < > \e" \- broken in most Make tools on Windows .ft P .fi .UNINDENT .UNINDENT .sp CMake does not reject these values outright because they do work in some cases. Use with caution. .SS COMPILE_FLAGS .sp Additional flags to be added when compiling this source file. .sp These flags will be added to the list of compile flags when this source file builds. Use \fBCOMPILE_DEFINITIONS\fP to pass additional preprocessor definitions. .SS EXTERNAL_OBJECT .sp If set to true then this is an object file. .sp If this property is set to true then the source file is really an object file and should not be compiled. It will still be linked into the target though. .SS Fortran_FORMAT .sp Set to FIXED or FREE to indicate the Fortran source layout. .sp This property tells CMake whether a given Fortran source file uses fixed\-format or free\-format. CMake will pass the corresponding format flag to the compiler. Consider using the target\-wide Fortran_FORMAT property if all source files in a target share the same format. .SS GENERATED .sp Is this source file generated as part of the build process. .sp If a source file is generated by the build process CMake will handle it differently in terms of dependency checking etc. Otherwise having a non\-existent source file could create problems. .SS HEADER_FILE_ONLY .sp Is this source file only a header file. .sp A property on a source file that indicates if the source file is a header file with no associated implementation. This is set automatically based on the file extension and is used by CMake to determine if certain dependency information should be computed. .SS KEEP_EXTENSION .sp Make the output file have the same extension as the source file. .sp If this property is set then the file extension of the output file will be the same as that of the source file. Normally the output file extension is computed based on the language of the source file, for example .cxx will go to a .o extension. .SS LABELS .sp Specify a list of text labels associated with a source file. .sp This property has meaning only when the source file is listed in a target whose LABELS property is also set. No other semantics are currently specified. .SS LANGUAGE .sp What programming language is the file. .sp A property that can be set to indicate what programming language the source file is. If it is not set the language is determined based on the file extension. Typical values are CXX C etc. Setting this property for a file means this file will be compiled. Do not set this for headers or files that should not be compiled. .SS LOCATION .sp The full path to a source file. .sp A read only property on a SOURCE FILE that contains the full path to the source file. .SS MACOSX_PACKAGE_LOCATION .sp Place a source file inside a Application Bundle (\fBMACOSX_BUNDLE\fP), Core Foundation Bundle (\fBBUNDLE\fP), or Framework Bundle (\fBFRAMEWORK\fP). It is applicable for OS X and iOS. .sp Executable targets with the \fBMACOSX_BUNDLE\fP property set are built as OS X or iOS application bundles on Apple platforms. Shared library targets with the \fBFRAMEWORK\fP property set are built as OS X or iOS frameworks on Apple platforms. Module library targets with the \fBBUNDLE\fP property set are built as OS X \fBCFBundle\fP bundles on Apple platforms. Source files listed in the target with this property set will be copied to a directory inside the bundle or framework content folder specified by the property value. For OS X Application Bundles the content folder is \fB.app/Contents\fP\&. For OS X Frameworks the content folder is \fB.framework/Versions/\fP\&. For OS X CFBundles the content folder is \fB.bundle/Contents\fP (unless the extension is changed). See the \fBPUBLIC_HEADER\fP, \fBPRIVATE_HEADER\fP, and \fBRESOURCE\fP target properties for specifying files meant for \fBHeaders\fP, \fBPrivateHeaders\fP, or \fBResources\fP directories. .SS OBJECT_DEPENDS .sp Additional files on which a compiled object file depends. .sp Specifies a ;\-list of full\-paths to files on which any object files compiled from this source file depend. On Makefile Generators and the \fBNinja\fP generator an object file will be recompiled if any of the named files is newer than it. Visual Studio Generators and the \fBXcode\fP generator cannot implement such compilation dependencies. .sp This property need not be used to specify the dependency of a source file on a generated header file that it includes. Although the property was originally introduced for this purpose, it is no longer necessary. If the generated header file is created by a custom command in the same target as the source file, the automatic dependency scanning process will recognize the dependency. If the generated header file is created by another target, an inter\-target dependency should be created with the \fBadd_dependencies()\fP command (if one does not already exist due to linking relationships). .SS OBJECT_OUTPUTS .sp Additional outputs for a Makefile rule. .sp Additional outputs created by compilation of this source file. If any of these outputs is missing the object will be recompiled. This is supported only on Makefile generators and will be ignored on other generators. .SS SYMBOLIC .sp Is this just a name for a rule. .sp If SYMBOLIC (boolean) is set to true the build system will be informed that the source file is not actually created on disk but instead used as a symbolic name for a build rule. .SS VS_DEPLOYMENT_CONTENT .sp Mark a source file as content for deployment with a Windows Phone or Windows Store application when built with a Visual Studio generator. The value must evaluate to either \fB1\fP or \fB0\fP and may use \fBgenerator expressions\fP to make the choice based on the build configuration. The \fB\&.vcxproj\fP file entry for the source file will be marked either \fBDeploymentContent\fP or \fBExcludedFromBuild\fP for values \fB1\fP and \fB0\fP, respectively. .SS VS_DEPLOYMENT_LOCATION .sp Specifies the deployment location for a content source file with a Windows Phone or Windows Store application when built with a Visual Studio generator. This property is only applicable when using \fBVS_DEPLOYMENT_CONTENT\fP\&. The value represent the path relative to the app package and applies to all configurations. .SS VS_SHADER_ENTRYPOINT .sp Specifies the name of the entry point for the shader of a \fB\&.hlsl\fP source file. .SS VS_SHADER_FLAGS .sp Set additional VS shader flags of a \fB\&.hlsl\fP source file. .SS VS_SHADER_MODEL .sp Specifies the shader model of a \fB\&.hlsl\fP source file. Some shader types can only be used with recent shader models .SS VS_SHADER_TYPE .sp Set the VS shader type of a \fB\&.hlsl\fP source file. .SS VS_TOOL_OVERRIDE .sp Override the default Visual Studio tool that will be applied to the source file with a new tool not based on the extension of the file. .SS VS_XAML_TYPE .sp Mark a XAML source file as a different type than the default \fBPage\fP\&. The most common usage would be to set the default App.xaml file as ApplicationDefinition. .SS WRAP_EXCLUDE .sp Exclude this source file from any code wrapping techniques. .sp Some packages can wrap source files into alternate languages to provide additional functionality. For example, C++ code can be wrapped into Java or Python etc using SWIG etc. If WRAP_EXCLUDE is set to true (1 etc) that indicates that this source file should not be wrapped. .SS XCODE_EXPLICIT_FILE_TYPE .sp Set the Xcode \fBexplicitFileType\fP attribute on its reference to a source file. CMake computes a default based on file extension but can be told explicitly with this property. .sp See also \fBXCODE_LAST_KNOWN_FILE_TYPE\fP\&. .SS XCODE_FILE_ATTRIBUTES .sp Add values to the Xcode \fBATTRIBUTES\fP setting on its reference to a source file. Among other things, this can be used to set the role on a mig file: .INDENT 0.0 .INDENT 3.5 .sp .nf .ft C set_source_files_properties(defs.mig PROPERTIES XCODE_FILE_ATTRIBUTES "Client;Server" ) .ft P .fi .UNINDENT .UNINDENT .SS XCODE_LAST_KNOWN_FILE_TYPE .sp Set the Xcode \fBlastKnownFileType\fP attribute on its reference to a source file. CMake computes a default based on file extension but can be told explicitly with this property. .sp See also \fBXCODE_EXPLICIT_FILE_TYPE\fP, which is preferred over this property if set. .SH PROPERTIES ON CACHE ENTRIES .SS ADVANCED .sp True if entry should be hidden by default in GUIs. .sp This is a boolean value indicating whether the entry is considered interesting only for advanced configuration. The mark_as_advanced() command modifies this property. .SS HELPSTRING .sp Help associated with entry in GUIs. .sp This string summarizes the purpose of an entry to help users set it through a CMake GUI. .SS MODIFIED .sp Internal management property. Do not set or get. .sp This is an internal cache entry property managed by CMake to track interactive user modification of entries. Ignore it. .SS STRINGS .sp Enumerate possible STRING entry values for GUI selection. .sp For cache entries with type STRING, this enumerates a set of values. CMake GUIs may use this to provide a selection widget instead of a generic string entry field. This is for convenience only. CMake does not enforce that the value matches one of those listed. .SS TYPE .sp Widget type for entry in GUIs. .sp Cache entry values are always strings, but CMake GUIs present widgets to help users set values. The GUIs use this property as a hint to determine the widget type. Valid TYPE values are: .INDENT 0.0 .INDENT 3.5 .sp .nf .ft C BOOL = Boolean ON/OFF value. PATH = Path to a directory. FILEPATH = Path to a file. STRING = Generic string value. INTERNAL = Do not present in GUI at all. STATIC = Value managed by CMake, do not change. UNINITIALIZED = Type not yet specified. .ft P .fi .UNINDENT .UNINDENT .sp Generally the TYPE of a cache entry should be set by the command which creates it (set, option, find_library, etc.). .SS VALUE .sp Value of a cache entry. .sp This property maps to the actual value of a cache entry. Setting this property always sets the value without checking, so use with care. .SH PROPERTIES ON INSTALLED FILES .SS CPACK_DESKTOP_SHORTCUTS .sp Species a list of shortcut names that should be created on the Desktop for this file. .sp The property is currently only supported by the WIX generator. .SS CPACK_NEVER_OVERWRITE .sp Request that this file not be overwritten on install or reinstall. .sp The property is currently only supported by the WIX generator. .SS CPACK_PERMANENT .sp Request that this file not be removed on uninstall. .sp The property is currently only supported by the WIX generator. .SS CPACK_START_MENU_SHORTCUTS .sp Species a list of shortcut names that should be created in the Start Menu for this file. .sp The property is currently only supported by the WIX generator. .SS CPACK_STARTUP_SHORTCUTS .sp Species a list of shortcut names that should be created in the Startup folder for this file. .sp The property is currently only supported by the WIX generator. .SS CPACK_WIX_ACL .sp Specifies access permissions for files or directories installed by a WiX installer. .sp The property can contain multiple list entries, each of which has to match the following format. .INDENT 0.0 .INDENT 3.5 .sp .nf .ft C [@]=[,] .ft P .fi .UNINDENT .UNINDENT .sp \fB\fP and \fB\fP specify the windows user and domain for which the \fB\fP element should be generated. .sp \fB\fP is any of the YesNoType attributes listed here: .INDENT 0.0 .INDENT 3.5 .sp .nf .ft C http://wixtoolset.org/documentation/manual/v3/xsd/wix/permission.html .ft P .fi .UNINDENT .UNINDENT .SH DEPRECATED PROPERTIES ON DIRECTORIES .SS COMPILE_DEFINITIONS_ .sp Ignored. See CMake Policy \fBCMP0043\fP\&. .sp Per\-configuration preprocessor definitions in a directory. .sp This is the configuration\-specific version of \fBCOMPILE_DEFINITIONS\fP where \fB\fP is an upper\-case name (ex. \fBCOMPILE_DEFINITIONS_DEBUG\fP). .sp This property will be initialized in each directory by its value in the directory\(aqs parent. .sp Contents of \fBCOMPILE_DEFINITIONS_\fP may use "generator expressions" with the syntax \fB$<...>\fP\&. See the \fBcmake\-generator\-expressions(7)\fP manual for available expressions. See the \fBcmake\-buildsystem(7)\fP manual for more on defining buildsystem properties. .sp Generator expressions should be preferred instead of setting this property. .SH DEPRECATED PROPERTIES ON TARGETS .SS COMPILE_DEFINITIONS_ .sp Ignored. See CMake Policy \fBCMP0043\fP\&. .sp Per\-configuration preprocessor definitions on a target. .sp This is the configuration\-specific version of \fBCOMPILE_DEFINITIONS\fP where \fB\fP is an upper\-case name (ex. \fBCOMPILE_DEFINITIONS_DEBUG\fP). .sp Contents of \fBCOMPILE_DEFINITIONS_\fP may use "generator expressions" with the syntax \fB$<...>\fP\&. See the \fBcmake\-generator\-expressions(7)\fP manual for available expressions. See the \fBcmake\-buildsystem(7)\fP manual for more on defining buildsystem properties. .sp Generator expressions should be preferred instead of setting this property. .SS POST_INSTALL_SCRIPT .sp Deprecated install support. .sp The PRE_INSTALL_SCRIPT and POST_INSTALL_SCRIPT properties are the old way to specify CMake scripts to run before and after installing a target. They are used only when the old INSTALL_TARGETS command is used to install the target. Use the INSTALL command instead. .SS PRE_INSTALL_SCRIPT .sp Deprecated install support. .sp The PRE_INSTALL_SCRIPT and POST_INSTALL_SCRIPT properties are the old way to specify CMake scripts to run before and after installing a target. They are used only when the old INSTALL_TARGETS command is used to install the target. Use the INSTALL command instead. .SH DEPRECATED PROPERTIES ON SOURCE FILES .SS COMPILE_DEFINITIONS_ .sp Ignored. See CMake Policy \fBCMP0043\fP\&. .sp Per\-configuration preprocessor definitions on a source file. .sp This is the configuration\-specific version of COMPILE_DEFINITIONS. Note that Xcode does not support per\-configuration source file flags so this property will be ignored by the Xcode generator. .SH COPYRIGHT 2000-2017 Kitware, Inc. and Contributors .\" Generated by docutils manpage writer. .