Add files using upload-large-folder tool
Browse filesThis view is limited to 50 files because it contains too many changes. See raw diff
- toolchain/cmake-3.27.9-linux-x86_64/doc/cmake/html/_static/_sphinx_javascript_frameworks_compat.js +134 -0
- toolchain/cmake-3.27.9-linux-x86_64/doc/cmake/html/_static/basic.css +900 -0
- toolchain/cmake-3.27.9-linux-x86_64/doc/cmake/html/_static/classic.css +269 -0
- toolchain/cmake-3.27.9-linux-x86_64/doc/cmake/html/_static/cmake-favicon.ico +0 -0
- toolchain/cmake-3.27.9-linux-x86_64/doc/cmake/html/_static/cmake.css +86 -0
- toolchain/cmake-3.27.9-linux-x86_64/doc/cmake/html/_static/default.css +1 -0
- toolchain/cmake-3.27.9-linux-x86_64/doc/cmake/html/_static/doctools.js +156 -0
- toolchain/cmake-3.27.9-linux-x86_64/doc/cmake/html/_static/documentation_options.js +14 -0
- toolchain/cmake-3.27.9-linux-x86_64/doc/cmake/html/_static/jquery-3.6.0.js +0 -0
- toolchain/cmake-3.27.9-linux-x86_64/doc/cmake/html/_static/jquery.js +2 -0
- toolchain/cmake-3.27.9-linux-x86_64/doc/cmake/html/_static/language_data.js +199 -0
- toolchain/cmake-3.27.9-linux-x86_64/doc/cmake/html/_static/pygments.css +53 -0
- toolchain/cmake-3.27.9-linux-x86_64/doc/cmake/html/_static/searchtools.js +566 -0
- toolchain/cmake-3.27.9-linux-x86_64/doc/cmake/html/_static/sidebar.js +70 -0
- toolchain/cmake-3.27.9-linux-x86_64/doc/cmake/html/_static/sphinx_highlight.js +144 -0
- toolchain/cmake-3.27.9-linux-x86_64/doc/cmake/html/_static/underscore-1.13.1.js +2042 -0
- toolchain/cmake-3.27.9-linux-x86_64/doc/cmake/html/_static/underscore.js +6 -0
- toolchain/cmake-3.27.9-linux-x86_64/doc/cmake/html/command/add_compile_definitions.html +177 -0
- toolchain/cmake-3.27.9-linux-x86_64/doc/cmake/html/command/add_compile_options.html +220 -0
- toolchain/cmake-3.27.9-linux-x86_64/doc/cmake/html/command/add_custom_command.html +671 -0
- toolchain/cmake-3.27.9-linux-x86_64/doc/cmake/html/command/add_custom_target.html +327 -0
- toolchain/cmake-3.27.9-linux-x86_64/doc/cmake/html/command/add_definitions.html +182 -0
- toolchain/cmake-3.27.9-linux-x86_64/doc/cmake/html/command/add_dependencies.html +173 -0
- toolchain/cmake-3.27.9-linux-x86_64/doc/cmake/html/command/add_executable.html +259 -0
- toolchain/cmake-3.27.9-linux-x86_64/doc/cmake/html/command/add_library.html +401 -0
- toolchain/cmake-3.27.9-linux-x86_64/doc/cmake/html/command/add_link_options.html +236 -0
- toolchain/cmake-3.27.9-linux-x86_64/doc/cmake/html/command/add_subdirectory.html +173 -0
- toolchain/cmake-3.27.9-linux-x86_64/doc/cmake/html/command/add_test.html +208 -0
- toolchain/cmake-3.27.9-linux-x86_64/doc/cmake/html/command/aux_source_directory.html +156 -0
- toolchain/cmake-3.27.9-linux-x86_64/doc/cmake/html/command/block.html +214 -0
- toolchain/cmake-3.27.9-linux-x86_64/doc/cmake/html/command/break.html +144 -0
- toolchain/cmake-3.27.9-linux-x86_64/doc/cmake/html/command/build_command.html +181 -0
- toolchain/cmake-3.27.9-linux-x86_64/doc/cmake/html/command/build_name.html +147 -0
- toolchain/cmake-3.27.9-linux-x86_64/doc/cmake/html/command/cmake_file_api.html +217 -0
- toolchain/cmake-3.27.9-linux-x86_64/doc/cmake/html/command/cmake_host_system_information.html +519 -0
- toolchain/cmake-3.27.9-linux-x86_64/doc/cmake/html/command/cmake_language.html +627 -0
- toolchain/cmake-3.27.9-linux-x86_64/doc/cmake/html/command/cmake_minimum_required.html +233 -0
- toolchain/cmake-3.27.9-linux-x86_64/doc/cmake/html/command/cmake_parse_arguments.html +253 -0
- toolchain/cmake-3.27.9-linux-x86_64/doc/cmake/html/command/cmake_path.html +788 -0
- toolchain/cmake-3.27.9-linux-x86_64/doc/cmake/html/command/cmake_policy.html +310 -0
- toolchain/cmake-3.27.9-linux-x86_64/doc/cmake/html/command/configure_file.html +301 -0
- toolchain/cmake-3.27.9-linux-x86_64/doc/cmake/html/command/continue.html +149 -0
- toolchain/cmake-3.27.9-linux-x86_64/doc/cmake/html/command/create_test_sourcelist.html +163 -0
- toolchain/cmake-3.27.9-linux-x86_64/doc/cmake/html/command/ctest_build.html +217 -0
- toolchain/cmake-3.27.9-linux-x86_64/doc/cmake/html/command/ctest_configure.html +179 -0
- toolchain/cmake-3.27.9-linux-x86_64/doc/cmake/html/command/ctest_coverage.html +180 -0
- toolchain/cmake-3.27.9-linux-x86_64/doc/cmake/html/command/ctest_empty_binary_directory.html +145 -0
- toolchain/cmake-3.27.9-linux-x86_64/doc/cmake/html/command/ctest_memcheck.html +177 -0
- toolchain/cmake-3.27.9-linux-x86_64/doc/cmake/html/command/ctest_read_custom_files.html +146 -0
- toolchain/cmake-3.27.9-linux-x86_64/doc/cmake/html/command/ctest_run_script.html +148 -0
toolchain/cmake-3.27.9-linux-x86_64/doc/cmake/html/_static/_sphinx_javascript_frameworks_compat.js
ADDED
|
@@ -0,0 +1,134 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/*
|
| 2 |
+
* _sphinx_javascript_frameworks_compat.js
|
| 3 |
+
* ~~~~~~~~~~
|
| 4 |
+
*
|
| 5 |
+
* Compatability shim for jQuery and underscores.js.
|
| 6 |
+
*
|
| 7 |
+
* WILL BE REMOVED IN Sphinx 6.0
|
| 8 |
+
* xref RemovedInSphinx60Warning
|
| 9 |
+
*
|
| 10 |
+
*/
|
| 11 |
+
|
| 12 |
+
/**
|
| 13 |
+
* select a different prefix for underscore
|
| 14 |
+
*/
|
| 15 |
+
$u = _.noConflict();
|
| 16 |
+
|
| 17 |
+
|
| 18 |
+
/**
|
| 19 |
+
* small helper function to urldecode strings
|
| 20 |
+
*
|
| 21 |
+
* See https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/decodeURIComponent#Decoding_query_parameters_from_a_URL
|
| 22 |
+
*/
|
| 23 |
+
jQuery.urldecode = function(x) {
|
| 24 |
+
if (!x) {
|
| 25 |
+
return x
|
| 26 |
+
}
|
| 27 |
+
return decodeURIComponent(x.replace(/\+/g, ' '));
|
| 28 |
+
};
|
| 29 |
+
|
| 30 |
+
/**
|
| 31 |
+
* small helper function to urlencode strings
|
| 32 |
+
*/
|
| 33 |
+
jQuery.urlencode = encodeURIComponent;
|
| 34 |
+
|
| 35 |
+
/**
|
| 36 |
+
* This function returns the parsed url parameters of the
|
| 37 |
+
* current request. Multiple values per key are supported,
|
| 38 |
+
* it will always return arrays of strings for the value parts.
|
| 39 |
+
*/
|
| 40 |
+
jQuery.getQueryParameters = function(s) {
|
| 41 |
+
if (typeof s === 'undefined')
|
| 42 |
+
s = document.location.search;
|
| 43 |
+
var parts = s.substr(s.indexOf('?') + 1).split('&');
|
| 44 |
+
var result = {};
|
| 45 |
+
for (var i = 0; i < parts.length; i++) {
|
| 46 |
+
var tmp = parts[i].split('=', 2);
|
| 47 |
+
var key = jQuery.urldecode(tmp[0]);
|
| 48 |
+
var value = jQuery.urldecode(tmp[1]);
|
| 49 |
+
if (key in result)
|
| 50 |
+
result[key].push(value);
|
| 51 |
+
else
|
| 52 |
+
result[key] = [value];
|
| 53 |
+
}
|
| 54 |
+
return result;
|
| 55 |
+
};
|
| 56 |
+
|
| 57 |
+
/**
|
| 58 |
+
* highlight a given string on a jquery object by wrapping it in
|
| 59 |
+
* span elements with the given class name.
|
| 60 |
+
*/
|
| 61 |
+
jQuery.fn.highlightText = function(text, className) {
|
| 62 |
+
function highlight(node, addItems) {
|
| 63 |
+
if (node.nodeType === 3) {
|
| 64 |
+
var val = node.nodeValue;
|
| 65 |
+
var pos = val.toLowerCase().indexOf(text);
|
| 66 |
+
if (pos >= 0 &&
|
| 67 |
+
!jQuery(node.parentNode).hasClass(className) &&
|
| 68 |
+
!jQuery(node.parentNode).hasClass("nohighlight")) {
|
| 69 |
+
var span;
|
| 70 |
+
var isInSVG = jQuery(node).closest("body, svg, foreignObject").is("svg");
|
| 71 |
+
if (isInSVG) {
|
| 72 |
+
span = document.createElementNS("http://www.w3.org/2000/svg", "tspan");
|
| 73 |
+
} else {
|
| 74 |
+
span = document.createElement("span");
|
| 75 |
+
span.className = className;
|
| 76 |
+
}
|
| 77 |
+
span.appendChild(document.createTextNode(val.substr(pos, text.length)));
|
| 78 |
+
node.parentNode.insertBefore(span, node.parentNode.insertBefore(
|
| 79 |
+
document.createTextNode(val.substr(pos + text.length)),
|
| 80 |
+
node.nextSibling));
|
| 81 |
+
node.nodeValue = val.substr(0, pos);
|
| 82 |
+
if (isInSVG) {
|
| 83 |
+
var rect = document.createElementNS("http://www.w3.org/2000/svg", "rect");
|
| 84 |
+
var bbox = node.parentElement.getBBox();
|
| 85 |
+
rect.x.baseVal.value = bbox.x;
|
| 86 |
+
rect.y.baseVal.value = bbox.y;
|
| 87 |
+
rect.width.baseVal.value = bbox.width;
|
| 88 |
+
rect.height.baseVal.value = bbox.height;
|
| 89 |
+
rect.setAttribute('class', className);
|
| 90 |
+
addItems.push({
|
| 91 |
+
"parent": node.parentNode,
|
| 92 |
+
"target": rect});
|
| 93 |
+
}
|
| 94 |
+
}
|
| 95 |
+
}
|
| 96 |
+
else if (!jQuery(node).is("button, select, textarea")) {
|
| 97 |
+
jQuery.each(node.childNodes, function() {
|
| 98 |
+
highlight(this, addItems);
|
| 99 |
+
});
|
| 100 |
+
}
|
| 101 |
+
}
|
| 102 |
+
var addItems = [];
|
| 103 |
+
var result = this.each(function() {
|
| 104 |
+
highlight(this, addItems);
|
| 105 |
+
});
|
| 106 |
+
for (var i = 0; i < addItems.length; ++i) {
|
| 107 |
+
jQuery(addItems[i].parent).before(addItems[i].target);
|
| 108 |
+
}
|
| 109 |
+
return result;
|
| 110 |
+
};
|
| 111 |
+
|
| 112 |
+
/*
|
| 113 |
+
* backward compatibility for jQuery.browser
|
| 114 |
+
* This will be supported until firefox bug is fixed.
|
| 115 |
+
*/
|
| 116 |
+
if (!jQuery.browser) {
|
| 117 |
+
jQuery.uaMatch = function(ua) {
|
| 118 |
+
ua = ua.toLowerCase();
|
| 119 |
+
|
| 120 |
+
var match = /(chrome)[ \/]([\w.]+)/.exec(ua) ||
|
| 121 |
+
/(webkit)[ \/]([\w.]+)/.exec(ua) ||
|
| 122 |
+
/(opera)(?:.*version|)[ \/]([\w.]+)/.exec(ua) ||
|
| 123 |
+
/(msie) ([\w.]+)/.exec(ua) ||
|
| 124 |
+
ua.indexOf("compatible") < 0 && /(mozilla)(?:.*? rv:([\w.]+)|)/.exec(ua) ||
|
| 125 |
+
[];
|
| 126 |
+
|
| 127 |
+
return {
|
| 128 |
+
browser: match[ 1 ] || "",
|
| 129 |
+
version: match[ 2 ] || "0"
|
| 130 |
+
};
|
| 131 |
+
};
|
| 132 |
+
jQuery.browser = {};
|
| 133 |
+
jQuery.browser[jQuery.uaMatch(navigator.userAgent).browser] = true;
|
| 134 |
+
}
|
toolchain/cmake-3.27.9-linux-x86_64/doc/cmake/html/_static/basic.css
ADDED
|
@@ -0,0 +1,900 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/*
|
| 2 |
+
* basic.css
|
| 3 |
+
* ~~~~~~~~~
|
| 4 |
+
*
|
| 5 |
+
* Sphinx stylesheet -- basic theme.
|
| 6 |
+
*
|
| 7 |
+
* :copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS.
|
| 8 |
+
* :license: BSD, see LICENSE for details.
|
| 9 |
+
*
|
| 10 |
+
*/
|
| 11 |
+
|
| 12 |
+
/* -- main layout ----------------------------------------------------------- */
|
| 13 |
+
|
| 14 |
+
div.clearer {
|
| 15 |
+
clear: both;
|
| 16 |
+
}
|
| 17 |
+
|
| 18 |
+
div.section::after {
|
| 19 |
+
display: block;
|
| 20 |
+
content: '';
|
| 21 |
+
clear: left;
|
| 22 |
+
}
|
| 23 |
+
|
| 24 |
+
/* -- relbar ---------------------------------------------------------------- */
|
| 25 |
+
|
| 26 |
+
div.related {
|
| 27 |
+
width: 100%;
|
| 28 |
+
font-size: 90%;
|
| 29 |
+
}
|
| 30 |
+
|
| 31 |
+
div.related h3 {
|
| 32 |
+
display: none;
|
| 33 |
+
}
|
| 34 |
+
|
| 35 |
+
div.related ul {
|
| 36 |
+
margin: 0;
|
| 37 |
+
padding: 0 0 0 10px;
|
| 38 |
+
list-style: none;
|
| 39 |
+
}
|
| 40 |
+
|
| 41 |
+
div.related li {
|
| 42 |
+
display: inline;
|
| 43 |
+
}
|
| 44 |
+
|
| 45 |
+
div.related li.right {
|
| 46 |
+
float: right;
|
| 47 |
+
margin-right: 5px;
|
| 48 |
+
}
|
| 49 |
+
|
| 50 |
+
/* -- sidebar --------------------------------------------------------------- */
|
| 51 |
+
|
| 52 |
+
div.sphinxsidebarwrapper {
|
| 53 |
+
padding: 10px 5px 0 10px;
|
| 54 |
+
}
|
| 55 |
+
|
| 56 |
+
div.sphinxsidebar {
|
| 57 |
+
float: left;
|
| 58 |
+
width: 230px;
|
| 59 |
+
margin-left: -100%;
|
| 60 |
+
font-size: 90%;
|
| 61 |
+
word-wrap: break-word;
|
| 62 |
+
overflow-wrap : break-word;
|
| 63 |
+
}
|
| 64 |
+
|
| 65 |
+
div.sphinxsidebar ul {
|
| 66 |
+
list-style: none;
|
| 67 |
+
}
|
| 68 |
+
|
| 69 |
+
div.sphinxsidebar ul ul,
|
| 70 |
+
div.sphinxsidebar ul.want-points {
|
| 71 |
+
margin-left: 20px;
|
| 72 |
+
list-style: square;
|
| 73 |
+
}
|
| 74 |
+
|
| 75 |
+
div.sphinxsidebar ul ul {
|
| 76 |
+
margin-top: 0;
|
| 77 |
+
margin-bottom: 0;
|
| 78 |
+
}
|
| 79 |
+
|
| 80 |
+
div.sphinxsidebar form {
|
| 81 |
+
margin-top: 10px;
|
| 82 |
+
}
|
| 83 |
+
|
| 84 |
+
div.sphinxsidebar input {
|
| 85 |
+
border: 1px solid #98dbcc;
|
| 86 |
+
font-family: sans-serif;
|
| 87 |
+
font-size: 1em;
|
| 88 |
+
}
|
| 89 |
+
|
| 90 |
+
div.sphinxsidebar #searchbox form.search {
|
| 91 |
+
overflow: hidden;
|
| 92 |
+
}
|
| 93 |
+
|
| 94 |
+
div.sphinxsidebar #searchbox input[type="text"] {
|
| 95 |
+
float: left;
|
| 96 |
+
width: 80%;
|
| 97 |
+
padding: 0.25em;
|
| 98 |
+
box-sizing: border-box;
|
| 99 |
+
}
|
| 100 |
+
|
| 101 |
+
div.sphinxsidebar #searchbox input[type="submit"] {
|
| 102 |
+
float: left;
|
| 103 |
+
width: 20%;
|
| 104 |
+
border-left: none;
|
| 105 |
+
padding: 0.25em;
|
| 106 |
+
box-sizing: border-box;
|
| 107 |
+
}
|
| 108 |
+
|
| 109 |
+
|
| 110 |
+
img {
|
| 111 |
+
border: 0;
|
| 112 |
+
max-width: 100%;
|
| 113 |
+
}
|
| 114 |
+
|
| 115 |
+
/* -- search page ----------------------------------------------------------- */
|
| 116 |
+
|
| 117 |
+
ul.search {
|
| 118 |
+
margin: 10px 0 0 20px;
|
| 119 |
+
padding: 0;
|
| 120 |
+
}
|
| 121 |
+
|
| 122 |
+
ul.search li {
|
| 123 |
+
padding: 5px 0 5px 20px;
|
| 124 |
+
background-image: url(file.png);
|
| 125 |
+
background-repeat: no-repeat;
|
| 126 |
+
background-position: 0 7px;
|
| 127 |
+
}
|
| 128 |
+
|
| 129 |
+
ul.search li a {
|
| 130 |
+
font-weight: bold;
|
| 131 |
+
}
|
| 132 |
+
|
| 133 |
+
ul.search li p.context {
|
| 134 |
+
color: #888;
|
| 135 |
+
margin: 2px 0 0 30px;
|
| 136 |
+
text-align: left;
|
| 137 |
+
}
|
| 138 |
+
|
| 139 |
+
ul.keywordmatches li.goodmatch a {
|
| 140 |
+
font-weight: bold;
|
| 141 |
+
}
|
| 142 |
+
|
| 143 |
+
/* -- index page ------------------------------------------------------------ */
|
| 144 |
+
|
| 145 |
+
table.contentstable {
|
| 146 |
+
width: 90%;
|
| 147 |
+
margin-left: auto;
|
| 148 |
+
margin-right: auto;
|
| 149 |
+
}
|
| 150 |
+
|
| 151 |
+
table.contentstable p.biglink {
|
| 152 |
+
line-height: 150%;
|
| 153 |
+
}
|
| 154 |
+
|
| 155 |
+
a.biglink {
|
| 156 |
+
font-size: 1.3em;
|
| 157 |
+
}
|
| 158 |
+
|
| 159 |
+
span.linkdescr {
|
| 160 |
+
font-style: italic;
|
| 161 |
+
padding-top: 5px;
|
| 162 |
+
font-size: 90%;
|
| 163 |
+
}
|
| 164 |
+
|
| 165 |
+
/* -- general index --------------------------------------------------------- */
|
| 166 |
+
|
| 167 |
+
table.indextable {
|
| 168 |
+
width: 100%;
|
| 169 |
+
}
|
| 170 |
+
|
| 171 |
+
table.indextable td {
|
| 172 |
+
text-align: left;
|
| 173 |
+
vertical-align: top;
|
| 174 |
+
}
|
| 175 |
+
|
| 176 |
+
table.indextable ul {
|
| 177 |
+
margin-top: 0;
|
| 178 |
+
margin-bottom: 0;
|
| 179 |
+
list-style-type: none;
|
| 180 |
+
}
|
| 181 |
+
|
| 182 |
+
table.indextable > tbody > tr > td > ul {
|
| 183 |
+
padding-left: 0em;
|
| 184 |
+
}
|
| 185 |
+
|
| 186 |
+
table.indextable tr.pcap {
|
| 187 |
+
height: 10px;
|
| 188 |
+
}
|
| 189 |
+
|
| 190 |
+
table.indextable tr.cap {
|
| 191 |
+
margin-top: 10px;
|
| 192 |
+
background-color: #f2f2f2;
|
| 193 |
+
}
|
| 194 |
+
|
| 195 |
+
img.toggler {
|
| 196 |
+
margin-right: 3px;
|
| 197 |
+
margin-top: 3px;
|
| 198 |
+
cursor: pointer;
|
| 199 |
+
}
|
| 200 |
+
|
| 201 |
+
div.modindex-jumpbox {
|
| 202 |
+
border-top: 1px solid #ddd;
|
| 203 |
+
border-bottom: 1px solid #ddd;
|
| 204 |
+
margin: 1em 0 1em 0;
|
| 205 |
+
padding: 0.4em;
|
| 206 |
+
}
|
| 207 |
+
|
| 208 |
+
div.genindex-jumpbox {
|
| 209 |
+
border-top: 1px solid #ddd;
|
| 210 |
+
border-bottom: 1px solid #ddd;
|
| 211 |
+
margin: 1em 0 1em 0;
|
| 212 |
+
padding: 0.4em;
|
| 213 |
+
}
|
| 214 |
+
|
| 215 |
+
/* -- domain module index --------------------------------------------------- */
|
| 216 |
+
|
| 217 |
+
table.modindextable td {
|
| 218 |
+
padding: 2px;
|
| 219 |
+
border-collapse: collapse;
|
| 220 |
+
}
|
| 221 |
+
|
| 222 |
+
/* -- general body styles --------------------------------------------------- */
|
| 223 |
+
|
| 224 |
+
div.body {
|
| 225 |
+
min-width: 360px;
|
| 226 |
+
max-width: 800px;
|
| 227 |
+
}
|
| 228 |
+
|
| 229 |
+
div.body p, div.body dd, div.body li, div.body blockquote {
|
| 230 |
+
-moz-hyphens: auto;
|
| 231 |
+
-ms-hyphens: auto;
|
| 232 |
+
-webkit-hyphens: auto;
|
| 233 |
+
hyphens: auto;
|
| 234 |
+
}
|
| 235 |
+
|
| 236 |
+
a.headerlink {
|
| 237 |
+
visibility: hidden;
|
| 238 |
+
}
|
| 239 |
+
|
| 240 |
+
h1:hover > a.headerlink,
|
| 241 |
+
h2:hover > a.headerlink,
|
| 242 |
+
h3:hover > a.headerlink,
|
| 243 |
+
h4:hover > a.headerlink,
|
| 244 |
+
h5:hover > a.headerlink,
|
| 245 |
+
h6:hover > a.headerlink,
|
| 246 |
+
dt:hover > a.headerlink,
|
| 247 |
+
caption:hover > a.headerlink,
|
| 248 |
+
p.caption:hover > a.headerlink,
|
| 249 |
+
div.code-block-caption:hover > a.headerlink {
|
| 250 |
+
visibility: visible;
|
| 251 |
+
}
|
| 252 |
+
|
| 253 |
+
div.body p.caption {
|
| 254 |
+
text-align: inherit;
|
| 255 |
+
}
|
| 256 |
+
|
| 257 |
+
div.body td {
|
| 258 |
+
text-align: left;
|
| 259 |
+
}
|
| 260 |
+
|
| 261 |
+
.first {
|
| 262 |
+
margin-top: 0 !important;
|
| 263 |
+
}
|
| 264 |
+
|
| 265 |
+
p.rubric {
|
| 266 |
+
margin-top: 30px;
|
| 267 |
+
font-weight: bold;
|
| 268 |
+
}
|
| 269 |
+
|
| 270 |
+
img.align-left, figure.align-left, .figure.align-left, object.align-left {
|
| 271 |
+
clear: left;
|
| 272 |
+
float: left;
|
| 273 |
+
margin-right: 1em;
|
| 274 |
+
}
|
| 275 |
+
|
| 276 |
+
img.align-right, figure.align-right, .figure.align-right, object.align-right {
|
| 277 |
+
clear: right;
|
| 278 |
+
float: right;
|
| 279 |
+
margin-left: 1em;
|
| 280 |
+
}
|
| 281 |
+
|
| 282 |
+
img.align-center, figure.align-center, .figure.align-center, object.align-center {
|
| 283 |
+
display: block;
|
| 284 |
+
margin-left: auto;
|
| 285 |
+
margin-right: auto;
|
| 286 |
+
}
|
| 287 |
+
|
| 288 |
+
img.align-default, figure.align-default, .figure.align-default {
|
| 289 |
+
display: block;
|
| 290 |
+
margin-left: auto;
|
| 291 |
+
margin-right: auto;
|
| 292 |
+
}
|
| 293 |
+
|
| 294 |
+
.align-left {
|
| 295 |
+
text-align: left;
|
| 296 |
+
}
|
| 297 |
+
|
| 298 |
+
.align-center {
|
| 299 |
+
text-align: center;
|
| 300 |
+
}
|
| 301 |
+
|
| 302 |
+
.align-default {
|
| 303 |
+
text-align: center;
|
| 304 |
+
}
|
| 305 |
+
|
| 306 |
+
.align-right {
|
| 307 |
+
text-align: right;
|
| 308 |
+
}
|
| 309 |
+
|
| 310 |
+
/* -- sidebars -------------------------------------------------------------- */
|
| 311 |
+
|
| 312 |
+
div.sidebar,
|
| 313 |
+
aside.sidebar {
|
| 314 |
+
margin: 0 0 0.5em 1em;
|
| 315 |
+
border: 1px solid #ddb;
|
| 316 |
+
padding: 7px;
|
| 317 |
+
background-color: #ffe;
|
| 318 |
+
width: 40%;
|
| 319 |
+
float: right;
|
| 320 |
+
clear: right;
|
| 321 |
+
overflow-x: auto;
|
| 322 |
+
}
|
| 323 |
+
|
| 324 |
+
p.sidebar-title {
|
| 325 |
+
font-weight: bold;
|
| 326 |
+
}
|
| 327 |
+
nav.contents,
|
| 328 |
+
aside.topic,
|
| 329 |
+
div.admonition, div.topic, blockquote {
|
| 330 |
+
clear: left;
|
| 331 |
+
}
|
| 332 |
+
|
| 333 |
+
/* -- topics ---------------------------------------------------------------- */
|
| 334 |
+
nav.contents,
|
| 335 |
+
aside.topic,
|
| 336 |
+
div.topic {
|
| 337 |
+
border: 1px solid #ccc;
|
| 338 |
+
padding: 7px;
|
| 339 |
+
margin: 10px 0 10px 0;
|
| 340 |
+
}
|
| 341 |
+
|
| 342 |
+
p.topic-title {
|
| 343 |
+
font-size: 1.1em;
|
| 344 |
+
font-weight: bold;
|
| 345 |
+
margin-top: 10px;
|
| 346 |
+
}
|
| 347 |
+
|
| 348 |
+
/* -- admonitions ----------------------------------------------------------- */
|
| 349 |
+
|
| 350 |
+
div.admonition {
|
| 351 |
+
margin-top: 10px;
|
| 352 |
+
margin-bottom: 10px;
|
| 353 |
+
padding: 7px;
|
| 354 |
+
}
|
| 355 |
+
|
| 356 |
+
div.admonition dt {
|
| 357 |
+
font-weight: bold;
|
| 358 |
+
}
|
| 359 |
+
|
| 360 |
+
p.admonition-title {
|
| 361 |
+
margin: 0px 10px 5px 0px;
|
| 362 |
+
font-weight: bold;
|
| 363 |
+
}
|
| 364 |
+
|
| 365 |
+
div.body p.centered {
|
| 366 |
+
text-align: center;
|
| 367 |
+
margin-top: 25px;
|
| 368 |
+
}
|
| 369 |
+
|
| 370 |
+
/* -- content of sidebars/topics/admonitions -------------------------------- */
|
| 371 |
+
|
| 372 |
+
div.sidebar > :last-child,
|
| 373 |
+
aside.sidebar > :last-child,
|
| 374 |
+
nav.contents > :last-child,
|
| 375 |
+
aside.topic > :last-child,
|
| 376 |
+
div.topic > :last-child,
|
| 377 |
+
div.admonition > :last-child {
|
| 378 |
+
margin-bottom: 0;
|
| 379 |
+
}
|
| 380 |
+
|
| 381 |
+
div.sidebar::after,
|
| 382 |
+
aside.sidebar::after,
|
| 383 |
+
nav.contents::after,
|
| 384 |
+
aside.topic::after,
|
| 385 |
+
div.topic::after,
|
| 386 |
+
div.admonition::after,
|
| 387 |
+
blockquote::after {
|
| 388 |
+
display: block;
|
| 389 |
+
content: '';
|
| 390 |
+
clear: both;
|
| 391 |
+
}
|
| 392 |
+
|
| 393 |
+
/* -- tables ---------------------------------------------------------------- */
|
| 394 |
+
|
| 395 |
+
table.docutils {
|
| 396 |
+
margin-top: 10px;
|
| 397 |
+
margin-bottom: 10px;
|
| 398 |
+
border: 0;
|
| 399 |
+
border-collapse: collapse;
|
| 400 |
+
}
|
| 401 |
+
|
| 402 |
+
table.align-center {
|
| 403 |
+
margin-left: auto;
|
| 404 |
+
margin-right: auto;
|
| 405 |
+
}
|
| 406 |
+
|
| 407 |
+
table.align-default {
|
| 408 |
+
margin-left: auto;
|
| 409 |
+
margin-right: auto;
|
| 410 |
+
}
|
| 411 |
+
|
| 412 |
+
table caption span.caption-number {
|
| 413 |
+
font-style: italic;
|
| 414 |
+
}
|
| 415 |
+
|
| 416 |
+
table caption span.caption-text {
|
| 417 |
+
}
|
| 418 |
+
|
| 419 |
+
table.docutils td, table.docutils th {
|
| 420 |
+
padding: 1px 8px 1px 5px;
|
| 421 |
+
border-top: 0;
|
| 422 |
+
border-left: 0;
|
| 423 |
+
border-right: 0;
|
| 424 |
+
border-bottom: 1px solid #aaa;
|
| 425 |
+
}
|
| 426 |
+
|
| 427 |
+
th {
|
| 428 |
+
text-align: left;
|
| 429 |
+
padding-right: 5px;
|
| 430 |
+
}
|
| 431 |
+
|
| 432 |
+
table.citation {
|
| 433 |
+
border-left: solid 1px gray;
|
| 434 |
+
margin-left: 1px;
|
| 435 |
+
}
|
| 436 |
+
|
| 437 |
+
table.citation td {
|
| 438 |
+
border-bottom: none;
|
| 439 |
+
}
|
| 440 |
+
|
| 441 |
+
th > :first-child,
|
| 442 |
+
td > :first-child {
|
| 443 |
+
margin-top: 0px;
|
| 444 |
+
}
|
| 445 |
+
|
| 446 |
+
th > :last-child,
|
| 447 |
+
td > :last-child {
|
| 448 |
+
margin-bottom: 0px;
|
| 449 |
+
}
|
| 450 |
+
|
| 451 |
+
/* -- figures --------------------------------------------------------------- */
|
| 452 |
+
|
| 453 |
+
div.figure, figure {
|
| 454 |
+
margin: 0.5em;
|
| 455 |
+
padding: 0.5em;
|
| 456 |
+
}
|
| 457 |
+
|
| 458 |
+
div.figure p.caption, figcaption {
|
| 459 |
+
padding: 0.3em;
|
| 460 |
+
}
|
| 461 |
+
|
| 462 |
+
div.figure p.caption span.caption-number,
|
| 463 |
+
figcaption span.caption-number {
|
| 464 |
+
font-style: italic;
|
| 465 |
+
}
|
| 466 |
+
|
| 467 |
+
div.figure p.caption span.caption-text,
|
| 468 |
+
figcaption span.caption-text {
|
| 469 |
+
}
|
| 470 |
+
|
| 471 |
+
/* -- field list styles ----------------------------------------------------- */
|
| 472 |
+
|
| 473 |
+
table.field-list td, table.field-list th {
|
| 474 |
+
border: 0 !important;
|
| 475 |
+
}
|
| 476 |
+
|
| 477 |
+
.field-list ul {
|
| 478 |
+
margin: 0;
|
| 479 |
+
padding-left: 1em;
|
| 480 |
+
}
|
| 481 |
+
|
| 482 |
+
.field-list p {
|
| 483 |
+
margin: 0;
|
| 484 |
+
}
|
| 485 |
+
|
| 486 |
+
.field-name {
|
| 487 |
+
-moz-hyphens: manual;
|
| 488 |
+
-ms-hyphens: manual;
|
| 489 |
+
-webkit-hyphens: manual;
|
| 490 |
+
hyphens: manual;
|
| 491 |
+
}
|
| 492 |
+
|
| 493 |
+
/* -- hlist styles ---------------------------------------------------------- */
|
| 494 |
+
|
| 495 |
+
table.hlist {
|
| 496 |
+
margin: 1em 0;
|
| 497 |
+
}
|
| 498 |
+
|
| 499 |
+
table.hlist td {
|
| 500 |
+
vertical-align: top;
|
| 501 |
+
}
|
| 502 |
+
|
| 503 |
+
/* -- object description styles --------------------------------------------- */
|
| 504 |
+
|
| 505 |
+
.sig {
|
| 506 |
+
font-family: 'Consolas', 'Menlo', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', monospace;
|
| 507 |
+
}
|
| 508 |
+
|
| 509 |
+
.sig-name, code.descname {
|
| 510 |
+
background-color: transparent;
|
| 511 |
+
font-weight: bold;
|
| 512 |
+
}
|
| 513 |
+
|
| 514 |
+
.sig-name {
|
| 515 |
+
font-size: 1.1em;
|
| 516 |
+
}
|
| 517 |
+
|
| 518 |
+
code.descname {
|
| 519 |
+
font-size: 1.2em;
|
| 520 |
+
}
|
| 521 |
+
|
| 522 |
+
.sig-prename, code.descclassname {
|
| 523 |
+
background-color: transparent;
|
| 524 |
+
}
|
| 525 |
+
|
| 526 |
+
.optional {
|
| 527 |
+
font-size: 1.3em;
|
| 528 |
+
}
|
| 529 |
+
|
| 530 |
+
.sig-paren {
|
| 531 |
+
font-size: larger;
|
| 532 |
+
}
|
| 533 |
+
|
| 534 |
+
.sig-param.n {
|
| 535 |
+
font-style: italic;
|
| 536 |
+
}
|
| 537 |
+
|
| 538 |
+
/* C++ specific styling */
|
| 539 |
+
|
| 540 |
+
.sig-inline.c-texpr,
|
| 541 |
+
.sig-inline.cpp-texpr {
|
| 542 |
+
font-family: unset;
|
| 543 |
+
}
|
| 544 |
+
|
| 545 |
+
.sig.c .k, .sig.c .kt,
|
| 546 |
+
.sig.cpp .k, .sig.cpp .kt {
|
| 547 |
+
color: #0033B3;
|
| 548 |
+
}
|
| 549 |
+
|
| 550 |
+
.sig.c .m,
|
| 551 |
+
.sig.cpp .m {
|
| 552 |
+
color: #1750EB;
|
| 553 |
+
}
|
| 554 |
+
|
| 555 |
+
.sig.c .s, .sig.c .sc,
|
| 556 |
+
.sig.cpp .s, .sig.cpp .sc {
|
| 557 |
+
color: #067D17;
|
| 558 |
+
}
|
| 559 |
+
|
| 560 |
+
|
| 561 |
+
/* -- other body styles ----------------------------------------------------- */
|
| 562 |
+
|
| 563 |
+
ol.arabic {
|
| 564 |
+
list-style: decimal;
|
| 565 |
+
}
|
| 566 |
+
|
| 567 |
+
ol.loweralpha {
|
| 568 |
+
list-style: lower-alpha;
|
| 569 |
+
}
|
| 570 |
+
|
| 571 |
+
ol.upperalpha {
|
| 572 |
+
list-style: upper-alpha;
|
| 573 |
+
}
|
| 574 |
+
|
| 575 |
+
ol.lowerroman {
|
| 576 |
+
list-style: lower-roman;
|
| 577 |
+
}
|
| 578 |
+
|
| 579 |
+
ol.upperroman {
|
| 580 |
+
list-style: upper-roman;
|
| 581 |
+
}
|
| 582 |
+
|
| 583 |
+
:not(li) > ol > li:first-child > :first-child,
|
| 584 |
+
:not(li) > ul > li:first-child > :first-child {
|
| 585 |
+
margin-top: 0px;
|
| 586 |
+
}
|
| 587 |
+
|
| 588 |
+
:not(li) > ol > li:last-child > :last-child,
|
| 589 |
+
:not(li) > ul > li:last-child > :last-child {
|
| 590 |
+
margin-bottom: 0px;
|
| 591 |
+
}
|
| 592 |
+
|
| 593 |
+
ol.simple ol p,
|
| 594 |
+
ol.simple ul p,
|
| 595 |
+
ul.simple ol p,
|
| 596 |
+
ul.simple ul p {
|
| 597 |
+
margin-top: 0;
|
| 598 |
+
}
|
| 599 |
+
|
| 600 |
+
ol.simple > li:not(:first-child) > p,
|
| 601 |
+
ul.simple > li:not(:first-child) > p {
|
| 602 |
+
margin-top: 0;
|
| 603 |
+
}
|
| 604 |
+
|
| 605 |
+
ol.simple p,
|
| 606 |
+
ul.simple p {
|
| 607 |
+
margin-bottom: 0;
|
| 608 |
+
}
|
| 609 |
+
aside.footnote > span,
|
| 610 |
+
div.citation > span {
|
| 611 |
+
float: left;
|
| 612 |
+
}
|
| 613 |
+
aside.footnote > span:last-of-type,
|
| 614 |
+
div.citation > span:last-of-type {
|
| 615 |
+
padding-right: 0.5em;
|
| 616 |
+
}
|
| 617 |
+
aside.footnote > p {
|
| 618 |
+
margin-left: 2em;
|
| 619 |
+
}
|
| 620 |
+
div.citation > p {
|
| 621 |
+
margin-left: 4em;
|
| 622 |
+
}
|
| 623 |
+
aside.footnote > p:last-of-type,
|
| 624 |
+
div.citation > p:last-of-type {
|
| 625 |
+
margin-bottom: 0em;
|
| 626 |
+
}
|
| 627 |
+
aside.footnote > p:last-of-type:after,
|
| 628 |
+
div.citation > p:last-of-type:after {
|
| 629 |
+
content: "";
|
| 630 |
+
clear: both;
|
| 631 |
+
}
|
| 632 |
+
|
| 633 |
+
dl.field-list {
|
| 634 |
+
display: grid;
|
| 635 |
+
grid-template-columns: fit-content(30%) auto;
|
| 636 |
+
}
|
| 637 |
+
|
| 638 |
+
dl.field-list > dt {
|
| 639 |
+
font-weight: bold;
|
| 640 |
+
word-break: break-word;
|
| 641 |
+
padding-left: 0.5em;
|
| 642 |
+
padding-right: 5px;
|
| 643 |
+
}
|
| 644 |
+
|
| 645 |
+
dl.field-list > dd {
|
| 646 |
+
padding-left: 0.5em;
|
| 647 |
+
margin-top: 0em;
|
| 648 |
+
margin-left: 0em;
|
| 649 |
+
margin-bottom: 0em;
|
| 650 |
+
}
|
| 651 |
+
|
| 652 |
+
dl {
|
| 653 |
+
margin-bottom: 15px;
|
| 654 |
+
}
|
| 655 |
+
|
| 656 |
+
dd > :first-child {
|
| 657 |
+
margin-top: 0px;
|
| 658 |
+
}
|
| 659 |
+
|
| 660 |
+
dd ul, dd table {
|
| 661 |
+
margin-bottom: 10px;
|
| 662 |
+
}
|
| 663 |
+
|
| 664 |
+
dd {
|
| 665 |
+
margin-top: 3px;
|
| 666 |
+
margin-bottom: 10px;
|
| 667 |
+
margin-left: 30px;
|
| 668 |
+
}
|
| 669 |
+
|
| 670 |
+
dl > dd:last-child,
|
| 671 |
+
dl > dd:last-child > :last-child {
|
| 672 |
+
margin-bottom: 0;
|
| 673 |
+
}
|
| 674 |
+
|
| 675 |
+
dt:target, span.highlighted {
|
| 676 |
+
background-color: #fbe54e;
|
| 677 |
+
}
|
| 678 |
+
|
| 679 |
+
rect.highlighted {
|
| 680 |
+
fill: #fbe54e;
|
| 681 |
+
}
|
| 682 |
+
|
| 683 |
+
dl.glossary dt {
|
| 684 |
+
font-weight: bold;
|
| 685 |
+
font-size: 1.1em;
|
| 686 |
+
}
|
| 687 |
+
|
| 688 |
+
.versionmodified {
|
| 689 |
+
font-style: italic;
|
| 690 |
+
}
|
| 691 |
+
|
| 692 |
+
.system-message {
|
| 693 |
+
background-color: #fda;
|
| 694 |
+
padding: 5px;
|
| 695 |
+
border: 3px solid red;
|
| 696 |
+
}
|
| 697 |
+
|
| 698 |
+
.footnote:target {
|
| 699 |
+
background-color: #ffa;
|
| 700 |
+
}
|
| 701 |
+
|
| 702 |
+
.line-block {
|
| 703 |
+
display: block;
|
| 704 |
+
margin-top: 1em;
|
| 705 |
+
margin-bottom: 1em;
|
| 706 |
+
}
|
| 707 |
+
|
| 708 |
+
.line-block .line-block {
|
| 709 |
+
margin-top: 0;
|
| 710 |
+
margin-bottom: 0;
|
| 711 |
+
margin-left: 1.5em;
|
| 712 |
+
}
|
| 713 |
+
|
| 714 |
+
.guilabel, .menuselection {
|
| 715 |
+
font-family: sans-serif;
|
| 716 |
+
}
|
| 717 |
+
|
| 718 |
+
.accelerator {
|
| 719 |
+
text-decoration: underline;
|
| 720 |
+
}
|
| 721 |
+
|
| 722 |
+
.classifier {
|
| 723 |
+
font-style: oblique;
|
| 724 |
+
}
|
| 725 |
+
|
| 726 |
+
.classifier:before {
|
| 727 |
+
font-style: normal;
|
| 728 |
+
margin: 0 0.5em;
|
| 729 |
+
content: ":";
|
| 730 |
+
display: inline-block;
|
| 731 |
+
}
|
| 732 |
+
|
| 733 |
+
abbr, acronym {
|
| 734 |
+
border-bottom: dotted 1px;
|
| 735 |
+
cursor: help;
|
| 736 |
+
}
|
| 737 |
+
|
| 738 |
+
/* -- code displays --------------------------------------------------------- */
|
| 739 |
+
|
| 740 |
+
pre {
|
| 741 |
+
overflow: auto;
|
| 742 |
+
overflow-y: hidden; /* fixes display issues on Chrome browsers */
|
| 743 |
+
}
|
| 744 |
+
|
| 745 |
+
pre, div[class*="highlight-"] {
|
| 746 |
+
clear: both;
|
| 747 |
+
}
|
| 748 |
+
|
| 749 |
+
span.pre {
|
| 750 |
+
-moz-hyphens: none;
|
| 751 |
+
-ms-hyphens: none;
|
| 752 |
+
-webkit-hyphens: none;
|
| 753 |
+
hyphens: none;
|
| 754 |
+
white-space: nowrap;
|
| 755 |
+
}
|
| 756 |
+
|
| 757 |
+
div[class*="highlight-"] {
|
| 758 |
+
margin: 1em 0;
|
| 759 |
+
}
|
| 760 |
+
|
| 761 |
+
td.linenos pre {
|
| 762 |
+
border: 0;
|
| 763 |
+
background-color: transparent;
|
| 764 |
+
color: #aaa;
|
| 765 |
+
}
|
| 766 |
+
|
| 767 |
+
table.highlighttable {
|
| 768 |
+
display: block;
|
| 769 |
+
}
|
| 770 |
+
|
| 771 |
+
table.highlighttable tbody {
|
| 772 |
+
display: block;
|
| 773 |
+
}
|
| 774 |
+
|
| 775 |
+
table.highlighttable tr {
|
| 776 |
+
display: flex;
|
| 777 |
+
}
|
| 778 |
+
|
| 779 |
+
table.highlighttable td {
|
| 780 |
+
margin: 0;
|
| 781 |
+
padding: 0;
|
| 782 |
+
}
|
| 783 |
+
|
| 784 |
+
table.highlighttable td.linenos {
|
| 785 |
+
padding-right: 0.5em;
|
| 786 |
+
}
|
| 787 |
+
|
| 788 |
+
table.highlighttable td.code {
|
| 789 |
+
flex: 1;
|
| 790 |
+
overflow: hidden;
|
| 791 |
+
}
|
| 792 |
+
|
| 793 |
+
.highlight .hll {
|
| 794 |
+
display: block;
|
| 795 |
+
}
|
| 796 |
+
|
| 797 |
+
div.highlight pre,
|
| 798 |
+
table.highlighttable pre {
|
| 799 |
+
margin: 0;
|
| 800 |
+
}
|
| 801 |
+
|
| 802 |
+
div.code-block-caption + div {
|
| 803 |
+
margin-top: 0;
|
| 804 |
+
}
|
| 805 |
+
|
| 806 |
+
div.code-block-caption {
|
| 807 |
+
margin-top: 1em;
|
| 808 |
+
padding: 2px 5px;
|
| 809 |
+
font-size: small;
|
| 810 |
+
}
|
| 811 |
+
|
| 812 |
+
div.code-block-caption code {
|
| 813 |
+
background-color: transparent;
|
| 814 |
+
}
|
| 815 |
+
|
| 816 |
+
table.highlighttable td.linenos,
|
| 817 |
+
span.linenos,
|
| 818 |
+
div.highlight span.gp { /* gp: Generic.Prompt */
|
| 819 |
+
user-select: none;
|
| 820 |
+
-webkit-user-select: text; /* Safari fallback only */
|
| 821 |
+
-webkit-user-select: none; /* Chrome/Safari */
|
| 822 |
+
-moz-user-select: none; /* Firefox */
|
| 823 |
+
-ms-user-select: none; /* IE10+ */
|
| 824 |
+
}
|
| 825 |
+
|
| 826 |
+
div.code-block-caption span.caption-number {
|
| 827 |
+
padding: 0.1em 0.3em;
|
| 828 |
+
font-style: italic;
|
| 829 |
+
}
|
| 830 |
+
|
| 831 |
+
div.code-block-caption span.caption-text {
|
| 832 |
+
}
|
| 833 |
+
|
| 834 |
+
div.literal-block-wrapper {
|
| 835 |
+
margin: 1em 0;
|
| 836 |
+
}
|
| 837 |
+
|
| 838 |
+
code.xref, a code {
|
| 839 |
+
background-color: transparent;
|
| 840 |
+
font-weight: bold;
|
| 841 |
+
}
|
| 842 |
+
|
| 843 |
+
h1 code, h2 code, h3 code, h4 code, h5 code, h6 code {
|
| 844 |
+
background-color: transparent;
|
| 845 |
+
}
|
| 846 |
+
|
| 847 |
+
.viewcode-link {
|
| 848 |
+
float: right;
|
| 849 |
+
}
|
| 850 |
+
|
| 851 |
+
.viewcode-back {
|
| 852 |
+
float: right;
|
| 853 |
+
font-family: sans-serif;
|
| 854 |
+
}
|
| 855 |
+
|
| 856 |
+
div.viewcode-block:target {
|
| 857 |
+
margin: -1px -10px;
|
| 858 |
+
padding: 0 10px;
|
| 859 |
+
}
|
| 860 |
+
|
| 861 |
+
/* -- math display ---------------------------------------------------------- */
|
| 862 |
+
|
| 863 |
+
img.math {
|
| 864 |
+
vertical-align: middle;
|
| 865 |
+
}
|
| 866 |
+
|
| 867 |
+
div.body div.math p {
|
| 868 |
+
text-align: center;
|
| 869 |
+
}
|
| 870 |
+
|
| 871 |
+
span.eqno {
|
| 872 |
+
float: right;
|
| 873 |
+
}
|
| 874 |
+
|
| 875 |
+
span.eqno a.headerlink {
|
| 876 |
+
position: absolute;
|
| 877 |
+
z-index: 1;
|
| 878 |
+
}
|
| 879 |
+
|
| 880 |
+
div.math:hover a.headerlink {
|
| 881 |
+
visibility: visible;
|
| 882 |
+
}
|
| 883 |
+
|
| 884 |
+
/* -- printout stylesheet --------------------------------------------------- */
|
| 885 |
+
|
| 886 |
+
@media print {
|
| 887 |
+
div.document,
|
| 888 |
+
div.documentwrapper,
|
| 889 |
+
div.bodywrapper {
|
| 890 |
+
margin: 0 !important;
|
| 891 |
+
width: 100%;
|
| 892 |
+
}
|
| 893 |
+
|
| 894 |
+
div.sphinxsidebar,
|
| 895 |
+
div.related,
|
| 896 |
+
div.footer,
|
| 897 |
+
#top-link {
|
| 898 |
+
display: none;
|
| 899 |
+
}
|
| 900 |
+
}
|
toolchain/cmake-3.27.9-linux-x86_64/doc/cmake/html/_static/classic.css
ADDED
|
@@ -0,0 +1,269 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/*
|
| 2 |
+
* classic.css_t
|
| 3 |
+
* ~~~~~~~~~~~~~
|
| 4 |
+
*
|
| 5 |
+
* Sphinx stylesheet -- classic theme.
|
| 6 |
+
*
|
| 7 |
+
* :copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS.
|
| 8 |
+
* :license: BSD, see LICENSE for details.
|
| 9 |
+
*
|
| 10 |
+
*/
|
| 11 |
+
|
| 12 |
+
@import url("basic.css");
|
| 13 |
+
|
| 14 |
+
/* -- page layout ----------------------------------------------------------- */
|
| 15 |
+
|
| 16 |
+
html {
|
| 17 |
+
/* CSS hack for macOS's scrollbar (see #1125) */
|
| 18 |
+
background-color: #FFFFFF;
|
| 19 |
+
}
|
| 20 |
+
|
| 21 |
+
body {
|
| 22 |
+
font-family: sans-serif;
|
| 23 |
+
font-size: 100%;
|
| 24 |
+
background-color: #00182d;
|
| 25 |
+
color: #000;
|
| 26 |
+
margin: 0;
|
| 27 |
+
padding: 0;
|
| 28 |
+
}
|
| 29 |
+
|
| 30 |
+
div.document {
|
| 31 |
+
display: flex;
|
| 32 |
+
background-color: #e4ece8;
|
| 33 |
+
}
|
| 34 |
+
|
| 35 |
+
div.documentwrapper {
|
| 36 |
+
float: left;
|
| 37 |
+
width: 100%;
|
| 38 |
+
}
|
| 39 |
+
|
| 40 |
+
div.bodywrapper {
|
| 41 |
+
margin: 0 0 0 230px;
|
| 42 |
+
}
|
| 43 |
+
|
| 44 |
+
div.body {
|
| 45 |
+
background-color: #ffffff;
|
| 46 |
+
color: #444444;
|
| 47 |
+
padding: 0 20px 30px 20px;
|
| 48 |
+
}
|
| 49 |
+
|
| 50 |
+
div.footer {
|
| 51 |
+
color: #ffffff;
|
| 52 |
+
width: 100%;
|
| 53 |
+
padding: 9px 0 9px 0;
|
| 54 |
+
text-align: center;
|
| 55 |
+
font-size: 75%;
|
| 56 |
+
}
|
| 57 |
+
|
| 58 |
+
div.footer a {
|
| 59 |
+
color: #ffffff;
|
| 60 |
+
text-decoration: underline;
|
| 61 |
+
}
|
| 62 |
+
|
| 63 |
+
div.related {
|
| 64 |
+
background-color: #00529b;
|
| 65 |
+
line-height: 30px;
|
| 66 |
+
color: #ffffff;
|
| 67 |
+
}
|
| 68 |
+
|
| 69 |
+
div.related a {
|
| 70 |
+
color: #ffffff;
|
| 71 |
+
}
|
| 72 |
+
|
| 73 |
+
div.sphinxsidebar {
|
| 74 |
+
}
|
| 75 |
+
|
| 76 |
+
div.sphinxsidebar h3 {
|
| 77 |
+
font-family: 'Trebuchet MS', sans-serif;
|
| 78 |
+
color: #333333;
|
| 79 |
+
font-size: 1.4em;
|
| 80 |
+
font-weight: normal;
|
| 81 |
+
margin: 0;
|
| 82 |
+
padding: 0;
|
| 83 |
+
}
|
| 84 |
+
|
| 85 |
+
div.sphinxsidebar h3 a {
|
| 86 |
+
color: #333333;
|
| 87 |
+
}
|
| 88 |
+
|
| 89 |
+
div.sphinxsidebar h4 {
|
| 90 |
+
font-family: 'Trebuchet MS', sans-serif;
|
| 91 |
+
color: #333333;
|
| 92 |
+
font-size: 1.3em;
|
| 93 |
+
font-weight: normal;
|
| 94 |
+
margin: 5px 0 0 0;
|
| 95 |
+
padding: 0;
|
| 96 |
+
}
|
| 97 |
+
|
| 98 |
+
div.sphinxsidebar p {
|
| 99 |
+
color: #333333;
|
| 100 |
+
}
|
| 101 |
+
|
| 102 |
+
div.sphinxsidebar p.topless {
|
| 103 |
+
margin: 5px 10px 10px 10px;
|
| 104 |
+
}
|
| 105 |
+
|
| 106 |
+
div.sphinxsidebar ul {
|
| 107 |
+
margin: 10px;
|
| 108 |
+
padding: 0;
|
| 109 |
+
color: #333333;
|
| 110 |
+
}
|
| 111 |
+
|
| 112 |
+
div.sphinxsidebar a {
|
| 113 |
+
color: #00a94f;
|
| 114 |
+
}
|
| 115 |
+
|
| 116 |
+
div.sphinxsidebar input {
|
| 117 |
+
border: 1px solid #00a94f;
|
| 118 |
+
font-family: sans-serif;
|
| 119 |
+
font-size: 1em;
|
| 120 |
+
}
|
| 121 |
+
|
| 122 |
+
|
| 123 |
+
|
| 124 |
+
/* -- hyperlink styles ------------------------------------------------------ */
|
| 125 |
+
|
| 126 |
+
a {
|
| 127 |
+
color: #2b63a8;
|
| 128 |
+
text-decoration: none;
|
| 129 |
+
}
|
| 130 |
+
|
| 131 |
+
a:visited {
|
| 132 |
+
color: #2b63a8;
|
| 133 |
+
text-decoration: none;
|
| 134 |
+
}
|
| 135 |
+
|
| 136 |
+
a:hover {
|
| 137 |
+
text-decoration: underline;
|
| 138 |
+
}
|
| 139 |
+
|
| 140 |
+
|
| 141 |
+
|
| 142 |
+
/* -- body styles ----------------------------------------------------------- */
|
| 143 |
+
|
| 144 |
+
div.body h1,
|
| 145 |
+
div.body h2,
|
| 146 |
+
div.body h3,
|
| 147 |
+
div.body h4,
|
| 148 |
+
div.body h5,
|
| 149 |
+
div.body h6 {
|
| 150 |
+
font-family: 'Trebuchet MS', sans-serif;
|
| 151 |
+
background-color: #f2f2f2;
|
| 152 |
+
font-weight: normal;
|
| 153 |
+
color: #003564;
|
| 154 |
+
border-bottom: 1px solid #ccc;
|
| 155 |
+
margin: 20px -20px 10px -20px;
|
| 156 |
+
padding: 3px 0 3px 10px;
|
| 157 |
+
}
|
| 158 |
+
|
| 159 |
+
div.body h1 { margin-top: 0; font-size: 200%; }
|
| 160 |
+
div.body h2 { font-size: 160%; }
|
| 161 |
+
div.body h3 { font-size: 140%; }
|
| 162 |
+
div.body h4 { font-size: 120%; }
|
| 163 |
+
div.body h5 { font-size: 110%; }
|
| 164 |
+
div.body h6 { font-size: 100%; }
|
| 165 |
+
|
| 166 |
+
a.headerlink {
|
| 167 |
+
color: #3d8ff2;
|
| 168 |
+
font-size: 0.8em;
|
| 169 |
+
padding: 0 4px 0 4px;
|
| 170 |
+
text-decoration: none;
|
| 171 |
+
}
|
| 172 |
+
|
| 173 |
+
a.headerlink:hover {
|
| 174 |
+
background-color: #3d8ff2;
|
| 175 |
+
color: white;
|
| 176 |
+
}
|
| 177 |
+
|
| 178 |
+
div.body p, div.body dd, div.body li, div.body blockquote {
|
| 179 |
+
text-align: justify;
|
| 180 |
+
line-height: 130%;
|
| 181 |
+
}
|
| 182 |
+
|
| 183 |
+
div.admonition p.admonition-title + p {
|
| 184 |
+
display: inline;
|
| 185 |
+
}
|
| 186 |
+
|
| 187 |
+
div.admonition p {
|
| 188 |
+
margin-bottom: 5px;
|
| 189 |
+
}
|
| 190 |
+
|
| 191 |
+
div.admonition pre {
|
| 192 |
+
margin-bottom: 5px;
|
| 193 |
+
}
|
| 194 |
+
|
| 195 |
+
div.admonition ul, div.admonition ol {
|
| 196 |
+
margin-bottom: 5px;
|
| 197 |
+
}
|
| 198 |
+
|
| 199 |
+
div.note {
|
| 200 |
+
background-color: #eee;
|
| 201 |
+
border: 1px solid #ccc;
|
| 202 |
+
}
|
| 203 |
+
|
| 204 |
+
div.seealso {
|
| 205 |
+
background-color: #ffc;
|
| 206 |
+
border: 1px solid #ff6;
|
| 207 |
+
}
|
| 208 |
+
nav.contents,
|
| 209 |
+
aside.topic,
|
| 210 |
+
|
| 211 |
+
div.topic {
|
| 212 |
+
background-color: #eee;
|
| 213 |
+
}
|
| 214 |
+
|
| 215 |
+
div.warning {
|
| 216 |
+
background-color: #ffe4e4;
|
| 217 |
+
border: 1px solid #f66;
|
| 218 |
+
}
|
| 219 |
+
|
| 220 |
+
p.admonition-title {
|
| 221 |
+
display: inline;
|
| 222 |
+
}
|
| 223 |
+
|
| 224 |
+
p.admonition-title:after {
|
| 225 |
+
content: ":";
|
| 226 |
+
}
|
| 227 |
+
|
| 228 |
+
pre {
|
| 229 |
+
padding: 5px;
|
| 230 |
+
background-color: #eeeeee;
|
| 231 |
+
color: #333333;
|
| 232 |
+
line-height: 120%;
|
| 233 |
+
border: 1px solid #ac9;
|
| 234 |
+
border-left: none;
|
| 235 |
+
border-right: none;
|
| 236 |
+
}
|
| 237 |
+
|
| 238 |
+
code {
|
| 239 |
+
background-color: #ecf0f3;
|
| 240 |
+
padding: 0 1px 0 1px;
|
| 241 |
+
font-size: 0.95em;
|
| 242 |
+
}
|
| 243 |
+
|
| 244 |
+
th, dl.field-list > dt {
|
| 245 |
+
background-color: #ede;
|
| 246 |
+
}
|
| 247 |
+
|
| 248 |
+
.warning code {
|
| 249 |
+
background: #efc2c2;
|
| 250 |
+
}
|
| 251 |
+
|
| 252 |
+
.note code {
|
| 253 |
+
background: #d6d6d6;
|
| 254 |
+
}
|
| 255 |
+
|
| 256 |
+
.viewcode-back {
|
| 257 |
+
font-family: sans-serif;
|
| 258 |
+
}
|
| 259 |
+
|
| 260 |
+
div.viewcode-block:target {
|
| 261 |
+
background-color: #f4debf;
|
| 262 |
+
border-top: 1px solid #ac9;
|
| 263 |
+
border-bottom: 1px solid #ac9;
|
| 264 |
+
}
|
| 265 |
+
|
| 266 |
+
div.code-block-caption {
|
| 267 |
+
color: #efefef;
|
| 268 |
+
background-color: #1c4e63;
|
| 269 |
+
}
|
toolchain/cmake-3.27.9-linux-x86_64/doc/cmake/html/_static/cmake-favicon.ico
ADDED
|
|
toolchain/cmake-3.27.9-linux-x86_64/doc/cmake/html/_static/cmake.css
ADDED
|
@@ -0,0 +1,86 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/* Import the Sphinx theme style. */
|
| 2 |
+
@import url("default.css");
|
| 3 |
+
|
| 4 |
+
/* Wrap sidebar content even within words so that long
|
| 5 |
+
document names do not escape sidebar borders. */
|
| 6 |
+
div.sphinxsidebarwrapper {
|
| 7 |
+
word-wrap: break-word;
|
| 8 |
+
}
|
| 9 |
+
|
| 10 |
+
/* Make links inside parsed-literal blocks more obvious
|
| 11 |
+
by using a background color and increased line spacing
|
| 12 |
+
to make them look boxed. */
|
| 13 |
+
.literal-block {
|
| 14 |
+
line-height: 1.4;
|
| 15 |
+
}
|
| 16 |
+
.literal-block a.reference.internal {
|
| 17 |
+
background-color: #dfdfdf;
|
| 18 |
+
}
|
| 19 |
+
|
| 20 |
+
/* Apply <pre> style (from classic.css) to signature directive argument. */
|
| 21 |
+
.signature .sig {
|
| 22 |
+
padding: 5px;
|
| 23 |
+
background-color: #eeeeee;
|
| 24 |
+
color: #333333;
|
| 25 |
+
line-height: 120%;
|
| 26 |
+
border: 1px solid #ac9;
|
| 27 |
+
border-left: none;
|
| 28 |
+
border-right: none;
|
| 29 |
+
}
|
| 30 |
+
|
| 31 |
+
/* Add additional styling to signature directive argument. */
|
| 32 |
+
.signature .sig {
|
| 33 |
+
margin-bottom: 5px;
|
| 34 |
+
padding-left: calc(5px + 3em);
|
| 35 |
+
text-indent: -3em;
|
| 36 |
+
font-family: monospace;
|
| 37 |
+
}
|
| 38 |
+
|
| 39 |
+
.signature .sig .code.sig-name {
|
| 40 |
+
font-weight: normal;
|
| 41 |
+
}
|
| 42 |
+
|
| 43 |
+
/* Implement non-breaking spaces in signatures. */
|
| 44 |
+
.nbsp {
|
| 45 |
+
white-space: nowrap;
|
| 46 |
+
}
|
| 47 |
+
|
| 48 |
+
/* Add hanging indent to version-{added,changed} content. */
|
| 49 |
+
div .versionadded > *,
|
| 50 |
+
div .versionchanged > * {
|
| 51 |
+
padding-left: 2em;
|
| 52 |
+
}
|
| 53 |
+
|
| 54 |
+
div.versionadded > :first-child,
|
| 55 |
+
div.versionchanged > :first-child {
|
| 56 |
+
text-indent: -2em;
|
| 57 |
+
}
|
| 58 |
+
|
| 59 |
+
/* Remove unwanted margin in case list item contains a div-wrapping
|
| 60 |
+
directive like `.. versionadded` or `.. deprecated`. */
|
| 61 |
+
dd > :first-child > p {
|
| 62 |
+
margin-top: 0px;
|
| 63 |
+
}
|
| 64 |
+
|
| 65 |
+
div.outdated {
|
| 66 |
+
background-color: #f0f0c0;
|
| 67 |
+
color: black;
|
| 68 |
+
font-size: 90%;
|
| 69 |
+
padding-bottom: 5px;
|
| 70 |
+
padding-left: 2px;
|
| 71 |
+
padding-right: 2px;
|
| 72 |
+
padding-top: 5px;
|
| 73 |
+
text-align: center;
|
| 74 |
+
width: 100%;
|
| 75 |
+
}
|
| 76 |
+
|
| 77 |
+
/* Revert style to the inherited (normal text) for `:guide:` links */
|
| 78 |
+
code.xref.cmake-guide {
|
| 79 |
+
font-size: inherit;
|
| 80 |
+
font-family: inherit;
|
| 81 |
+
font-weight: inherit;
|
| 82 |
+
padding: inherit;
|
| 83 |
+
}
|
| 84 |
+
code.xref.cmake-guide span.pre {
|
| 85 |
+
white-space: inherit;
|
| 86 |
+
}
|
toolchain/cmake-3.27.9-linux-x86_64/doc/cmake/html/_static/default.css
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
@import url("classic.css");
|
toolchain/cmake-3.27.9-linux-x86_64/doc/cmake/html/_static/doctools.js
ADDED
|
@@ -0,0 +1,156 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/*
|
| 2 |
+
* doctools.js
|
| 3 |
+
* ~~~~~~~~~~~
|
| 4 |
+
*
|
| 5 |
+
* Base JavaScript utilities for all Sphinx HTML documentation.
|
| 6 |
+
*
|
| 7 |
+
* :copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS.
|
| 8 |
+
* :license: BSD, see LICENSE for details.
|
| 9 |
+
*
|
| 10 |
+
*/
|
| 11 |
+
"use strict";
|
| 12 |
+
|
| 13 |
+
const BLACKLISTED_KEY_CONTROL_ELEMENTS = new Set([
|
| 14 |
+
"TEXTAREA",
|
| 15 |
+
"INPUT",
|
| 16 |
+
"SELECT",
|
| 17 |
+
"BUTTON",
|
| 18 |
+
]);
|
| 19 |
+
|
| 20 |
+
const _ready = (callback) => {
|
| 21 |
+
if (document.readyState !== "loading") {
|
| 22 |
+
callback();
|
| 23 |
+
} else {
|
| 24 |
+
document.addEventListener("DOMContentLoaded", callback);
|
| 25 |
+
}
|
| 26 |
+
};
|
| 27 |
+
|
| 28 |
+
/**
|
| 29 |
+
* Small JavaScript module for the documentation.
|
| 30 |
+
*/
|
| 31 |
+
const Documentation = {
|
| 32 |
+
init: () => {
|
| 33 |
+
Documentation.initDomainIndexTable();
|
| 34 |
+
Documentation.initOnKeyListeners();
|
| 35 |
+
},
|
| 36 |
+
|
| 37 |
+
/**
|
| 38 |
+
* i18n support
|
| 39 |
+
*/
|
| 40 |
+
TRANSLATIONS: {},
|
| 41 |
+
PLURAL_EXPR: (n) => (n === 1 ? 0 : 1),
|
| 42 |
+
LOCALE: "unknown",
|
| 43 |
+
|
| 44 |
+
// gettext and ngettext don't access this so that the functions
|
| 45 |
+
// can safely bound to a different name (_ = Documentation.gettext)
|
| 46 |
+
gettext: (string) => {
|
| 47 |
+
const translated = Documentation.TRANSLATIONS[string];
|
| 48 |
+
switch (typeof translated) {
|
| 49 |
+
case "undefined":
|
| 50 |
+
return string; // no translation
|
| 51 |
+
case "string":
|
| 52 |
+
return translated; // translation exists
|
| 53 |
+
default:
|
| 54 |
+
return translated[0]; // (singular, plural) translation tuple exists
|
| 55 |
+
}
|
| 56 |
+
},
|
| 57 |
+
|
| 58 |
+
ngettext: (singular, plural, n) => {
|
| 59 |
+
const translated = Documentation.TRANSLATIONS[singular];
|
| 60 |
+
if (typeof translated !== "undefined")
|
| 61 |
+
return translated[Documentation.PLURAL_EXPR(n)];
|
| 62 |
+
return n === 1 ? singular : plural;
|
| 63 |
+
},
|
| 64 |
+
|
| 65 |
+
addTranslations: (catalog) => {
|
| 66 |
+
Object.assign(Documentation.TRANSLATIONS, catalog.messages);
|
| 67 |
+
Documentation.PLURAL_EXPR = new Function(
|
| 68 |
+
"n",
|
| 69 |
+
`return (${catalog.plural_expr})`
|
| 70 |
+
);
|
| 71 |
+
Documentation.LOCALE = catalog.locale;
|
| 72 |
+
},
|
| 73 |
+
|
| 74 |
+
/**
|
| 75 |
+
* helper function to focus on search bar
|
| 76 |
+
*/
|
| 77 |
+
focusSearchBar: () => {
|
| 78 |
+
document.querySelectorAll("input[name=q]")[0]?.focus();
|
| 79 |
+
},
|
| 80 |
+
|
| 81 |
+
/**
|
| 82 |
+
* Initialise the domain index toggle buttons
|
| 83 |
+
*/
|
| 84 |
+
initDomainIndexTable: () => {
|
| 85 |
+
const toggler = (el) => {
|
| 86 |
+
const idNumber = el.id.substr(7);
|
| 87 |
+
const toggledRows = document.querySelectorAll(`tr.cg-${idNumber}`);
|
| 88 |
+
if (el.src.substr(-9) === "minus.png") {
|
| 89 |
+
el.src = `${el.src.substr(0, el.src.length - 9)}plus.png`;
|
| 90 |
+
toggledRows.forEach((el) => (el.style.display = "none"));
|
| 91 |
+
} else {
|
| 92 |
+
el.src = `${el.src.substr(0, el.src.length - 8)}minus.png`;
|
| 93 |
+
toggledRows.forEach((el) => (el.style.display = ""));
|
| 94 |
+
}
|
| 95 |
+
};
|
| 96 |
+
|
| 97 |
+
const togglerElements = document.querySelectorAll("img.toggler");
|
| 98 |
+
togglerElements.forEach((el) =>
|
| 99 |
+
el.addEventListener("click", (event) => toggler(event.currentTarget))
|
| 100 |
+
);
|
| 101 |
+
togglerElements.forEach((el) => (el.style.display = ""));
|
| 102 |
+
if (DOCUMENTATION_OPTIONS.COLLAPSE_INDEX) togglerElements.forEach(toggler);
|
| 103 |
+
},
|
| 104 |
+
|
| 105 |
+
initOnKeyListeners: () => {
|
| 106 |
+
// only install a listener if it is really needed
|
| 107 |
+
if (
|
| 108 |
+
!DOCUMENTATION_OPTIONS.NAVIGATION_WITH_KEYS &&
|
| 109 |
+
!DOCUMENTATION_OPTIONS.ENABLE_SEARCH_SHORTCUTS
|
| 110 |
+
)
|
| 111 |
+
return;
|
| 112 |
+
|
| 113 |
+
document.addEventListener("keydown", (event) => {
|
| 114 |
+
// bail for input elements
|
| 115 |
+
if (BLACKLISTED_KEY_CONTROL_ELEMENTS.has(document.activeElement.tagName)) return;
|
| 116 |
+
// bail with special keys
|
| 117 |
+
if (event.altKey || event.ctrlKey || event.metaKey) return;
|
| 118 |
+
|
| 119 |
+
if (!event.shiftKey) {
|
| 120 |
+
switch (event.key) {
|
| 121 |
+
case "ArrowLeft":
|
| 122 |
+
if (!DOCUMENTATION_OPTIONS.NAVIGATION_WITH_KEYS) break;
|
| 123 |
+
|
| 124 |
+
const prevLink = document.querySelector('link[rel="prev"]');
|
| 125 |
+
if (prevLink && prevLink.href) {
|
| 126 |
+
window.location.href = prevLink.href;
|
| 127 |
+
event.preventDefault();
|
| 128 |
+
}
|
| 129 |
+
break;
|
| 130 |
+
case "ArrowRight":
|
| 131 |
+
if (!DOCUMENTATION_OPTIONS.NAVIGATION_WITH_KEYS) break;
|
| 132 |
+
|
| 133 |
+
const nextLink = document.querySelector('link[rel="next"]');
|
| 134 |
+
if (nextLink && nextLink.href) {
|
| 135 |
+
window.location.href = nextLink.href;
|
| 136 |
+
event.preventDefault();
|
| 137 |
+
}
|
| 138 |
+
break;
|
| 139 |
+
}
|
| 140 |
+
}
|
| 141 |
+
|
| 142 |
+
// some keyboard layouts may need Shift to get /
|
| 143 |
+
switch (event.key) {
|
| 144 |
+
case "/":
|
| 145 |
+
if (!DOCUMENTATION_OPTIONS.ENABLE_SEARCH_SHORTCUTS) break;
|
| 146 |
+
Documentation.focusSearchBar();
|
| 147 |
+
event.preventDefault();
|
| 148 |
+
}
|
| 149 |
+
});
|
| 150 |
+
},
|
| 151 |
+
};
|
| 152 |
+
|
| 153 |
+
// quick alias for translations
|
| 154 |
+
const _ = Documentation.gettext;
|
| 155 |
+
|
| 156 |
+
_ready(Documentation.init);
|
toolchain/cmake-3.27.9-linux-x86_64/doc/cmake/html/_static/documentation_options.js
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
var DOCUMENTATION_OPTIONS = {
|
| 2 |
+
URL_ROOT: document.getElementById("documentation_options").getAttribute('data-url_root'),
|
| 3 |
+
VERSION: '3.27.9',
|
| 4 |
+
LANGUAGE: 'en',
|
| 5 |
+
COLLAPSE_INDEX: false,
|
| 6 |
+
BUILDER: 'html',
|
| 7 |
+
FILE_SUFFIX: '.html',
|
| 8 |
+
LINK_SUFFIX: '.html',
|
| 9 |
+
HAS_SOURCE: true,
|
| 10 |
+
SOURCELINK_SUFFIX: '.txt',
|
| 11 |
+
NAVIGATION_WITH_KEYS: false,
|
| 12 |
+
SHOW_SEARCH_SUMMARY: true,
|
| 13 |
+
ENABLE_SEARCH_SHORTCUTS: true,
|
| 14 |
+
};
|
toolchain/cmake-3.27.9-linux-x86_64/doc/cmake/html/_static/jquery-3.6.0.js
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
toolchain/cmake-3.27.9-linux-x86_64/doc/cmake/html/_static/jquery.js
ADDED
|
@@ -0,0 +1,2 @@
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/*! jQuery v3.6.0 | (c) OpenJS Foundation and other contributors | jquery.org/license */
|
| 2 |
+
!function(e,t){"use strict";"object"==typeof module&&"object"==typeof module.exports?module.exports=e.document?t(e,!0):function(e){if(!e.document)throw new Error("jQuery requires a window with a document");return t(e)}:t(e)}("undefined"!=typeof window?window:this,function(C,e){"use strict";var t=[],r=Object.getPrototypeOf,s=t.slice,g=t.flat?function(e){return t.flat.call(e)}:function(e){return t.concat.apply([],e)},u=t.push,i=t.indexOf,n={},o=n.toString,v=n.hasOwnProperty,a=v.toString,l=a.call(Object),y={},m=function(e){return"function"==typeof e&&"number"!=typeof e.nodeType&&"function"!=typeof e.item},x=function(e){return null!=e&&e===e.window},E=C.document,c={type:!0,src:!0,nonce:!0,noModule:!0};function b(e,t,n){var r,i,o=(n=n||E).createElement("script");if(o.text=e,t)for(r in c)(i=t[r]||t.getAttribute&&t.getAttribute(r))&&o.setAttribute(r,i);n.head.appendChild(o).parentNode.removeChild(o)}function w(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?n[o.call(e)]||"object":typeof e}var f="3.6.0",S=function(e,t){return new S.fn.init(e,t)};function p(e){var t=!!e&&"length"in e&&e.length,n=w(e);return!m(e)&&!x(e)&&("array"===n||0===t||"number"==typeof t&&0<t&&t-1 in e)}S.fn=S.prototype={jquery:f,constructor:S,length:0,toArray:function(){return s.call(this)},get:function(e){return null==e?s.call(this):e<0?this[e+this.length]:this[e]},pushStack:function(e){var t=S.merge(this.constructor(),e);return t.prevObject=this,t},each:function(e){return S.each(this,e)},map:function(n){return this.pushStack(S.map(this,function(e,t){return n.call(e,t,e)}))},slice:function(){return this.pushStack(s.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},even:function(){return this.pushStack(S.grep(this,function(e,t){return(t+1)%2}))},odd:function(){return this.pushStack(S.grep(this,function(e,t){return t%2}))},eq:function(e){var t=this.length,n=+e+(e<0?t:0);return this.pushStack(0<=n&&n<t?[this[n]]:[])},end:function(){return this.prevObject||this.constructor()},push:u,sort:t.sort,splice:t.splice},S.extend=S.fn.extend=function(){var e,t,n,r,i,o,a=arguments[0]||{},s=1,u=arguments.length,l=!1;for("boolean"==typeof a&&(l=a,a=arguments[s]||{},s++),"object"==typeof a||m(a)||(a={}),s===u&&(a=this,s--);s<u;s++)if(null!=(e=arguments[s]))for(t in e)r=e[t],"__proto__"!==t&&a!==r&&(l&&r&&(S.isPlainObject(r)||(i=Array.isArray(r)))?(n=a[t],o=i&&!Array.isArray(n)?[]:i||S.isPlainObject(n)?n:{},i=!1,a[t]=S.extend(l,o,r)):void 0!==r&&(a[t]=r));return a},S.extend({expando:"jQuery"+(f+Math.random()).replace(/\D/g,""),isReady:!0,error:function(e){throw new Error(e)},noop:function(){},isPlainObject:function(e){var t,n;return!(!e||"[object Object]"!==o.call(e))&&(!(t=r(e))||"function"==typeof(n=v.call(t,"constructor")&&t.constructor)&&a.call(n)===l)},isEmptyObject:function(e){var t;for(t in e)return!1;return!0},globalEval:function(e,t,n){b(e,{nonce:t&&t.nonce},n)},each:function(e,t){var n,r=0;if(p(e)){for(n=e.length;r<n;r++)if(!1===t.call(e[r],r,e[r]))break}else for(r in e)if(!1===t.call(e[r],r,e[r]))break;return e},makeArray:function(e,t){var n=t||[];return null!=e&&(p(Object(e))?S.merge(n,"string"==typeof e?[e]:e):u.call(n,e)),n},inArray:function(e,t,n){return null==t?-1:i.call(t,e,n)},merge:function(e,t){for(var n=+t.length,r=0,i=e.length;r<n;r++)e[i++]=t[r];return e.length=i,e},grep:function(e,t,n){for(var r=[],i=0,o=e.length,a=!n;i<o;i++)!t(e[i],i)!==a&&r.push(e[i]);return r},map:function(e,t,n){var r,i,o=0,a=[];if(p(e))for(r=e.length;o<r;o++)null!=(i=t(e[o],o,n))&&a.push(i);else for(o in e)null!=(i=t(e[o],o,n))&&a.push(i);return g(a)},guid:1,support:y}),"function"==typeof Symbol&&(S.fn[Symbol.iterator]=t[Symbol.iterator]),S.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "),function(e,t){n["[object "+t+"]"]=t.toLowerCase()});var d=function(n){var e,d,b,o,i,h,f,g,w,u,l,T,C,a,E,v,s,c,y,S="sizzle"+1*new Date,p=n.document,k=0,r=0,m=ue(),x=ue(),A=ue(),N=ue(),j=function(e,t){return e===t&&(l=!0),0},D={}.hasOwnProperty,t=[],q=t.pop,L=t.push,H=t.push,O=t.slice,P=function(e,t){for(var n=0,r=e.length;n<r;n++)if(e[n]===t)return n;return-1},R="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",M="[\\x20\\t\\r\\n\\f]",I="(?:\\\\[\\da-fA-F]{1,6}"+M+"?|\\\\[^\\r\\n\\f]|[\\w-]|[^\0-\\x7f])+",W="\\["+M+"*("+I+")(?:"+M+"*([*^$|!~]?=)"+M+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+I+"))|)"+M+"*\\]",F=":("+I+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+W+")*)|.*)\\)|)",B=new RegExp(M+"+","g"),$=new RegExp("^"+M+"+|((?:^|[^\\\\])(?:\\\\.)*)"+M+"+$","g"),_=new RegExp("^"+M+"*,"+M+"*"),z=new RegExp("^"+M+"*([>+~]|"+M+")"+M+"*"),U=new RegExp(M+"|>"),X=new RegExp(F),V=new RegExp("^"+I+"$"),G={ID:new RegExp("^#("+I+")"),CLASS:new RegExp("^\\.("+I+")"),TAG:new RegExp("^("+I+"|[*])"),ATTR:new RegExp("^"+W),PSEUDO:new RegExp("^"+F),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+M+"*(even|odd|(([+-]|)(\\d*)n|)"+M+"*(?:([+-]|)"+M+"*(\\d+)|))"+M+"*\\)|)","i"),bool:new RegExp("^(?:"+R+")$","i"),needsContext:new RegExp("^"+M+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+M+"*((?:-\\d)?\\d*)"+M+"*\\)|)(?=[^-]|$)","i")},Y=/HTML$/i,Q=/^(?:input|select|textarea|button)$/i,J=/^h\d$/i,K=/^[^{]+\{\s*\[native \w/,Z=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,ee=/[+~]/,te=new RegExp("\\\\[\\da-fA-F]{1,6}"+M+"?|\\\\([^\\r\\n\\f])","g"),ne=function(e,t){var n="0x"+e.slice(1)-65536;return t||(n<0?String.fromCharCode(n+65536):String.fromCharCode(n>>10|55296,1023&n|56320))},re=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,ie=function(e,t){return t?"\0"===e?"\ufffd":e.slice(0,-1)+"\\"+e.charCodeAt(e.length-1).toString(16)+" ":"\\"+e},oe=function(){T()},ae=be(function(e){return!0===e.disabled&&"fieldset"===e.nodeName.toLowerCase()},{dir:"parentNode",next:"legend"});try{H.apply(t=O.call(p.childNodes),p.childNodes),t[p.childNodes.length].nodeType}catch(e){H={apply:t.length?function(e,t){L.apply(e,O.call(t))}:function(e,t){var n=e.length,r=0;while(e[n++]=t[r++]);e.length=n-1}}}function se(t,e,n,r){var i,o,a,s,u,l,c,f=e&&e.ownerDocument,p=e?e.nodeType:9;if(n=n||[],"string"!=typeof t||!t||1!==p&&9!==p&&11!==p)return n;if(!r&&(T(e),e=e||C,E)){if(11!==p&&(u=Z.exec(t)))if(i=u[1]){if(9===p){if(!(a=e.getElementById(i)))return n;if(a.id===i)return n.push(a),n}else if(f&&(a=f.getElementById(i))&&y(e,a)&&a.id===i)return n.push(a),n}else{if(u[2])return H.apply(n,e.getElementsByTagName(t)),n;if((i=u[3])&&d.getElementsByClassName&&e.getElementsByClassName)return H.apply(n,e.getElementsByClassName(i)),n}if(d.qsa&&!N[t+" "]&&(!v||!v.test(t))&&(1!==p||"object"!==e.nodeName.toLowerCase())){if(c=t,f=e,1===p&&(U.test(t)||z.test(t))){(f=ee.test(t)&&ye(e.parentNode)||e)===e&&d.scope||((s=e.getAttribute("id"))?s=s.replace(re,ie):e.setAttribute("id",s=S)),o=(l=h(t)).length;while(o--)l[o]=(s?"#"+s:":scope")+" "+xe(l[o]);c=l.join(",")}try{return H.apply(n,f.querySelectorAll(c)),n}catch(e){N(t,!0)}finally{s===S&&e.removeAttribute("id")}}}return g(t.replace($,"$1"),e,n,r)}function ue(){var r=[];return function e(t,n){return r.push(t+" ")>b.cacheLength&&delete e[r.shift()],e[t+" "]=n}}function le(e){return e[S]=!0,e}function ce(e){var t=C.createElement("fieldset");try{return!!e(t)}catch(e){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function fe(e,t){var n=e.split("|"),r=n.length;while(r--)b.attrHandle[n[r]]=t}function pe(e,t){var n=t&&e,r=n&&1===e.nodeType&&1===t.nodeType&&e.sourceIndex-t.sourceIndex;if(r)return r;if(n)while(n=n.nextSibling)if(n===t)return-1;return e?1:-1}function de(t){return function(e){return"input"===e.nodeName.toLowerCase()&&e.type===t}}function he(n){return function(e){var t=e.nodeName.toLowerCase();return("input"===t||"button"===t)&&e.type===n}}function ge(t){return function(e){return"form"in e?e.parentNode&&!1===e.disabled?"label"in e?"label"in e.parentNode?e.parentNode.disabled===t:e.disabled===t:e.isDisabled===t||e.isDisabled!==!t&&ae(e)===t:e.disabled===t:"label"in e&&e.disabled===t}}function ve(a){return le(function(o){return o=+o,le(function(e,t){var n,r=a([],e.length,o),i=r.length;while(i--)e[n=r[i]]&&(e[n]=!(t[n]=e[n]))})})}function ye(e){return e&&"undefined"!=typeof e.getElementsByTagName&&e}for(e in d=se.support={},i=se.isXML=function(e){var t=e&&e.namespaceURI,n=e&&(e.ownerDocument||e).documentElement;return!Y.test(t||n&&n.nodeName||"HTML")},T=se.setDocument=function(e){var t,n,r=e?e.ownerDocument||e:p;return r!=C&&9===r.nodeType&&r.documentElement&&(a=(C=r).documentElement,E=!i(C),p!=C&&(n=C.defaultView)&&n.top!==n&&(n.addEventListener?n.addEventListener("unload",oe,!1):n.attachEvent&&n.attachEvent("onunload",oe)),d.scope=ce(function(e){return a.appendChild(e).appendChild(C.createElement("div")),"undefined"!=typeof e.querySelectorAll&&!e.querySelectorAll(":scope fieldset div").length}),d.attributes=ce(function(e){return e.className="i",!e.getAttribute("className")}),d.getElementsByTagName=ce(function(e){return e.appendChild(C.createComment("")),!e.getElementsByTagName("*").length}),d.getElementsByClassName=K.test(C.getElementsByClassName),d.getById=ce(function(e){return a.appendChild(e).id=S,!C.getElementsByName||!C.getElementsByName(S).length}),d.getById?(b.filter.ID=function(e){var t=e.replace(te,ne);return function(e){return e.getAttribute("id")===t}},b.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&E){var n=t.getElementById(e);return n?[n]:[]}}):(b.filter.ID=function(e){var n=e.replace(te,ne);return function(e){var t="undefined"!=typeof e.getAttributeNode&&e.getAttributeNode("id");return t&&t.value===n}},b.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&E){var n,r,i,o=t.getElementById(e);if(o){if((n=o.getAttributeNode("id"))&&n.value===e)return[o];i=t.getElementsByName(e),r=0;while(o=i[r++])if((n=o.getAttributeNode("id"))&&n.value===e)return[o]}return[]}}),b.find.TAG=d.getElementsByTagName?function(e,t){return"undefined"!=typeof t.getElementsByTagName?t.getElementsByTagName(e):d.qsa?t.querySelectorAll(e):void 0}:function(e,t){var n,r=[],i=0,o=t.getElementsByTagName(e);if("*"===e){while(n=o[i++])1===n.nodeType&&r.push(n);return r}return o},b.find.CLASS=d.getElementsByClassName&&function(e,t){if("undefined"!=typeof t.getElementsByClassName&&E)return t.getElementsByClassName(e)},s=[],v=[],(d.qsa=K.test(C.querySelectorAll))&&(ce(function(e){var t;a.appendChild(e).innerHTML="<a id='"+S+"'></a><select id='"+S+"-\r\\' msallowcapture=''><option selected=''></option></select>",e.querySelectorAll("[msallowcapture^='']").length&&v.push("[*^$]="+M+"*(?:''|\"\")"),e.querySelectorAll("[selected]").length||v.push("\\["+M+"*(?:value|"+R+")"),e.querySelectorAll("[id~="+S+"-]").length||v.push("~="),(t=C.createElement("input")).setAttribute("name",""),e.appendChild(t),e.querySelectorAll("[name='']").length||v.push("\\["+M+"*name"+M+"*="+M+"*(?:''|\"\")"),e.querySelectorAll(":checked").length||v.push(":checked"),e.querySelectorAll("a#"+S+"+*").length||v.push(".#.+[+~]"),e.querySelectorAll("\\\f"),v.push("[\\r\\n\\f]")}),ce(function(e){e.innerHTML="<a href='' disabled='disabled'></a><select disabled='disabled'><option/></select>";var t=C.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&v.push("name"+M+"*[*^$|!~]?="),2!==e.querySelectorAll(":enabled").length&&v.push(":enabled",":disabled"),a.appendChild(e).disabled=!0,2!==e.querySelectorAll(":disabled").length&&v.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),v.push(",.*:")})),(d.matchesSelector=K.test(c=a.matches||a.webkitMatchesSelector||a.mozMatchesSelector||a.oMatchesSelector||a.msMatchesSelector))&&ce(function(e){d.disconnectedMatch=c.call(e,"*"),c.call(e,"[s!='']:x"),s.push("!=",F)}),v=v.length&&new RegExp(v.join("|")),s=s.length&&new RegExp(s.join("|")),t=K.test(a.compareDocumentPosition),y=t||K.test(a.contains)?function(e,t){var n=9===e.nodeType?e.documentElement:e,r=t&&t.parentNode;return e===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):e.compareDocumentPosition&&16&e.compareDocumentPosition(r)))}:function(e,t){if(t)while(t=t.parentNode)if(t===e)return!0;return!1},j=t?function(e,t){if(e===t)return l=!0,0;var n=!e.compareDocumentPosition-!t.compareDocumentPosition;return n||(1&(n=(e.ownerDocument||e)==(t.ownerDocument||t)?e.compareDocumentPosition(t):1)||!d.sortDetached&&t.compareDocumentPosition(e)===n?e==C||e.ownerDocument==p&&y(p,e)?-1:t==C||t.ownerDocument==p&&y(p,t)?1:u?P(u,e)-P(u,t):0:4&n?-1:1)}:function(e,t){if(e===t)return l=!0,0;var n,r=0,i=e.parentNode,o=t.parentNode,a=[e],s=[t];if(!i||!o)return e==C?-1:t==C?1:i?-1:o?1:u?P(u,e)-P(u,t):0;if(i===o)return pe(e,t);n=e;while(n=n.parentNode)a.unshift(n);n=t;while(n=n.parentNode)s.unshift(n);while(a[r]===s[r])r++;return r?pe(a[r],s[r]):a[r]==p?-1:s[r]==p?1:0}),C},se.matches=function(e,t){return se(e,null,null,t)},se.matchesSelector=function(e,t){if(T(e),d.matchesSelector&&E&&!N[t+" "]&&(!s||!s.test(t))&&(!v||!v.test(t)))try{var n=c.call(e,t);if(n||d.disconnectedMatch||e.document&&11!==e.document.nodeType)return n}catch(e){N(t,!0)}return 0<se(t,C,null,[e]).length},se.contains=function(e,t){return(e.ownerDocument||e)!=C&&T(e),y(e,t)},se.attr=function(e,t){(e.ownerDocument||e)!=C&&T(e);var n=b.attrHandle[t.toLowerCase()],r=n&&D.call(b.attrHandle,t.toLowerCase())?n(e,t,!E):void 0;return void 0!==r?r:d.attributes||!E?e.getAttribute(t):(r=e.getAttributeNode(t))&&r.specified?r.value:null},se.escape=function(e){return(e+"").replace(re,ie)},se.error=function(e){throw new Error("Syntax error, unrecognized expression: "+e)},se.uniqueSort=function(e){var t,n=[],r=0,i=0;if(l=!d.detectDuplicates,u=!d.sortStable&&e.slice(0),e.sort(j),l){while(t=e[i++])t===e[i]&&(r=n.push(i));while(r--)e.splice(n[r],1)}return u=null,e},o=se.getText=function(e){var t,n="",r=0,i=e.nodeType;if(i){if(1===i||9===i||11===i){if("string"==typeof e.textContent)return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)n+=o(e)}else if(3===i||4===i)return e.nodeValue}else while(t=e[r++])n+=o(t);return n},(b=se.selectors={cacheLength:50,createPseudo:le,match:G,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(te,ne),e[3]=(e[3]||e[4]||e[5]||"").replace(te,ne),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||se.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&se.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return G.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&X.test(n)&&(t=h(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(te,ne).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=m[e+" "];return t||(t=new RegExp("(^|"+M+")"+e+"("+M+"|$)"))&&m(e,function(e){return t.test("string"==typeof e.className&&e.className||"undefined"!=typeof e.getAttribute&&e.getAttribute("class")||"")})},ATTR:function(n,r,i){return function(e){var t=se.attr(e,n);return null==t?"!="===r:!r||(t+="","="===r?t===i:"!="===r?t!==i:"^="===r?i&&0===t.indexOf(i):"*="===r?i&&-1<t.indexOf(i):"$="===r?i&&t.slice(-i.length)===i:"~="===r?-1<(" "+t.replace(B," ")+" ").indexOf(i):"|="===r&&(t===i||t.slice(0,i.length+1)===i+"-"))}},CHILD:function(h,e,t,g,v){var y="nth"!==h.slice(0,3),m="last"!==h.slice(-4),x="of-type"===e;return 1===g&&0===v?function(e){return!!e.parentNode}:function(e,t,n){var r,i,o,a,s,u,l=y!==m?"nextSibling":"previousSibling",c=e.parentNode,f=x&&e.nodeName.toLowerCase(),p=!n&&!x,d=!1;if(c){if(y){while(l){a=e;while(a=a[l])if(x?a.nodeName.toLowerCase()===f:1===a.nodeType)return!1;u=l="only"===h&&!u&&"nextSibling"}return!0}if(u=[m?c.firstChild:c.lastChild],m&&p){d=(s=(r=(i=(o=(a=c)[S]||(a[S]={}))[a.uniqueID]||(o[a.uniqueID]={}))[h]||[])[0]===k&&r[1])&&r[2],a=s&&c.childNodes[s];while(a=++s&&a&&a[l]||(d=s=0)||u.pop())if(1===a.nodeType&&++d&&a===e){i[h]=[k,s,d];break}}else if(p&&(d=s=(r=(i=(o=(a=e)[S]||(a[S]={}))[a.uniqueID]||(o[a.uniqueID]={}))[h]||[])[0]===k&&r[1]),!1===d)while(a=++s&&a&&a[l]||(d=s=0)||u.pop())if((x?a.nodeName.toLowerCase()===f:1===a.nodeType)&&++d&&(p&&((i=(o=a[S]||(a[S]={}))[a.uniqueID]||(o[a.uniqueID]={}))[h]=[k,d]),a===e))break;return(d-=v)===g||d%g==0&&0<=d/g}}},PSEUDO:function(e,o){var t,a=b.pseudos[e]||b.setFilters[e.toLowerCase()]||se.error("unsupported pseudo: "+e);return a[S]?a(o):1<a.length?(t=[e,e,"",o],b.setFilters.hasOwnProperty(e.toLowerCase())?le(function(e,t){var n,r=a(e,o),i=r.length;while(i--)e[n=P(e,r[i])]=!(t[n]=r[i])}):function(e){return a(e,0,t)}):a}},pseudos:{not:le(function(e){var r=[],i=[],s=f(e.replace($,"$1"));return s[S]?le(function(e,t,n,r){var i,o=s(e,null,r,[]),a=e.length;while(a--)(i=o[a])&&(e[a]=!(t[a]=i))}):function(e,t,n){return r[0]=e,s(r,null,n,i),r[0]=null,!i.pop()}}),has:le(function(t){return function(e){return 0<se(t,e).length}}),contains:le(function(t){return t=t.replace(te,ne),function(e){return-1<(e.textContent||o(e)).indexOf(t)}}),lang:le(function(n){return V.test(n||"")||se.error("unsupported lang: "+n),n=n.replace(te,ne).toLowerCase(),function(e){var t;do{if(t=E?e.lang:e.getAttribute("xml:lang")||e.getAttribute("lang"))return(t=t.toLowerCase())===n||0===t.indexOf(n+"-")}while((e=e.parentNode)&&1===e.nodeType);return!1}}),target:function(e){var t=n.location&&n.location.hash;return t&&t.slice(1)===e.id},root:function(e){return e===a},focus:function(e){return e===C.activeElement&&(!C.hasFocus||C.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},enabled:ge(!1),disabled:ge(!0),checked:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&!!e.checked||"option"===t&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,!0===e.selected},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling)if(e.nodeType<6)return!1;return!0},parent:function(e){return!b.pseudos.empty(e)},header:function(e){return J.test(e.nodeName)},input:function(e){return Q.test(e.nodeName)},button:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&"button"===e.type||"button"===t},text:function(e){var t;return"input"===e.nodeName.toLowerCase()&&"text"===e.type&&(null==(t=e.getAttribute("type"))||"text"===t.toLowerCase())},first:ve(function(){return[0]}),last:ve(function(e,t){return[t-1]}),eq:ve(function(e,t,n){return[n<0?n+t:n]}),even:ve(function(e,t){for(var n=0;n<t;n+=2)e.push(n);return e}),odd:ve(function(e,t){for(var n=1;n<t;n+=2)e.push(n);return e}),lt:ve(function(e,t,n){for(var r=n<0?n+t:t<n?t:n;0<=--r;)e.push(r);return e}),gt:ve(function(e,t,n){for(var r=n<0?n+t:n;++r<t;)e.push(r);return e})}}).pseudos.nth=b.pseudos.eq,{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})b.pseudos[e]=de(e);for(e in{submit:!0,reset:!0})b.pseudos[e]=he(e);function me(){}function xe(e){for(var t=0,n=e.length,r="";t<n;t++)r+=e[t].value;return r}function be(s,e,t){var u=e.dir,l=e.next,c=l||u,f=t&&"parentNode"===c,p=r++;return e.first?function(e,t,n){while(e=e[u])if(1===e.nodeType||f)return s(e,t,n);return!1}:function(e,t,n){var r,i,o,a=[k,p];if(n){while(e=e[u])if((1===e.nodeType||f)&&s(e,t,n))return!0}else while(e=e[u])if(1===e.nodeType||f)if(i=(o=e[S]||(e[S]={}))[e.uniqueID]||(o[e.uniqueID]={}),l&&l===e.nodeName.toLowerCase())e=e[u]||e;else{if((r=i[c])&&r[0]===k&&r[1]===p)return a[2]=r[2];if((i[c]=a)[2]=s(e,t,n))return!0}return!1}}function we(i){return 1<i.length?function(e,t,n){var r=i.length;while(r--)if(!i[r](e,t,n))return!1;return!0}:i[0]}function Te(e,t,n,r,i){for(var o,a=[],s=0,u=e.length,l=null!=t;s<u;s++)(o=e[s])&&(n&&!n(o,r,i)||(a.push(o),l&&t.push(s)));return a}function Ce(d,h,g,v,y,e){return v&&!v[S]&&(v=Ce(v)),y&&!y[S]&&(y=Ce(y,e)),le(function(e,t,n,r){var i,o,a,s=[],u=[],l=t.length,c=e||function(e,t,n){for(var r=0,i=t.length;r<i;r++)se(e,t[r],n);return n}(h||"*",n.nodeType?[n]:n,[]),f=!d||!e&&h?c:Te(c,s,d,n,r),p=g?y||(e?d:l||v)?[]:t:f;if(g&&g(f,p,n,r),v){i=Te(p,u),v(i,[],n,r),o=i.length;while(o--)(a=i[o])&&(p[u[o]]=!(f[u[o]]=a))}if(e){if(y||d){if(y){i=[],o=p.length;while(o--)(a=p[o])&&i.push(f[o]=a);y(null,p=[],i,r)}o=p.length;while(o--)(a=p[o])&&-1<(i=y?P(e,a):s[o])&&(e[i]=!(t[i]=a))}}else p=Te(p===t?p.splice(l,p.length):p),y?y(null,t,p,r):H.apply(t,p)})}function Ee(e){for(var i,t,n,r=e.length,o=b.relative[e[0].type],a=o||b.relative[" "],s=o?1:0,u=be(function(e){return e===i},a,!0),l=be(function(e){return-1<P(i,e)},a,!0),c=[function(e,t,n){var r=!o&&(n||t!==w)||((i=t).nodeType?u(e,t,n):l(e,t,n));return i=null,r}];s<r;s++)if(t=b.relative[e[s].type])c=[be(we(c),t)];else{if((t=b.filter[e[s].type].apply(null,e[s].matches))[S]){for(n=++s;n<r;n++)if(b.relative[e[n].type])break;return Ce(1<s&&we(c),1<s&&xe(e.slice(0,s-1).concat({value:" "===e[s-2].type?"*":""})).replace($,"$1"),t,s<n&&Ee(e.slice(s,n)),n<r&&Ee(e=e.slice(n)),n<r&&xe(e))}c.push(t)}return we(c)}return me.prototype=b.filters=b.pseudos,b.setFilters=new me,h=se.tokenize=function(e,t){var n,r,i,o,a,s,u,l=x[e+" "];if(l)return t?0:l.slice(0);a=e,s=[],u=b.preFilter;while(a){for(o in n&&!(r=_.exec(a))||(r&&(a=a.slice(r[0].length)||a),s.push(i=[])),n=!1,(r=z.exec(a))&&(n=r.shift(),i.push({value:n,type:r[0].replace($," ")}),a=a.slice(n.length)),b.filter)!(r=G[o].exec(a))||u[o]&&!(r=u[o](r))||(n=r.shift(),i.push({value:n,type:o,matches:r}),a=a.slice(n.length));if(!n)break}return t?a.length:a?se.error(e):x(e,s).slice(0)},f=se.compile=function(e,t){var n,v,y,m,x,r,i=[],o=[],a=A[e+" "];if(!a){t||(t=h(e)),n=t.length;while(n--)(a=Ee(t[n]))[S]?i.push(a):o.push(a);(a=A(e,(v=o,m=0<(y=i).length,x=0<v.length,r=function(e,t,n,r,i){var o,a,s,u=0,l="0",c=e&&[],f=[],p=w,d=e||x&&b.find.TAG("*",i),h=k+=null==p?1:Math.random()||.1,g=d.length;for(i&&(w=t==C||t||i);l!==g&&null!=(o=d[l]);l++){if(x&&o){a=0,t||o.ownerDocument==C||(T(o),n=!E);while(s=v[a++])if(s(o,t||C,n)){r.push(o);break}i&&(k=h)}m&&((o=!s&&o)&&u--,e&&c.push(o))}if(u+=l,m&&l!==u){a=0;while(s=y[a++])s(c,f,t,n);if(e){if(0<u)while(l--)c[l]||f[l]||(f[l]=q.call(r));f=Te(f)}H.apply(r,f),i&&!e&&0<f.length&&1<u+y.length&&se.uniqueSort(r)}return i&&(k=h,w=p),c},m?le(r):r))).selector=e}return a},g=se.select=function(e,t,n,r){var i,o,a,s,u,l="function"==typeof e&&e,c=!r&&h(e=l.selector||e);if(n=n||[],1===c.length){if(2<(o=c[0]=c[0].slice(0)).length&&"ID"===(a=o[0]).type&&9===t.nodeType&&E&&b.relative[o[1].type]){if(!(t=(b.find.ID(a.matches[0].replace(te,ne),t)||[])[0]))return n;l&&(t=t.parentNode),e=e.slice(o.shift().value.length)}i=G.needsContext.test(e)?0:o.length;while(i--){if(a=o[i],b.relative[s=a.type])break;if((u=b.find[s])&&(r=u(a.matches[0].replace(te,ne),ee.test(o[0].type)&&ye(t.parentNode)||t))){if(o.splice(i,1),!(e=r.length&&xe(o)))return H.apply(n,r),n;break}}}return(l||f(e,c))(r,t,!E,n,!t||ee.test(e)&&ye(t.parentNode)||t),n},d.sortStable=S.split("").sort(j).join("")===S,d.detectDuplicates=!!l,T(),d.sortDetached=ce(function(e){return 1&e.compareDocumentPosition(C.createElement("fieldset"))}),ce(function(e){return e.innerHTML="<a href='#'></a>","#"===e.firstChild.getAttribute("href")})||fe("type|href|height|width",function(e,t,n){if(!n)return e.getAttribute(t,"type"===t.toLowerCase()?1:2)}),d.attributes&&ce(function(e){return e.innerHTML="<input/>",e.firstChild.setAttribute("value",""),""===e.firstChild.getAttribute("value")})||fe("value",function(e,t,n){if(!n&&"input"===e.nodeName.toLowerCase())return e.defaultValue}),ce(function(e){return null==e.getAttribute("disabled")})||fe(R,function(e,t,n){var r;if(!n)return!0===e[t]?t.toLowerCase():(r=e.getAttributeNode(t))&&r.specified?r.value:null}),se}(C);S.find=d,S.expr=d.selectors,S.expr[":"]=S.expr.pseudos,S.uniqueSort=S.unique=d.uniqueSort,S.text=d.getText,S.isXMLDoc=d.isXML,S.contains=d.contains,S.escapeSelector=d.escape;var h=function(e,t,n){var r=[],i=void 0!==n;while((e=e[t])&&9!==e.nodeType)if(1===e.nodeType){if(i&&S(e).is(n))break;r.push(e)}return r},T=function(e,t){for(var n=[];e;e=e.nextSibling)1===e.nodeType&&e!==t&&n.push(e);return n},k=S.expr.match.needsContext;function A(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()}var N=/^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function j(e,n,r){return m(n)?S.grep(e,function(e,t){return!!n.call(e,t,e)!==r}):n.nodeType?S.grep(e,function(e){return e===n!==r}):"string"!=typeof n?S.grep(e,function(e){return-1<i.call(n,e)!==r}):S.filter(n,e,r)}S.filter=function(e,t,n){var r=t[0];return n&&(e=":not("+e+")"),1===t.length&&1===r.nodeType?S.find.matchesSelector(r,e)?[r]:[]:S.find.matches(e,S.grep(t,function(e){return 1===e.nodeType}))},S.fn.extend({find:function(e){var t,n,r=this.length,i=this;if("string"!=typeof e)return this.pushStack(S(e).filter(function(){for(t=0;t<r;t++)if(S.contains(i[t],this))return!0}));for(n=this.pushStack([]),t=0;t<r;t++)S.find(e,i[t],n);return 1<r?S.uniqueSort(n):n},filter:function(e){return this.pushStack(j(this,e||[],!1))},not:function(e){return this.pushStack(j(this,e||[],!0))},is:function(e){return!!j(this,"string"==typeof e&&k.test(e)?S(e):e||[],!1).length}});var D,q=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/;(S.fn.init=function(e,t,n){var r,i;if(!e)return this;if(n=n||D,"string"==typeof e){if(!(r="<"===e[0]&&">"===e[e.length-1]&&3<=e.length?[null,e,null]:q.exec(e))||!r[1]&&t)return!t||t.jquery?(t||n).find(e):this.constructor(t).find(e);if(r[1]){if(t=t instanceof S?t[0]:t,S.merge(this,S.parseHTML(r[1],t&&t.nodeType?t.ownerDocument||t:E,!0)),N.test(r[1])&&S.isPlainObject(t))for(r in t)m(this[r])?this[r](t[r]):this.attr(r,t[r]);return this}return(i=E.getElementById(r[2]))&&(this[0]=i,this.length=1),this}return e.nodeType?(this[0]=e,this.length=1,this):m(e)?void 0!==n.ready?n.ready(e):e(S):S.makeArray(e,this)}).prototype=S.fn,D=S(E);var L=/^(?:parents|prev(?:Until|All))/,H={children:!0,contents:!0,next:!0,prev:!0};function O(e,t){while((e=e[t])&&1!==e.nodeType);return e}S.fn.extend({has:function(e){var t=S(e,this),n=t.length;return this.filter(function(){for(var e=0;e<n;e++)if(S.contains(this,t[e]))return!0})},closest:function(e,t){var n,r=0,i=this.length,o=[],a="string"!=typeof e&&S(e);if(!k.test(e))for(;r<i;r++)for(n=this[r];n&&n!==t;n=n.parentNode)if(n.nodeType<11&&(a?-1<a.index(n):1===n.nodeType&&S.find.matchesSelector(n,e))){o.push(n);break}return this.pushStack(1<o.length?S.uniqueSort(o):o)},index:function(e){return e?"string"==typeof e?i.call(S(e),this[0]):i.call(this,e.jquery?e[0]:e):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(e,t){return this.pushStack(S.uniqueSort(S.merge(this.get(),S(e,t))))},addBack:function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}}),S.each({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return h(e,"parentNode")},parentsUntil:function(e,t,n){return h(e,"parentNode",n)},next:function(e){return O(e,"nextSibling")},prev:function(e){return O(e,"previousSibling")},nextAll:function(e){return h(e,"nextSibling")},prevAll:function(e){return h(e,"previousSibling")},nextUntil:function(e,t,n){return h(e,"nextSibling",n)},prevUntil:function(e,t,n){return h(e,"previousSibling",n)},siblings:function(e){return T((e.parentNode||{}).firstChild,e)},children:function(e){return T(e.firstChild)},contents:function(e){return null!=e.contentDocument&&r(e.contentDocument)?e.contentDocument:(A(e,"template")&&(e=e.content||e),S.merge([],e.childNodes))}},function(r,i){S.fn[r]=function(e,t){var n=S.map(this,i,e);return"Until"!==r.slice(-5)&&(t=e),t&&"string"==typeof t&&(n=S.filter(t,n)),1<this.length&&(H[r]||S.uniqueSort(n),L.test(r)&&n.reverse()),this.pushStack(n)}});var P=/[^\x20\t\r\n\f]+/g;function R(e){return e}function M(e){throw e}function I(e,t,n,r){var i;try{e&&m(i=e.promise)?i.call(e).done(t).fail(n):e&&m(i=e.then)?i.call(e,t,n):t.apply(void 0,[e].slice(r))}catch(e){n.apply(void 0,[e])}}S.Callbacks=function(r){var e,n;r="string"==typeof r?(e=r,n={},S.each(e.match(P)||[],function(e,t){n[t]=!0}),n):S.extend({},r);var i,t,o,a,s=[],u=[],l=-1,c=function(){for(a=a||r.once,o=i=!0;u.length;l=-1){t=u.shift();while(++l<s.length)!1===s[l].apply(t[0],t[1])&&r.stopOnFalse&&(l=s.length,t=!1)}r.memory||(t=!1),i=!1,a&&(s=t?[]:"")},f={add:function(){return s&&(t&&!i&&(l=s.length-1,u.push(t)),function n(e){S.each(e,function(e,t){m(t)?r.unique&&f.has(t)||s.push(t):t&&t.length&&"string"!==w(t)&&n(t)})}(arguments),t&&!i&&c()),this},remove:function(){return S.each(arguments,function(e,t){var n;while(-1<(n=S.inArray(t,s,n)))s.splice(n,1),n<=l&&l--}),this},has:function(e){return e?-1<S.inArray(e,s):0<s.length},empty:function(){return s&&(s=[]),this},disable:function(){return a=u=[],s=t="",this},disabled:function(){return!s},lock:function(){return a=u=[],t||i||(s=t=""),this},locked:function(){return!!a},fireWith:function(e,t){return a||(t=[e,(t=t||[]).slice?t.slice():t],u.push(t),i||c()),this},fire:function(){return f.fireWith(this,arguments),this},fired:function(){return!!o}};return f},S.extend({Deferred:function(e){var o=[["notify","progress",S.Callbacks("memory"),S.Callbacks("memory"),2],["resolve","done",S.Callbacks("once memory"),S.Callbacks("once memory"),0,"resolved"],["reject","fail",S.Callbacks("once memory"),S.Callbacks("once memory"),1,"rejected"]],i="pending",a={state:function(){return i},always:function(){return s.done(arguments).fail(arguments),this},"catch":function(e){return a.then(null,e)},pipe:function(){var i=arguments;return S.Deferred(function(r){S.each(o,function(e,t){var n=m(i[t[4]])&&i[t[4]];s[t[1]](function(){var e=n&&n.apply(this,arguments);e&&m(e.promise)?e.promise().progress(r.notify).done(r.resolve).fail(r.reject):r[t[0]+"With"](this,n?[e]:arguments)})}),i=null}).promise()},then:function(t,n,r){var u=0;function l(i,o,a,s){return function(){var n=this,r=arguments,e=function(){var e,t;if(!(i<u)){if((e=a.apply(n,r))===o.promise())throw new TypeError("Thenable self-resolution");t=e&&("object"==typeof e||"function"==typeof e)&&e.then,m(t)?s?t.call(e,l(u,o,R,s),l(u,o,M,s)):(u++,t.call(e,l(u,o,R,s),l(u,o,M,s),l(u,o,R,o.notifyWith))):(a!==R&&(n=void 0,r=[e]),(s||o.resolveWith)(n,r))}},t=s?e:function(){try{e()}catch(e){S.Deferred.exceptionHook&&S.Deferred.exceptionHook(e,t.stackTrace),u<=i+1&&(a!==M&&(n=void 0,r=[e]),o.rejectWith(n,r))}};i?t():(S.Deferred.getStackHook&&(t.stackTrace=S.Deferred.getStackHook()),C.setTimeout(t))}}return S.Deferred(function(e){o[0][3].add(l(0,e,m(r)?r:R,e.notifyWith)),o[1][3].add(l(0,e,m(t)?t:R)),o[2][3].add(l(0,e,m(n)?n:M))}).promise()},promise:function(e){return null!=e?S.extend(e,a):a}},s={};return S.each(o,function(e,t){var n=t[2],r=t[5];a[t[1]]=n.add,r&&n.add(function(){i=r},o[3-e][2].disable,o[3-e][3].disable,o[0][2].lock,o[0][3].lock),n.add(t[3].fire),s[t[0]]=function(){return s[t[0]+"With"](this===s?void 0:this,arguments),this},s[t[0]+"With"]=n.fireWith}),a.promise(s),e&&e.call(s,s),s},when:function(e){var n=arguments.length,t=n,r=Array(t),i=s.call(arguments),o=S.Deferred(),a=function(t){return function(e){r[t]=this,i[t]=1<arguments.length?s.call(arguments):e,--n||o.resolveWith(r,i)}};if(n<=1&&(I(e,o.done(a(t)).resolve,o.reject,!n),"pending"===o.state()||m(i[t]&&i[t].then)))return o.then();while(t--)I(i[t],a(t),o.reject);return o.promise()}});var W=/^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;S.Deferred.exceptionHook=function(e,t){C.console&&C.console.warn&&e&&W.test(e.name)&&C.console.warn("jQuery.Deferred exception: "+e.message,e.stack,t)},S.readyException=function(e){C.setTimeout(function(){throw e})};var F=S.Deferred();function B(){E.removeEventListener("DOMContentLoaded",B),C.removeEventListener("load",B),S.ready()}S.fn.ready=function(e){return F.then(e)["catch"](function(e){S.readyException(e)}),this},S.extend({isReady:!1,readyWait:1,ready:function(e){(!0===e?--S.readyWait:S.isReady)||(S.isReady=!0)!==e&&0<--S.readyWait||F.resolveWith(E,[S])}}),S.ready.then=F.then,"complete"===E.readyState||"loading"!==E.readyState&&!E.documentElement.doScroll?C.setTimeout(S.ready):(E.addEventListener("DOMContentLoaded",B),C.addEventListener("load",B));var $=function(e,t,n,r,i,o,a){var s=0,u=e.length,l=null==n;if("object"===w(n))for(s in i=!0,n)$(e,t,s,n[s],!0,o,a);else if(void 0!==r&&(i=!0,m(r)||(a=!0),l&&(a?(t.call(e,r),t=null):(l=t,t=function(e,t,n){return l.call(S(e),n)})),t))for(;s<u;s++)t(e[s],n,a?r:r.call(e[s],s,t(e[s],n)));return i?e:l?t.call(e):u?t(e[0],n):o},_=/^-ms-/,z=/-([a-z])/g;function U(e,t){return t.toUpperCase()}function X(e){return e.replace(_,"ms-").replace(z,U)}var V=function(e){return 1===e.nodeType||9===e.nodeType||!+e.nodeType};function G(){this.expando=S.expando+G.uid++}G.uid=1,G.prototype={cache:function(e){var t=e[this.expando];return t||(t={},V(e)&&(e.nodeType?e[this.expando]=t:Object.defineProperty(e,this.expando,{value:t,configurable:!0}))),t},set:function(e,t,n){var r,i=this.cache(e);if("string"==typeof t)i[X(t)]=n;else for(r in t)i[X(r)]=t[r];return i},get:function(e,t){return void 0===t?this.cache(e):e[this.expando]&&e[this.expando][X(t)]},access:function(e,t,n){return void 0===t||t&&"string"==typeof t&&void 0===n?this.get(e,t):(this.set(e,t,n),void 0!==n?n:t)},remove:function(e,t){var n,r=e[this.expando];if(void 0!==r){if(void 0!==t){n=(t=Array.isArray(t)?t.map(X):(t=X(t))in r?[t]:t.match(P)||[]).length;while(n--)delete r[t[n]]}(void 0===t||S.isEmptyObject(r))&&(e.nodeType?e[this.expando]=void 0:delete e[this.expando])}},hasData:function(e){var t=e[this.expando];return void 0!==t&&!S.isEmptyObject(t)}};var Y=new G,Q=new G,J=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,K=/[A-Z]/g;function Z(e,t,n){var r,i;if(void 0===n&&1===e.nodeType)if(r="data-"+t.replace(K,"-$&").toLowerCase(),"string"==typeof(n=e.getAttribute(r))){try{n="true"===(i=n)||"false"!==i&&("null"===i?null:i===+i+""?+i:J.test(i)?JSON.parse(i):i)}catch(e){}Q.set(e,t,n)}else n=void 0;return n}S.extend({hasData:function(e){return Q.hasData(e)||Y.hasData(e)},data:function(e,t,n){return Q.access(e,t,n)},removeData:function(e,t){Q.remove(e,t)},_data:function(e,t,n){return Y.access(e,t,n)},_removeData:function(e,t){Y.remove(e,t)}}),S.fn.extend({data:function(n,e){var t,r,i,o=this[0],a=o&&o.attributes;if(void 0===n){if(this.length&&(i=Q.get(o),1===o.nodeType&&!Y.get(o,"hasDataAttrs"))){t=a.length;while(t--)a[t]&&0===(r=a[t].name).indexOf("data-")&&(r=X(r.slice(5)),Z(o,r,i[r]));Y.set(o,"hasDataAttrs",!0)}return i}return"object"==typeof n?this.each(function(){Q.set(this,n)}):$(this,function(e){var t;if(o&&void 0===e)return void 0!==(t=Q.get(o,n))?t:void 0!==(t=Z(o,n))?t:void 0;this.each(function(){Q.set(this,n,e)})},null,e,1<arguments.length,null,!0)},removeData:function(e){return this.each(function(){Q.remove(this,e)})}}),S.extend({queue:function(e,t,n){var r;if(e)return t=(t||"fx")+"queue",r=Y.get(e,t),n&&(!r||Array.isArray(n)?r=Y.access(e,t,S.makeArray(n)):r.push(n)),r||[]},dequeue:function(e,t){t=t||"fx";var n=S.queue(e,t),r=n.length,i=n.shift(),o=S._queueHooks(e,t);"inprogress"===i&&(i=n.shift(),r--),i&&("fx"===t&&n.unshift("inprogress"),delete o.stop,i.call(e,function(){S.dequeue(e,t)},o)),!r&&o&&o.empty.fire()},_queueHooks:function(e,t){var n=t+"queueHooks";return Y.get(e,n)||Y.access(e,n,{empty:S.Callbacks("once memory").add(function(){Y.remove(e,[t+"queue",n])})})}}),S.fn.extend({queue:function(t,n){var e=2;return"string"!=typeof t&&(n=t,t="fx",e--),arguments.length<e?S.queue(this[0],t):void 0===n?this:this.each(function(){var e=S.queue(this,t,n);S._queueHooks(this,t),"fx"===t&&"inprogress"!==e[0]&&S.dequeue(this,t)})},dequeue:function(e){return this.each(function(){S.dequeue(this,e)})},clearQueue:function(e){return this.queue(e||"fx",[])},promise:function(e,t){var n,r=1,i=S.Deferred(),o=this,a=this.length,s=function(){--r||i.resolveWith(o,[o])};"string"!=typeof e&&(t=e,e=void 0),e=e||"fx";while(a--)(n=Y.get(o[a],e+"queueHooks"))&&n.empty&&(r++,n.empty.add(s));return s(),i.promise(t)}});var ee=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,te=new RegExp("^(?:([+-])=|)("+ee+")([a-z%]*)$","i"),ne=["Top","Right","Bottom","Left"],re=E.documentElement,ie=function(e){return S.contains(e.ownerDocument,e)},oe={composed:!0};re.getRootNode&&(ie=function(e){return S.contains(e.ownerDocument,e)||e.getRootNode(oe)===e.ownerDocument});var ae=function(e,t){return"none"===(e=t||e).style.display||""===e.style.display&&ie(e)&&"none"===S.css(e,"display")};function se(e,t,n,r){var i,o,a=20,s=r?function(){return r.cur()}:function(){return S.css(e,t,"")},u=s(),l=n&&n[3]||(S.cssNumber[t]?"":"px"),c=e.nodeType&&(S.cssNumber[t]||"px"!==l&&+u)&&te.exec(S.css(e,t));if(c&&c[3]!==l){u/=2,l=l||c[3],c=+u||1;while(a--)S.style(e,t,c+l),(1-o)*(1-(o=s()/u||.5))<=0&&(a=0),c/=o;c*=2,S.style(e,t,c+l),n=n||[]}return n&&(c=+c||+u||0,i=n[1]?c+(n[1]+1)*n[2]:+n[2],r&&(r.unit=l,r.start=c,r.end=i)),i}var ue={};function le(e,t){for(var n,r,i,o,a,s,u,l=[],c=0,f=e.length;c<f;c++)(r=e[c]).style&&(n=r.style.display,t?("none"===n&&(l[c]=Y.get(r,"display")||null,l[c]||(r.style.display="")),""===r.style.display&&ae(r)&&(l[c]=(u=a=o=void 0,a=(i=r).ownerDocument,s=i.nodeName,(u=ue[s])||(o=a.body.appendChild(a.createElement(s)),u=S.css(o,"display"),o.parentNode.removeChild(o),"none"===u&&(u="block"),ue[s]=u)))):"none"!==n&&(l[c]="none",Y.set(r,"display",n)));for(c=0;c<f;c++)null!=l[c]&&(e[c].style.display=l[c]);return e}S.fn.extend({show:function(){return le(this,!0)},hide:function(){return le(this)},toggle:function(e){return"boolean"==typeof e?e?this.show():this.hide():this.each(function(){ae(this)?S(this).show():S(this).hide()})}});var ce,fe,pe=/^(?:checkbox|radio)$/i,de=/<([a-z][^\/\0>\x20\t\r\n\f]*)/i,he=/^$|^module$|\/(?:java|ecma)script/i;ce=E.createDocumentFragment().appendChild(E.createElement("div")),(fe=E.createElement("input")).setAttribute("type","radio"),fe.setAttribute("checked","checked"),fe.setAttribute("name","t"),ce.appendChild(fe),y.checkClone=ce.cloneNode(!0).cloneNode(!0).lastChild.checked,ce.innerHTML="<textarea>x</textarea>",y.noCloneChecked=!!ce.cloneNode(!0).lastChild.defaultValue,ce.innerHTML="<option></option>",y.option=!!ce.lastChild;var ge={thead:[1,"<table>","</table>"],col:[2,"<table><colgroup>","</colgroup></table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:[0,"",""]};function ve(e,t){var n;return n="undefined"!=typeof e.getElementsByTagName?e.getElementsByTagName(t||"*"):"undefined"!=typeof e.querySelectorAll?e.querySelectorAll(t||"*"):[],void 0===t||t&&A(e,t)?S.merge([e],n):n}function ye(e,t){for(var n=0,r=e.length;n<r;n++)Y.set(e[n],"globalEval",!t||Y.get(t[n],"globalEval"))}ge.tbody=ge.tfoot=ge.colgroup=ge.caption=ge.thead,ge.th=ge.td,y.option||(ge.optgroup=ge.option=[1,"<select multiple='multiple'>","</select>"]);var me=/<|&#?\w+;/;function xe(e,t,n,r,i){for(var o,a,s,u,l,c,f=t.createDocumentFragment(),p=[],d=0,h=e.length;d<h;d++)if((o=e[d])||0===o)if("object"===w(o))S.merge(p,o.nodeType?[o]:o);else if(me.test(o)){a=a||f.appendChild(t.createElement("div")),s=(de.exec(o)||["",""])[1].toLowerCase(),u=ge[s]||ge._default,a.innerHTML=u[1]+S.htmlPrefilter(o)+u[2],c=u[0];while(c--)a=a.lastChild;S.merge(p,a.childNodes),(a=f.firstChild).textContent=""}else p.push(t.createTextNode(o));f.textContent="",d=0;while(o=p[d++])if(r&&-1<S.inArray(o,r))i&&i.push(o);else if(l=ie(o),a=ve(f.appendChild(o),"script"),l&&ye(a),n){c=0;while(o=a[c++])he.test(o.type||"")&&n.push(o)}return f}var be=/^([^.]*)(?:\.(.+)|)/;function we(){return!0}function Te(){return!1}function Ce(e,t){return e===function(){try{return E.activeElement}catch(e){}}()==("focus"===t)}function Ee(e,t,n,r,i,o){var a,s;if("object"==typeof t){for(s in"string"!=typeof n&&(r=r||n,n=void 0),t)Ee(e,s,n,r,t[s],o);return e}if(null==r&&null==i?(i=n,r=n=void 0):null==i&&("string"==typeof n?(i=r,r=void 0):(i=r,r=n,n=void 0)),!1===i)i=Te;else if(!i)return e;return 1===o&&(a=i,(i=function(e){return S().off(e),a.apply(this,arguments)}).guid=a.guid||(a.guid=S.guid++)),e.each(function(){S.event.add(this,t,i,r,n)})}function Se(e,i,o){o?(Y.set(e,i,!1),S.event.add(e,i,{namespace:!1,handler:function(e){var t,n,r=Y.get(this,i);if(1&e.isTrigger&&this[i]){if(r.length)(S.event.special[i]||{}).delegateType&&e.stopPropagation();else if(r=s.call(arguments),Y.set(this,i,r),t=o(this,i),this[i](),r!==(n=Y.get(this,i))||t?Y.set(this,i,!1):n={},r!==n)return e.stopImmediatePropagation(),e.preventDefault(),n&&n.value}else r.length&&(Y.set(this,i,{value:S.event.trigger(S.extend(r[0],S.Event.prototype),r.slice(1),this)}),e.stopImmediatePropagation())}})):void 0===Y.get(e,i)&&S.event.add(e,i,we)}S.event={global:{},add:function(t,e,n,r,i){var o,a,s,u,l,c,f,p,d,h,g,v=Y.get(t);if(V(t)){n.handler&&(n=(o=n).handler,i=o.selector),i&&S.find.matchesSelector(re,i),n.guid||(n.guid=S.guid++),(u=v.events)||(u=v.events=Object.create(null)),(a=v.handle)||(a=v.handle=function(e){return"undefined"!=typeof S&&S.event.triggered!==e.type?S.event.dispatch.apply(t,arguments):void 0}),l=(e=(e||"").match(P)||[""]).length;while(l--)d=g=(s=be.exec(e[l])||[])[1],h=(s[2]||"").split(".").sort(),d&&(f=S.event.special[d]||{},d=(i?f.delegateType:f.bindType)||d,f=S.event.special[d]||{},c=S.extend({type:d,origType:g,data:r,handler:n,guid:n.guid,selector:i,needsContext:i&&S.expr.match.needsContext.test(i),namespace:h.join(".")},o),(p=u[d])||((p=u[d]=[]).delegateCount=0,f.setup&&!1!==f.setup.call(t,r,h,a)||t.addEventListener&&t.addEventListener(d,a)),f.add&&(f.add.call(t,c),c.handler.guid||(c.handler.guid=n.guid)),i?p.splice(p.delegateCount++,0,c):p.push(c),S.event.global[d]=!0)}},remove:function(e,t,n,r,i){var o,a,s,u,l,c,f,p,d,h,g,v=Y.hasData(e)&&Y.get(e);if(v&&(u=v.events)){l=(t=(t||"").match(P)||[""]).length;while(l--)if(d=g=(s=be.exec(t[l])||[])[1],h=(s[2]||"").split(".").sort(),d){f=S.event.special[d]||{},p=u[d=(r?f.delegateType:f.bindType)||d]||[],s=s[2]&&new RegExp("(^|\\.)"+h.join("\\.(?:.*\\.|)")+"(\\.|$)"),a=o=p.length;while(o--)c=p[o],!i&&g!==c.origType||n&&n.guid!==c.guid||s&&!s.test(c.namespace)||r&&r!==c.selector&&("**"!==r||!c.selector)||(p.splice(o,1),c.selector&&p.delegateCount--,f.remove&&f.remove.call(e,c));a&&!p.length&&(f.teardown&&!1!==f.teardown.call(e,h,v.handle)||S.removeEvent(e,d,v.handle),delete u[d])}else for(d in u)S.event.remove(e,d+t[l],n,r,!0);S.isEmptyObject(u)&&Y.remove(e,"handle events")}},dispatch:function(e){var t,n,r,i,o,a,s=new Array(arguments.length),u=S.event.fix(e),l=(Y.get(this,"events")||Object.create(null))[u.type]||[],c=S.event.special[u.type]||{};for(s[0]=u,t=1;t<arguments.length;t++)s[t]=arguments[t];if(u.delegateTarget=this,!c.preDispatch||!1!==c.preDispatch.call(this,u)){a=S.event.handlers.call(this,u,l),t=0;while((i=a[t++])&&!u.isPropagationStopped()){u.currentTarget=i.elem,n=0;while((o=i.handlers[n++])&&!u.isImmediatePropagationStopped())u.rnamespace&&!1!==o.namespace&&!u.rnamespace.test(o.namespace)||(u.handleObj=o,u.data=o.data,void 0!==(r=((S.event.special[o.origType]||{}).handle||o.handler).apply(i.elem,s))&&!1===(u.result=r)&&(u.preventDefault(),u.stopPropagation()))}return c.postDispatch&&c.postDispatch.call(this,u),u.result}},handlers:function(e,t){var n,r,i,o,a,s=[],u=t.delegateCount,l=e.target;if(u&&l.nodeType&&!("click"===e.type&&1<=e.button))for(;l!==this;l=l.parentNode||this)if(1===l.nodeType&&("click"!==e.type||!0!==l.disabled)){for(o=[],a={},n=0;n<u;n++)void 0===a[i=(r=t[n]).selector+" "]&&(a[i]=r.needsContext?-1<S(i,this).index(l):S.find(i,this,null,[l]).length),a[i]&&o.push(r);o.length&&s.push({elem:l,handlers:o})}return l=this,u<t.length&&s.push({elem:l,handlers:t.slice(u)}),s},addProp:function(t,e){Object.defineProperty(S.Event.prototype,t,{enumerable:!0,configurable:!0,get:m(e)?function(){if(this.originalEvent)return e(this.originalEvent)}:function(){if(this.originalEvent)return this.originalEvent[t]},set:function(e){Object.defineProperty(this,t,{enumerable:!0,configurable:!0,writable:!0,value:e})}})},fix:function(e){return e[S.expando]?e:new S.Event(e)},special:{load:{noBubble:!0},click:{setup:function(e){var t=this||e;return pe.test(t.type)&&t.click&&A(t,"input")&&Se(t,"click",we),!1},trigger:function(e){var t=this||e;return pe.test(t.type)&&t.click&&A(t,"input")&&Se(t,"click"),!0},_default:function(e){var t=e.target;return pe.test(t.type)&&t.click&&A(t,"input")&&Y.get(t,"click")||A(t,"a")}},beforeunload:{postDispatch:function(e){void 0!==e.result&&e.originalEvent&&(e.originalEvent.returnValue=e.result)}}}},S.removeEvent=function(e,t,n){e.removeEventListener&&e.removeEventListener(t,n)},S.Event=function(e,t){if(!(this instanceof S.Event))return new S.Event(e,t);e&&e.type?(this.originalEvent=e,this.type=e.type,this.isDefaultPrevented=e.defaultPrevented||void 0===e.defaultPrevented&&!1===e.returnValue?we:Te,this.target=e.target&&3===e.target.nodeType?e.target.parentNode:e.target,this.currentTarget=e.currentTarget,this.relatedTarget=e.relatedTarget):this.type=e,t&&S.extend(this,t),this.timeStamp=e&&e.timeStamp||Date.now(),this[S.expando]=!0},S.Event.prototype={constructor:S.Event,isDefaultPrevented:Te,isPropagationStopped:Te,isImmediatePropagationStopped:Te,isSimulated:!1,preventDefault:function(){var e=this.originalEvent;this.isDefaultPrevented=we,e&&!this.isSimulated&&e.preventDefault()},stopPropagation:function(){var e=this.originalEvent;this.isPropagationStopped=we,e&&!this.isSimulated&&e.stopPropagation()},stopImmediatePropagation:function(){var e=this.originalEvent;this.isImmediatePropagationStopped=we,e&&!this.isSimulated&&e.stopImmediatePropagation(),this.stopPropagation()}},S.each({altKey:!0,bubbles:!0,cancelable:!0,changedTouches:!0,ctrlKey:!0,detail:!0,eventPhase:!0,metaKey:!0,pageX:!0,pageY:!0,shiftKey:!0,view:!0,"char":!0,code:!0,charCode:!0,key:!0,keyCode:!0,button:!0,buttons:!0,clientX:!0,clientY:!0,offsetX:!0,offsetY:!0,pointerId:!0,pointerType:!0,screenX:!0,screenY:!0,targetTouches:!0,toElement:!0,touches:!0,which:!0},S.event.addProp),S.each({focus:"focusin",blur:"focusout"},function(e,t){S.event.special[e]={setup:function(){return Se(this,e,Ce),!1},trigger:function(){return Se(this,e),!0},_default:function(){return!0},delegateType:t}}),S.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},function(e,i){S.event.special[e]={delegateType:i,bindType:i,handle:function(e){var t,n=e.relatedTarget,r=e.handleObj;return n&&(n===this||S.contains(this,n))||(e.type=r.origType,t=r.handler.apply(this,arguments),e.type=i),t}}}),S.fn.extend({on:function(e,t,n,r){return Ee(this,e,t,n,r)},one:function(e,t,n,r){return Ee(this,e,t,n,r,1)},off:function(e,t,n){var r,i;if(e&&e.preventDefault&&e.handleObj)return r=e.handleObj,S(e.delegateTarget).off(r.namespace?r.origType+"."+r.namespace:r.origType,r.selector,r.handler),this;if("object"==typeof e){for(i in e)this.off(i,t,e[i]);return this}return!1!==t&&"function"!=typeof t||(n=t,t=void 0),!1===n&&(n=Te),this.each(function(){S.event.remove(this,e,n,t)})}});var ke=/<script|<style|<link/i,Ae=/checked\s*(?:[^=]|=\s*.checked.)/i,Ne=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g;function je(e,t){return A(e,"table")&&A(11!==t.nodeType?t:t.firstChild,"tr")&&S(e).children("tbody")[0]||e}function De(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function qe(e){return"true/"===(e.type||"").slice(0,5)?e.type=e.type.slice(5):e.removeAttribute("type"),e}function Le(e,t){var n,r,i,o,a,s;if(1===t.nodeType){if(Y.hasData(e)&&(s=Y.get(e).events))for(i in Y.remove(t,"handle events"),s)for(n=0,r=s[i].length;n<r;n++)S.event.add(t,i,s[i][n]);Q.hasData(e)&&(o=Q.access(e),a=S.extend({},o),Q.set(t,a))}}function He(n,r,i,o){r=g(r);var e,t,a,s,u,l,c=0,f=n.length,p=f-1,d=r[0],h=m(d);if(h||1<f&&"string"==typeof d&&!y.checkClone&&Ae.test(d))return n.each(function(e){var t=n.eq(e);h&&(r[0]=d.call(this,e,t.html())),He(t,r,i,o)});if(f&&(t=(e=xe(r,n[0].ownerDocument,!1,n,o)).firstChild,1===e.childNodes.length&&(e=t),t||o)){for(s=(a=S.map(ve(e,"script"),De)).length;c<f;c++)u=e,c!==p&&(u=S.clone(u,!0,!0),s&&S.merge(a,ve(u,"script"))),i.call(n[c],u,c);if(s)for(l=a[a.length-1].ownerDocument,S.map(a,qe),c=0;c<s;c++)u=a[c],he.test(u.type||"")&&!Y.access(u,"globalEval")&&S.contains(l,u)&&(u.src&&"module"!==(u.type||"").toLowerCase()?S._evalUrl&&!u.noModule&&S._evalUrl(u.src,{nonce:u.nonce||u.getAttribute("nonce")},l):b(u.textContent.replace(Ne,""),u,l))}return n}function Oe(e,t,n){for(var r,i=t?S.filter(t,e):e,o=0;null!=(r=i[o]);o++)n||1!==r.nodeType||S.cleanData(ve(r)),r.parentNode&&(n&&ie(r)&&ye(ve(r,"script")),r.parentNode.removeChild(r));return e}S.extend({htmlPrefilter:function(e){return e},clone:function(e,t,n){var r,i,o,a,s,u,l,c=e.cloneNode(!0),f=ie(e);if(!(y.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||S.isXMLDoc(e)))for(a=ve(c),r=0,i=(o=ve(e)).length;r<i;r++)s=o[r],u=a[r],void 0,"input"===(l=u.nodeName.toLowerCase())&&pe.test(s.type)?u.checked=s.checked:"input"!==l&&"textarea"!==l||(u.defaultValue=s.defaultValue);if(t)if(n)for(o=o||ve(e),a=a||ve(c),r=0,i=o.length;r<i;r++)Le(o[r],a[r]);else Le(e,c);return 0<(a=ve(c,"script")).length&&ye(a,!f&&ve(e,"script")),c},cleanData:function(e){for(var t,n,r,i=S.event.special,o=0;void 0!==(n=e[o]);o++)if(V(n)){if(t=n[Y.expando]){if(t.events)for(r in t.events)i[r]?S.event.remove(n,r):S.removeEvent(n,r,t.handle);n[Y.expando]=void 0}n[Q.expando]&&(n[Q.expando]=void 0)}}}),S.fn.extend({detach:function(e){return Oe(this,e,!0)},remove:function(e){return Oe(this,e)},text:function(e){return $(this,function(e){return void 0===e?S.text(this):this.empty().each(function(){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||(this.textContent=e)})},null,e,arguments.length)},append:function(){return He(this,arguments,function(e){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||je(this,e).appendChild(e)})},prepend:function(){return He(this,arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=je(this,e);t.insertBefore(e,t.firstChild)}})},before:function(){return He(this,arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this)})},after:function(){return He(this,arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this.nextSibling)})},empty:function(){for(var e,t=0;null!=(e=this[t]);t++)1===e.nodeType&&(S.cleanData(ve(e,!1)),e.textContent="");return this},clone:function(e,t){return e=null!=e&&e,t=null==t?e:t,this.map(function(){return S.clone(this,e,t)})},html:function(e){return $(this,function(e){var t=this[0]||{},n=0,r=this.length;if(void 0===e&&1===t.nodeType)return t.innerHTML;if("string"==typeof e&&!ke.test(e)&&!ge[(de.exec(e)||["",""])[1].toLowerCase()]){e=S.htmlPrefilter(e);try{for(;n<r;n++)1===(t=this[n]||{}).nodeType&&(S.cleanData(ve(t,!1)),t.innerHTML=e);t=0}catch(e){}}t&&this.empty().append(e)},null,e,arguments.length)},replaceWith:function(){var n=[];return He(this,arguments,function(e){var t=this.parentNode;S.inArray(this,n)<0&&(S.cleanData(ve(this)),t&&t.replaceChild(e,this))},n)}}),S.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(e,a){S.fn[e]=function(e){for(var t,n=[],r=S(e),i=r.length-1,o=0;o<=i;o++)t=o===i?this:this.clone(!0),S(r[o])[a](t),u.apply(n,t.get());return this.pushStack(n)}});var Pe=new RegExp("^("+ee+")(?!px)[a-z%]+$","i"),Re=function(e){var t=e.ownerDocument.defaultView;return t&&t.opener||(t=C),t.getComputedStyle(e)},Me=function(e,t,n){var r,i,o={};for(i in t)o[i]=e.style[i],e.style[i]=t[i];for(i in r=n.call(e),t)e.style[i]=o[i];return r},Ie=new RegExp(ne.join("|"),"i");function We(e,t,n){var r,i,o,a,s=e.style;return(n=n||Re(e))&&(""!==(a=n.getPropertyValue(t)||n[t])||ie(e)||(a=S.style(e,t)),!y.pixelBoxStyles()&&Pe.test(a)&&Ie.test(t)&&(r=s.width,i=s.minWidth,o=s.maxWidth,s.minWidth=s.maxWidth=s.width=a,a=n.width,s.width=r,s.minWidth=i,s.maxWidth=o)),void 0!==a?a+"":a}function Fe(e,t){return{get:function(){if(!e())return(this.get=t).apply(this,arguments);delete this.get}}}!function(){function e(){if(l){u.style.cssText="position:absolute;left:-11111px;width:60px;margin-top:1px;padding:0;border:0",l.style.cssText="position:relative;display:block;box-sizing:border-box;overflow:scroll;margin:auto;border:1px;padding:1px;width:60%;top:1%",re.appendChild(u).appendChild(l);var e=C.getComputedStyle(l);n="1%"!==e.top,s=12===t(e.marginLeft),l.style.right="60%",o=36===t(e.right),r=36===t(e.width),l.style.position="absolute",i=12===t(l.offsetWidth/3),re.removeChild(u),l=null}}function t(e){return Math.round(parseFloat(e))}var n,r,i,o,a,s,u=E.createElement("div"),l=E.createElement("div");l.style&&(l.style.backgroundClip="content-box",l.cloneNode(!0).style.backgroundClip="",y.clearCloneStyle="content-box"===l.style.backgroundClip,S.extend(y,{boxSizingReliable:function(){return e(),r},pixelBoxStyles:function(){return e(),o},pixelPosition:function(){return e(),n},reliableMarginLeft:function(){return e(),s},scrollboxSize:function(){return e(),i},reliableTrDimensions:function(){var e,t,n,r;return null==a&&(e=E.createElement("table"),t=E.createElement("tr"),n=E.createElement("div"),e.style.cssText="position:absolute;left:-11111px;border-collapse:separate",t.style.cssText="border:1px solid",t.style.height="1px",n.style.height="9px",n.style.display="block",re.appendChild(e).appendChild(t).appendChild(n),r=C.getComputedStyle(t),a=parseInt(r.height,10)+parseInt(r.borderTopWidth,10)+parseInt(r.borderBottomWidth,10)===t.offsetHeight,re.removeChild(e)),a}}))}();var Be=["Webkit","Moz","ms"],$e=E.createElement("div").style,_e={};function ze(e){var t=S.cssProps[e]||_e[e];return t||(e in $e?e:_e[e]=function(e){var t=e[0].toUpperCase()+e.slice(1),n=Be.length;while(n--)if((e=Be[n]+t)in $e)return e}(e)||e)}var Ue=/^(none|table(?!-c[ea]).+)/,Xe=/^--/,Ve={position:"absolute",visibility:"hidden",display:"block"},Ge={letterSpacing:"0",fontWeight:"400"};function Ye(e,t,n){var r=te.exec(t);return r?Math.max(0,r[2]-(n||0))+(r[3]||"px"):t}function Qe(e,t,n,r,i,o){var a="width"===t?1:0,s=0,u=0;if(n===(r?"border":"content"))return 0;for(;a<4;a+=2)"margin"===n&&(u+=S.css(e,n+ne[a],!0,i)),r?("content"===n&&(u-=S.css(e,"padding"+ne[a],!0,i)),"margin"!==n&&(u-=S.css(e,"border"+ne[a]+"Width",!0,i))):(u+=S.css(e,"padding"+ne[a],!0,i),"padding"!==n?u+=S.css(e,"border"+ne[a]+"Width",!0,i):s+=S.css(e,"border"+ne[a]+"Width",!0,i));return!r&&0<=o&&(u+=Math.max(0,Math.ceil(e["offset"+t[0].toUpperCase()+t.slice(1)]-o-u-s-.5))||0),u}function Je(e,t,n){var r=Re(e),i=(!y.boxSizingReliable()||n)&&"border-box"===S.css(e,"boxSizing",!1,r),o=i,a=We(e,t,r),s="offset"+t[0].toUpperCase()+t.slice(1);if(Pe.test(a)){if(!n)return a;a="auto"}return(!y.boxSizingReliable()&&i||!y.reliableTrDimensions()&&A(e,"tr")||"auto"===a||!parseFloat(a)&&"inline"===S.css(e,"display",!1,r))&&e.getClientRects().length&&(i="border-box"===S.css(e,"boxSizing",!1,r),(o=s in e)&&(a=e[s])),(a=parseFloat(a)||0)+Qe(e,t,n||(i?"border":"content"),o,r,a)+"px"}function Ke(e,t,n,r,i){return new Ke.prototype.init(e,t,n,r,i)}S.extend({cssHooks:{opacity:{get:function(e,t){if(t){var n=We(e,"opacity");return""===n?"1":n}}}},cssNumber:{animationIterationCount:!0,columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,gridArea:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnStart:!0,gridRow:!0,gridRowEnd:!0,gridRowStart:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{},style:function(e,t,n,r){if(e&&3!==e.nodeType&&8!==e.nodeType&&e.style){var i,o,a,s=X(t),u=Xe.test(t),l=e.style;if(u||(t=ze(s)),a=S.cssHooks[t]||S.cssHooks[s],void 0===n)return a&&"get"in a&&void 0!==(i=a.get(e,!1,r))?i:l[t];"string"===(o=typeof n)&&(i=te.exec(n))&&i[1]&&(n=se(e,t,i),o="number"),null!=n&&n==n&&("number"!==o||u||(n+=i&&i[3]||(S.cssNumber[s]?"":"px")),y.clearCloneStyle||""!==n||0!==t.indexOf("background")||(l[t]="inherit"),a&&"set"in a&&void 0===(n=a.set(e,n,r))||(u?l.setProperty(t,n):l[t]=n))}},css:function(e,t,n,r){var i,o,a,s=X(t);return Xe.test(t)||(t=ze(s)),(a=S.cssHooks[t]||S.cssHooks[s])&&"get"in a&&(i=a.get(e,!0,n)),void 0===i&&(i=We(e,t,r)),"normal"===i&&t in Ge&&(i=Ge[t]),""===n||n?(o=parseFloat(i),!0===n||isFinite(o)?o||0:i):i}}),S.each(["height","width"],function(e,u){S.cssHooks[u]={get:function(e,t,n){if(t)return!Ue.test(S.css(e,"display"))||e.getClientRects().length&&e.getBoundingClientRect().width?Je(e,u,n):Me(e,Ve,function(){return Je(e,u,n)})},set:function(e,t,n){var r,i=Re(e),o=!y.scrollboxSize()&&"absolute"===i.position,a=(o||n)&&"border-box"===S.css(e,"boxSizing",!1,i),s=n?Qe(e,u,n,a,i):0;return a&&o&&(s-=Math.ceil(e["offset"+u[0].toUpperCase()+u.slice(1)]-parseFloat(i[u])-Qe(e,u,"border",!1,i)-.5)),s&&(r=te.exec(t))&&"px"!==(r[3]||"px")&&(e.style[u]=t,t=S.css(e,u)),Ye(0,t,s)}}}),S.cssHooks.marginLeft=Fe(y.reliableMarginLeft,function(e,t){if(t)return(parseFloat(We(e,"marginLeft"))||e.getBoundingClientRect().left-Me(e,{marginLeft:0},function(){return e.getBoundingClientRect().left}))+"px"}),S.each({margin:"",padding:"",border:"Width"},function(i,o){S.cssHooks[i+o]={expand:function(e){for(var t=0,n={},r="string"==typeof e?e.split(" "):[e];t<4;t++)n[i+ne[t]+o]=r[t]||r[t-2]||r[0];return n}},"margin"!==i&&(S.cssHooks[i+o].set=Ye)}),S.fn.extend({css:function(e,t){return $(this,function(e,t,n){var r,i,o={},a=0;if(Array.isArray(t)){for(r=Re(e),i=t.length;a<i;a++)o[t[a]]=S.css(e,t[a],!1,r);return o}return void 0!==n?S.style(e,t,n):S.css(e,t)},e,t,1<arguments.length)}}),((S.Tween=Ke).prototype={constructor:Ke,init:function(e,t,n,r,i,o){this.elem=e,this.prop=n,this.easing=i||S.easing._default,this.options=t,this.start=this.now=this.cur(),this.end=r,this.unit=o||(S.cssNumber[n]?"":"px")},cur:function(){var e=Ke.propHooks[this.prop];return e&&e.get?e.get(this):Ke.propHooks._default.get(this)},run:function(e){var t,n=Ke.propHooks[this.prop];return this.options.duration?this.pos=t=S.easing[this.easing](e,this.options.duration*e,0,1,this.options.duration):this.pos=t=e,this.now=(this.end-this.start)*t+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),n&&n.set?n.set(this):Ke.propHooks._default.set(this),this}}).init.prototype=Ke.prototype,(Ke.propHooks={_default:{get:function(e){var t;return 1!==e.elem.nodeType||null!=e.elem[e.prop]&&null==e.elem.style[e.prop]?e.elem[e.prop]:(t=S.css(e.elem,e.prop,""))&&"auto"!==t?t:0},set:function(e){S.fx.step[e.prop]?S.fx.step[e.prop](e):1!==e.elem.nodeType||!S.cssHooks[e.prop]&&null==e.elem.style[ze(e.prop)]?e.elem[e.prop]=e.now:S.style(e.elem,e.prop,e.now+e.unit)}}}).scrollTop=Ke.propHooks.scrollLeft={set:function(e){e.elem.nodeType&&e.elem.parentNode&&(e.elem[e.prop]=e.now)}},S.easing={linear:function(e){return e},swing:function(e){return.5-Math.cos(e*Math.PI)/2},_default:"swing"},S.fx=Ke.prototype.init,S.fx.step={};var Ze,et,tt,nt,rt=/^(?:toggle|show|hide)$/,it=/queueHooks$/;function ot(){et&&(!1===E.hidden&&C.requestAnimationFrame?C.requestAnimationFrame(ot):C.setTimeout(ot,S.fx.interval),S.fx.tick())}function at(){return C.setTimeout(function(){Ze=void 0}),Ze=Date.now()}function st(e,t){var n,r=0,i={height:e};for(t=t?1:0;r<4;r+=2-t)i["margin"+(n=ne[r])]=i["padding"+n]=e;return t&&(i.opacity=i.width=e),i}function ut(e,t,n){for(var r,i=(lt.tweeners[t]||[]).concat(lt.tweeners["*"]),o=0,a=i.length;o<a;o++)if(r=i[o].call(n,t,e))return r}function lt(o,e,t){var n,a,r=0,i=lt.prefilters.length,s=S.Deferred().always(function(){delete u.elem}),u=function(){if(a)return!1;for(var e=Ze||at(),t=Math.max(0,l.startTime+l.duration-e),n=1-(t/l.duration||0),r=0,i=l.tweens.length;r<i;r++)l.tweens[r].run(n);return s.notifyWith(o,[l,n,t]),n<1&&i?t:(i||s.notifyWith(o,[l,1,0]),s.resolveWith(o,[l]),!1)},l=s.promise({elem:o,props:S.extend({},e),opts:S.extend(!0,{specialEasing:{},easing:S.easing._default},t),originalProperties:e,originalOptions:t,startTime:Ze||at(),duration:t.duration,tweens:[],createTween:function(e,t){var n=S.Tween(o,l.opts,e,t,l.opts.specialEasing[e]||l.opts.easing);return l.tweens.push(n),n},stop:function(e){var t=0,n=e?l.tweens.length:0;if(a)return this;for(a=!0;t<n;t++)l.tweens[t].run(1);return e?(s.notifyWith(o,[l,1,0]),s.resolveWith(o,[l,e])):s.rejectWith(o,[l,e]),this}}),c=l.props;for(!function(e,t){var n,r,i,o,a;for(n in e)if(i=t[r=X(n)],o=e[n],Array.isArray(o)&&(i=o[1],o=e[n]=o[0]),n!==r&&(e[r]=o,delete e[n]),(a=S.cssHooks[r])&&"expand"in a)for(n in o=a.expand(o),delete e[r],o)n in e||(e[n]=o[n],t[n]=i);else t[r]=i}(c,l.opts.specialEasing);r<i;r++)if(n=lt.prefilters[r].call(l,o,c,l.opts))return m(n.stop)&&(S._queueHooks(l.elem,l.opts.queue).stop=n.stop.bind(n)),n;return S.map(c,ut,l),m(l.opts.start)&&l.opts.start.call(o,l),l.progress(l.opts.progress).done(l.opts.done,l.opts.complete).fail(l.opts.fail).always(l.opts.always),S.fx.timer(S.extend(u,{elem:o,anim:l,queue:l.opts.queue})),l}S.Animation=S.extend(lt,{tweeners:{"*":[function(e,t){var n=this.createTween(e,t);return se(n.elem,e,te.exec(t),n),n}]},tweener:function(e,t){m(e)?(t=e,e=["*"]):e=e.match(P);for(var n,r=0,i=e.length;r<i;r++)n=e[r],lt.tweeners[n]=lt.tweeners[n]||[],lt.tweeners[n].unshift(t)},prefilters:[function(e,t,n){var r,i,o,a,s,u,l,c,f="width"in t||"height"in t,p=this,d={},h=e.style,g=e.nodeType&&ae(e),v=Y.get(e,"fxshow");for(r in n.queue||(null==(a=S._queueHooks(e,"fx")).unqueued&&(a.unqueued=0,s=a.empty.fire,a.empty.fire=function(){a.unqueued||s()}),a.unqueued++,p.always(function(){p.always(function(){a.unqueued--,S.queue(e,"fx").length||a.empty.fire()})})),t)if(i=t[r],rt.test(i)){if(delete t[r],o=o||"toggle"===i,i===(g?"hide":"show")){if("show"!==i||!v||void 0===v[r])continue;g=!0}d[r]=v&&v[r]||S.style(e,r)}if((u=!S.isEmptyObject(t))||!S.isEmptyObject(d))for(r in f&&1===e.nodeType&&(n.overflow=[h.overflow,h.overflowX,h.overflowY],null==(l=v&&v.display)&&(l=Y.get(e,"display")),"none"===(c=S.css(e,"display"))&&(l?c=l:(le([e],!0),l=e.style.display||l,c=S.css(e,"display"),le([e]))),("inline"===c||"inline-block"===c&&null!=l)&&"none"===S.css(e,"float")&&(u||(p.done(function(){h.display=l}),null==l&&(c=h.display,l="none"===c?"":c)),h.display="inline-block")),n.overflow&&(h.overflow="hidden",p.always(function(){h.overflow=n.overflow[0],h.overflowX=n.overflow[1],h.overflowY=n.overflow[2]})),u=!1,d)u||(v?"hidden"in v&&(g=v.hidden):v=Y.access(e,"fxshow",{display:l}),o&&(v.hidden=!g),g&&le([e],!0),p.done(function(){for(r in g||le([e]),Y.remove(e,"fxshow"),d)S.style(e,r,d[r])})),u=ut(g?v[r]:0,r,p),r in v||(v[r]=u.start,g&&(u.end=u.start,u.start=0))}],prefilter:function(e,t){t?lt.prefilters.unshift(e):lt.prefilters.push(e)}}),S.speed=function(e,t,n){var r=e&&"object"==typeof e?S.extend({},e):{complete:n||!n&&t||m(e)&&e,duration:e,easing:n&&t||t&&!m(t)&&t};return S.fx.off?r.duration=0:"number"!=typeof r.duration&&(r.duration in S.fx.speeds?r.duration=S.fx.speeds[r.duration]:r.duration=S.fx.speeds._default),null!=r.queue&&!0!==r.queue||(r.queue="fx"),r.old=r.complete,r.complete=function(){m(r.old)&&r.old.call(this),r.queue&&S.dequeue(this,r.queue)},r},S.fn.extend({fadeTo:function(e,t,n,r){return this.filter(ae).css("opacity",0).show().end().animate({opacity:t},e,n,r)},animate:function(t,e,n,r){var i=S.isEmptyObject(t),o=S.speed(e,n,r),a=function(){var e=lt(this,S.extend({},t),o);(i||Y.get(this,"finish"))&&e.stop(!0)};return a.finish=a,i||!1===o.queue?this.each(a):this.queue(o.queue,a)},stop:function(i,e,o){var a=function(e){var t=e.stop;delete e.stop,t(o)};return"string"!=typeof i&&(o=e,e=i,i=void 0),e&&this.queue(i||"fx",[]),this.each(function(){var e=!0,t=null!=i&&i+"queueHooks",n=S.timers,r=Y.get(this);if(t)r[t]&&r[t].stop&&a(r[t]);else for(t in r)r[t]&&r[t].stop&&it.test(t)&&a(r[t]);for(t=n.length;t--;)n[t].elem!==this||null!=i&&n[t].queue!==i||(n[t].anim.stop(o),e=!1,n.splice(t,1));!e&&o||S.dequeue(this,i)})},finish:function(a){return!1!==a&&(a=a||"fx"),this.each(function(){var e,t=Y.get(this),n=t[a+"queue"],r=t[a+"queueHooks"],i=S.timers,o=n?n.length:0;for(t.finish=!0,S.queue(this,a,[]),r&&r.stop&&r.stop.call(this,!0),e=i.length;e--;)i[e].elem===this&&i[e].queue===a&&(i[e].anim.stop(!0),i.splice(e,1));for(e=0;e<o;e++)n[e]&&n[e].finish&&n[e].finish.call(this);delete t.finish})}}),S.each(["toggle","show","hide"],function(e,r){var i=S.fn[r];S.fn[r]=function(e,t,n){return null==e||"boolean"==typeof e?i.apply(this,arguments):this.animate(st(r,!0),e,t,n)}}),S.each({slideDown:st("show"),slideUp:st("hide"),slideToggle:st("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(e,r){S.fn[e]=function(e,t,n){return this.animate(r,e,t,n)}}),S.timers=[],S.fx.tick=function(){var e,t=0,n=S.timers;for(Ze=Date.now();t<n.length;t++)(e=n[t])()||n[t]!==e||n.splice(t--,1);n.length||S.fx.stop(),Ze=void 0},S.fx.timer=function(e){S.timers.push(e),S.fx.start()},S.fx.interval=13,S.fx.start=function(){et||(et=!0,ot())},S.fx.stop=function(){et=null},S.fx.speeds={slow:600,fast:200,_default:400},S.fn.delay=function(r,e){return r=S.fx&&S.fx.speeds[r]||r,e=e||"fx",this.queue(e,function(e,t){var n=C.setTimeout(e,r);t.stop=function(){C.clearTimeout(n)}})},tt=E.createElement("input"),nt=E.createElement("select").appendChild(E.createElement("option")),tt.type="checkbox",y.checkOn=""!==tt.value,y.optSelected=nt.selected,(tt=E.createElement("input")).value="t",tt.type="radio",y.radioValue="t"===tt.value;var ct,ft=S.expr.attrHandle;S.fn.extend({attr:function(e,t){return $(this,S.attr,e,t,1<arguments.length)},removeAttr:function(e){return this.each(function(){S.removeAttr(this,e)})}}),S.extend({attr:function(e,t,n){var r,i,o=e.nodeType;if(3!==o&&8!==o&&2!==o)return"undefined"==typeof e.getAttribute?S.prop(e,t,n):(1===o&&S.isXMLDoc(e)||(i=S.attrHooks[t.toLowerCase()]||(S.expr.match.bool.test(t)?ct:void 0)),void 0!==n?null===n?void S.removeAttr(e,t):i&&"set"in i&&void 0!==(r=i.set(e,n,t))?r:(e.setAttribute(t,n+""),n):i&&"get"in i&&null!==(r=i.get(e,t))?r:null==(r=S.find.attr(e,t))?void 0:r)},attrHooks:{type:{set:function(e,t){if(!y.radioValue&&"radio"===t&&A(e,"input")){var n=e.value;return e.setAttribute("type",t),n&&(e.value=n),t}}}},removeAttr:function(e,t){var n,r=0,i=t&&t.match(P);if(i&&1===e.nodeType)while(n=i[r++])e.removeAttribute(n)}}),ct={set:function(e,t,n){return!1===t?S.removeAttr(e,n):e.setAttribute(n,n),n}},S.each(S.expr.match.bool.source.match(/\w+/g),function(e,t){var a=ft[t]||S.find.attr;ft[t]=function(e,t,n){var r,i,o=t.toLowerCase();return n||(i=ft[o],ft[o]=r,r=null!=a(e,t,n)?o:null,ft[o]=i),r}});var pt=/^(?:input|select|textarea|button)$/i,dt=/^(?:a|area)$/i;function ht(e){return(e.match(P)||[]).join(" ")}function gt(e){return e.getAttribute&&e.getAttribute("class")||""}function vt(e){return Array.isArray(e)?e:"string"==typeof e&&e.match(P)||[]}S.fn.extend({prop:function(e,t){return $(this,S.prop,e,t,1<arguments.length)},removeProp:function(e){return this.each(function(){delete this[S.propFix[e]||e]})}}),S.extend({prop:function(e,t,n){var r,i,o=e.nodeType;if(3!==o&&8!==o&&2!==o)return 1===o&&S.isXMLDoc(e)||(t=S.propFix[t]||t,i=S.propHooks[t]),void 0!==n?i&&"set"in i&&void 0!==(r=i.set(e,n,t))?r:e[t]=n:i&&"get"in i&&null!==(r=i.get(e,t))?r:e[t]},propHooks:{tabIndex:{get:function(e){var t=S.find.attr(e,"tabindex");return t?parseInt(t,10):pt.test(e.nodeName)||dt.test(e.nodeName)&&e.href?0:-1}}},propFix:{"for":"htmlFor","class":"className"}}),y.optSelected||(S.propHooks.selected={get:function(e){var t=e.parentNode;return t&&t.parentNode&&t.parentNode.selectedIndex,null},set:function(e){var t=e.parentNode;t&&(t.selectedIndex,t.parentNode&&t.parentNode.selectedIndex)}}),S.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){S.propFix[this.toLowerCase()]=this}),S.fn.extend({addClass:function(t){var e,n,r,i,o,a,s,u=0;if(m(t))return this.each(function(e){S(this).addClass(t.call(this,e,gt(this)))});if((e=vt(t)).length)while(n=this[u++])if(i=gt(n),r=1===n.nodeType&&" "+ht(i)+" "){a=0;while(o=e[a++])r.indexOf(" "+o+" ")<0&&(r+=o+" ");i!==(s=ht(r))&&n.setAttribute("class",s)}return this},removeClass:function(t){var e,n,r,i,o,a,s,u=0;if(m(t))return this.each(function(e){S(this).removeClass(t.call(this,e,gt(this)))});if(!arguments.length)return this.attr("class","");if((e=vt(t)).length)while(n=this[u++])if(i=gt(n),r=1===n.nodeType&&" "+ht(i)+" "){a=0;while(o=e[a++])while(-1<r.indexOf(" "+o+" "))r=r.replace(" "+o+" "," ");i!==(s=ht(r))&&n.setAttribute("class",s)}return this},toggleClass:function(i,t){var o=typeof i,a="string"===o||Array.isArray(i);return"boolean"==typeof t&&a?t?this.addClass(i):this.removeClass(i):m(i)?this.each(function(e){S(this).toggleClass(i.call(this,e,gt(this),t),t)}):this.each(function(){var e,t,n,r;if(a){t=0,n=S(this),r=vt(i);while(e=r[t++])n.hasClass(e)?n.removeClass(e):n.addClass(e)}else void 0!==i&&"boolean"!==o||((e=gt(this))&&Y.set(this,"__className__",e),this.setAttribute&&this.setAttribute("class",e||!1===i?"":Y.get(this,"__className__")||""))})},hasClass:function(e){var t,n,r=0;t=" "+e+" ";while(n=this[r++])if(1===n.nodeType&&-1<(" "+ht(gt(n))+" ").indexOf(t))return!0;return!1}});var yt=/\r/g;S.fn.extend({val:function(n){var r,e,i,t=this[0];return arguments.length?(i=m(n),this.each(function(e){var t;1===this.nodeType&&(null==(t=i?n.call(this,e,S(this).val()):n)?t="":"number"==typeof t?t+="":Array.isArray(t)&&(t=S.map(t,function(e){return null==e?"":e+""})),(r=S.valHooks[this.type]||S.valHooks[this.nodeName.toLowerCase()])&&"set"in r&&void 0!==r.set(this,t,"value")||(this.value=t))})):t?(r=S.valHooks[t.type]||S.valHooks[t.nodeName.toLowerCase()])&&"get"in r&&void 0!==(e=r.get(t,"value"))?e:"string"==typeof(e=t.value)?e.replace(yt,""):null==e?"":e:void 0}}),S.extend({valHooks:{option:{get:function(e){var t=S.find.attr(e,"value");return null!=t?t:ht(S.text(e))}},select:{get:function(e){var t,n,r,i=e.options,o=e.selectedIndex,a="select-one"===e.type,s=a?null:[],u=a?o+1:i.length;for(r=o<0?u:a?o:0;r<u;r++)if(((n=i[r]).selected||r===o)&&!n.disabled&&(!n.parentNode.disabled||!A(n.parentNode,"optgroup"))){if(t=S(n).val(),a)return t;s.push(t)}return s},set:function(e,t){var n,r,i=e.options,o=S.makeArray(t),a=i.length;while(a--)((r=i[a]).selected=-1<S.inArray(S.valHooks.option.get(r),o))&&(n=!0);return n||(e.selectedIndex=-1),o}}}}),S.each(["radio","checkbox"],function(){S.valHooks[this]={set:function(e,t){if(Array.isArray(t))return e.checked=-1<S.inArray(S(e).val(),t)}},y.checkOn||(S.valHooks[this].get=function(e){return null===e.getAttribute("value")?"on":e.value})}),y.focusin="onfocusin"in C;var mt=/^(?:focusinfocus|focusoutblur)$/,xt=function(e){e.stopPropagation()};S.extend(S.event,{trigger:function(e,t,n,r){var i,o,a,s,u,l,c,f,p=[n||E],d=v.call(e,"type")?e.type:e,h=v.call(e,"namespace")?e.namespace.split("."):[];if(o=f=a=n=n||E,3!==n.nodeType&&8!==n.nodeType&&!mt.test(d+S.event.triggered)&&(-1<d.indexOf(".")&&(d=(h=d.split(".")).shift(),h.sort()),u=d.indexOf(":")<0&&"on"+d,(e=e[S.expando]?e:new S.Event(d,"object"==typeof e&&e)).isTrigger=r?2:3,e.namespace=h.join("."),e.rnamespace=e.namespace?new RegExp("(^|\\.)"+h.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,e.result=void 0,e.target||(e.target=n),t=null==t?[e]:S.makeArray(t,[e]),c=S.event.special[d]||{},r||!c.trigger||!1!==c.trigger.apply(n,t))){if(!r&&!c.noBubble&&!x(n)){for(s=c.delegateType||d,mt.test(s+d)||(o=o.parentNode);o;o=o.parentNode)p.push(o),a=o;a===(n.ownerDocument||E)&&p.push(a.defaultView||a.parentWindow||C)}i=0;while((o=p[i++])&&!e.isPropagationStopped())f=o,e.type=1<i?s:c.bindType||d,(l=(Y.get(o,"events")||Object.create(null))[e.type]&&Y.get(o,"handle"))&&l.apply(o,t),(l=u&&o[u])&&l.apply&&V(o)&&(e.result=l.apply(o,t),!1===e.result&&e.preventDefault());return e.type=d,r||e.isDefaultPrevented()||c._default&&!1!==c._default.apply(p.pop(),t)||!V(n)||u&&m(n[d])&&!x(n)&&((a=n[u])&&(n[u]=null),S.event.triggered=d,e.isPropagationStopped()&&f.addEventListener(d,xt),n[d](),e.isPropagationStopped()&&f.removeEventListener(d,xt),S.event.triggered=void 0,a&&(n[u]=a)),e.result}},simulate:function(e,t,n){var r=S.extend(new S.Event,n,{type:e,isSimulated:!0});S.event.trigger(r,null,t)}}),S.fn.extend({trigger:function(e,t){return this.each(function(){S.event.trigger(e,t,this)})},triggerHandler:function(e,t){var n=this[0];if(n)return S.event.trigger(e,t,n,!0)}}),y.focusin||S.each({focus:"focusin",blur:"focusout"},function(n,r){var i=function(e){S.event.simulate(r,e.target,S.event.fix(e))};S.event.special[r]={setup:function(){var e=this.ownerDocument||this.document||this,t=Y.access(e,r);t||e.addEventListener(n,i,!0),Y.access(e,r,(t||0)+1)},teardown:function(){var e=this.ownerDocument||this.document||this,t=Y.access(e,r)-1;t?Y.access(e,r,t):(e.removeEventListener(n,i,!0),Y.remove(e,r))}}});var bt=C.location,wt={guid:Date.now()},Tt=/\?/;S.parseXML=function(e){var t,n;if(!e||"string"!=typeof e)return null;try{t=(new C.DOMParser).parseFromString(e,"text/xml")}catch(e){}return n=t&&t.getElementsByTagName("parsererror")[0],t&&!n||S.error("Invalid XML: "+(n?S.map(n.childNodes,function(e){return e.textContent}).join("\n"):e)),t};var Ct=/\[\]$/,Et=/\r?\n/g,St=/^(?:submit|button|image|reset|file)$/i,kt=/^(?:input|select|textarea|keygen)/i;function At(n,e,r,i){var t;if(Array.isArray(e))S.each(e,function(e,t){r||Ct.test(n)?i(n,t):At(n+"["+("object"==typeof t&&null!=t?e:"")+"]",t,r,i)});else if(r||"object"!==w(e))i(n,e);else for(t in e)At(n+"["+t+"]",e[t],r,i)}S.param=function(e,t){var n,r=[],i=function(e,t){var n=m(t)?t():t;r[r.length]=encodeURIComponent(e)+"="+encodeURIComponent(null==n?"":n)};if(null==e)return"";if(Array.isArray(e)||e.jquery&&!S.isPlainObject(e))S.each(e,function(){i(this.name,this.value)});else for(n in e)At(n,e[n],t,i);return r.join("&")},S.fn.extend({serialize:function(){return S.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var e=S.prop(this,"elements");return e?S.makeArray(e):this}).filter(function(){var e=this.type;return this.name&&!S(this).is(":disabled")&&kt.test(this.nodeName)&&!St.test(e)&&(this.checked||!pe.test(e))}).map(function(e,t){var n=S(this).val();return null==n?null:Array.isArray(n)?S.map(n,function(e){return{name:t.name,value:e.replace(Et,"\r\n")}}):{name:t.name,value:n.replace(Et,"\r\n")}}).get()}});var Nt=/%20/g,jt=/#.*$/,Dt=/([?&])_=[^&]*/,qt=/^(.*?):[ \t]*([^\r\n]*)$/gm,Lt=/^(?:GET|HEAD)$/,Ht=/^\/\//,Ot={},Pt={},Rt="*/".concat("*"),Mt=E.createElement("a");function It(o){return function(e,t){"string"!=typeof e&&(t=e,e="*");var n,r=0,i=e.toLowerCase().match(P)||[];if(m(t))while(n=i[r++])"+"===n[0]?(n=n.slice(1)||"*",(o[n]=o[n]||[]).unshift(t)):(o[n]=o[n]||[]).push(t)}}function Wt(t,i,o,a){var s={},u=t===Pt;function l(e){var r;return s[e]=!0,S.each(t[e]||[],function(e,t){var n=t(i,o,a);return"string"!=typeof n||u||s[n]?u?!(r=n):void 0:(i.dataTypes.unshift(n),l(n),!1)}),r}return l(i.dataTypes[0])||!s["*"]&&l("*")}function Ft(e,t){var n,r,i=S.ajaxSettings.flatOptions||{};for(n in t)void 0!==t[n]&&((i[n]?e:r||(r={}))[n]=t[n]);return r&&S.extend(!0,e,r),e}Mt.href=bt.href,S.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:bt.href,type:"GET",isLocal:/^(?:about|app|app-storage|.+-extension|file|res|widget):$/.test(bt.protocol),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Rt,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/\bxml\b/,html:/\bhtml/,json:/\bjson\b/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":JSON.parse,"text xml":S.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(e,t){return t?Ft(Ft(e,S.ajaxSettings),t):Ft(S.ajaxSettings,e)},ajaxPrefilter:It(Ot),ajaxTransport:It(Pt),ajax:function(e,t){"object"==typeof e&&(t=e,e=void 0),t=t||{};var c,f,p,n,d,r,h,g,i,o,v=S.ajaxSetup({},t),y=v.context||v,m=v.context&&(y.nodeType||y.jquery)?S(y):S.event,x=S.Deferred(),b=S.Callbacks("once memory"),w=v.statusCode||{},a={},s={},u="canceled",T={readyState:0,getResponseHeader:function(e){var t;if(h){if(!n){n={};while(t=qt.exec(p))n[t[1].toLowerCase()+" "]=(n[t[1].toLowerCase()+" "]||[]).concat(t[2])}t=n[e.toLowerCase()+" "]}return null==t?null:t.join(", ")},getAllResponseHeaders:function(){return h?p:null},setRequestHeader:function(e,t){return null==h&&(e=s[e.toLowerCase()]=s[e.toLowerCase()]||e,a[e]=t),this},overrideMimeType:function(e){return null==h&&(v.mimeType=e),this},statusCode:function(e){var t;if(e)if(h)T.always(e[T.status]);else for(t in e)w[t]=[w[t],e[t]];return this},abort:function(e){var t=e||u;return c&&c.abort(t),l(0,t),this}};if(x.promise(T),v.url=((e||v.url||bt.href)+"").replace(Ht,bt.protocol+"//"),v.type=t.method||t.type||v.method||v.type,v.dataTypes=(v.dataType||"*").toLowerCase().match(P)||[""],null==v.crossDomain){r=E.createElement("a");try{r.href=v.url,r.href=r.href,v.crossDomain=Mt.protocol+"//"+Mt.host!=r.protocol+"//"+r.host}catch(e){v.crossDomain=!0}}if(v.data&&v.processData&&"string"!=typeof v.data&&(v.data=S.param(v.data,v.traditional)),Wt(Ot,v,t,T),h)return T;for(i in(g=S.event&&v.global)&&0==S.active++&&S.event.trigger("ajaxStart"),v.type=v.type.toUpperCase(),v.hasContent=!Lt.test(v.type),f=v.url.replace(jt,""),v.hasContent?v.data&&v.processData&&0===(v.contentType||"").indexOf("application/x-www-form-urlencoded")&&(v.data=v.data.replace(Nt,"+")):(o=v.url.slice(f.length),v.data&&(v.processData||"string"==typeof v.data)&&(f+=(Tt.test(f)?"&":"?")+v.data,delete v.data),!1===v.cache&&(f=f.replace(Dt,"$1"),o=(Tt.test(f)?"&":"?")+"_="+wt.guid+++o),v.url=f+o),v.ifModified&&(S.lastModified[f]&&T.setRequestHeader("If-Modified-Since",S.lastModified[f]),S.etag[f]&&T.setRequestHeader("If-None-Match",S.etag[f])),(v.data&&v.hasContent&&!1!==v.contentType||t.contentType)&&T.setRequestHeader("Content-Type",v.contentType),T.setRequestHeader("Accept",v.dataTypes[0]&&v.accepts[v.dataTypes[0]]?v.accepts[v.dataTypes[0]]+("*"!==v.dataTypes[0]?", "+Rt+"; q=0.01":""):v.accepts["*"]),v.headers)T.setRequestHeader(i,v.headers[i]);if(v.beforeSend&&(!1===v.beforeSend.call(y,T,v)||h))return T.abort();if(u="abort",b.add(v.complete),T.done(v.success),T.fail(v.error),c=Wt(Pt,v,t,T)){if(T.readyState=1,g&&m.trigger("ajaxSend",[T,v]),h)return T;v.async&&0<v.timeout&&(d=C.setTimeout(function(){T.abort("timeout")},v.timeout));try{h=!1,c.send(a,l)}catch(e){if(h)throw e;l(-1,e)}}else l(-1,"No Transport");function l(e,t,n,r){var i,o,a,s,u,l=t;h||(h=!0,d&&C.clearTimeout(d),c=void 0,p=r||"",T.readyState=0<e?4:0,i=200<=e&&e<300||304===e,n&&(s=function(e,t,n){var r,i,o,a,s=e.contents,u=e.dataTypes;while("*"===u[0])u.shift(),void 0===r&&(r=e.mimeType||t.getResponseHeader("Content-Type"));if(r)for(i in s)if(s[i]&&s[i].test(r)){u.unshift(i);break}if(u[0]in n)o=u[0];else{for(i in n){if(!u[0]||e.converters[i+" "+u[0]]){o=i;break}a||(a=i)}o=o||a}if(o)return o!==u[0]&&u.unshift(o),n[o]}(v,T,n)),!i&&-1<S.inArray("script",v.dataTypes)&&S.inArray("json",v.dataTypes)<0&&(v.converters["text script"]=function(){}),s=function(e,t,n,r){var i,o,a,s,u,l={},c=e.dataTypes.slice();if(c[1])for(a in e.converters)l[a.toLowerCase()]=e.converters[a];o=c.shift();while(o)if(e.responseFields[o]&&(n[e.responseFields[o]]=t),!u&&r&&e.dataFilter&&(t=e.dataFilter(t,e.dataType)),u=o,o=c.shift())if("*"===o)o=u;else if("*"!==u&&u!==o){if(!(a=l[u+" "+o]||l["* "+o]))for(i in l)if((s=i.split(" "))[1]===o&&(a=l[u+" "+s[0]]||l["* "+s[0]])){!0===a?a=l[i]:!0!==l[i]&&(o=s[0],c.unshift(s[1]));break}if(!0!==a)if(a&&e["throws"])t=a(t);else try{t=a(t)}catch(e){return{state:"parsererror",error:a?e:"No conversion from "+u+" to "+o}}}return{state:"success",data:t}}(v,s,T,i),i?(v.ifModified&&((u=T.getResponseHeader("Last-Modified"))&&(S.lastModified[f]=u),(u=T.getResponseHeader("etag"))&&(S.etag[f]=u)),204===e||"HEAD"===v.type?l="nocontent":304===e?l="notmodified":(l=s.state,o=s.data,i=!(a=s.error))):(a=l,!e&&l||(l="error",e<0&&(e=0))),T.status=e,T.statusText=(t||l)+"",i?x.resolveWith(y,[o,l,T]):x.rejectWith(y,[T,l,a]),T.statusCode(w),w=void 0,g&&m.trigger(i?"ajaxSuccess":"ajaxError",[T,v,i?o:a]),b.fireWith(y,[T,l]),g&&(m.trigger("ajaxComplete",[T,v]),--S.active||S.event.trigger("ajaxStop")))}return T},getJSON:function(e,t,n){return S.get(e,t,n,"json")},getScript:function(e,t){return S.get(e,void 0,t,"script")}}),S.each(["get","post"],function(e,i){S[i]=function(e,t,n,r){return m(t)&&(r=r||n,n=t,t=void 0),S.ajax(S.extend({url:e,type:i,dataType:r,data:t,success:n},S.isPlainObject(e)&&e))}}),S.ajaxPrefilter(function(e){var t;for(t in e.headers)"content-type"===t.toLowerCase()&&(e.contentType=e.headers[t]||"")}),S._evalUrl=function(e,t,n){return S.ajax({url:e,type:"GET",dataType:"script",cache:!0,async:!1,global:!1,converters:{"text script":function(){}},dataFilter:function(e){S.globalEval(e,t,n)}})},S.fn.extend({wrapAll:function(e){var t;return this[0]&&(m(e)&&(e=e.call(this[0])),t=S(e,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&t.insertBefore(this[0]),t.map(function(){var e=this;while(e.firstElementChild)e=e.firstElementChild;return e}).append(this)),this},wrapInner:function(n){return m(n)?this.each(function(e){S(this).wrapInner(n.call(this,e))}):this.each(function(){var e=S(this),t=e.contents();t.length?t.wrapAll(n):e.append(n)})},wrap:function(t){var n=m(t);return this.each(function(e){S(this).wrapAll(n?t.call(this,e):t)})},unwrap:function(e){return this.parent(e).not("body").each(function(){S(this).replaceWith(this.childNodes)}),this}}),S.expr.pseudos.hidden=function(e){return!S.expr.pseudos.visible(e)},S.expr.pseudos.visible=function(e){return!!(e.offsetWidth||e.offsetHeight||e.getClientRects().length)},S.ajaxSettings.xhr=function(){try{return new C.XMLHttpRequest}catch(e){}};var Bt={0:200,1223:204},$t=S.ajaxSettings.xhr();y.cors=!!$t&&"withCredentials"in $t,y.ajax=$t=!!$t,S.ajaxTransport(function(i){var o,a;if(y.cors||$t&&!i.crossDomain)return{send:function(e,t){var n,r=i.xhr();if(r.open(i.type,i.url,i.async,i.username,i.password),i.xhrFields)for(n in i.xhrFields)r[n]=i.xhrFields[n];for(n in i.mimeType&&r.overrideMimeType&&r.overrideMimeType(i.mimeType),i.crossDomain||e["X-Requested-With"]||(e["X-Requested-With"]="XMLHttpRequest"),e)r.setRequestHeader(n,e[n]);o=function(e){return function(){o&&(o=a=r.onload=r.onerror=r.onabort=r.ontimeout=r.onreadystatechange=null,"abort"===e?r.abort():"error"===e?"number"!=typeof r.status?t(0,"error"):t(r.status,r.statusText):t(Bt[r.status]||r.status,r.statusText,"text"!==(r.responseType||"text")||"string"!=typeof r.responseText?{binary:r.response}:{text:r.responseText},r.getAllResponseHeaders()))}},r.onload=o(),a=r.onerror=r.ontimeout=o("error"),void 0!==r.onabort?r.onabort=a:r.onreadystatechange=function(){4===r.readyState&&C.setTimeout(function(){o&&a()})},o=o("abort");try{r.send(i.hasContent&&i.data||null)}catch(e){if(o)throw e}},abort:function(){o&&o()}}}),S.ajaxPrefilter(function(e){e.crossDomain&&(e.contents.script=!1)}),S.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/\b(?:java|ecma)script\b/},converters:{"text script":function(e){return S.globalEval(e),e}}}),S.ajaxPrefilter("script",function(e){void 0===e.cache&&(e.cache=!1),e.crossDomain&&(e.type="GET")}),S.ajaxTransport("script",function(n){var r,i;if(n.crossDomain||n.scriptAttrs)return{send:function(e,t){r=S("<script>").attr(n.scriptAttrs||{}).prop({charset:n.scriptCharset,src:n.url}).on("load error",i=function(e){r.remove(),i=null,e&&t("error"===e.type?404:200,e.type)}),E.head.appendChild(r[0])},abort:function(){i&&i()}}});var _t,zt=[],Ut=/(=)\?(?=&|$)|\?\?/;S.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=zt.pop()||S.expando+"_"+wt.guid++;return this[e]=!0,e}}),S.ajaxPrefilter("json jsonp",function(e,t,n){var r,i,o,a=!1!==e.jsonp&&(Ut.test(e.url)?"url":"string"==typeof e.data&&0===(e.contentType||"").indexOf("application/x-www-form-urlencoded")&&Ut.test(e.data)&&"data");if(a||"jsonp"===e.dataTypes[0])return r=e.jsonpCallback=m(e.jsonpCallback)?e.jsonpCallback():e.jsonpCallback,a?e[a]=e[a].replace(Ut,"$1"+r):!1!==e.jsonp&&(e.url+=(Tt.test(e.url)?"&":"?")+e.jsonp+"="+r),e.converters["script json"]=function(){return o||S.error(r+" was not called"),o[0]},e.dataTypes[0]="json",i=C[r],C[r]=function(){o=arguments},n.always(function(){void 0===i?S(C).removeProp(r):C[r]=i,e[r]&&(e.jsonpCallback=t.jsonpCallback,zt.push(r)),o&&m(i)&&i(o[0]),o=i=void 0}),"script"}),y.createHTMLDocument=((_t=E.implementation.createHTMLDocument("").body).innerHTML="<form></form><form></form>",2===_t.childNodes.length),S.parseHTML=function(e,t,n){return"string"!=typeof e?[]:("boolean"==typeof t&&(n=t,t=!1),t||(y.createHTMLDocument?((r=(t=E.implementation.createHTMLDocument("")).createElement("base")).href=E.location.href,t.head.appendChild(r)):t=E),o=!n&&[],(i=N.exec(e))?[t.createElement(i[1])]:(i=xe([e],t,o),o&&o.length&&S(o).remove(),S.merge([],i.childNodes)));var r,i,o},S.fn.load=function(e,t,n){var r,i,o,a=this,s=e.indexOf(" ");return-1<s&&(r=ht(e.slice(s)),e=e.slice(0,s)),m(t)?(n=t,t=void 0):t&&"object"==typeof t&&(i="POST"),0<a.length&&S.ajax({url:e,type:i||"GET",dataType:"html",data:t}).done(function(e){o=arguments,a.html(r?S("<div>").append(S.parseHTML(e)).find(r):e)}).always(n&&function(e,t){a.each(function(){n.apply(this,o||[e.responseText,t,e])})}),this},S.expr.pseudos.animated=function(t){return S.grep(S.timers,function(e){return t===e.elem}).length},S.offset={setOffset:function(e,t,n){var r,i,o,a,s,u,l=S.css(e,"position"),c=S(e),f={};"static"===l&&(e.style.position="relative"),s=c.offset(),o=S.css(e,"top"),u=S.css(e,"left"),("absolute"===l||"fixed"===l)&&-1<(o+u).indexOf("auto")?(a=(r=c.position()).top,i=r.left):(a=parseFloat(o)||0,i=parseFloat(u)||0),m(t)&&(t=t.call(e,n,S.extend({},s))),null!=t.top&&(f.top=t.top-s.top+a),null!=t.left&&(f.left=t.left-s.left+i),"using"in t?t.using.call(e,f):c.css(f)}},S.fn.extend({offset:function(t){if(arguments.length)return void 0===t?this:this.each(function(e){S.offset.setOffset(this,t,e)});var e,n,r=this[0];return r?r.getClientRects().length?(e=r.getBoundingClientRect(),n=r.ownerDocument.defaultView,{top:e.top+n.pageYOffset,left:e.left+n.pageXOffset}):{top:0,left:0}:void 0},position:function(){if(this[0]){var e,t,n,r=this[0],i={top:0,left:0};if("fixed"===S.css(r,"position"))t=r.getBoundingClientRect();else{t=this.offset(),n=r.ownerDocument,e=r.offsetParent||n.documentElement;while(e&&(e===n.body||e===n.documentElement)&&"static"===S.css(e,"position"))e=e.parentNode;e&&e!==r&&1===e.nodeType&&((i=S(e).offset()).top+=S.css(e,"borderTopWidth",!0),i.left+=S.css(e,"borderLeftWidth",!0))}return{top:t.top-i.top-S.css(r,"marginTop",!0),left:t.left-i.left-S.css(r,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){var e=this.offsetParent;while(e&&"static"===S.css(e,"position"))e=e.offsetParent;return e||re})}}),S.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(t,i){var o="pageYOffset"===i;S.fn[t]=function(e){return $(this,function(e,t,n){var r;if(x(e)?r=e:9===e.nodeType&&(r=e.defaultView),void 0===n)return r?r[i]:e[t];r?r.scrollTo(o?r.pageXOffset:n,o?n:r.pageYOffset):e[t]=n},t,e,arguments.length)}}),S.each(["top","left"],function(e,n){S.cssHooks[n]=Fe(y.pixelPosition,function(e,t){if(t)return t=We(e,n),Pe.test(t)?S(e).position()[n]+"px":t})}),S.each({Height:"height",Width:"width"},function(a,s){S.each({padding:"inner"+a,content:s,"":"outer"+a},function(r,o){S.fn[o]=function(e,t){var n=arguments.length&&(r||"boolean"!=typeof e),i=r||(!0===e||!0===t?"margin":"border");return $(this,function(e,t,n){var r;return x(e)?0===o.indexOf("outer")?e["inner"+a]:e.document.documentElement["client"+a]:9===e.nodeType?(r=e.documentElement,Math.max(e.body["scroll"+a],r["scroll"+a],e.body["offset"+a],r["offset"+a],r["client"+a])):void 0===n?S.css(e,t,i):S.style(e,t,n,i)},s,n?e:void 0,n)}})}),S.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){S.fn[t]=function(e){return this.on(t,e)}}),S.fn.extend({bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,n,r){return this.on(t,e,n,r)},undelegate:function(e,t,n){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",n)},hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)}}),S.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),function(e,n){S.fn[n]=function(e,t){return 0<arguments.length?this.on(n,null,e,t):this.trigger(n)}});var Xt=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g;S.proxy=function(e,t){var n,r,i;if("string"==typeof t&&(n=e[t],t=e,e=n),m(e))return r=s.call(arguments,2),(i=function(){return e.apply(t||this,r.concat(s.call(arguments)))}).guid=e.guid=e.guid||S.guid++,i},S.holdReady=function(e){e?S.readyWait++:S.ready(!0)},S.isArray=Array.isArray,S.parseJSON=JSON.parse,S.nodeName=A,S.isFunction=m,S.isWindow=x,S.camelCase=X,S.type=w,S.now=Date.now,S.isNumeric=function(e){var t=S.type(e);return("number"===t||"string"===t)&&!isNaN(e-parseFloat(e))},S.trim=function(e){return null==e?"":(e+"").replace(Xt,"")},"function"==typeof define&&define.amd&&define("jquery",[],function(){return S});var Vt=C.jQuery,Gt=C.$;return S.noConflict=function(e){return C.$===S&&(C.$=Gt),e&&C.jQuery===S&&(C.jQuery=Vt),S},"undefined"==typeof e&&(C.jQuery=C.$=S),S});
|
toolchain/cmake-3.27.9-linux-x86_64/doc/cmake/html/_static/language_data.js
ADDED
|
@@ -0,0 +1,199 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/*
|
| 2 |
+
* language_data.js
|
| 3 |
+
* ~~~~~~~~~~~~~~~~
|
| 4 |
+
*
|
| 5 |
+
* This script contains the language-specific data used by searchtools.js,
|
| 6 |
+
* namely the list of stopwords, stemmer, scorer and splitter.
|
| 7 |
+
*
|
| 8 |
+
* :copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS.
|
| 9 |
+
* :license: BSD, see LICENSE for details.
|
| 10 |
+
*
|
| 11 |
+
*/
|
| 12 |
+
|
| 13 |
+
var stopwords = ["a", "and", "are", "as", "at", "be", "but", "by", "for", "if", "in", "into", "is", "it", "near", "no", "not", "of", "on", "or", "such", "that", "the", "their", "then", "there", "these", "they", "this", "to", "was", "will", "with"];
|
| 14 |
+
|
| 15 |
+
|
| 16 |
+
/* Non-minified version is copied as a separate JS file, is available */
|
| 17 |
+
|
| 18 |
+
/**
|
| 19 |
+
* Porter Stemmer
|
| 20 |
+
*/
|
| 21 |
+
var Stemmer = function() {
|
| 22 |
+
|
| 23 |
+
var step2list = {
|
| 24 |
+
ational: 'ate',
|
| 25 |
+
tional: 'tion',
|
| 26 |
+
enci: 'ence',
|
| 27 |
+
anci: 'ance',
|
| 28 |
+
izer: 'ize',
|
| 29 |
+
bli: 'ble',
|
| 30 |
+
alli: 'al',
|
| 31 |
+
entli: 'ent',
|
| 32 |
+
eli: 'e',
|
| 33 |
+
ousli: 'ous',
|
| 34 |
+
ization: 'ize',
|
| 35 |
+
ation: 'ate',
|
| 36 |
+
ator: 'ate',
|
| 37 |
+
alism: 'al',
|
| 38 |
+
iveness: 'ive',
|
| 39 |
+
fulness: 'ful',
|
| 40 |
+
ousness: 'ous',
|
| 41 |
+
aliti: 'al',
|
| 42 |
+
iviti: 'ive',
|
| 43 |
+
biliti: 'ble',
|
| 44 |
+
logi: 'log'
|
| 45 |
+
};
|
| 46 |
+
|
| 47 |
+
var step3list = {
|
| 48 |
+
icate: 'ic',
|
| 49 |
+
ative: '',
|
| 50 |
+
alize: 'al',
|
| 51 |
+
iciti: 'ic',
|
| 52 |
+
ical: 'ic',
|
| 53 |
+
ful: '',
|
| 54 |
+
ness: ''
|
| 55 |
+
};
|
| 56 |
+
|
| 57 |
+
var c = "[^aeiou]"; // consonant
|
| 58 |
+
var v = "[aeiouy]"; // vowel
|
| 59 |
+
var C = c + "[^aeiouy]*"; // consonant sequence
|
| 60 |
+
var V = v + "[aeiou]*"; // vowel sequence
|
| 61 |
+
|
| 62 |
+
var mgr0 = "^(" + C + ")?" + V + C; // [C]VC... is m>0
|
| 63 |
+
var meq1 = "^(" + C + ")?" + V + C + "(" + V + ")?$"; // [C]VC[V] is m=1
|
| 64 |
+
var mgr1 = "^(" + C + ")?" + V + C + V + C; // [C]VCVC... is m>1
|
| 65 |
+
var s_v = "^(" + C + ")?" + v; // vowel in stem
|
| 66 |
+
|
| 67 |
+
this.stemWord = function (w) {
|
| 68 |
+
var stem;
|
| 69 |
+
var suffix;
|
| 70 |
+
var firstch;
|
| 71 |
+
var origword = w;
|
| 72 |
+
|
| 73 |
+
if (w.length < 3)
|
| 74 |
+
return w;
|
| 75 |
+
|
| 76 |
+
var re;
|
| 77 |
+
var re2;
|
| 78 |
+
var re3;
|
| 79 |
+
var re4;
|
| 80 |
+
|
| 81 |
+
firstch = w.substr(0,1);
|
| 82 |
+
if (firstch == "y")
|
| 83 |
+
w = firstch.toUpperCase() + w.substr(1);
|
| 84 |
+
|
| 85 |
+
// Step 1a
|
| 86 |
+
re = /^(.+?)(ss|i)es$/;
|
| 87 |
+
re2 = /^(.+?)([^s])s$/;
|
| 88 |
+
|
| 89 |
+
if (re.test(w))
|
| 90 |
+
w = w.replace(re,"$1$2");
|
| 91 |
+
else if (re2.test(w))
|
| 92 |
+
w = w.replace(re2,"$1$2");
|
| 93 |
+
|
| 94 |
+
// Step 1b
|
| 95 |
+
re = /^(.+?)eed$/;
|
| 96 |
+
re2 = /^(.+?)(ed|ing)$/;
|
| 97 |
+
if (re.test(w)) {
|
| 98 |
+
var fp = re.exec(w);
|
| 99 |
+
re = new RegExp(mgr0);
|
| 100 |
+
if (re.test(fp[1])) {
|
| 101 |
+
re = /.$/;
|
| 102 |
+
w = w.replace(re,"");
|
| 103 |
+
}
|
| 104 |
+
}
|
| 105 |
+
else if (re2.test(w)) {
|
| 106 |
+
var fp = re2.exec(w);
|
| 107 |
+
stem = fp[1];
|
| 108 |
+
re2 = new RegExp(s_v);
|
| 109 |
+
if (re2.test(stem)) {
|
| 110 |
+
w = stem;
|
| 111 |
+
re2 = /(at|bl|iz)$/;
|
| 112 |
+
re3 = new RegExp("([^aeiouylsz])\\1$");
|
| 113 |
+
re4 = new RegExp("^" + C + v + "[^aeiouwxy]$");
|
| 114 |
+
if (re2.test(w))
|
| 115 |
+
w = w + "e";
|
| 116 |
+
else if (re3.test(w)) {
|
| 117 |
+
re = /.$/;
|
| 118 |
+
w = w.replace(re,"");
|
| 119 |
+
}
|
| 120 |
+
else if (re4.test(w))
|
| 121 |
+
w = w + "e";
|
| 122 |
+
}
|
| 123 |
+
}
|
| 124 |
+
|
| 125 |
+
// Step 1c
|
| 126 |
+
re = /^(.+?)y$/;
|
| 127 |
+
if (re.test(w)) {
|
| 128 |
+
var fp = re.exec(w);
|
| 129 |
+
stem = fp[1];
|
| 130 |
+
re = new RegExp(s_v);
|
| 131 |
+
if (re.test(stem))
|
| 132 |
+
w = stem + "i";
|
| 133 |
+
}
|
| 134 |
+
|
| 135 |
+
// Step 2
|
| 136 |
+
re = /^(.+?)(ational|tional|enci|anci|izer|bli|alli|entli|eli|ousli|ization|ation|ator|alism|iveness|fulness|ousness|aliti|iviti|biliti|logi)$/;
|
| 137 |
+
if (re.test(w)) {
|
| 138 |
+
var fp = re.exec(w);
|
| 139 |
+
stem = fp[1];
|
| 140 |
+
suffix = fp[2];
|
| 141 |
+
re = new RegExp(mgr0);
|
| 142 |
+
if (re.test(stem))
|
| 143 |
+
w = stem + step2list[suffix];
|
| 144 |
+
}
|
| 145 |
+
|
| 146 |
+
// Step 3
|
| 147 |
+
re = /^(.+?)(icate|ative|alize|iciti|ical|ful|ness)$/;
|
| 148 |
+
if (re.test(w)) {
|
| 149 |
+
var fp = re.exec(w);
|
| 150 |
+
stem = fp[1];
|
| 151 |
+
suffix = fp[2];
|
| 152 |
+
re = new RegExp(mgr0);
|
| 153 |
+
if (re.test(stem))
|
| 154 |
+
w = stem + step3list[suffix];
|
| 155 |
+
}
|
| 156 |
+
|
| 157 |
+
// Step 4
|
| 158 |
+
re = /^(.+?)(al|ance|ence|er|ic|able|ible|ant|ement|ment|ent|ou|ism|ate|iti|ous|ive|ize)$/;
|
| 159 |
+
re2 = /^(.+?)(s|t)(ion)$/;
|
| 160 |
+
if (re.test(w)) {
|
| 161 |
+
var fp = re.exec(w);
|
| 162 |
+
stem = fp[1];
|
| 163 |
+
re = new RegExp(mgr1);
|
| 164 |
+
if (re.test(stem))
|
| 165 |
+
w = stem;
|
| 166 |
+
}
|
| 167 |
+
else if (re2.test(w)) {
|
| 168 |
+
var fp = re2.exec(w);
|
| 169 |
+
stem = fp[1] + fp[2];
|
| 170 |
+
re2 = new RegExp(mgr1);
|
| 171 |
+
if (re2.test(stem))
|
| 172 |
+
w = stem;
|
| 173 |
+
}
|
| 174 |
+
|
| 175 |
+
// Step 5
|
| 176 |
+
re = /^(.+?)e$/;
|
| 177 |
+
if (re.test(w)) {
|
| 178 |
+
var fp = re.exec(w);
|
| 179 |
+
stem = fp[1];
|
| 180 |
+
re = new RegExp(mgr1);
|
| 181 |
+
re2 = new RegExp(meq1);
|
| 182 |
+
re3 = new RegExp("^" + C + v + "[^aeiouwxy]$");
|
| 183 |
+
if (re.test(stem) || (re2.test(stem) && !(re3.test(stem))))
|
| 184 |
+
w = stem;
|
| 185 |
+
}
|
| 186 |
+
re = /ll$/;
|
| 187 |
+
re2 = new RegExp(mgr1);
|
| 188 |
+
if (re.test(w) && re2.test(w)) {
|
| 189 |
+
re = /.$/;
|
| 190 |
+
w = w.replace(re,"");
|
| 191 |
+
}
|
| 192 |
+
|
| 193 |
+
// and turn initial Y back to y
|
| 194 |
+
if (firstch == "y")
|
| 195 |
+
w = firstch.toLowerCase() + w.substr(1);
|
| 196 |
+
return w;
|
| 197 |
+
}
|
| 198 |
+
}
|
| 199 |
+
|
toolchain/cmake-3.27.9-linux-x86_64/doc/cmake/html/_static/pygments.css
ADDED
|
@@ -0,0 +1,53 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
pre { line-height: 125%; }
|
| 2 |
+
td.linenos .normal { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; }
|
| 3 |
+
span.linenos { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; }
|
| 4 |
+
td.linenos .special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; }
|
| 5 |
+
span.linenos.special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; }
|
| 6 |
+
.highlight .hll { background-color: #ffffcc }
|
| 7 |
+
.highlight { background: #f8f8f8; }
|
| 8 |
+
.highlight .c { color: #408080; font-style: italic } /* Comment */
|
| 9 |
+
.highlight .o { color: #555555 } /* Operator */
|
| 10 |
+
.highlight .ch { color: #408080; font-style: italic } /* Comment.Hashbang */
|
| 11 |
+
.highlight .cm { color: #408080; font-style: italic } /* Comment.Multiline */
|
| 12 |
+
.highlight .cp { color: #408080; font-style: italic } /* Comment.Preproc */
|
| 13 |
+
.highlight .cpf { color: #408080; font-style: italic } /* Comment.PreprocFile */
|
| 14 |
+
.highlight .c1 { color: #408080; font-style: italic } /* Comment.Single */
|
| 15 |
+
.highlight .cs { color: #408080; font-style: italic } /* Comment.Special */
|
| 16 |
+
.highlight .m { color: #105030 } /* Literal.Number */
|
| 17 |
+
.highlight .s { color: #217A21 } /* Literal.String */
|
| 18 |
+
.highlight .na { color: #906060 } /* Name.Attribute */
|
| 19 |
+
.highlight .nb { color: #333333 } /* Name.Builtin */
|
| 20 |
+
.highlight .no { color: #4070a0 } /* Name.Constant */
|
| 21 |
+
.highlight .ni { color: #70A020; font-style: italic } /* Name.Entity */
|
| 22 |
+
.highlight .ne { color: #FF0000; font-weight: bold } /* Name.Exception */
|
| 23 |
+
.highlight .nf { color: #007020 } /* Name.Function */
|
| 24 |
+
.highlight .nl { color: #A0A000 } /* Name.Label */
|
| 25 |
+
.highlight .nt { color: #bb60d5 } /* Name.Tag */
|
| 26 |
+
.highlight .nv { color: #1080B0 } /* Name.Variable */
|
| 27 |
+
.highlight .ow { color: #555555 } /* Operator.Word */
|
| 28 |
+
.highlight .w { color: #bbbbbb } /* Text.Whitespace */
|
| 29 |
+
.highlight .mb { color: #105030 } /* Literal.Number.Bin */
|
| 30 |
+
.highlight .mf { color: #105030 } /* Literal.Number.Float */
|
| 31 |
+
.highlight .mh { color: #105030 } /* Literal.Number.Hex */
|
| 32 |
+
.highlight .mi { color: #105030 } /* Literal.Number.Integer */
|
| 33 |
+
.highlight .mo { color: #105030 } /* Literal.Number.Oct */
|
| 34 |
+
.highlight .sa { color: #217A21 } /* Literal.String.Affix */
|
| 35 |
+
.highlight .sb { color: #217A21 } /* Literal.String.Backtick */
|
| 36 |
+
.highlight .sc { color: #217A21 } /* Literal.String.Char */
|
| 37 |
+
.highlight .dl { color: #217A21 } /* Literal.String.Delimiter */
|
| 38 |
+
.highlight .sd { color: #217A21 } /* Literal.String.Doc */
|
| 39 |
+
.highlight .s2 { color: #217A21 } /* Literal.String.Double */
|
| 40 |
+
.highlight .se { color: #217A21 } /* Literal.String.Escape */
|
| 41 |
+
.highlight .sh { color: #217A21 } /* Literal.String.Heredoc */
|
| 42 |
+
.highlight .si { color: #217A21 } /* Literal.String.Interpol */
|
| 43 |
+
.highlight .sx { color: #217A21 } /* Literal.String.Other */
|
| 44 |
+
.highlight .sr { color: #217A21 } /* Literal.String.Regex */
|
| 45 |
+
.highlight .s1 { color: #217A21 } /* Literal.String.Single */
|
| 46 |
+
.highlight .ss { color: #217A21 } /* Literal.String.Symbol */
|
| 47 |
+
.highlight .bp { color: #333333 } /* Name.Builtin.Pseudo */
|
| 48 |
+
.highlight .fm { color: #007020 } /* Name.Function.Magic */
|
| 49 |
+
.highlight .vc { color: #1080B0 } /* Name.Variable.Class */
|
| 50 |
+
.highlight .vg { color: #1080B0 } /* Name.Variable.Global */
|
| 51 |
+
.highlight .vi { color: #1080B0 } /* Name.Variable.Instance */
|
| 52 |
+
.highlight .vm { color: #1080B0 } /* Name.Variable.Magic */
|
| 53 |
+
.highlight .il { color: #105030 } /* Literal.Number.Integer.Long */
|
toolchain/cmake-3.27.9-linux-x86_64/doc/cmake/html/_static/searchtools.js
ADDED
|
@@ -0,0 +1,566 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/*
|
| 2 |
+
* searchtools.js
|
| 3 |
+
* ~~~~~~~~~~~~~~~~
|
| 4 |
+
*
|
| 5 |
+
* Sphinx JavaScript utilities for the full-text search.
|
| 6 |
+
*
|
| 7 |
+
* :copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS.
|
| 8 |
+
* :license: BSD, see LICENSE for details.
|
| 9 |
+
*
|
| 10 |
+
*/
|
| 11 |
+
"use strict";
|
| 12 |
+
|
| 13 |
+
/**
|
| 14 |
+
* Simple result scoring code.
|
| 15 |
+
*/
|
| 16 |
+
if (typeof Scorer === "undefined") {
|
| 17 |
+
var Scorer = {
|
| 18 |
+
// Implement the following function to further tweak the score for each result
|
| 19 |
+
// The function takes a result array [docname, title, anchor, descr, score, filename]
|
| 20 |
+
// and returns the new score.
|
| 21 |
+
/*
|
| 22 |
+
score: result => {
|
| 23 |
+
const [docname, title, anchor, descr, score, filename] = result
|
| 24 |
+
return score
|
| 25 |
+
},
|
| 26 |
+
*/
|
| 27 |
+
|
| 28 |
+
// query matches the full name of an object
|
| 29 |
+
objNameMatch: 11,
|
| 30 |
+
// or matches in the last dotted part of the object name
|
| 31 |
+
objPartialMatch: 6,
|
| 32 |
+
// Additive scores depending on the priority of the object
|
| 33 |
+
objPrio: {
|
| 34 |
+
0: 15, // used to be importantResults
|
| 35 |
+
1: 5, // used to be objectResults
|
| 36 |
+
2: -5, // used to be unimportantResults
|
| 37 |
+
},
|
| 38 |
+
// Used when the priority is not in the mapping.
|
| 39 |
+
objPrioDefault: 0,
|
| 40 |
+
|
| 41 |
+
// query found in title
|
| 42 |
+
title: 15,
|
| 43 |
+
partialTitle: 7,
|
| 44 |
+
// query found in terms
|
| 45 |
+
term: 5,
|
| 46 |
+
partialTerm: 2,
|
| 47 |
+
};
|
| 48 |
+
}
|
| 49 |
+
|
| 50 |
+
const _removeChildren = (element) => {
|
| 51 |
+
while (element && element.lastChild) element.removeChild(element.lastChild);
|
| 52 |
+
};
|
| 53 |
+
|
| 54 |
+
/**
|
| 55 |
+
* See https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions#escaping
|
| 56 |
+
*/
|
| 57 |
+
const _escapeRegExp = (string) =>
|
| 58 |
+
string.replace(/[.*+\-?^${}()|[\]\\]/g, "\\$&"); // $& means the whole matched string
|
| 59 |
+
|
| 60 |
+
const _displayItem = (item, searchTerms) => {
|
| 61 |
+
const docBuilder = DOCUMENTATION_OPTIONS.BUILDER;
|
| 62 |
+
const docUrlRoot = DOCUMENTATION_OPTIONS.URL_ROOT;
|
| 63 |
+
const docFileSuffix = DOCUMENTATION_OPTIONS.FILE_SUFFIX;
|
| 64 |
+
const docLinkSuffix = DOCUMENTATION_OPTIONS.LINK_SUFFIX;
|
| 65 |
+
const showSearchSummary = DOCUMENTATION_OPTIONS.SHOW_SEARCH_SUMMARY;
|
| 66 |
+
|
| 67 |
+
const [docName, title, anchor, descr, score, _filename] = item;
|
| 68 |
+
|
| 69 |
+
let listItem = document.createElement("li");
|
| 70 |
+
let requestUrl;
|
| 71 |
+
let linkUrl;
|
| 72 |
+
if (docBuilder === "dirhtml") {
|
| 73 |
+
// dirhtml builder
|
| 74 |
+
let dirname = docName + "/";
|
| 75 |
+
if (dirname.match(/\/index\/$/))
|
| 76 |
+
dirname = dirname.substring(0, dirname.length - 6);
|
| 77 |
+
else if (dirname === "index/") dirname = "";
|
| 78 |
+
requestUrl = docUrlRoot + dirname;
|
| 79 |
+
linkUrl = requestUrl;
|
| 80 |
+
} else {
|
| 81 |
+
// normal html builders
|
| 82 |
+
requestUrl = docUrlRoot + docName + docFileSuffix;
|
| 83 |
+
linkUrl = docName + docLinkSuffix;
|
| 84 |
+
}
|
| 85 |
+
let linkEl = listItem.appendChild(document.createElement("a"));
|
| 86 |
+
linkEl.href = linkUrl + anchor;
|
| 87 |
+
linkEl.dataset.score = score;
|
| 88 |
+
linkEl.innerHTML = title;
|
| 89 |
+
if (descr)
|
| 90 |
+
listItem.appendChild(document.createElement("span")).innerHTML =
|
| 91 |
+
" (" + descr + ")";
|
| 92 |
+
else if (showSearchSummary)
|
| 93 |
+
fetch(requestUrl)
|
| 94 |
+
.then((responseData) => responseData.text())
|
| 95 |
+
.then((data) => {
|
| 96 |
+
if (data)
|
| 97 |
+
listItem.appendChild(
|
| 98 |
+
Search.makeSearchSummary(data, searchTerms)
|
| 99 |
+
);
|
| 100 |
+
});
|
| 101 |
+
Search.output.appendChild(listItem);
|
| 102 |
+
};
|
| 103 |
+
const _finishSearch = (resultCount) => {
|
| 104 |
+
Search.stopPulse();
|
| 105 |
+
Search.title.innerText = _("Search Results");
|
| 106 |
+
if (!resultCount)
|
| 107 |
+
Search.status.innerText = Documentation.gettext(
|
| 108 |
+
"Your search did not match any documents. Please make sure that all words are spelled correctly and that you've selected enough categories."
|
| 109 |
+
);
|
| 110 |
+
else
|
| 111 |
+
Search.status.innerText = _(
|
| 112 |
+
`Search finished, found ${resultCount} page(s) matching the search query.`
|
| 113 |
+
);
|
| 114 |
+
};
|
| 115 |
+
const _displayNextItem = (
|
| 116 |
+
results,
|
| 117 |
+
resultCount,
|
| 118 |
+
searchTerms
|
| 119 |
+
) => {
|
| 120 |
+
// results left, load the summary and display it
|
| 121 |
+
// this is intended to be dynamic (don't sub resultsCount)
|
| 122 |
+
if (results.length) {
|
| 123 |
+
_displayItem(results.pop(), searchTerms);
|
| 124 |
+
setTimeout(
|
| 125 |
+
() => _displayNextItem(results, resultCount, searchTerms),
|
| 126 |
+
5
|
| 127 |
+
);
|
| 128 |
+
}
|
| 129 |
+
// search finished, update title and status message
|
| 130 |
+
else _finishSearch(resultCount);
|
| 131 |
+
};
|
| 132 |
+
|
| 133 |
+
/**
|
| 134 |
+
* Default splitQuery function. Can be overridden in ``sphinx.search`` with a
|
| 135 |
+
* custom function per language.
|
| 136 |
+
*
|
| 137 |
+
* The regular expression works by splitting the string on consecutive characters
|
| 138 |
+
* that are not Unicode letters, numbers, underscores, or emoji characters.
|
| 139 |
+
* This is the same as ``\W+`` in Python, preserving the surrogate pair area.
|
| 140 |
+
*/
|
| 141 |
+
if (typeof splitQuery === "undefined") {
|
| 142 |
+
var splitQuery = (query) => query
|
| 143 |
+
.split(/[^\p{Letter}\p{Number}_\p{Emoji_Presentation}]+/gu)
|
| 144 |
+
.filter(term => term) // remove remaining empty strings
|
| 145 |
+
}
|
| 146 |
+
|
| 147 |
+
/**
|
| 148 |
+
* Search Module
|
| 149 |
+
*/
|
| 150 |
+
const Search = {
|
| 151 |
+
_index: null,
|
| 152 |
+
_queued_query: null,
|
| 153 |
+
_pulse_status: -1,
|
| 154 |
+
|
| 155 |
+
htmlToText: (htmlString) => {
|
| 156 |
+
const htmlElement = new DOMParser().parseFromString(htmlString, 'text/html');
|
| 157 |
+
htmlElement.querySelectorAll(".headerlink").forEach((el) => { el.remove() });
|
| 158 |
+
const docContent = htmlElement.querySelector('[role="main"]');
|
| 159 |
+
if (docContent !== undefined) return docContent.textContent;
|
| 160 |
+
console.warn(
|
| 161 |
+
"Content block not found. Sphinx search tries to obtain it via '[role=main]'. Could you check your theme or template."
|
| 162 |
+
);
|
| 163 |
+
return "";
|
| 164 |
+
},
|
| 165 |
+
|
| 166 |
+
init: () => {
|
| 167 |
+
const query = new URLSearchParams(window.location.search).get("q");
|
| 168 |
+
document
|
| 169 |
+
.querySelectorAll('input[name="q"]')
|
| 170 |
+
.forEach((el) => (el.value = query));
|
| 171 |
+
if (query) Search.performSearch(query);
|
| 172 |
+
},
|
| 173 |
+
|
| 174 |
+
loadIndex: (url) =>
|
| 175 |
+
(document.body.appendChild(document.createElement("script")).src = url),
|
| 176 |
+
|
| 177 |
+
setIndex: (index) => {
|
| 178 |
+
Search._index = index;
|
| 179 |
+
if (Search._queued_query !== null) {
|
| 180 |
+
const query = Search._queued_query;
|
| 181 |
+
Search._queued_query = null;
|
| 182 |
+
Search.query(query);
|
| 183 |
+
}
|
| 184 |
+
},
|
| 185 |
+
|
| 186 |
+
hasIndex: () => Search._index !== null,
|
| 187 |
+
|
| 188 |
+
deferQuery: (query) => (Search._queued_query = query),
|
| 189 |
+
|
| 190 |
+
stopPulse: () => (Search._pulse_status = -1),
|
| 191 |
+
|
| 192 |
+
startPulse: () => {
|
| 193 |
+
if (Search._pulse_status >= 0) return;
|
| 194 |
+
|
| 195 |
+
const pulse = () => {
|
| 196 |
+
Search._pulse_status = (Search._pulse_status + 1) % 4;
|
| 197 |
+
Search.dots.innerText = ".".repeat(Search._pulse_status);
|
| 198 |
+
if (Search._pulse_status >= 0) window.setTimeout(pulse, 500);
|
| 199 |
+
};
|
| 200 |
+
pulse();
|
| 201 |
+
},
|
| 202 |
+
|
| 203 |
+
/**
|
| 204 |
+
* perform a search for something (or wait until index is loaded)
|
| 205 |
+
*/
|
| 206 |
+
performSearch: (query) => {
|
| 207 |
+
// create the required interface elements
|
| 208 |
+
const searchText = document.createElement("h2");
|
| 209 |
+
searchText.textContent = _("Searching");
|
| 210 |
+
const searchSummary = document.createElement("p");
|
| 211 |
+
searchSummary.classList.add("search-summary");
|
| 212 |
+
searchSummary.innerText = "";
|
| 213 |
+
const searchList = document.createElement("ul");
|
| 214 |
+
searchList.classList.add("search");
|
| 215 |
+
|
| 216 |
+
const out = document.getElementById("search-results");
|
| 217 |
+
Search.title = out.appendChild(searchText);
|
| 218 |
+
Search.dots = Search.title.appendChild(document.createElement("span"));
|
| 219 |
+
Search.status = out.appendChild(searchSummary);
|
| 220 |
+
Search.output = out.appendChild(searchList);
|
| 221 |
+
|
| 222 |
+
const searchProgress = document.getElementById("search-progress");
|
| 223 |
+
// Some themes don't use the search progress node
|
| 224 |
+
if (searchProgress) {
|
| 225 |
+
searchProgress.innerText = _("Preparing search...");
|
| 226 |
+
}
|
| 227 |
+
Search.startPulse();
|
| 228 |
+
|
| 229 |
+
// index already loaded, the browser was quick!
|
| 230 |
+
if (Search.hasIndex()) Search.query(query);
|
| 231 |
+
else Search.deferQuery(query);
|
| 232 |
+
},
|
| 233 |
+
|
| 234 |
+
/**
|
| 235 |
+
* execute search (requires search index to be loaded)
|
| 236 |
+
*/
|
| 237 |
+
query: (query) => {
|
| 238 |
+
const filenames = Search._index.filenames;
|
| 239 |
+
const docNames = Search._index.docnames;
|
| 240 |
+
const titles = Search._index.titles;
|
| 241 |
+
const allTitles = Search._index.alltitles;
|
| 242 |
+
const indexEntries = Search._index.indexentries;
|
| 243 |
+
|
| 244 |
+
// stem the search terms and add them to the correct list
|
| 245 |
+
const stemmer = new Stemmer();
|
| 246 |
+
const searchTerms = new Set();
|
| 247 |
+
const excludedTerms = new Set();
|
| 248 |
+
const highlightTerms = new Set();
|
| 249 |
+
const objectTerms = new Set(splitQuery(query.toLowerCase().trim()));
|
| 250 |
+
splitQuery(query.trim()).forEach((queryTerm) => {
|
| 251 |
+
const queryTermLower = queryTerm.toLowerCase();
|
| 252 |
+
|
| 253 |
+
// maybe skip this "word"
|
| 254 |
+
// stopwords array is from language_data.js
|
| 255 |
+
if (
|
| 256 |
+
stopwords.indexOf(queryTermLower) !== -1 ||
|
| 257 |
+
queryTerm.match(/^\d+$/)
|
| 258 |
+
)
|
| 259 |
+
return;
|
| 260 |
+
|
| 261 |
+
// stem the word
|
| 262 |
+
let word = stemmer.stemWord(queryTermLower);
|
| 263 |
+
// select the correct list
|
| 264 |
+
if (word[0] === "-") excludedTerms.add(word.substr(1));
|
| 265 |
+
else {
|
| 266 |
+
searchTerms.add(word);
|
| 267 |
+
highlightTerms.add(queryTermLower);
|
| 268 |
+
}
|
| 269 |
+
});
|
| 270 |
+
|
| 271 |
+
if (SPHINX_HIGHLIGHT_ENABLED) { // set in sphinx_highlight.js
|
| 272 |
+
localStorage.setItem("sphinx_highlight_terms", [...highlightTerms].join(" "))
|
| 273 |
+
}
|
| 274 |
+
|
| 275 |
+
// console.debug("SEARCH: searching for:");
|
| 276 |
+
// console.info("required: ", [...searchTerms]);
|
| 277 |
+
// console.info("excluded: ", [...excludedTerms]);
|
| 278 |
+
|
| 279 |
+
// array of [docname, title, anchor, descr, score, filename]
|
| 280 |
+
let results = [];
|
| 281 |
+
_removeChildren(document.getElementById("search-progress"));
|
| 282 |
+
|
| 283 |
+
const queryLower = query.toLowerCase();
|
| 284 |
+
for (const [title, foundTitles] of Object.entries(allTitles)) {
|
| 285 |
+
if (title.toLowerCase().includes(queryLower) && (queryLower.length >= title.length/2)) {
|
| 286 |
+
for (const [file, id] of foundTitles) {
|
| 287 |
+
let score = Math.round(100 * queryLower.length / title.length)
|
| 288 |
+
results.push([
|
| 289 |
+
docNames[file],
|
| 290 |
+
titles[file] !== title ? `${titles[file]} > ${title}` : title,
|
| 291 |
+
id !== null ? "#" + id : "",
|
| 292 |
+
null,
|
| 293 |
+
score,
|
| 294 |
+
filenames[file],
|
| 295 |
+
]);
|
| 296 |
+
}
|
| 297 |
+
}
|
| 298 |
+
}
|
| 299 |
+
|
| 300 |
+
// search for explicit entries in index directives
|
| 301 |
+
for (const [entry, foundEntries] of Object.entries(indexEntries)) {
|
| 302 |
+
if (entry.includes(queryLower) && (queryLower.length >= entry.length/2)) {
|
| 303 |
+
for (const [file, id] of foundEntries) {
|
| 304 |
+
let score = Math.round(100 * queryLower.length / entry.length)
|
| 305 |
+
results.push([
|
| 306 |
+
docNames[file],
|
| 307 |
+
titles[file],
|
| 308 |
+
id ? "#" + id : "",
|
| 309 |
+
null,
|
| 310 |
+
score,
|
| 311 |
+
filenames[file],
|
| 312 |
+
]);
|
| 313 |
+
}
|
| 314 |
+
}
|
| 315 |
+
}
|
| 316 |
+
|
| 317 |
+
// lookup as object
|
| 318 |
+
objectTerms.forEach((term) =>
|
| 319 |
+
results.push(...Search.performObjectSearch(term, objectTerms))
|
| 320 |
+
);
|
| 321 |
+
|
| 322 |
+
// lookup as search terms in fulltext
|
| 323 |
+
results.push(...Search.performTermsSearch(searchTerms, excludedTerms));
|
| 324 |
+
|
| 325 |
+
// let the scorer override scores with a custom scoring function
|
| 326 |
+
if (Scorer.score) results.forEach((item) => (item[4] = Scorer.score(item)));
|
| 327 |
+
|
| 328 |
+
// now sort the results by score (in opposite order of appearance, since the
|
| 329 |
+
// display function below uses pop() to retrieve items) and then
|
| 330 |
+
// alphabetically
|
| 331 |
+
results.sort((a, b) => {
|
| 332 |
+
const leftScore = a[4];
|
| 333 |
+
const rightScore = b[4];
|
| 334 |
+
if (leftScore === rightScore) {
|
| 335 |
+
// same score: sort alphabetically
|
| 336 |
+
const leftTitle = a[1].toLowerCase();
|
| 337 |
+
const rightTitle = b[1].toLowerCase();
|
| 338 |
+
if (leftTitle === rightTitle) return 0;
|
| 339 |
+
return leftTitle > rightTitle ? -1 : 1; // inverted is intentional
|
| 340 |
+
}
|
| 341 |
+
return leftScore > rightScore ? 1 : -1;
|
| 342 |
+
});
|
| 343 |
+
|
| 344 |
+
// remove duplicate search results
|
| 345 |
+
// note the reversing of results, so that in the case of duplicates, the highest-scoring entry is kept
|
| 346 |
+
let seen = new Set();
|
| 347 |
+
results = results.reverse().reduce((acc, result) => {
|
| 348 |
+
let resultStr = result.slice(0, 4).concat([result[5]]).map(v => String(v)).join(',');
|
| 349 |
+
if (!seen.has(resultStr)) {
|
| 350 |
+
acc.push(result);
|
| 351 |
+
seen.add(resultStr);
|
| 352 |
+
}
|
| 353 |
+
return acc;
|
| 354 |
+
}, []);
|
| 355 |
+
|
| 356 |
+
results = results.reverse();
|
| 357 |
+
|
| 358 |
+
// for debugging
|
| 359 |
+
//Search.lastresults = results.slice(); // a copy
|
| 360 |
+
// console.info("search results:", Search.lastresults);
|
| 361 |
+
|
| 362 |
+
// print the results
|
| 363 |
+
_displayNextItem(results, results.length, searchTerms);
|
| 364 |
+
},
|
| 365 |
+
|
| 366 |
+
/**
|
| 367 |
+
* search for object names
|
| 368 |
+
*/
|
| 369 |
+
performObjectSearch: (object, objectTerms) => {
|
| 370 |
+
const filenames = Search._index.filenames;
|
| 371 |
+
const docNames = Search._index.docnames;
|
| 372 |
+
const objects = Search._index.objects;
|
| 373 |
+
const objNames = Search._index.objnames;
|
| 374 |
+
const titles = Search._index.titles;
|
| 375 |
+
|
| 376 |
+
const results = [];
|
| 377 |
+
|
| 378 |
+
const objectSearchCallback = (prefix, match) => {
|
| 379 |
+
const name = match[4]
|
| 380 |
+
const fullname = (prefix ? prefix + "." : "") + name;
|
| 381 |
+
const fullnameLower = fullname.toLowerCase();
|
| 382 |
+
if (fullnameLower.indexOf(object) < 0) return;
|
| 383 |
+
|
| 384 |
+
let score = 0;
|
| 385 |
+
const parts = fullnameLower.split(".");
|
| 386 |
+
|
| 387 |
+
// check for different match types: exact matches of full name or
|
| 388 |
+
// "last name" (i.e. last dotted part)
|
| 389 |
+
if (fullnameLower === object || parts.slice(-1)[0] === object)
|
| 390 |
+
score += Scorer.objNameMatch;
|
| 391 |
+
else if (parts.slice(-1)[0].indexOf(object) > -1)
|
| 392 |
+
score += Scorer.objPartialMatch; // matches in last name
|
| 393 |
+
|
| 394 |
+
const objName = objNames[match[1]][2];
|
| 395 |
+
const title = titles[match[0]];
|
| 396 |
+
|
| 397 |
+
// If more than one term searched for, we require other words to be
|
| 398 |
+
// found in the name/title/description
|
| 399 |
+
const otherTerms = new Set(objectTerms);
|
| 400 |
+
otherTerms.delete(object);
|
| 401 |
+
if (otherTerms.size > 0) {
|
| 402 |
+
const haystack = `${prefix} ${name} ${objName} ${title}`.toLowerCase();
|
| 403 |
+
if (
|
| 404 |
+
[...otherTerms].some((otherTerm) => haystack.indexOf(otherTerm) < 0)
|
| 405 |
+
)
|
| 406 |
+
return;
|
| 407 |
+
}
|
| 408 |
+
|
| 409 |
+
let anchor = match[3];
|
| 410 |
+
if (anchor === "") anchor = fullname;
|
| 411 |
+
else if (anchor === "-") anchor = objNames[match[1]][1] + "-" + fullname;
|
| 412 |
+
|
| 413 |
+
const descr = objName + _(", in ") + title;
|
| 414 |
+
|
| 415 |
+
// add custom score for some objects according to scorer
|
| 416 |
+
if (Scorer.objPrio.hasOwnProperty(match[2]))
|
| 417 |
+
score += Scorer.objPrio[match[2]];
|
| 418 |
+
else score += Scorer.objPrioDefault;
|
| 419 |
+
|
| 420 |
+
results.push([
|
| 421 |
+
docNames[match[0]],
|
| 422 |
+
fullname,
|
| 423 |
+
"#" + anchor,
|
| 424 |
+
descr,
|
| 425 |
+
score,
|
| 426 |
+
filenames[match[0]],
|
| 427 |
+
]);
|
| 428 |
+
};
|
| 429 |
+
Object.keys(objects).forEach((prefix) =>
|
| 430 |
+
objects[prefix].forEach((array) =>
|
| 431 |
+
objectSearchCallback(prefix, array)
|
| 432 |
+
)
|
| 433 |
+
);
|
| 434 |
+
return results;
|
| 435 |
+
},
|
| 436 |
+
|
| 437 |
+
/**
|
| 438 |
+
* search for full-text terms in the index
|
| 439 |
+
*/
|
| 440 |
+
performTermsSearch: (searchTerms, excludedTerms) => {
|
| 441 |
+
// prepare search
|
| 442 |
+
const terms = Search._index.terms;
|
| 443 |
+
const titleTerms = Search._index.titleterms;
|
| 444 |
+
const filenames = Search._index.filenames;
|
| 445 |
+
const docNames = Search._index.docnames;
|
| 446 |
+
const titles = Search._index.titles;
|
| 447 |
+
|
| 448 |
+
const scoreMap = new Map();
|
| 449 |
+
const fileMap = new Map();
|
| 450 |
+
|
| 451 |
+
// perform the search on the required terms
|
| 452 |
+
searchTerms.forEach((word) => {
|
| 453 |
+
const files = [];
|
| 454 |
+
const arr = [
|
| 455 |
+
{ files: terms[word], score: Scorer.term },
|
| 456 |
+
{ files: titleTerms[word], score: Scorer.title },
|
| 457 |
+
];
|
| 458 |
+
// add support for partial matches
|
| 459 |
+
if (word.length > 2) {
|
| 460 |
+
const escapedWord = _escapeRegExp(word);
|
| 461 |
+
Object.keys(terms).forEach((term) => {
|
| 462 |
+
if (term.match(escapedWord) && !terms[word])
|
| 463 |
+
arr.push({ files: terms[term], score: Scorer.partialTerm });
|
| 464 |
+
});
|
| 465 |
+
Object.keys(titleTerms).forEach((term) => {
|
| 466 |
+
if (term.match(escapedWord) && !titleTerms[word])
|
| 467 |
+
arr.push({ files: titleTerms[word], score: Scorer.partialTitle });
|
| 468 |
+
});
|
| 469 |
+
}
|
| 470 |
+
|
| 471 |
+
// no match but word was a required one
|
| 472 |
+
if (arr.every((record) => record.files === undefined)) return;
|
| 473 |
+
|
| 474 |
+
// found search word in contents
|
| 475 |
+
arr.forEach((record) => {
|
| 476 |
+
if (record.files === undefined) return;
|
| 477 |
+
|
| 478 |
+
let recordFiles = record.files;
|
| 479 |
+
if (recordFiles.length === undefined) recordFiles = [recordFiles];
|
| 480 |
+
files.push(...recordFiles);
|
| 481 |
+
|
| 482 |
+
// set score for the word in each file
|
| 483 |
+
recordFiles.forEach((file) => {
|
| 484 |
+
if (!scoreMap.has(file)) scoreMap.set(file, {});
|
| 485 |
+
scoreMap.get(file)[word] = record.score;
|
| 486 |
+
});
|
| 487 |
+
});
|
| 488 |
+
|
| 489 |
+
// create the mapping
|
| 490 |
+
files.forEach((file) => {
|
| 491 |
+
if (fileMap.has(file) && fileMap.get(file).indexOf(word) === -1)
|
| 492 |
+
fileMap.get(file).push(word);
|
| 493 |
+
else fileMap.set(file, [word]);
|
| 494 |
+
});
|
| 495 |
+
});
|
| 496 |
+
|
| 497 |
+
// now check if the files don't contain excluded terms
|
| 498 |
+
const results = [];
|
| 499 |
+
for (const [file, wordList] of fileMap) {
|
| 500 |
+
// check if all requirements are matched
|
| 501 |
+
|
| 502 |
+
// as search terms with length < 3 are discarded
|
| 503 |
+
const filteredTermCount = [...searchTerms].filter(
|
| 504 |
+
(term) => term.length > 2
|
| 505 |
+
).length;
|
| 506 |
+
if (
|
| 507 |
+
wordList.length !== searchTerms.size &&
|
| 508 |
+
wordList.length !== filteredTermCount
|
| 509 |
+
)
|
| 510 |
+
continue;
|
| 511 |
+
|
| 512 |
+
// ensure that none of the excluded terms is in the search result
|
| 513 |
+
if (
|
| 514 |
+
[...excludedTerms].some(
|
| 515 |
+
(term) =>
|
| 516 |
+
terms[term] === file ||
|
| 517 |
+
titleTerms[term] === file ||
|
| 518 |
+
(terms[term] || []).includes(file) ||
|
| 519 |
+
(titleTerms[term] || []).includes(file)
|
| 520 |
+
)
|
| 521 |
+
)
|
| 522 |
+
break;
|
| 523 |
+
|
| 524 |
+
// select one (max) score for the file.
|
| 525 |
+
const score = Math.max(...wordList.map((w) => scoreMap.get(file)[w]));
|
| 526 |
+
// add result to the result list
|
| 527 |
+
results.push([
|
| 528 |
+
docNames[file],
|
| 529 |
+
titles[file],
|
| 530 |
+
"",
|
| 531 |
+
null,
|
| 532 |
+
score,
|
| 533 |
+
filenames[file],
|
| 534 |
+
]);
|
| 535 |
+
}
|
| 536 |
+
return results;
|
| 537 |
+
},
|
| 538 |
+
|
| 539 |
+
/**
|
| 540 |
+
* helper function to return a node containing the
|
| 541 |
+
* search summary for a given text. keywords is a list
|
| 542 |
+
* of stemmed words.
|
| 543 |
+
*/
|
| 544 |
+
makeSearchSummary: (htmlText, keywords) => {
|
| 545 |
+
const text = Search.htmlToText(htmlText);
|
| 546 |
+
if (text === "") return null;
|
| 547 |
+
|
| 548 |
+
const textLower = text.toLowerCase();
|
| 549 |
+
const actualStartPosition = [...keywords]
|
| 550 |
+
.map((k) => textLower.indexOf(k.toLowerCase()))
|
| 551 |
+
.filter((i) => i > -1)
|
| 552 |
+
.slice(-1)[0];
|
| 553 |
+
const startWithContext = Math.max(actualStartPosition - 120, 0);
|
| 554 |
+
|
| 555 |
+
const top = startWithContext === 0 ? "" : "...";
|
| 556 |
+
const tail = startWithContext + 240 < text.length ? "..." : "";
|
| 557 |
+
|
| 558 |
+
let summary = document.createElement("p");
|
| 559 |
+
summary.classList.add("context");
|
| 560 |
+
summary.textContent = top + text.substr(startWithContext, 240).trim() + tail;
|
| 561 |
+
|
| 562 |
+
return summary;
|
| 563 |
+
},
|
| 564 |
+
};
|
| 565 |
+
|
| 566 |
+
_ready(Search.init);
|
toolchain/cmake-3.27.9-linux-x86_64/doc/cmake/html/_static/sidebar.js
ADDED
|
@@ -0,0 +1,70 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/*
|
| 2 |
+
* sidebar.js
|
| 3 |
+
* ~~~~~~~~~~
|
| 4 |
+
*
|
| 5 |
+
* This script makes the Sphinx sidebar collapsible.
|
| 6 |
+
*
|
| 7 |
+
* .sphinxsidebar contains .sphinxsidebarwrapper. This script adds
|
| 8 |
+
* in .sphixsidebar, after .sphinxsidebarwrapper, the #sidebarbutton
|
| 9 |
+
* used to collapse and expand the sidebar.
|
| 10 |
+
*
|
| 11 |
+
* When the sidebar is collapsed the .sphinxsidebarwrapper is hidden
|
| 12 |
+
* and the width of the sidebar and the margin-left of the document
|
| 13 |
+
* are decreased. When the sidebar is expanded the opposite happens.
|
| 14 |
+
* This script saves a per-browser/per-session cookie used to
|
| 15 |
+
* remember the position of the sidebar among the pages.
|
| 16 |
+
* Once the browser is closed the cookie is deleted and the position
|
| 17 |
+
* reset to the default (expanded).
|
| 18 |
+
*
|
| 19 |
+
* :copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS.
|
| 20 |
+
* :license: BSD, see LICENSE for details.
|
| 21 |
+
*
|
| 22 |
+
*/
|
| 23 |
+
|
| 24 |
+
const initialiseSidebar = () => {
|
| 25 |
+
|
| 26 |
+
|
| 27 |
+
|
| 28 |
+
|
| 29 |
+
// global elements used by the functions.
|
| 30 |
+
const bodyWrapper = document.getElementsByClassName("bodywrapper")[0]
|
| 31 |
+
const sidebar = document.getElementsByClassName("sphinxsidebar")[0]
|
| 32 |
+
const sidebarWrapper = document.getElementsByClassName('sphinxsidebarwrapper')[0]
|
| 33 |
+
const sidebarButton = document.getElementById("sidebarbutton")
|
| 34 |
+
const sidebarArrow = sidebarButton.querySelector('span')
|
| 35 |
+
|
| 36 |
+
// for some reason, the document has no sidebar; do not run into errors
|
| 37 |
+
if (typeof sidebar === "undefined") return;
|
| 38 |
+
|
| 39 |
+
const flipArrow = element => element.innerText = (element.innerText === "»") ? "«" : "»"
|
| 40 |
+
|
| 41 |
+
const collapse_sidebar = () => {
|
| 42 |
+
bodyWrapper.style.marginLeft = ".8em";
|
| 43 |
+
sidebar.style.width = ".8em"
|
| 44 |
+
sidebarWrapper.style.display = "none"
|
| 45 |
+
flipArrow(sidebarArrow)
|
| 46 |
+
sidebarButton.title = _('Expand sidebar')
|
| 47 |
+
window.localStorage.setItem("sidebar", "collapsed")
|
| 48 |
+
}
|
| 49 |
+
|
| 50 |
+
const expand_sidebar = () => {
|
| 51 |
+
bodyWrapper.style.marginLeft = ""
|
| 52 |
+
sidebar.style.removeProperty("width")
|
| 53 |
+
sidebarWrapper.style.display = ""
|
| 54 |
+
flipArrow(sidebarArrow)
|
| 55 |
+
sidebarButton.title = _('Collapse sidebar')
|
| 56 |
+
window.localStorage.setItem("sidebar", "expanded")
|
| 57 |
+
}
|
| 58 |
+
|
| 59 |
+
sidebarButton.addEventListener("click", () => {
|
| 60 |
+
(sidebarWrapper.style.display === "none") ? expand_sidebar() : collapse_sidebar()
|
| 61 |
+
})
|
| 62 |
+
|
| 63 |
+
if (!window.localStorage.getItem("sidebar")) return
|
| 64 |
+
const value = window.localStorage.getItem("sidebar")
|
| 65 |
+
if (value === "collapsed") collapse_sidebar();
|
| 66 |
+
else if (value === "expanded") expand_sidebar();
|
| 67 |
+
}
|
| 68 |
+
|
| 69 |
+
if (document.readyState !== "loading") initialiseSidebar()
|
| 70 |
+
else document.addEventListener("DOMContentLoaded", initialiseSidebar)
|
toolchain/cmake-3.27.9-linux-x86_64/doc/cmake/html/_static/sphinx_highlight.js
ADDED
|
@@ -0,0 +1,144 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/* Highlighting utilities for Sphinx HTML documentation. */
|
| 2 |
+
"use strict";
|
| 3 |
+
|
| 4 |
+
const SPHINX_HIGHLIGHT_ENABLED = true
|
| 5 |
+
|
| 6 |
+
/**
|
| 7 |
+
* highlight a given string on a node by wrapping it in
|
| 8 |
+
* span elements with the given class name.
|
| 9 |
+
*/
|
| 10 |
+
const _highlight = (node, addItems, text, className) => {
|
| 11 |
+
if (node.nodeType === Node.TEXT_NODE) {
|
| 12 |
+
const val = node.nodeValue;
|
| 13 |
+
const parent = node.parentNode;
|
| 14 |
+
const pos = val.toLowerCase().indexOf(text);
|
| 15 |
+
if (
|
| 16 |
+
pos >= 0 &&
|
| 17 |
+
!parent.classList.contains(className) &&
|
| 18 |
+
!parent.classList.contains("nohighlight")
|
| 19 |
+
) {
|
| 20 |
+
let span;
|
| 21 |
+
|
| 22 |
+
const closestNode = parent.closest("body, svg, foreignObject");
|
| 23 |
+
const isInSVG = closestNode && closestNode.matches("svg");
|
| 24 |
+
if (isInSVG) {
|
| 25 |
+
span = document.createElementNS("http://www.w3.org/2000/svg", "tspan");
|
| 26 |
+
} else {
|
| 27 |
+
span = document.createElement("span");
|
| 28 |
+
span.classList.add(className);
|
| 29 |
+
}
|
| 30 |
+
|
| 31 |
+
span.appendChild(document.createTextNode(val.substr(pos, text.length)));
|
| 32 |
+
parent.insertBefore(
|
| 33 |
+
span,
|
| 34 |
+
parent.insertBefore(
|
| 35 |
+
document.createTextNode(val.substr(pos + text.length)),
|
| 36 |
+
node.nextSibling
|
| 37 |
+
)
|
| 38 |
+
);
|
| 39 |
+
node.nodeValue = val.substr(0, pos);
|
| 40 |
+
|
| 41 |
+
if (isInSVG) {
|
| 42 |
+
const rect = document.createElementNS(
|
| 43 |
+
"http://www.w3.org/2000/svg",
|
| 44 |
+
"rect"
|
| 45 |
+
);
|
| 46 |
+
const bbox = parent.getBBox();
|
| 47 |
+
rect.x.baseVal.value = bbox.x;
|
| 48 |
+
rect.y.baseVal.value = bbox.y;
|
| 49 |
+
rect.width.baseVal.value = bbox.width;
|
| 50 |
+
rect.height.baseVal.value = bbox.height;
|
| 51 |
+
rect.setAttribute("class", className);
|
| 52 |
+
addItems.push({ parent: parent, target: rect });
|
| 53 |
+
}
|
| 54 |
+
}
|
| 55 |
+
} else if (node.matches && !node.matches("button, select, textarea")) {
|
| 56 |
+
node.childNodes.forEach((el) => _highlight(el, addItems, text, className));
|
| 57 |
+
}
|
| 58 |
+
};
|
| 59 |
+
const _highlightText = (thisNode, text, className) => {
|
| 60 |
+
let addItems = [];
|
| 61 |
+
_highlight(thisNode, addItems, text, className);
|
| 62 |
+
addItems.forEach((obj) =>
|
| 63 |
+
obj.parent.insertAdjacentElement("beforebegin", obj.target)
|
| 64 |
+
);
|
| 65 |
+
};
|
| 66 |
+
|
| 67 |
+
/**
|
| 68 |
+
* Small JavaScript module for the documentation.
|
| 69 |
+
*/
|
| 70 |
+
const SphinxHighlight = {
|
| 71 |
+
|
| 72 |
+
/**
|
| 73 |
+
* highlight the search words provided in localstorage in the text
|
| 74 |
+
*/
|
| 75 |
+
highlightSearchWords: () => {
|
| 76 |
+
if (!SPHINX_HIGHLIGHT_ENABLED) return; // bail if no highlight
|
| 77 |
+
|
| 78 |
+
// get and clear terms from localstorage
|
| 79 |
+
const url = new URL(window.location);
|
| 80 |
+
const highlight =
|
| 81 |
+
localStorage.getItem("sphinx_highlight_terms")
|
| 82 |
+
|| url.searchParams.get("highlight")
|
| 83 |
+
|| "";
|
| 84 |
+
localStorage.removeItem("sphinx_highlight_terms")
|
| 85 |
+
url.searchParams.delete("highlight");
|
| 86 |
+
window.history.replaceState({}, "", url);
|
| 87 |
+
|
| 88 |
+
// get individual terms from highlight string
|
| 89 |
+
const terms = highlight.toLowerCase().split(/\s+/).filter(x => x);
|
| 90 |
+
if (terms.length === 0) return; // nothing to do
|
| 91 |
+
|
| 92 |
+
// There should never be more than one element matching "div.body"
|
| 93 |
+
const divBody = document.querySelectorAll("div.body");
|
| 94 |
+
const body = divBody.length ? divBody[0] : document.querySelector("body");
|
| 95 |
+
window.setTimeout(() => {
|
| 96 |
+
terms.forEach((term) => _highlightText(body, term, "highlighted"));
|
| 97 |
+
}, 10);
|
| 98 |
+
|
| 99 |
+
const searchBox = document.getElementById("searchbox");
|
| 100 |
+
if (searchBox === null) return;
|
| 101 |
+
searchBox.appendChild(
|
| 102 |
+
document
|
| 103 |
+
.createRange()
|
| 104 |
+
.createContextualFragment(
|
| 105 |
+
'<p class="highlight-link">' +
|
| 106 |
+
'<a href="javascript:SphinxHighlight.hideSearchWords()">' +
|
| 107 |
+
_("Hide Search Matches") +
|
| 108 |
+
"</a></p>"
|
| 109 |
+
)
|
| 110 |
+
);
|
| 111 |
+
},
|
| 112 |
+
|
| 113 |
+
/**
|
| 114 |
+
* helper function to hide the search marks again
|
| 115 |
+
*/
|
| 116 |
+
hideSearchWords: () => {
|
| 117 |
+
document
|
| 118 |
+
.querySelectorAll("#searchbox .highlight-link")
|
| 119 |
+
.forEach((el) => el.remove());
|
| 120 |
+
document
|
| 121 |
+
.querySelectorAll("span.highlighted")
|
| 122 |
+
.forEach((el) => el.classList.remove("highlighted"));
|
| 123 |
+
localStorage.removeItem("sphinx_highlight_terms")
|
| 124 |
+
},
|
| 125 |
+
|
| 126 |
+
initEscapeListener: () => {
|
| 127 |
+
// only install a listener if it is really needed
|
| 128 |
+
if (!DOCUMENTATION_OPTIONS.ENABLE_SEARCH_SHORTCUTS) return;
|
| 129 |
+
|
| 130 |
+
document.addEventListener("keydown", (event) => {
|
| 131 |
+
// bail for input elements
|
| 132 |
+
if (BLACKLISTED_KEY_CONTROL_ELEMENTS.has(document.activeElement.tagName)) return;
|
| 133 |
+
// bail with special keys
|
| 134 |
+
if (event.shiftKey || event.altKey || event.ctrlKey || event.metaKey) return;
|
| 135 |
+
if (DOCUMENTATION_OPTIONS.ENABLE_SEARCH_SHORTCUTS && (event.key === "Escape")) {
|
| 136 |
+
SphinxHighlight.hideSearchWords();
|
| 137 |
+
event.preventDefault();
|
| 138 |
+
}
|
| 139 |
+
});
|
| 140 |
+
},
|
| 141 |
+
};
|
| 142 |
+
|
| 143 |
+
_ready(SphinxHighlight.highlightSearchWords);
|
| 144 |
+
_ready(SphinxHighlight.initEscapeListener);
|
toolchain/cmake-3.27.9-linux-x86_64/doc/cmake/html/_static/underscore-1.13.1.js
ADDED
|
@@ -0,0 +1,2042 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
(function (global, factory) {
|
| 2 |
+
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
|
| 3 |
+
typeof define === 'function' && define.amd ? define('underscore', factory) :
|
| 4 |
+
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, (function () {
|
| 5 |
+
var current = global._;
|
| 6 |
+
var exports = global._ = factory();
|
| 7 |
+
exports.noConflict = function () { global._ = current; return exports; };
|
| 8 |
+
}()));
|
| 9 |
+
}(this, (function () {
|
| 10 |
+
// Underscore.js 1.13.1
|
| 11 |
+
// https://underscorejs.org
|
| 12 |
+
// (c) 2009-2021 Jeremy Ashkenas, Julian Gonggrijp, and DocumentCloud and Investigative Reporters & Editors
|
| 13 |
+
// Underscore may be freely distributed under the MIT license.
|
| 14 |
+
|
| 15 |
+
// Current version.
|
| 16 |
+
var VERSION = '1.13.1';
|
| 17 |
+
|
| 18 |
+
// Establish the root object, `window` (`self`) in the browser, `global`
|
| 19 |
+
// on the server, or `this` in some virtual machines. We use `self`
|
| 20 |
+
// instead of `window` for `WebWorker` support.
|
| 21 |
+
var root = typeof self == 'object' && self.self === self && self ||
|
| 22 |
+
typeof global == 'object' && global.global === global && global ||
|
| 23 |
+
Function('return this')() ||
|
| 24 |
+
{};
|
| 25 |
+
|
| 26 |
+
// Save bytes in the minified (but not gzipped) version:
|
| 27 |
+
var ArrayProto = Array.prototype, ObjProto = Object.prototype;
|
| 28 |
+
var SymbolProto = typeof Symbol !== 'undefined' ? Symbol.prototype : null;
|
| 29 |
+
|
| 30 |
+
// Create quick reference variables for speed access to core prototypes.
|
| 31 |
+
var push = ArrayProto.push,
|
| 32 |
+
slice = ArrayProto.slice,
|
| 33 |
+
toString = ObjProto.toString,
|
| 34 |
+
hasOwnProperty = ObjProto.hasOwnProperty;
|
| 35 |
+
|
| 36 |
+
// Modern feature detection.
|
| 37 |
+
var supportsArrayBuffer = typeof ArrayBuffer !== 'undefined',
|
| 38 |
+
supportsDataView = typeof DataView !== 'undefined';
|
| 39 |
+
|
| 40 |
+
// All **ECMAScript 5+** native function implementations that we hope to use
|
| 41 |
+
// are declared here.
|
| 42 |
+
var nativeIsArray = Array.isArray,
|
| 43 |
+
nativeKeys = Object.keys,
|
| 44 |
+
nativeCreate = Object.create,
|
| 45 |
+
nativeIsView = supportsArrayBuffer && ArrayBuffer.isView;
|
| 46 |
+
|
| 47 |
+
// Create references to these builtin functions because we override them.
|
| 48 |
+
var _isNaN = isNaN,
|
| 49 |
+
_isFinite = isFinite;
|
| 50 |
+
|
| 51 |
+
// Keys in IE < 9 that won't be iterated by `for key in ...` and thus missed.
|
| 52 |
+
var hasEnumBug = !{toString: null}.propertyIsEnumerable('toString');
|
| 53 |
+
var nonEnumerableProps = ['valueOf', 'isPrototypeOf', 'toString',
|
| 54 |
+
'propertyIsEnumerable', 'hasOwnProperty', 'toLocaleString'];
|
| 55 |
+
|
| 56 |
+
// The largest integer that can be represented exactly.
|
| 57 |
+
var MAX_ARRAY_INDEX = Math.pow(2, 53) - 1;
|
| 58 |
+
|
| 59 |
+
// Some functions take a variable number of arguments, or a few expected
|
| 60 |
+
// arguments at the beginning and then a variable number of values to operate
|
| 61 |
+
// on. This helper accumulates all remaining arguments past the function’s
|
| 62 |
+
// argument length (or an explicit `startIndex`), into an array that becomes
|
| 63 |
+
// the last argument. Similar to ES6’s "rest parameter".
|
| 64 |
+
function restArguments(func, startIndex) {
|
| 65 |
+
startIndex = startIndex == null ? func.length - 1 : +startIndex;
|
| 66 |
+
return function() {
|
| 67 |
+
var length = Math.max(arguments.length - startIndex, 0),
|
| 68 |
+
rest = Array(length),
|
| 69 |
+
index = 0;
|
| 70 |
+
for (; index < length; index++) {
|
| 71 |
+
rest[index] = arguments[index + startIndex];
|
| 72 |
+
}
|
| 73 |
+
switch (startIndex) {
|
| 74 |
+
case 0: return func.call(this, rest);
|
| 75 |
+
case 1: return func.call(this, arguments[0], rest);
|
| 76 |
+
case 2: return func.call(this, arguments[0], arguments[1], rest);
|
| 77 |
+
}
|
| 78 |
+
var args = Array(startIndex + 1);
|
| 79 |
+
for (index = 0; index < startIndex; index++) {
|
| 80 |
+
args[index] = arguments[index];
|
| 81 |
+
}
|
| 82 |
+
args[startIndex] = rest;
|
| 83 |
+
return func.apply(this, args);
|
| 84 |
+
};
|
| 85 |
+
}
|
| 86 |
+
|
| 87 |
+
// Is a given variable an object?
|
| 88 |
+
function isObject(obj) {
|
| 89 |
+
var type = typeof obj;
|
| 90 |
+
return type === 'function' || type === 'object' && !!obj;
|
| 91 |
+
}
|
| 92 |
+
|
| 93 |
+
// Is a given value equal to null?
|
| 94 |
+
function isNull(obj) {
|
| 95 |
+
return obj === null;
|
| 96 |
+
}
|
| 97 |
+
|
| 98 |
+
// Is a given variable undefined?
|
| 99 |
+
function isUndefined(obj) {
|
| 100 |
+
return obj === void 0;
|
| 101 |
+
}
|
| 102 |
+
|
| 103 |
+
// Is a given value a boolean?
|
| 104 |
+
function isBoolean(obj) {
|
| 105 |
+
return obj === true || obj === false || toString.call(obj) === '[object Boolean]';
|
| 106 |
+
}
|
| 107 |
+
|
| 108 |
+
// Is a given value a DOM element?
|
| 109 |
+
function isElement(obj) {
|
| 110 |
+
return !!(obj && obj.nodeType === 1);
|
| 111 |
+
}
|
| 112 |
+
|
| 113 |
+
// Internal function for creating a `toString`-based type tester.
|
| 114 |
+
function tagTester(name) {
|
| 115 |
+
var tag = '[object ' + name + ']';
|
| 116 |
+
return function(obj) {
|
| 117 |
+
return toString.call(obj) === tag;
|
| 118 |
+
};
|
| 119 |
+
}
|
| 120 |
+
|
| 121 |
+
var isString = tagTester('String');
|
| 122 |
+
|
| 123 |
+
var isNumber = tagTester('Number');
|
| 124 |
+
|
| 125 |
+
var isDate = tagTester('Date');
|
| 126 |
+
|
| 127 |
+
var isRegExp = tagTester('RegExp');
|
| 128 |
+
|
| 129 |
+
var isError = tagTester('Error');
|
| 130 |
+
|
| 131 |
+
var isSymbol = tagTester('Symbol');
|
| 132 |
+
|
| 133 |
+
var isArrayBuffer = tagTester('ArrayBuffer');
|
| 134 |
+
|
| 135 |
+
var isFunction = tagTester('Function');
|
| 136 |
+
|
| 137 |
+
// Optimize `isFunction` if appropriate. Work around some `typeof` bugs in old
|
| 138 |
+
// v8, IE 11 (#1621), Safari 8 (#1929), and PhantomJS (#2236).
|
| 139 |
+
var nodelist = root.document && root.document.childNodes;
|
| 140 |
+
if (typeof /./ != 'function' && typeof Int8Array != 'object' && typeof nodelist != 'function') {
|
| 141 |
+
isFunction = function(obj) {
|
| 142 |
+
return typeof obj == 'function' || false;
|
| 143 |
+
};
|
| 144 |
+
}
|
| 145 |
+
|
| 146 |
+
var isFunction$1 = isFunction;
|
| 147 |
+
|
| 148 |
+
var hasObjectTag = tagTester('Object');
|
| 149 |
+
|
| 150 |
+
// In IE 10 - Edge 13, `DataView` has string tag `'[object Object]'`.
|
| 151 |
+
// In IE 11, the most common among them, this problem also applies to
|
| 152 |
+
// `Map`, `WeakMap` and `Set`.
|
| 153 |
+
var hasStringTagBug = (
|
| 154 |
+
supportsDataView && hasObjectTag(new DataView(new ArrayBuffer(8)))
|
| 155 |
+
),
|
| 156 |
+
isIE11 = (typeof Map !== 'undefined' && hasObjectTag(new Map));
|
| 157 |
+
|
| 158 |
+
var isDataView = tagTester('DataView');
|
| 159 |
+
|
| 160 |
+
// In IE 10 - Edge 13, we need a different heuristic
|
| 161 |
+
// to determine whether an object is a `DataView`.
|
| 162 |
+
function ie10IsDataView(obj) {
|
| 163 |
+
return obj != null && isFunction$1(obj.getInt8) && isArrayBuffer(obj.buffer);
|
| 164 |
+
}
|
| 165 |
+
|
| 166 |
+
var isDataView$1 = (hasStringTagBug ? ie10IsDataView : isDataView);
|
| 167 |
+
|
| 168 |
+
// Is a given value an array?
|
| 169 |
+
// Delegates to ECMA5's native `Array.isArray`.
|
| 170 |
+
var isArray = nativeIsArray || tagTester('Array');
|
| 171 |
+
|
| 172 |
+
// Internal function to check whether `key` is an own property name of `obj`.
|
| 173 |
+
function has$1(obj, key) {
|
| 174 |
+
return obj != null && hasOwnProperty.call(obj, key);
|
| 175 |
+
}
|
| 176 |
+
|
| 177 |
+
var isArguments = tagTester('Arguments');
|
| 178 |
+
|
| 179 |
+
// Define a fallback version of the method in browsers (ahem, IE < 9), where
|
| 180 |
+
// there isn't any inspectable "Arguments" type.
|
| 181 |
+
(function() {
|
| 182 |
+
if (!isArguments(arguments)) {
|
| 183 |
+
isArguments = function(obj) {
|
| 184 |
+
return has$1(obj, 'callee');
|
| 185 |
+
};
|
| 186 |
+
}
|
| 187 |
+
}());
|
| 188 |
+
|
| 189 |
+
var isArguments$1 = isArguments;
|
| 190 |
+
|
| 191 |
+
// Is a given object a finite number?
|
| 192 |
+
function isFinite$1(obj) {
|
| 193 |
+
return !isSymbol(obj) && _isFinite(obj) && !isNaN(parseFloat(obj));
|
| 194 |
+
}
|
| 195 |
+
|
| 196 |
+
// Is the given value `NaN`?
|
| 197 |
+
function isNaN$1(obj) {
|
| 198 |
+
return isNumber(obj) && _isNaN(obj);
|
| 199 |
+
}
|
| 200 |
+
|
| 201 |
+
// Predicate-generating function. Often useful outside of Underscore.
|
| 202 |
+
function constant(value) {
|
| 203 |
+
return function() {
|
| 204 |
+
return value;
|
| 205 |
+
};
|
| 206 |
+
}
|
| 207 |
+
|
| 208 |
+
// Common internal logic for `isArrayLike` and `isBufferLike`.
|
| 209 |
+
function createSizePropertyCheck(getSizeProperty) {
|
| 210 |
+
return function(collection) {
|
| 211 |
+
var sizeProperty = getSizeProperty(collection);
|
| 212 |
+
return typeof sizeProperty == 'number' && sizeProperty >= 0 && sizeProperty <= MAX_ARRAY_INDEX;
|
| 213 |
+
}
|
| 214 |
+
}
|
| 215 |
+
|
| 216 |
+
// Internal helper to generate a function to obtain property `key` from `obj`.
|
| 217 |
+
function shallowProperty(key) {
|
| 218 |
+
return function(obj) {
|
| 219 |
+
return obj == null ? void 0 : obj[key];
|
| 220 |
+
};
|
| 221 |
+
}
|
| 222 |
+
|
| 223 |
+
// Internal helper to obtain the `byteLength` property of an object.
|
| 224 |
+
var getByteLength = shallowProperty('byteLength');
|
| 225 |
+
|
| 226 |
+
// Internal helper to determine whether we should spend extensive checks against
|
| 227 |
+
// `ArrayBuffer` et al.
|
| 228 |
+
var isBufferLike = createSizePropertyCheck(getByteLength);
|
| 229 |
+
|
| 230 |
+
// Is a given value a typed array?
|
| 231 |
+
var typedArrayPattern = /\[object ((I|Ui)nt(8|16|32)|Float(32|64)|Uint8Clamped|Big(I|Ui)nt64)Array\]/;
|
| 232 |
+
function isTypedArray(obj) {
|
| 233 |
+
// `ArrayBuffer.isView` is the most future-proof, so use it when available.
|
| 234 |
+
// Otherwise, fall back on the above regular expression.
|
| 235 |
+
return nativeIsView ? (nativeIsView(obj) && !isDataView$1(obj)) :
|
| 236 |
+
isBufferLike(obj) && typedArrayPattern.test(toString.call(obj));
|
| 237 |
+
}
|
| 238 |
+
|
| 239 |
+
var isTypedArray$1 = supportsArrayBuffer ? isTypedArray : constant(false);
|
| 240 |
+
|
| 241 |
+
// Internal helper to obtain the `length` property of an object.
|
| 242 |
+
var getLength = shallowProperty('length');
|
| 243 |
+
|
| 244 |
+
// Internal helper to create a simple lookup structure.
|
| 245 |
+
// `collectNonEnumProps` used to depend on `_.contains`, but this led to
|
| 246 |
+
// circular imports. `emulatedSet` is a one-off solution that only works for
|
| 247 |
+
// arrays of strings.
|
| 248 |
+
function emulatedSet(keys) {
|
| 249 |
+
var hash = {};
|
| 250 |
+
for (var l = keys.length, i = 0; i < l; ++i) hash[keys[i]] = true;
|
| 251 |
+
return {
|
| 252 |
+
contains: function(key) { return hash[key]; },
|
| 253 |
+
push: function(key) {
|
| 254 |
+
hash[key] = true;
|
| 255 |
+
return keys.push(key);
|
| 256 |
+
}
|
| 257 |
+
};
|
| 258 |
+
}
|
| 259 |
+
|
| 260 |
+
// Internal helper. Checks `keys` for the presence of keys in IE < 9 that won't
|
| 261 |
+
// be iterated by `for key in ...` and thus missed. Extends `keys` in place if
|
| 262 |
+
// needed.
|
| 263 |
+
function collectNonEnumProps(obj, keys) {
|
| 264 |
+
keys = emulatedSet(keys);
|
| 265 |
+
var nonEnumIdx = nonEnumerableProps.length;
|
| 266 |
+
var constructor = obj.constructor;
|
| 267 |
+
var proto = isFunction$1(constructor) && constructor.prototype || ObjProto;
|
| 268 |
+
|
| 269 |
+
// Constructor is a special case.
|
| 270 |
+
var prop = 'constructor';
|
| 271 |
+
if (has$1(obj, prop) && !keys.contains(prop)) keys.push(prop);
|
| 272 |
+
|
| 273 |
+
while (nonEnumIdx--) {
|
| 274 |
+
prop = nonEnumerableProps[nonEnumIdx];
|
| 275 |
+
if (prop in obj && obj[prop] !== proto[prop] && !keys.contains(prop)) {
|
| 276 |
+
keys.push(prop);
|
| 277 |
+
}
|
| 278 |
+
}
|
| 279 |
+
}
|
| 280 |
+
|
| 281 |
+
// Retrieve the names of an object's own properties.
|
| 282 |
+
// Delegates to **ECMAScript 5**'s native `Object.keys`.
|
| 283 |
+
function keys(obj) {
|
| 284 |
+
if (!isObject(obj)) return [];
|
| 285 |
+
if (nativeKeys) return nativeKeys(obj);
|
| 286 |
+
var keys = [];
|
| 287 |
+
for (var key in obj) if (has$1(obj, key)) keys.push(key);
|
| 288 |
+
// Ahem, IE < 9.
|
| 289 |
+
if (hasEnumBug) collectNonEnumProps(obj, keys);
|
| 290 |
+
return keys;
|
| 291 |
+
}
|
| 292 |
+
|
| 293 |
+
// Is a given array, string, or object empty?
|
| 294 |
+
// An "empty" object has no enumerable own-properties.
|
| 295 |
+
function isEmpty(obj) {
|
| 296 |
+
if (obj == null) return true;
|
| 297 |
+
// Skip the more expensive `toString`-based type checks if `obj` has no
|
| 298 |
+
// `.length`.
|
| 299 |
+
var length = getLength(obj);
|
| 300 |
+
if (typeof length == 'number' && (
|
| 301 |
+
isArray(obj) || isString(obj) || isArguments$1(obj)
|
| 302 |
+
)) return length === 0;
|
| 303 |
+
return getLength(keys(obj)) === 0;
|
| 304 |
+
}
|
| 305 |
+
|
| 306 |
+
// Returns whether an object has a given set of `key:value` pairs.
|
| 307 |
+
function isMatch(object, attrs) {
|
| 308 |
+
var _keys = keys(attrs), length = _keys.length;
|
| 309 |
+
if (object == null) return !length;
|
| 310 |
+
var obj = Object(object);
|
| 311 |
+
for (var i = 0; i < length; i++) {
|
| 312 |
+
var key = _keys[i];
|
| 313 |
+
if (attrs[key] !== obj[key] || !(key in obj)) return false;
|
| 314 |
+
}
|
| 315 |
+
return true;
|
| 316 |
+
}
|
| 317 |
+
|
| 318 |
+
// If Underscore is called as a function, it returns a wrapped object that can
|
| 319 |
+
// be used OO-style. This wrapper holds altered versions of all functions added
|
| 320 |
+
// through `_.mixin`. Wrapped objects may be chained.
|
| 321 |
+
function _$1(obj) {
|
| 322 |
+
if (obj instanceof _$1) return obj;
|
| 323 |
+
if (!(this instanceof _$1)) return new _$1(obj);
|
| 324 |
+
this._wrapped = obj;
|
| 325 |
+
}
|
| 326 |
+
|
| 327 |
+
_$1.VERSION = VERSION;
|
| 328 |
+
|
| 329 |
+
// Extracts the result from a wrapped and chained object.
|
| 330 |
+
_$1.prototype.value = function() {
|
| 331 |
+
return this._wrapped;
|
| 332 |
+
};
|
| 333 |
+
|
| 334 |
+
// Provide unwrapping proxies for some methods used in engine operations
|
| 335 |
+
// such as arithmetic and JSON stringification.
|
| 336 |
+
_$1.prototype.valueOf = _$1.prototype.toJSON = _$1.prototype.value;
|
| 337 |
+
|
| 338 |
+
_$1.prototype.toString = function() {
|
| 339 |
+
return String(this._wrapped);
|
| 340 |
+
};
|
| 341 |
+
|
| 342 |
+
// Internal function to wrap or shallow-copy an ArrayBuffer,
|
| 343 |
+
// typed array or DataView to a new view, reusing the buffer.
|
| 344 |
+
function toBufferView(bufferSource) {
|
| 345 |
+
return new Uint8Array(
|
| 346 |
+
bufferSource.buffer || bufferSource,
|
| 347 |
+
bufferSource.byteOffset || 0,
|
| 348 |
+
getByteLength(bufferSource)
|
| 349 |
+
);
|
| 350 |
+
}
|
| 351 |
+
|
| 352 |
+
// We use this string twice, so give it a name for minification.
|
| 353 |
+
var tagDataView = '[object DataView]';
|
| 354 |
+
|
| 355 |
+
// Internal recursive comparison function for `_.isEqual`.
|
| 356 |
+
function eq(a, b, aStack, bStack) {
|
| 357 |
+
// Identical objects are equal. `0 === -0`, but they aren't identical.
|
| 358 |
+
// See the [Harmony `egal` proposal](https://wiki.ecmascript.org/doku.php?id=harmony:egal).
|
| 359 |
+
if (a === b) return a !== 0 || 1 / a === 1 / b;
|
| 360 |
+
// `null` or `undefined` only equal to itself (strict comparison).
|
| 361 |
+
if (a == null || b == null) return false;
|
| 362 |
+
// `NaN`s are equivalent, but non-reflexive.
|
| 363 |
+
if (a !== a) return b !== b;
|
| 364 |
+
// Exhaust primitive checks
|
| 365 |
+
var type = typeof a;
|
| 366 |
+
if (type !== 'function' && type !== 'object' && typeof b != 'object') return false;
|
| 367 |
+
return deepEq(a, b, aStack, bStack);
|
| 368 |
+
}
|
| 369 |
+
|
| 370 |
+
// Internal recursive comparison function for `_.isEqual`.
|
| 371 |
+
function deepEq(a, b, aStack, bStack) {
|
| 372 |
+
// Unwrap any wrapped objects.
|
| 373 |
+
if (a instanceof _$1) a = a._wrapped;
|
| 374 |
+
if (b instanceof _$1) b = b._wrapped;
|
| 375 |
+
// Compare `[[Class]]` names.
|
| 376 |
+
var className = toString.call(a);
|
| 377 |
+
if (className !== toString.call(b)) return false;
|
| 378 |
+
// Work around a bug in IE 10 - Edge 13.
|
| 379 |
+
if (hasStringTagBug && className == '[object Object]' && isDataView$1(a)) {
|
| 380 |
+
if (!isDataView$1(b)) return false;
|
| 381 |
+
className = tagDataView;
|
| 382 |
+
}
|
| 383 |
+
switch (className) {
|
| 384 |
+
// These types are compared by value.
|
| 385 |
+
case '[object RegExp]':
|
| 386 |
+
// RegExps are coerced to strings for comparison (Note: '' + /a/i === '/a/i')
|
| 387 |
+
case '[object String]':
|
| 388 |
+
// Primitives and their corresponding object wrappers are equivalent; thus, `"5"` is
|
| 389 |
+
// equivalent to `new String("5")`.
|
| 390 |
+
return '' + a === '' + b;
|
| 391 |
+
case '[object Number]':
|
| 392 |
+
// `NaN`s are equivalent, but non-reflexive.
|
| 393 |
+
// Object(NaN) is equivalent to NaN.
|
| 394 |
+
if (+a !== +a) return +b !== +b;
|
| 395 |
+
// An `egal` comparison is performed for other numeric values.
|
| 396 |
+
return +a === 0 ? 1 / +a === 1 / b : +a === +b;
|
| 397 |
+
case '[object Date]':
|
| 398 |
+
case '[object Boolean]':
|
| 399 |
+
// Coerce dates and booleans to numeric primitive values. Dates are compared by their
|
| 400 |
+
// millisecond representations. Note that invalid dates with millisecond representations
|
| 401 |
+
// of `NaN` are not equivalent.
|
| 402 |
+
return +a === +b;
|
| 403 |
+
case '[object Symbol]':
|
| 404 |
+
return SymbolProto.valueOf.call(a) === SymbolProto.valueOf.call(b);
|
| 405 |
+
case '[object ArrayBuffer]':
|
| 406 |
+
case tagDataView:
|
| 407 |
+
// Coerce to typed array so we can fall through.
|
| 408 |
+
return deepEq(toBufferView(a), toBufferView(b), aStack, bStack);
|
| 409 |
+
}
|
| 410 |
+
|
| 411 |
+
var areArrays = className === '[object Array]';
|
| 412 |
+
if (!areArrays && isTypedArray$1(a)) {
|
| 413 |
+
var byteLength = getByteLength(a);
|
| 414 |
+
if (byteLength !== getByteLength(b)) return false;
|
| 415 |
+
if (a.buffer === b.buffer && a.byteOffset === b.byteOffset) return true;
|
| 416 |
+
areArrays = true;
|
| 417 |
+
}
|
| 418 |
+
if (!areArrays) {
|
| 419 |
+
if (typeof a != 'object' || typeof b != 'object') return false;
|
| 420 |
+
|
| 421 |
+
// Objects with different constructors are not equivalent, but `Object`s or `Array`s
|
| 422 |
+
// from different frames are.
|
| 423 |
+
var aCtor = a.constructor, bCtor = b.constructor;
|
| 424 |
+
if (aCtor !== bCtor && !(isFunction$1(aCtor) && aCtor instanceof aCtor &&
|
| 425 |
+
isFunction$1(bCtor) && bCtor instanceof bCtor)
|
| 426 |
+
&& ('constructor' in a && 'constructor' in b)) {
|
| 427 |
+
return false;
|
| 428 |
+
}
|
| 429 |
+
}
|
| 430 |
+
// Assume equality for cyclic structures. The algorithm for detecting cyclic
|
| 431 |
+
// structures is adapted from ES 5.1 section 15.12.3, abstract operation `JO`.
|
| 432 |
+
|
| 433 |
+
// Initializing stack of traversed objects.
|
| 434 |
+
// It's done here since we only need them for objects and arrays comparison.
|
| 435 |
+
aStack = aStack || [];
|
| 436 |
+
bStack = bStack || [];
|
| 437 |
+
var length = aStack.length;
|
| 438 |
+
while (length--) {
|
| 439 |
+
// Linear search. Performance is inversely proportional to the number of
|
| 440 |
+
// unique nested structures.
|
| 441 |
+
if (aStack[length] === a) return bStack[length] === b;
|
| 442 |
+
}
|
| 443 |
+
|
| 444 |
+
// Add the first object to the stack of traversed objects.
|
| 445 |
+
aStack.push(a);
|
| 446 |
+
bStack.push(b);
|
| 447 |
+
|
| 448 |
+
// Recursively compare objects and arrays.
|
| 449 |
+
if (areArrays) {
|
| 450 |
+
// Compare array lengths to determine if a deep comparison is necessary.
|
| 451 |
+
length = a.length;
|
| 452 |
+
if (length !== b.length) return false;
|
| 453 |
+
// Deep compare the contents, ignoring non-numeric properties.
|
| 454 |
+
while (length--) {
|
| 455 |
+
if (!eq(a[length], b[length], aStack, bStack)) return false;
|
| 456 |
+
}
|
| 457 |
+
} else {
|
| 458 |
+
// Deep compare objects.
|
| 459 |
+
var _keys = keys(a), key;
|
| 460 |
+
length = _keys.length;
|
| 461 |
+
// Ensure that both objects contain the same number of properties before comparing deep equality.
|
| 462 |
+
if (keys(b).length !== length) return false;
|
| 463 |
+
while (length--) {
|
| 464 |
+
// Deep compare each member
|
| 465 |
+
key = _keys[length];
|
| 466 |
+
if (!(has$1(b, key) && eq(a[key], b[key], aStack, bStack))) return false;
|
| 467 |
+
}
|
| 468 |
+
}
|
| 469 |
+
// Remove the first object from the stack of traversed objects.
|
| 470 |
+
aStack.pop();
|
| 471 |
+
bStack.pop();
|
| 472 |
+
return true;
|
| 473 |
+
}
|
| 474 |
+
|
| 475 |
+
// Perform a deep comparison to check if two objects are equal.
|
| 476 |
+
function isEqual(a, b) {
|
| 477 |
+
return eq(a, b);
|
| 478 |
+
}
|
| 479 |
+
|
| 480 |
+
// Retrieve all the enumerable property names of an object.
|
| 481 |
+
function allKeys(obj) {
|
| 482 |
+
if (!isObject(obj)) return [];
|
| 483 |
+
var keys = [];
|
| 484 |
+
for (var key in obj) keys.push(key);
|
| 485 |
+
// Ahem, IE < 9.
|
| 486 |
+
if (hasEnumBug) collectNonEnumProps(obj, keys);
|
| 487 |
+
return keys;
|
| 488 |
+
}
|
| 489 |
+
|
| 490 |
+
// Since the regular `Object.prototype.toString` type tests don't work for
|
| 491 |
+
// some types in IE 11, we use a fingerprinting heuristic instead, based
|
| 492 |
+
// on the methods. It's not great, but it's the best we got.
|
| 493 |
+
// The fingerprint method lists are defined below.
|
| 494 |
+
function ie11fingerprint(methods) {
|
| 495 |
+
var length = getLength(methods);
|
| 496 |
+
return function(obj) {
|
| 497 |
+
if (obj == null) return false;
|
| 498 |
+
// `Map`, `WeakMap` and `Set` have no enumerable keys.
|
| 499 |
+
var keys = allKeys(obj);
|
| 500 |
+
if (getLength(keys)) return false;
|
| 501 |
+
for (var i = 0; i < length; i++) {
|
| 502 |
+
if (!isFunction$1(obj[methods[i]])) return false;
|
| 503 |
+
}
|
| 504 |
+
// If we are testing against `WeakMap`, we need to ensure that
|
| 505 |
+
// `obj` doesn't have a `forEach` method in order to distinguish
|
| 506 |
+
// it from a regular `Map`.
|
| 507 |
+
return methods !== weakMapMethods || !isFunction$1(obj[forEachName]);
|
| 508 |
+
};
|
| 509 |
+
}
|
| 510 |
+
|
| 511 |
+
// In the interest of compact minification, we write
|
| 512 |
+
// each string in the fingerprints only once.
|
| 513 |
+
var forEachName = 'forEach',
|
| 514 |
+
hasName = 'has',
|
| 515 |
+
commonInit = ['clear', 'delete'],
|
| 516 |
+
mapTail = ['get', hasName, 'set'];
|
| 517 |
+
|
| 518 |
+
// `Map`, `WeakMap` and `Set` each have slightly different
|
| 519 |
+
// combinations of the above sublists.
|
| 520 |
+
var mapMethods = commonInit.concat(forEachName, mapTail),
|
| 521 |
+
weakMapMethods = commonInit.concat(mapTail),
|
| 522 |
+
setMethods = ['add'].concat(commonInit, forEachName, hasName);
|
| 523 |
+
|
| 524 |
+
var isMap = isIE11 ? ie11fingerprint(mapMethods) : tagTester('Map');
|
| 525 |
+
|
| 526 |
+
var isWeakMap = isIE11 ? ie11fingerprint(weakMapMethods) : tagTester('WeakMap');
|
| 527 |
+
|
| 528 |
+
var isSet = isIE11 ? ie11fingerprint(setMethods) : tagTester('Set');
|
| 529 |
+
|
| 530 |
+
var isWeakSet = tagTester('WeakSet');
|
| 531 |
+
|
| 532 |
+
// Retrieve the values of an object's properties.
|
| 533 |
+
function values(obj) {
|
| 534 |
+
var _keys = keys(obj);
|
| 535 |
+
var length = _keys.length;
|
| 536 |
+
var values = Array(length);
|
| 537 |
+
for (var i = 0; i < length; i++) {
|
| 538 |
+
values[i] = obj[_keys[i]];
|
| 539 |
+
}
|
| 540 |
+
return values;
|
| 541 |
+
}
|
| 542 |
+
|
| 543 |
+
// Convert an object into a list of `[key, value]` pairs.
|
| 544 |
+
// The opposite of `_.object` with one argument.
|
| 545 |
+
function pairs(obj) {
|
| 546 |
+
var _keys = keys(obj);
|
| 547 |
+
var length = _keys.length;
|
| 548 |
+
var pairs = Array(length);
|
| 549 |
+
for (var i = 0; i < length; i++) {
|
| 550 |
+
pairs[i] = [_keys[i], obj[_keys[i]]];
|
| 551 |
+
}
|
| 552 |
+
return pairs;
|
| 553 |
+
}
|
| 554 |
+
|
| 555 |
+
// Invert the keys and values of an object. The values must be serializable.
|
| 556 |
+
function invert(obj) {
|
| 557 |
+
var result = {};
|
| 558 |
+
var _keys = keys(obj);
|
| 559 |
+
for (var i = 0, length = _keys.length; i < length; i++) {
|
| 560 |
+
result[obj[_keys[i]]] = _keys[i];
|
| 561 |
+
}
|
| 562 |
+
return result;
|
| 563 |
+
}
|
| 564 |
+
|
| 565 |
+
// Return a sorted list of the function names available on the object.
|
| 566 |
+
function functions(obj) {
|
| 567 |
+
var names = [];
|
| 568 |
+
for (var key in obj) {
|
| 569 |
+
if (isFunction$1(obj[key])) names.push(key);
|
| 570 |
+
}
|
| 571 |
+
return names.sort();
|
| 572 |
+
}
|
| 573 |
+
|
| 574 |
+
// An internal function for creating assigner functions.
|
| 575 |
+
function createAssigner(keysFunc, defaults) {
|
| 576 |
+
return function(obj) {
|
| 577 |
+
var length = arguments.length;
|
| 578 |
+
if (defaults) obj = Object(obj);
|
| 579 |
+
if (length < 2 || obj == null) return obj;
|
| 580 |
+
for (var index = 1; index < length; index++) {
|
| 581 |
+
var source = arguments[index],
|
| 582 |
+
keys = keysFunc(source),
|
| 583 |
+
l = keys.length;
|
| 584 |
+
for (var i = 0; i < l; i++) {
|
| 585 |
+
var key = keys[i];
|
| 586 |
+
if (!defaults || obj[key] === void 0) obj[key] = source[key];
|
| 587 |
+
}
|
| 588 |
+
}
|
| 589 |
+
return obj;
|
| 590 |
+
};
|
| 591 |
+
}
|
| 592 |
+
|
| 593 |
+
// Extend a given object with all the properties in passed-in object(s).
|
| 594 |
+
var extend = createAssigner(allKeys);
|
| 595 |
+
|
| 596 |
+
// Assigns a given object with all the own properties in the passed-in
|
| 597 |
+
// object(s).
|
| 598 |
+
// (https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object/assign)
|
| 599 |
+
var extendOwn = createAssigner(keys);
|
| 600 |
+
|
| 601 |
+
// Fill in a given object with default properties.
|
| 602 |
+
var defaults = createAssigner(allKeys, true);
|
| 603 |
+
|
| 604 |
+
// Create a naked function reference for surrogate-prototype-swapping.
|
| 605 |
+
function ctor() {
|
| 606 |
+
return function(){};
|
| 607 |
+
}
|
| 608 |
+
|
| 609 |
+
// An internal function for creating a new object that inherits from another.
|
| 610 |
+
function baseCreate(prototype) {
|
| 611 |
+
if (!isObject(prototype)) return {};
|
| 612 |
+
if (nativeCreate) return nativeCreate(prototype);
|
| 613 |
+
var Ctor = ctor();
|
| 614 |
+
Ctor.prototype = prototype;
|
| 615 |
+
var result = new Ctor;
|
| 616 |
+
Ctor.prototype = null;
|
| 617 |
+
return result;
|
| 618 |
+
}
|
| 619 |
+
|
| 620 |
+
// Creates an object that inherits from the given prototype object.
|
| 621 |
+
// If additional properties are provided then they will be added to the
|
| 622 |
+
// created object.
|
| 623 |
+
function create(prototype, props) {
|
| 624 |
+
var result = baseCreate(prototype);
|
| 625 |
+
if (props) extendOwn(result, props);
|
| 626 |
+
return result;
|
| 627 |
+
}
|
| 628 |
+
|
| 629 |
+
// Create a (shallow-cloned) duplicate of an object.
|
| 630 |
+
function clone(obj) {
|
| 631 |
+
if (!isObject(obj)) return obj;
|
| 632 |
+
return isArray(obj) ? obj.slice() : extend({}, obj);
|
| 633 |
+
}
|
| 634 |
+
|
| 635 |
+
// Invokes `interceptor` with the `obj` and then returns `obj`.
|
| 636 |
+
// The primary purpose of this method is to "tap into" a method chain, in
|
| 637 |
+
// order to perform operations on intermediate results within the chain.
|
| 638 |
+
function tap(obj, interceptor) {
|
| 639 |
+
interceptor(obj);
|
| 640 |
+
return obj;
|
| 641 |
+
}
|
| 642 |
+
|
| 643 |
+
// Normalize a (deep) property `path` to array.
|
| 644 |
+
// Like `_.iteratee`, this function can be customized.
|
| 645 |
+
function toPath$1(path) {
|
| 646 |
+
return isArray(path) ? path : [path];
|
| 647 |
+
}
|
| 648 |
+
_$1.toPath = toPath$1;
|
| 649 |
+
|
| 650 |
+
// Internal wrapper for `_.toPath` to enable minification.
|
| 651 |
+
// Similar to `cb` for `_.iteratee`.
|
| 652 |
+
function toPath(path) {
|
| 653 |
+
return _$1.toPath(path);
|
| 654 |
+
}
|
| 655 |
+
|
| 656 |
+
// Internal function to obtain a nested property in `obj` along `path`.
|
| 657 |
+
function deepGet(obj, path) {
|
| 658 |
+
var length = path.length;
|
| 659 |
+
for (var i = 0; i < length; i++) {
|
| 660 |
+
if (obj == null) return void 0;
|
| 661 |
+
obj = obj[path[i]];
|
| 662 |
+
}
|
| 663 |
+
return length ? obj : void 0;
|
| 664 |
+
}
|
| 665 |
+
|
| 666 |
+
// Get the value of the (deep) property on `path` from `object`.
|
| 667 |
+
// If any property in `path` does not exist or if the value is
|
| 668 |
+
// `undefined`, return `defaultValue` instead.
|
| 669 |
+
// The `path` is normalized through `_.toPath`.
|
| 670 |
+
function get(object, path, defaultValue) {
|
| 671 |
+
var value = deepGet(object, toPath(path));
|
| 672 |
+
return isUndefined(value) ? defaultValue : value;
|
| 673 |
+
}
|
| 674 |
+
|
| 675 |
+
// Shortcut function for checking if an object has a given property directly on
|
| 676 |
+
// itself (in other words, not on a prototype). Unlike the internal `has`
|
| 677 |
+
// function, this public version can also traverse nested properties.
|
| 678 |
+
function has(obj, path) {
|
| 679 |
+
path = toPath(path);
|
| 680 |
+
var length = path.length;
|
| 681 |
+
for (var i = 0; i < length; i++) {
|
| 682 |
+
var key = path[i];
|
| 683 |
+
if (!has$1(obj, key)) return false;
|
| 684 |
+
obj = obj[key];
|
| 685 |
+
}
|
| 686 |
+
return !!length;
|
| 687 |
+
}
|
| 688 |
+
|
| 689 |
+
// Keep the identity function around for default iteratees.
|
| 690 |
+
function identity(value) {
|
| 691 |
+
return value;
|
| 692 |
+
}
|
| 693 |
+
|
| 694 |
+
// Returns a predicate for checking whether an object has a given set of
|
| 695 |
+
// `key:value` pairs.
|
| 696 |
+
function matcher(attrs) {
|
| 697 |
+
attrs = extendOwn({}, attrs);
|
| 698 |
+
return function(obj) {
|
| 699 |
+
return isMatch(obj, attrs);
|
| 700 |
+
};
|
| 701 |
+
}
|
| 702 |
+
|
| 703 |
+
// Creates a function that, when passed an object, will traverse that object’s
|
| 704 |
+
// properties down the given `path`, specified as an array of keys or indices.
|
| 705 |
+
function property(path) {
|
| 706 |
+
path = toPath(path);
|
| 707 |
+
return function(obj) {
|
| 708 |
+
return deepGet(obj, path);
|
| 709 |
+
};
|
| 710 |
+
}
|
| 711 |
+
|
| 712 |
+
// Internal function that returns an efficient (for current engines) version
|
| 713 |
+
// of the passed-in callback, to be repeatedly applied in other Underscore
|
| 714 |
+
// functions.
|
| 715 |
+
function optimizeCb(func, context, argCount) {
|
| 716 |
+
if (context === void 0) return func;
|
| 717 |
+
switch (argCount == null ? 3 : argCount) {
|
| 718 |
+
case 1: return function(value) {
|
| 719 |
+
return func.call(context, value);
|
| 720 |
+
};
|
| 721 |
+
// The 2-argument case is omitted because we’re not using it.
|
| 722 |
+
case 3: return function(value, index, collection) {
|
| 723 |
+
return func.call(context, value, index, collection);
|
| 724 |
+
};
|
| 725 |
+
case 4: return function(accumulator, value, index, collection) {
|
| 726 |
+
return func.call(context, accumulator, value, index, collection);
|
| 727 |
+
};
|
| 728 |
+
}
|
| 729 |
+
return function() {
|
| 730 |
+
return func.apply(context, arguments);
|
| 731 |
+
};
|
| 732 |
+
}
|
| 733 |
+
|
| 734 |
+
// An internal function to generate callbacks that can be applied to each
|
| 735 |
+
// element in a collection, returning the desired result — either `_.identity`,
|
| 736 |
+
// an arbitrary callback, a property matcher, or a property accessor.
|
| 737 |
+
function baseIteratee(value, context, argCount) {
|
| 738 |
+
if (value == null) return identity;
|
| 739 |
+
if (isFunction$1(value)) return optimizeCb(value, context, argCount);
|
| 740 |
+
if (isObject(value) && !isArray(value)) return matcher(value);
|
| 741 |
+
return property(value);
|
| 742 |
+
}
|
| 743 |
+
|
| 744 |
+
// External wrapper for our callback generator. Users may customize
|
| 745 |
+
// `_.iteratee` if they want additional predicate/iteratee shorthand styles.
|
| 746 |
+
// This abstraction hides the internal-only `argCount` argument.
|
| 747 |
+
function iteratee(value, context) {
|
| 748 |
+
return baseIteratee(value, context, Infinity);
|
| 749 |
+
}
|
| 750 |
+
_$1.iteratee = iteratee;
|
| 751 |
+
|
| 752 |
+
// The function we call internally to generate a callback. It invokes
|
| 753 |
+
// `_.iteratee` if overridden, otherwise `baseIteratee`.
|
| 754 |
+
function cb(value, context, argCount) {
|
| 755 |
+
if (_$1.iteratee !== iteratee) return _$1.iteratee(value, context);
|
| 756 |
+
return baseIteratee(value, context, argCount);
|
| 757 |
+
}
|
| 758 |
+
|
| 759 |
+
// Returns the results of applying the `iteratee` to each element of `obj`.
|
| 760 |
+
// In contrast to `_.map` it returns an object.
|
| 761 |
+
function mapObject(obj, iteratee, context) {
|
| 762 |
+
iteratee = cb(iteratee, context);
|
| 763 |
+
var _keys = keys(obj),
|
| 764 |
+
length = _keys.length,
|
| 765 |
+
results = {};
|
| 766 |
+
for (var index = 0; index < length; index++) {
|
| 767 |
+
var currentKey = _keys[index];
|
| 768 |
+
results[currentKey] = iteratee(obj[currentKey], currentKey, obj);
|
| 769 |
+
}
|
| 770 |
+
return results;
|
| 771 |
+
}
|
| 772 |
+
|
| 773 |
+
// Predicate-generating function. Often useful outside of Underscore.
|
| 774 |
+
function noop(){}
|
| 775 |
+
|
| 776 |
+
// Generates a function for a given object that returns a given property.
|
| 777 |
+
function propertyOf(obj) {
|
| 778 |
+
if (obj == null) return noop;
|
| 779 |
+
return function(path) {
|
| 780 |
+
return get(obj, path);
|
| 781 |
+
};
|
| 782 |
+
}
|
| 783 |
+
|
| 784 |
+
// Run a function **n** times.
|
| 785 |
+
function times(n, iteratee, context) {
|
| 786 |
+
var accum = Array(Math.max(0, n));
|
| 787 |
+
iteratee = optimizeCb(iteratee, context, 1);
|
| 788 |
+
for (var i = 0; i < n; i++) accum[i] = iteratee(i);
|
| 789 |
+
return accum;
|
| 790 |
+
}
|
| 791 |
+
|
| 792 |
+
// Return a random integer between `min` and `max` (inclusive).
|
| 793 |
+
function random(min, max) {
|
| 794 |
+
if (max == null) {
|
| 795 |
+
max = min;
|
| 796 |
+
min = 0;
|
| 797 |
+
}
|
| 798 |
+
return min + Math.floor(Math.random() * (max - min + 1));
|
| 799 |
+
}
|
| 800 |
+
|
| 801 |
+
// A (possibly faster) way to get the current timestamp as an integer.
|
| 802 |
+
var now = Date.now || function() {
|
| 803 |
+
return new Date().getTime();
|
| 804 |
+
};
|
| 805 |
+
|
| 806 |
+
// Internal helper to generate functions for escaping and unescaping strings
|
| 807 |
+
// to/from HTML interpolation.
|
| 808 |
+
function createEscaper(map) {
|
| 809 |
+
var escaper = function(match) {
|
| 810 |
+
return map[match];
|
| 811 |
+
};
|
| 812 |
+
// Regexes for identifying a key that needs to be escaped.
|
| 813 |
+
var source = '(?:' + keys(map).join('|') + ')';
|
| 814 |
+
var testRegexp = RegExp(source);
|
| 815 |
+
var replaceRegexp = RegExp(source, 'g');
|
| 816 |
+
return function(string) {
|
| 817 |
+
string = string == null ? '' : '' + string;
|
| 818 |
+
return testRegexp.test(string) ? string.replace(replaceRegexp, escaper) : string;
|
| 819 |
+
};
|
| 820 |
+
}
|
| 821 |
+
|
| 822 |
+
// Internal list of HTML entities for escaping.
|
| 823 |
+
var escapeMap = {
|
| 824 |
+
'&': '&',
|
| 825 |
+
'<': '<',
|
| 826 |
+
'>': '>',
|
| 827 |
+
'"': '"',
|
| 828 |
+
"'": ''',
|
| 829 |
+
'`': '`'
|
| 830 |
+
};
|
| 831 |
+
|
| 832 |
+
// Function for escaping strings to HTML interpolation.
|
| 833 |
+
var _escape = createEscaper(escapeMap);
|
| 834 |
+
|
| 835 |
+
// Internal list of HTML entities for unescaping.
|
| 836 |
+
var unescapeMap = invert(escapeMap);
|
| 837 |
+
|
| 838 |
+
// Function for unescaping strings from HTML interpolation.
|
| 839 |
+
var _unescape = createEscaper(unescapeMap);
|
| 840 |
+
|
| 841 |
+
// By default, Underscore uses ERB-style template delimiters. Change the
|
| 842 |
+
// following template settings to use alternative delimiters.
|
| 843 |
+
var templateSettings = _$1.templateSettings = {
|
| 844 |
+
evaluate: /<%([\s\S]+?)%>/g,
|
| 845 |
+
interpolate: /<%=([\s\S]+?)%>/g,
|
| 846 |
+
escape: /<%-([\s\S]+?)%>/g
|
| 847 |
+
};
|
| 848 |
+
|
| 849 |
+
// When customizing `_.templateSettings`, if you don't want to define an
|
| 850 |
+
// interpolation, evaluation or escaping regex, we need one that is
|
| 851 |
+
// guaranteed not to match.
|
| 852 |
+
var noMatch = /(.)^/;
|
| 853 |
+
|
| 854 |
+
// Certain characters need to be escaped so that they can be put into a
|
| 855 |
+
// string literal.
|
| 856 |
+
var escapes = {
|
| 857 |
+
"'": "'",
|
| 858 |
+
'\\': '\\',
|
| 859 |
+
'\r': 'r',
|
| 860 |
+
'\n': 'n',
|
| 861 |
+
'\u2028': 'u2028',
|
| 862 |
+
'\u2029': 'u2029'
|
| 863 |
+
};
|
| 864 |
+
|
| 865 |
+
var escapeRegExp = /\\|'|\r|\n|\u2028|\u2029/g;
|
| 866 |
+
|
| 867 |
+
function escapeChar(match) {
|
| 868 |
+
return '\\' + escapes[match];
|
| 869 |
+
}
|
| 870 |
+
|
| 871 |
+
// In order to prevent third-party code injection through
|
| 872 |
+
// `_.templateSettings.variable`, we test it against the following regular
|
| 873 |
+
// expression. It is intentionally a bit more liberal than just matching valid
|
| 874 |
+
// identifiers, but still prevents possible loopholes through defaults or
|
| 875 |
+
// destructuring assignment.
|
| 876 |
+
var bareIdentifier = /^\s*(\w|\$)+\s*$/;
|
| 877 |
+
|
| 878 |
+
// JavaScript micro-templating, similar to John Resig's implementation.
|
| 879 |
+
// Underscore templating handles arbitrary delimiters, preserves whitespace,
|
| 880 |
+
// and correctly escapes quotes within interpolated code.
|
| 881 |
+
// NB: `oldSettings` only exists for backwards compatibility.
|
| 882 |
+
function template(text, settings, oldSettings) {
|
| 883 |
+
if (!settings && oldSettings) settings = oldSettings;
|
| 884 |
+
settings = defaults({}, settings, _$1.templateSettings);
|
| 885 |
+
|
| 886 |
+
// Combine delimiters into one regular expression via alternation.
|
| 887 |
+
var matcher = RegExp([
|
| 888 |
+
(settings.escape || noMatch).source,
|
| 889 |
+
(settings.interpolate || noMatch).source,
|
| 890 |
+
(settings.evaluate || noMatch).source
|
| 891 |
+
].join('|') + '|$', 'g');
|
| 892 |
+
|
| 893 |
+
// Compile the template source, escaping string literals appropriately.
|
| 894 |
+
var index = 0;
|
| 895 |
+
var source = "__p+='";
|
| 896 |
+
text.replace(matcher, function(match, escape, interpolate, evaluate, offset) {
|
| 897 |
+
source += text.slice(index, offset).replace(escapeRegExp, escapeChar);
|
| 898 |
+
index = offset + match.length;
|
| 899 |
+
|
| 900 |
+
if (escape) {
|
| 901 |
+
source += "'+\n((__t=(" + escape + "))==null?'':_.escape(__t))+\n'";
|
| 902 |
+
} else if (interpolate) {
|
| 903 |
+
source += "'+\n((__t=(" + interpolate + "))==null?'':__t)+\n'";
|
| 904 |
+
} else if (evaluate) {
|
| 905 |
+
source += "';\n" + evaluate + "\n__p+='";
|
| 906 |
+
}
|
| 907 |
+
|
| 908 |
+
// Adobe VMs need the match returned to produce the correct offset.
|
| 909 |
+
return match;
|
| 910 |
+
});
|
| 911 |
+
source += "';\n";
|
| 912 |
+
|
| 913 |
+
var argument = settings.variable;
|
| 914 |
+
if (argument) {
|
| 915 |
+
// Insure against third-party code injection. (CVE-2021-23358)
|
| 916 |
+
if (!bareIdentifier.test(argument)) throw new Error(
|
| 917 |
+
'variable is not a bare identifier: ' + argument
|
| 918 |
+
);
|
| 919 |
+
} else {
|
| 920 |
+
// If a variable is not specified, place data values in local scope.
|
| 921 |
+
source = 'with(obj||{}){\n' + source + '}\n';
|
| 922 |
+
argument = 'obj';
|
| 923 |
+
}
|
| 924 |
+
|
| 925 |
+
source = "var __t,__p='',__j=Array.prototype.join," +
|
| 926 |
+
"print=function(){__p+=__j.call(arguments,'');};\n" +
|
| 927 |
+
source + 'return __p;\n';
|
| 928 |
+
|
| 929 |
+
var render;
|
| 930 |
+
try {
|
| 931 |
+
render = new Function(argument, '_', source);
|
| 932 |
+
} catch (e) {
|
| 933 |
+
e.source = source;
|
| 934 |
+
throw e;
|
| 935 |
+
}
|
| 936 |
+
|
| 937 |
+
var template = function(data) {
|
| 938 |
+
return render.call(this, data, _$1);
|
| 939 |
+
};
|
| 940 |
+
|
| 941 |
+
// Provide the compiled source as a convenience for precompilation.
|
| 942 |
+
template.source = 'function(' + argument + '){\n' + source + '}';
|
| 943 |
+
|
| 944 |
+
return template;
|
| 945 |
+
}
|
| 946 |
+
|
| 947 |
+
// Traverses the children of `obj` along `path`. If a child is a function, it
|
| 948 |
+
// is invoked with its parent as context. Returns the value of the final
|
| 949 |
+
// child, or `fallback` if any child is undefined.
|
| 950 |
+
function result(obj, path, fallback) {
|
| 951 |
+
path = toPath(path);
|
| 952 |
+
var length = path.length;
|
| 953 |
+
if (!length) {
|
| 954 |
+
return isFunction$1(fallback) ? fallback.call(obj) : fallback;
|
| 955 |
+
}
|
| 956 |
+
for (var i = 0; i < length; i++) {
|
| 957 |
+
var prop = obj == null ? void 0 : obj[path[i]];
|
| 958 |
+
if (prop === void 0) {
|
| 959 |
+
prop = fallback;
|
| 960 |
+
i = length; // Ensure we don't continue iterating.
|
| 961 |
+
}
|
| 962 |
+
obj = isFunction$1(prop) ? prop.call(obj) : prop;
|
| 963 |
+
}
|
| 964 |
+
return obj;
|
| 965 |
+
}
|
| 966 |
+
|
| 967 |
+
// Generate a unique integer id (unique within the entire client session).
|
| 968 |
+
// Useful for temporary DOM ids.
|
| 969 |
+
var idCounter = 0;
|
| 970 |
+
function uniqueId(prefix) {
|
| 971 |
+
var id = ++idCounter + '';
|
| 972 |
+
return prefix ? prefix + id : id;
|
| 973 |
+
}
|
| 974 |
+
|
| 975 |
+
// Start chaining a wrapped Underscore object.
|
| 976 |
+
function chain(obj) {
|
| 977 |
+
var instance = _$1(obj);
|
| 978 |
+
instance._chain = true;
|
| 979 |
+
return instance;
|
| 980 |
+
}
|
| 981 |
+
|
| 982 |
+
// Internal function to execute `sourceFunc` bound to `context` with optional
|
| 983 |
+
// `args`. Determines whether to execute a function as a constructor or as a
|
| 984 |
+
// normal function.
|
| 985 |
+
function executeBound(sourceFunc, boundFunc, context, callingContext, args) {
|
| 986 |
+
if (!(callingContext instanceof boundFunc)) return sourceFunc.apply(context, args);
|
| 987 |
+
var self = baseCreate(sourceFunc.prototype);
|
| 988 |
+
var result = sourceFunc.apply(self, args);
|
| 989 |
+
if (isObject(result)) return result;
|
| 990 |
+
return self;
|
| 991 |
+
}
|
| 992 |
+
|
| 993 |
+
// Partially apply a function by creating a version that has had some of its
|
| 994 |
+
// arguments pre-filled, without changing its dynamic `this` context. `_` acts
|
| 995 |
+
// as a placeholder by default, allowing any combination of arguments to be
|
| 996 |
+
// pre-filled. Set `_.partial.placeholder` for a custom placeholder argument.
|
| 997 |
+
var partial = restArguments(function(func, boundArgs) {
|
| 998 |
+
var placeholder = partial.placeholder;
|
| 999 |
+
var bound = function() {
|
| 1000 |
+
var position = 0, length = boundArgs.length;
|
| 1001 |
+
var args = Array(length);
|
| 1002 |
+
for (var i = 0; i < length; i++) {
|
| 1003 |
+
args[i] = boundArgs[i] === placeholder ? arguments[position++] : boundArgs[i];
|
| 1004 |
+
}
|
| 1005 |
+
while (position < arguments.length) args.push(arguments[position++]);
|
| 1006 |
+
return executeBound(func, bound, this, this, args);
|
| 1007 |
+
};
|
| 1008 |
+
return bound;
|
| 1009 |
+
});
|
| 1010 |
+
|
| 1011 |
+
partial.placeholder = _$1;
|
| 1012 |
+
|
| 1013 |
+
// Create a function bound to a given object (assigning `this`, and arguments,
|
| 1014 |
+
// optionally).
|
| 1015 |
+
var bind = restArguments(function(func, context, args) {
|
| 1016 |
+
if (!isFunction$1(func)) throw new TypeError('Bind must be called on a function');
|
| 1017 |
+
var bound = restArguments(function(callArgs) {
|
| 1018 |
+
return executeBound(func, bound, context, this, args.concat(callArgs));
|
| 1019 |
+
});
|
| 1020 |
+
return bound;
|
| 1021 |
+
});
|
| 1022 |
+
|
| 1023 |
+
// Internal helper for collection methods to determine whether a collection
|
| 1024 |
+
// should be iterated as an array or as an object.
|
| 1025 |
+
// Related: https://people.mozilla.org/~jorendorff/es6-draft.html#sec-tolength
|
| 1026 |
+
// Avoids a very nasty iOS 8 JIT bug on ARM-64. #2094
|
| 1027 |
+
var isArrayLike = createSizePropertyCheck(getLength);
|
| 1028 |
+
|
| 1029 |
+
// Internal implementation of a recursive `flatten` function.
|
| 1030 |
+
function flatten$1(input, depth, strict, output) {
|
| 1031 |
+
output = output || [];
|
| 1032 |
+
if (!depth && depth !== 0) {
|
| 1033 |
+
depth = Infinity;
|
| 1034 |
+
} else if (depth <= 0) {
|
| 1035 |
+
return output.concat(input);
|
| 1036 |
+
}
|
| 1037 |
+
var idx = output.length;
|
| 1038 |
+
for (var i = 0, length = getLength(input); i < length; i++) {
|
| 1039 |
+
var value = input[i];
|
| 1040 |
+
if (isArrayLike(value) && (isArray(value) || isArguments$1(value))) {
|
| 1041 |
+
// Flatten current level of array or arguments object.
|
| 1042 |
+
if (depth > 1) {
|
| 1043 |
+
flatten$1(value, depth - 1, strict, output);
|
| 1044 |
+
idx = output.length;
|
| 1045 |
+
} else {
|
| 1046 |
+
var j = 0, len = value.length;
|
| 1047 |
+
while (j < len) output[idx++] = value[j++];
|
| 1048 |
+
}
|
| 1049 |
+
} else if (!strict) {
|
| 1050 |
+
output[idx++] = value;
|
| 1051 |
+
}
|
| 1052 |
+
}
|
| 1053 |
+
return output;
|
| 1054 |
+
}
|
| 1055 |
+
|
| 1056 |
+
// Bind a number of an object's methods to that object. Remaining arguments
|
| 1057 |
+
// are the method names to be bound. Useful for ensuring that all callbacks
|
| 1058 |
+
// defined on an object belong to it.
|
| 1059 |
+
var bindAll = restArguments(function(obj, keys) {
|
| 1060 |
+
keys = flatten$1(keys, false, false);
|
| 1061 |
+
var index = keys.length;
|
| 1062 |
+
if (index < 1) throw new Error('bindAll must be passed function names');
|
| 1063 |
+
while (index--) {
|
| 1064 |
+
var key = keys[index];
|
| 1065 |
+
obj[key] = bind(obj[key], obj);
|
| 1066 |
+
}
|
| 1067 |
+
return obj;
|
| 1068 |
+
});
|
| 1069 |
+
|
| 1070 |
+
// Memoize an expensive function by storing its results.
|
| 1071 |
+
function memoize(func, hasher) {
|
| 1072 |
+
var memoize = function(key) {
|
| 1073 |
+
var cache = memoize.cache;
|
| 1074 |
+
var address = '' + (hasher ? hasher.apply(this, arguments) : key);
|
| 1075 |
+
if (!has$1(cache, address)) cache[address] = func.apply(this, arguments);
|
| 1076 |
+
return cache[address];
|
| 1077 |
+
};
|
| 1078 |
+
memoize.cache = {};
|
| 1079 |
+
return memoize;
|
| 1080 |
+
}
|
| 1081 |
+
|
| 1082 |
+
// Delays a function for the given number of milliseconds, and then calls
|
| 1083 |
+
// it with the arguments supplied.
|
| 1084 |
+
var delay = restArguments(function(func, wait, args) {
|
| 1085 |
+
return setTimeout(function() {
|
| 1086 |
+
return func.apply(null, args);
|
| 1087 |
+
}, wait);
|
| 1088 |
+
});
|
| 1089 |
+
|
| 1090 |
+
// Defers a function, scheduling it to run after the current call stack has
|
| 1091 |
+
// cleared.
|
| 1092 |
+
var defer = partial(delay, _$1, 1);
|
| 1093 |
+
|
| 1094 |
+
// Returns a function, that, when invoked, will only be triggered at most once
|
| 1095 |
+
// during a given window of time. Normally, the throttled function will run
|
| 1096 |
+
// as much as it can, without ever going more than once per `wait` duration;
|
| 1097 |
+
// but if you'd like to disable the execution on the leading edge, pass
|
| 1098 |
+
// `{leading: false}`. To disable execution on the trailing edge, ditto.
|
| 1099 |
+
function throttle(func, wait, options) {
|
| 1100 |
+
var timeout, context, args, result;
|
| 1101 |
+
var previous = 0;
|
| 1102 |
+
if (!options) options = {};
|
| 1103 |
+
|
| 1104 |
+
var later = function() {
|
| 1105 |
+
previous = options.leading === false ? 0 : now();
|
| 1106 |
+
timeout = null;
|
| 1107 |
+
result = func.apply(context, args);
|
| 1108 |
+
if (!timeout) context = args = null;
|
| 1109 |
+
};
|
| 1110 |
+
|
| 1111 |
+
var throttled = function() {
|
| 1112 |
+
var _now = now();
|
| 1113 |
+
if (!previous && options.leading === false) previous = _now;
|
| 1114 |
+
var remaining = wait - (_now - previous);
|
| 1115 |
+
context = this;
|
| 1116 |
+
args = arguments;
|
| 1117 |
+
if (remaining <= 0 || remaining > wait) {
|
| 1118 |
+
if (timeout) {
|
| 1119 |
+
clearTimeout(timeout);
|
| 1120 |
+
timeout = null;
|
| 1121 |
+
}
|
| 1122 |
+
previous = _now;
|
| 1123 |
+
result = func.apply(context, args);
|
| 1124 |
+
if (!timeout) context = args = null;
|
| 1125 |
+
} else if (!timeout && options.trailing !== false) {
|
| 1126 |
+
timeout = setTimeout(later, remaining);
|
| 1127 |
+
}
|
| 1128 |
+
return result;
|
| 1129 |
+
};
|
| 1130 |
+
|
| 1131 |
+
throttled.cancel = function() {
|
| 1132 |
+
clearTimeout(timeout);
|
| 1133 |
+
previous = 0;
|
| 1134 |
+
timeout = context = args = null;
|
| 1135 |
+
};
|
| 1136 |
+
|
| 1137 |
+
return throttled;
|
| 1138 |
+
}
|
| 1139 |
+
|
| 1140 |
+
// When a sequence of calls of the returned function ends, the argument
|
| 1141 |
+
// function is triggered. The end of a sequence is defined by the `wait`
|
| 1142 |
+
// parameter. If `immediate` is passed, the argument function will be
|
| 1143 |
+
// triggered at the beginning of the sequence instead of at the end.
|
| 1144 |
+
function debounce(func, wait, immediate) {
|
| 1145 |
+
var timeout, previous, args, result, context;
|
| 1146 |
+
|
| 1147 |
+
var later = function() {
|
| 1148 |
+
var passed = now() - previous;
|
| 1149 |
+
if (wait > passed) {
|
| 1150 |
+
timeout = setTimeout(later, wait - passed);
|
| 1151 |
+
} else {
|
| 1152 |
+
timeout = null;
|
| 1153 |
+
if (!immediate) result = func.apply(context, args);
|
| 1154 |
+
// This check is needed because `func` can recursively invoke `debounced`.
|
| 1155 |
+
if (!timeout) args = context = null;
|
| 1156 |
+
}
|
| 1157 |
+
};
|
| 1158 |
+
|
| 1159 |
+
var debounced = restArguments(function(_args) {
|
| 1160 |
+
context = this;
|
| 1161 |
+
args = _args;
|
| 1162 |
+
previous = now();
|
| 1163 |
+
if (!timeout) {
|
| 1164 |
+
timeout = setTimeout(later, wait);
|
| 1165 |
+
if (immediate) result = func.apply(context, args);
|
| 1166 |
+
}
|
| 1167 |
+
return result;
|
| 1168 |
+
});
|
| 1169 |
+
|
| 1170 |
+
debounced.cancel = function() {
|
| 1171 |
+
clearTimeout(timeout);
|
| 1172 |
+
timeout = args = context = null;
|
| 1173 |
+
};
|
| 1174 |
+
|
| 1175 |
+
return debounced;
|
| 1176 |
+
}
|
| 1177 |
+
|
| 1178 |
+
// Returns the first function passed as an argument to the second,
|
| 1179 |
+
// allowing you to adjust arguments, run code before and after, and
|
| 1180 |
+
// conditionally execute the original function.
|
| 1181 |
+
function wrap(func, wrapper) {
|
| 1182 |
+
return partial(wrapper, func);
|
| 1183 |
+
}
|
| 1184 |
+
|
| 1185 |
+
// Returns a negated version of the passed-in predicate.
|
| 1186 |
+
function negate(predicate) {
|
| 1187 |
+
return function() {
|
| 1188 |
+
return !predicate.apply(this, arguments);
|
| 1189 |
+
};
|
| 1190 |
+
}
|
| 1191 |
+
|
| 1192 |
+
// Returns a function that is the composition of a list of functions, each
|
| 1193 |
+
// consuming the return value of the function that follows.
|
| 1194 |
+
function compose() {
|
| 1195 |
+
var args = arguments;
|
| 1196 |
+
var start = args.length - 1;
|
| 1197 |
+
return function() {
|
| 1198 |
+
var i = start;
|
| 1199 |
+
var result = args[start].apply(this, arguments);
|
| 1200 |
+
while (i--) result = args[i].call(this, result);
|
| 1201 |
+
return result;
|
| 1202 |
+
};
|
| 1203 |
+
}
|
| 1204 |
+
|
| 1205 |
+
// Returns a function that will only be executed on and after the Nth call.
|
| 1206 |
+
function after(times, func) {
|
| 1207 |
+
return function() {
|
| 1208 |
+
if (--times < 1) {
|
| 1209 |
+
return func.apply(this, arguments);
|
| 1210 |
+
}
|
| 1211 |
+
};
|
| 1212 |
+
}
|
| 1213 |
+
|
| 1214 |
+
// Returns a function that will only be executed up to (but not including) the
|
| 1215 |
+
// Nth call.
|
| 1216 |
+
function before(times, func) {
|
| 1217 |
+
var memo;
|
| 1218 |
+
return function() {
|
| 1219 |
+
if (--times > 0) {
|
| 1220 |
+
memo = func.apply(this, arguments);
|
| 1221 |
+
}
|
| 1222 |
+
if (times <= 1) func = null;
|
| 1223 |
+
return memo;
|
| 1224 |
+
};
|
| 1225 |
+
}
|
| 1226 |
+
|
| 1227 |
+
// Returns a function that will be executed at most one time, no matter how
|
| 1228 |
+
// often you call it. Useful for lazy initialization.
|
| 1229 |
+
var once = partial(before, 2);
|
| 1230 |
+
|
| 1231 |
+
// Returns the first key on an object that passes a truth test.
|
| 1232 |
+
function findKey(obj, predicate, context) {
|
| 1233 |
+
predicate = cb(predicate, context);
|
| 1234 |
+
var _keys = keys(obj), key;
|
| 1235 |
+
for (var i = 0, length = _keys.length; i < length; i++) {
|
| 1236 |
+
key = _keys[i];
|
| 1237 |
+
if (predicate(obj[key], key, obj)) return key;
|
| 1238 |
+
}
|
| 1239 |
+
}
|
| 1240 |
+
|
| 1241 |
+
// Internal function to generate `_.findIndex` and `_.findLastIndex`.
|
| 1242 |
+
function createPredicateIndexFinder(dir) {
|
| 1243 |
+
return function(array, predicate, context) {
|
| 1244 |
+
predicate = cb(predicate, context);
|
| 1245 |
+
var length = getLength(array);
|
| 1246 |
+
var index = dir > 0 ? 0 : length - 1;
|
| 1247 |
+
for (; index >= 0 && index < length; index += dir) {
|
| 1248 |
+
if (predicate(array[index], index, array)) return index;
|
| 1249 |
+
}
|
| 1250 |
+
return -1;
|
| 1251 |
+
};
|
| 1252 |
+
}
|
| 1253 |
+
|
| 1254 |
+
// Returns the first index on an array-like that passes a truth test.
|
| 1255 |
+
var findIndex = createPredicateIndexFinder(1);
|
| 1256 |
+
|
| 1257 |
+
// Returns the last index on an array-like that passes a truth test.
|
| 1258 |
+
var findLastIndex = createPredicateIndexFinder(-1);
|
| 1259 |
+
|
| 1260 |
+
// Use a comparator function to figure out the smallest index at which
|
| 1261 |
+
// an object should be inserted so as to maintain order. Uses binary search.
|
| 1262 |
+
function sortedIndex(array, obj, iteratee, context) {
|
| 1263 |
+
iteratee = cb(iteratee, context, 1);
|
| 1264 |
+
var value = iteratee(obj);
|
| 1265 |
+
var low = 0, high = getLength(array);
|
| 1266 |
+
while (low < high) {
|
| 1267 |
+
var mid = Math.floor((low + high) / 2);
|
| 1268 |
+
if (iteratee(array[mid]) < value) low = mid + 1; else high = mid;
|
| 1269 |
+
}
|
| 1270 |
+
return low;
|
| 1271 |
+
}
|
| 1272 |
+
|
| 1273 |
+
// Internal function to generate the `_.indexOf` and `_.lastIndexOf` functions.
|
| 1274 |
+
function createIndexFinder(dir, predicateFind, sortedIndex) {
|
| 1275 |
+
return function(array, item, idx) {
|
| 1276 |
+
var i = 0, length = getLength(array);
|
| 1277 |
+
if (typeof idx == 'number') {
|
| 1278 |
+
if (dir > 0) {
|
| 1279 |
+
i = idx >= 0 ? idx : Math.max(idx + length, i);
|
| 1280 |
+
} else {
|
| 1281 |
+
length = idx >= 0 ? Math.min(idx + 1, length) : idx + length + 1;
|
| 1282 |
+
}
|
| 1283 |
+
} else if (sortedIndex && idx && length) {
|
| 1284 |
+
idx = sortedIndex(array, item);
|
| 1285 |
+
return array[idx] === item ? idx : -1;
|
| 1286 |
+
}
|
| 1287 |
+
if (item !== item) {
|
| 1288 |
+
idx = predicateFind(slice.call(array, i, length), isNaN$1);
|
| 1289 |
+
return idx >= 0 ? idx + i : -1;
|
| 1290 |
+
}
|
| 1291 |
+
for (idx = dir > 0 ? i : length - 1; idx >= 0 && idx < length; idx += dir) {
|
| 1292 |
+
if (array[idx] === item) return idx;
|
| 1293 |
+
}
|
| 1294 |
+
return -1;
|
| 1295 |
+
};
|
| 1296 |
+
}
|
| 1297 |
+
|
| 1298 |
+
// Return the position of the first occurrence of an item in an array,
|
| 1299 |
+
// or -1 if the item is not included in the array.
|
| 1300 |
+
// If the array is large and already in sort order, pass `true`
|
| 1301 |
+
// for **isSorted** to use binary search.
|
| 1302 |
+
var indexOf = createIndexFinder(1, findIndex, sortedIndex);
|
| 1303 |
+
|
| 1304 |
+
// Return the position of the last occurrence of an item in an array,
|
| 1305 |
+
// or -1 if the item is not included in the array.
|
| 1306 |
+
var lastIndexOf = createIndexFinder(-1, findLastIndex);
|
| 1307 |
+
|
| 1308 |
+
// Return the first value which passes a truth test.
|
| 1309 |
+
function find(obj, predicate, context) {
|
| 1310 |
+
var keyFinder = isArrayLike(obj) ? findIndex : findKey;
|
| 1311 |
+
var key = keyFinder(obj, predicate, context);
|
| 1312 |
+
if (key !== void 0 && key !== -1) return obj[key];
|
| 1313 |
+
}
|
| 1314 |
+
|
| 1315 |
+
// Convenience version of a common use case of `_.find`: getting the first
|
| 1316 |
+
// object containing specific `key:value` pairs.
|
| 1317 |
+
function findWhere(obj, attrs) {
|
| 1318 |
+
return find(obj, matcher(attrs));
|
| 1319 |
+
}
|
| 1320 |
+
|
| 1321 |
+
// The cornerstone for collection functions, an `each`
|
| 1322 |
+
// implementation, aka `forEach`.
|
| 1323 |
+
// Handles raw objects in addition to array-likes. Treats all
|
| 1324 |
+
// sparse array-likes as if they were dense.
|
| 1325 |
+
function each(obj, iteratee, context) {
|
| 1326 |
+
iteratee = optimizeCb(iteratee, context);
|
| 1327 |
+
var i, length;
|
| 1328 |
+
if (isArrayLike(obj)) {
|
| 1329 |
+
for (i = 0, length = obj.length; i < length; i++) {
|
| 1330 |
+
iteratee(obj[i], i, obj);
|
| 1331 |
+
}
|
| 1332 |
+
} else {
|
| 1333 |
+
var _keys = keys(obj);
|
| 1334 |
+
for (i = 0, length = _keys.length; i < length; i++) {
|
| 1335 |
+
iteratee(obj[_keys[i]], _keys[i], obj);
|
| 1336 |
+
}
|
| 1337 |
+
}
|
| 1338 |
+
return obj;
|
| 1339 |
+
}
|
| 1340 |
+
|
| 1341 |
+
// Return the results of applying the iteratee to each element.
|
| 1342 |
+
function map(obj, iteratee, context) {
|
| 1343 |
+
iteratee = cb(iteratee, context);
|
| 1344 |
+
var _keys = !isArrayLike(obj) && keys(obj),
|
| 1345 |
+
length = (_keys || obj).length,
|
| 1346 |
+
results = Array(length);
|
| 1347 |
+
for (var index = 0; index < length; index++) {
|
| 1348 |
+
var currentKey = _keys ? _keys[index] : index;
|
| 1349 |
+
results[index] = iteratee(obj[currentKey], currentKey, obj);
|
| 1350 |
+
}
|
| 1351 |
+
return results;
|
| 1352 |
+
}
|
| 1353 |
+
|
| 1354 |
+
// Internal helper to create a reducing function, iterating left or right.
|
| 1355 |
+
function createReduce(dir) {
|
| 1356 |
+
// Wrap code that reassigns argument variables in a separate function than
|
| 1357 |
+
// the one that accesses `arguments.length` to avoid a perf hit. (#1991)
|
| 1358 |
+
var reducer = function(obj, iteratee, memo, initial) {
|
| 1359 |
+
var _keys = !isArrayLike(obj) && keys(obj),
|
| 1360 |
+
length = (_keys || obj).length,
|
| 1361 |
+
index = dir > 0 ? 0 : length - 1;
|
| 1362 |
+
if (!initial) {
|
| 1363 |
+
memo = obj[_keys ? _keys[index] : index];
|
| 1364 |
+
index += dir;
|
| 1365 |
+
}
|
| 1366 |
+
for (; index >= 0 && index < length; index += dir) {
|
| 1367 |
+
var currentKey = _keys ? _keys[index] : index;
|
| 1368 |
+
memo = iteratee(memo, obj[currentKey], currentKey, obj);
|
| 1369 |
+
}
|
| 1370 |
+
return memo;
|
| 1371 |
+
};
|
| 1372 |
+
|
| 1373 |
+
return function(obj, iteratee, memo, context) {
|
| 1374 |
+
var initial = arguments.length >= 3;
|
| 1375 |
+
return reducer(obj, optimizeCb(iteratee, context, 4), memo, initial);
|
| 1376 |
+
};
|
| 1377 |
+
}
|
| 1378 |
+
|
| 1379 |
+
// **Reduce** builds up a single result from a list of values, aka `inject`,
|
| 1380 |
+
// or `foldl`.
|
| 1381 |
+
var reduce = createReduce(1);
|
| 1382 |
+
|
| 1383 |
+
// The right-associative version of reduce, also known as `foldr`.
|
| 1384 |
+
var reduceRight = createReduce(-1);
|
| 1385 |
+
|
| 1386 |
+
// Return all the elements that pass a truth test.
|
| 1387 |
+
function filter(obj, predicate, context) {
|
| 1388 |
+
var results = [];
|
| 1389 |
+
predicate = cb(predicate, context);
|
| 1390 |
+
each(obj, function(value, index, list) {
|
| 1391 |
+
if (predicate(value, index, list)) results.push(value);
|
| 1392 |
+
});
|
| 1393 |
+
return results;
|
| 1394 |
+
}
|
| 1395 |
+
|
| 1396 |
+
// Return all the elements for which a truth test fails.
|
| 1397 |
+
function reject(obj, predicate, context) {
|
| 1398 |
+
return filter(obj, negate(cb(predicate)), context);
|
| 1399 |
+
}
|
| 1400 |
+
|
| 1401 |
+
// Determine whether all of the elements pass a truth test.
|
| 1402 |
+
function every(obj, predicate, context) {
|
| 1403 |
+
predicate = cb(predicate, context);
|
| 1404 |
+
var _keys = !isArrayLike(obj) && keys(obj),
|
| 1405 |
+
length = (_keys || obj).length;
|
| 1406 |
+
for (var index = 0; index < length; index++) {
|
| 1407 |
+
var currentKey = _keys ? _keys[index] : index;
|
| 1408 |
+
if (!predicate(obj[currentKey], currentKey, obj)) return false;
|
| 1409 |
+
}
|
| 1410 |
+
return true;
|
| 1411 |
+
}
|
| 1412 |
+
|
| 1413 |
+
// Determine if at least one element in the object passes a truth test.
|
| 1414 |
+
function some(obj, predicate, context) {
|
| 1415 |
+
predicate = cb(predicate, context);
|
| 1416 |
+
var _keys = !isArrayLike(obj) && keys(obj),
|
| 1417 |
+
length = (_keys || obj).length;
|
| 1418 |
+
for (var index = 0; index < length; index++) {
|
| 1419 |
+
var currentKey = _keys ? _keys[index] : index;
|
| 1420 |
+
if (predicate(obj[currentKey], currentKey, obj)) return true;
|
| 1421 |
+
}
|
| 1422 |
+
return false;
|
| 1423 |
+
}
|
| 1424 |
+
|
| 1425 |
+
// Determine if the array or object contains a given item (using `===`).
|
| 1426 |
+
function contains(obj, item, fromIndex, guard) {
|
| 1427 |
+
if (!isArrayLike(obj)) obj = values(obj);
|
| 1428 |
+
if (typeof fromIndex != 'number' || guard) fromIndex = 0;
|
| 1429 |
+
return indexOf(obj, item, fromIndex) >= 0;
|
| 1430 |
+
}
|
| 1431 |
+
|
| 1432 |
+
// Invoke a method (with arguments) on every item in a collection.
|
| 1433 |
+
var invoke = restArguments(function(obj, path, args) {
|
| 1434 |
+
var contextPath, func;
|
| 1435 |
+
if (isFunction$1(path)) {
|
| 1436 |
+
func = path;
|
| 1437 |
+
} else {
|
| 1438 |
+
path = toPath(path);
|
| 1439 |
+
contextPath = path.slice(0, -1);
|
| 1440 |
+
path = path[path.length - 1];
|
| 1441 |
+
}
|
| 1442 |
+
return map(obj, function(context) {
|
| 1443 |
+
var method = func;
|
| 1444 |
+
if (!method) {
|
| 1445 |
+
if (contextPath && contextPath.length) {
|
| 1446 |
+
context = deepGet(context, contextPath);
|
| 1447 |
+
}
|
| 1448 |
+
if (context == null) return void 0;
|
| 1449 |
+
method = context[path];
|
| 1450 |
+
}
|
| 1451 |
+
return method == null ? method : method.apply(context, args);
|
| 1452 |
+
});
|
| 1453 |
+
});
|
| 1454 |
+
|
| 1455 |
+
// Convenience version of a common use case of `_.map`: fetching a property.
|
| 1456 |
+
function pluck(obj, key) {
|
| 1457 |
+
return map(obj, property(key));
|
| 1458 |
+
}
|
| 1459 |
+
|
| 1460 |
+
// Convenience version of a common use case of `_.filter`: selecting only
|
| 1461 |
+
// objects containing specific `key:value` pairs.
|
| 1462 |
+
function where(obj, attrs) {
|
| 1463 |
+
return filter(obj, matcher(attrs));
|
| 1464 |
+
}
|
| 1465 |
+
|
| 1466 |
+
// Return the maximum element (or element-based computation).
|
| 1467 |
+
function max(obj, iteratee, context) {
|
| 1468 |
+
var result = -Infinity, lastComputed = -Infinity,
|
| 1469 |
+
value, computed;
|
| 1470 |
+
if (iteratee == null || typeof iteratee == 'number' && typeof obj[0] != 'object' && obj != null) {
|
| 1471 |
+
obj = isArrayLike(obj) ? obj : values(obj);
|
| 1472 |
+
for (var i = 0, length = obj.length; i < length; i++) {
|
| 1473 |
+
value = obj[i];
|
| 1474 |
+
if (value != null && value > result) {
|
| 1475 |
+
result = value;
|
| 1476 |
+
}
|
| 1477 |
+
}
|
| 1478 |
+
} else {
|
| 1479 |
+
iteratee = cb(iteratee, context);
|
| 1480 |
+
each(obj, function(v, index, list) {
|
| 1481 |
+
computed = iteratee(v, index, list);
|
| 1482 |
+
if (computed > lastComputed || computed === -Infinity && result === -Infinity) {
|
| 1483 |
+
result = v;
|
| 1484 |
+
lastComputed = computed;
|
| 1485 |
+
}
|
| 1486 |
+
});
|
| 1487 |
+
}
|
| 1488 |
+
return result;
|
| 1489 |
+
}
|
| 1490 |
+
|
| 1491 |
+
// Return the minimum element (or element-based computation).
|
| 1492 |
+
function min(obj, iteratee, context) {
|
| 1493 |
+
var result = Infinity, lastComputed = Infinity,
|
| 1494 |
+
value, computed;
|
| 1495 |
+
if (iteratee == null || typeof iteratee == 'number' && typeof obj[0] != 'object' && obj != null) {
|
| 1496 |
+
obj = isArrayLike(obj) ? obj : values(obj);
|
| 1497 |
+
for (var i = 0, length = obj.length; i < length; i++) {
|
| 1498 |
+
value = obj[i];
|
| 1499 |
+
if (value != null && value < result) {
|
| 1500 |
+
result = value;
|
| 1501 |
+
}
|
| 1502 |
+
}
|
| 1503 |
+
} else {
|
| 1504 |
+
iteratee = cb(iteratee, context);
|
| 1505 |
+
each(obj, function(v, index, list) {
|
| 1506 |
+
computed = iteratee(v, index, list);
|
| 1507 |
+
if (computed < lastComputed || computed === Infinity && result === Infinity) {
|
| 1508 |
+
result = v;
|
| 1509 |
+
lastComputed = computed;
|
| 1510 |
+
}
|
| 1511 |
+
});
|
| 1512 |
+
}
|
| 1513 |
+
return result;
|
| 1514 |
+
}
|
| 1515 |
+
|
| 1516 |
+
// Sample **n** random values from a collection using the modern version of the
|
| 1517 |
+
// [Fisher-Yates shuffle](https://en.wikipedia.org/wiki/Fisher–Yates_shuffle).
|
| 1518 |
+
// If **n** is not specified, returns a single random element.
|
| 1519 |
+
// The internal `guard` argument allows it to work with `_.map`.
|
| 1520 |
+
function sample(obj, n, guard) {
|
| 1521 |
+
if (n == null || guard) {
|
| 1522 |
+
if (!isArrayLike(obj)) obj = values(obj);
|
| 1523 |
+
return obj[random(obj.length - 1)];
|
| 1524 |
+
}
|
| 1525 |
+
var sample = isArrayLike(obj) ? clone(obj) : values(obj);
|
| 1526 |
+
var length = getLength(sample);
|
| 1527 |
+
n = Math.max(Math.min(n, length), 0);
|
| 1528 |
+
var last = length - 1;
|
| 1529 |
+
for (var index = 0; index < n; index++) {
|
| 1530 |
+
var rand = random(index, last);
|
| 1531 |
+
var temp = sample[index];
|
| 1532 |
+
sample[index] = sample[rand];
|
| 1533 |
+
sample[rand] = temp;
|
| 1534 |
+
}
|
| 1535 |
+
return sample.slice(0, n);
|
| 1536 |
+
}
|
| 1537 |
+
|
| 1538 |
+
// Shuffle a collection.
|
| 1539 |
+
function shuffle(obj) {
|
| 1540 |
+
return sample(obj, Infinity);
|
| 1541 |
+
}
|
| 1542 |
+
|
| 1543 |
+
// Sort the object's values by a criterion produced by an iteratee.
|
| 1544 |
+
function sortBy(obj, iteratee, context) {
|
| 1545 |
+
var index = 0;
|
| 1546 |
+
iteratee = cb(iteratee, context);
|
| 1547 |
+
return pluck(map(obj, function(value, key, list) {
|
| 1548 |
+
return {
|
| 1549 |
+
value: value,
|
| 1550 |
+
index: index++,
|
| 1551 |
+
criteria: iteratee(value, key, list)
|
| 1552 |
+
};
|
| 1553 |
+
}).sort(function(left, right) {
|
| 1554 |
+
var a = left.criteria;
|
| 1555 |
+
var b = right.criteria;
|
| 1556 |
+
if (a !== b) {
|
| 1557 |
+
if (a > b || a === void 0) return 1;
|
| 1558 |
+
if (a < b || b === void 0) return -1;
|
| 1559 |
+
}
|
| 1560 |
+
return left.index - right.index;
|
| 1561 |
+
}), 'value');
|
| 1562 |
+
}
|
| 1563 |
+
|
| 1564 |
+
// An internal function used for aggregate "group by" operations.
|
| 1565 |
+
function group(behavior, partition) {
|
| 1566 |
+
return function(obj, iteratee, context) {
|
| 1567 |
+
var result = partition ? [[], []] : {};
|
| 1568 |
+
iteratee = cb(iteratee, context);
|
| 1569 |
+
each(obj, function(value, index) {
|
| 1570 |
+
var key = iteratee(value, index, obj);
|
| 1571 |
+
behavior(result, value, key);
|
| 1572 |
+
});
|
| 1573 |
+
return result;
|
| 1574 |
+
};
|
| 1575 |
+
}
|
| 1576 |
+
|
| 1577 |
+
// Groups the object's values by a criterion. Pass either a string attribute
|
| 1578 |
+
// to group by, or a function that returns the criterion.
|
| 1579 |
+
var groupBy = group(function(result, value, key) {
|
| 1580 |
+
if (has$1(result, key)) result[key].push(value); else result[key] = [value];
|
| 1581 |
+
});
|
| 1582 |
+
|
| 1583 |
+
// Indexes the object's values by a criterion, similar to `_.groupBy`, but for
|
| 1584 |
+
// when you know that your index values will be unique.
|
| 1585 |
+
var indexBy = group(function(result, value, key) {
|
| 1586 |
+
result[key] = value;
|
| 1587 |
+
});
|
| 1588 |
+
|
| 1589 |
+
// Counts instances of an object that group by a certain criterion. Pass
|
| 1590 |
+
// either a string attribute to count by, or a function that returns the
|
| 1591 |
+
// criterion.
|
| 1592 |
+
var countBy = group(function(result, value, key) {
|
| 1593 |
+
if (has$1(result, key)) result[key]++; else result[key] = 1;
|
| 1594 |
+
});
|
| 1595 |
+
|
| 1596 |
+
// Split a collection into two arrays: one whose elements all pass the given
|
| 1597 |
+
// truth test, and one whose elements all do not pass the truth test.
|
| 1598 |
+
var partition = group(function(result, value, pass) {
|
| 1599 |
+
result[pass ? 0 : 1].push(value);
|
| 1600 |
+
}, true);
|
| 1601 |
+
|
| 1602 |
+
// Safely create a real, live array from anything iterable.
|
| 1603 |
+
var reStrSymbol = /[^\ud800-\udfff]|[\ud800-\udbff][\udc00-\udfff]|[\ud800-\udfff]/g;
|
| 1604 |
+
function toArray(obj) {
|
| 1605 |
+
if (!obj) return [];
|
| 1606 |
+
if (isArray(obj)) return slice.call(obj);
|
| 1607 |
+
if (isString(obj)) {
|
| 1608 |
+
// Keep surrogate pair characters together.
|
| 1609 |
+
return obj.match(reStrSymbol);
|
| 1610 |
+
}
|
| 1611 |
+
if (isArrayLike(obj)) return map(obj, identity);
|
| 1612 |
+
return values(obj);
|
| 1613 |
+
}
|
| 1614 |
+
|
| 1615 |
+
// Return the number of elements in a collection.
|
| 1616 |
+
function size(obj) {
|
| 1617 |
+
if (obj == null) return 0;
|
| 1618 |
+
return isArrayLike(obj) ? obj.length : keys(obj).length;
|
| 1619 |
+
}
|
| 1620 |
+
|
| 1621 |
+
// Internal `_.pick` helper function to determine whether `key` is an enumerable
|
| 1622 |
+
// property name of `obj`.
|
| 1623 |
+
function keyInObj(value, key, obj) {
|
| 1624 |
+
return key in obj;
|
| 1625 |
+
}
|
| 1626 |
+
|
| 1627 |
+
// Return a copy of the object only containing the allowed properties.
|
| 1628 |
+
var pick = restArguments(function(obj, keys) {
|
| 1629 |
+
var result = {}, iteratee = keys[0];
|
| 1630 |
+
if (obj == null) return result;
|
| 1631 |
+
if (isFunction$1(iteratee)) {
|
| 1632 |
+
if (keys.length > 1) iteratee = optimizeCb(iteratee, keys[1]);
|
| 1633 |
+
keys = allKeys(obj);
|
| 1634 |
+
} else {
|
| 1635 |
+
iteratee = keyInObj;
|
| 1636 |
+
keys = flatten$1(keys, false, false);
|
| 1637 |
+
obj = Object(obj);
|
| 1638 |
+
}
|
| 1639 |
+
for (var i = 0, length = keys.length; i < length; i++) {
|
| 1640 |
+
var key = keys[i];
|
| 1641 |
+
var value = obj[key];
|
| 1642 |
+
if (iteratee(value, key, obj)) result[key] = value;
|
| 1643 |
+
}
|
| 1644 |
+
return result;
|
| 1645 |
+
});
|
| 1646 |
+
|
| 1647 |
+
// Return a copy of the object without the disallowed properties.
|
| 1648 |
+
var omit = restArguments(function(obj, keys) {
|
| 1649 |
+
var iteratee = keys[0], context;
|
| 1650 |
+
if (isFunction$1(iteratee)) {
|
| 1651 |
+
iteratee = negate(iteratee);
|
| 1652 |
+
if (keys.length > 1) context = keys[1];
|
| 1653 |
+
} else {
|
| 1654 |
+
keys = map(flatten$1(keys, false, false), String);
|
| 1655 |
+
iteratee = function(value, key) {
|
| 1656 |
+
return !contains(keys, key);
|
| 1657 |
+
};
|
| 1658 |
+
}
|
| 1659 |
+
return pick(obj, iteratee, context);
|
| 1660 |
+
});
|
| 1661 |
+
|
| 1662 |
+
// Returns everything but the last entry of the array. Especially useful on
|
| 1663 |
+
// the arguments object. Passing **n** will return all the values in
|
| 1664 |
+
// the array, excluding the last N.
|
| 1665 |
+
function initial(array, n, guard) {
|
| 1666 |
+
return slice.call(array, 0, Math.max(0, array.length - (n == null || guard ? 1 : n)));
|
| 1667 |
+
}
|
| 1668 |
+
|
| 1669 |
+
// Get the first element of an array. Passing **n** will return the first N
|
| 1670 |
+
// values in the array. The **guard** check allows it to work with `_.map`.
|
| 1671 |
+
function first(array, n, guard) {
|
| 1672 |
+
if (array == null || array.length < 1) return n == null || guard ? void 0 : [];
|
| 1673 |
+
if (n == null || guard) return array[0];
|
| 1674 |
+
return initial(array, array.length - n);
|
| 1675 |
+
}
|
| 1676 |
+
|
| 1677 |
+
// Returns everything but the first entry of the `array`. Especially useful on
|
| 1678 |
+
// the `arguments` object. Passing an **n** will return the rest N values in the
|
| 1679 |
+
// `array`.
|
| 1680 |
+
function rest(array, n, guard) {
|
| 1681 |
+
return slice.call(array, n == null || guard ? 1 : n);
|
| 1682 |
+
}
|
| 1683 |
+
|
| 1684 |
+
// Get the last element of an array. Passing **n** will return the last N
|
| 1685 |
+
// values in the array.
|
| 1686 |
+
function last(array, n, guard) {
|
| 1687 |
+
if (array == null || array.length < 1) return n == null || guard ? void 0 : [];
|
| 1688 |
+
if (n == null || guard) return array[array.length - 1];
|
| 1689 |
+
return rest(array, Math.max(0, array.length - n));
|
| 1690 |
+
}
|
| 1691 |
+
|
| 1692 |
+
// Trim out all falsy values from an array.
|
| 1693 |
+
function compact(array) {
|
| 1694 |
+
return filter(array, Boolean);
|
| 1695 |
+
}
|
| 1696 |
+
|
| 1697 |
+
// Flatten out an array, either recursively (by default), or up to `depth`.
|
| 1698 |
+
// Passing `true` or `false` as `depth` means `1` or `Infinity`, respectively.
|
| 1699 |
+
function flatten(array, depth) {
|
| 1700 |
+
return flatten$1(array, depth, false);
|
| 1701 |
+
}
|
| 1702 |
+
|
| 1703 |
+
// Take the difference between one array and a number of other arrays.
|
| 1704 |
+
// Only the elements present in just the first array will remain.
|
| 1705 |
+
var difference = restArguments(function(array, rest) {
|
| 1706 |
+
rest = flatten$1(rest, true, true);
|
| 1707 |
+
return filter(array, function(value){
|
| 1708 |
+
return !contains(rest, value);
|
| 1709 |
+
});
|
| 1710 |
+
});
|
| 1711 |
+
|
| 1712 |
+
// Return a version of the array that does not contain the specified value(s).
|
| 1713 |
+
var without = restArguments(function(array, otherArrays) {
|
| 1714 |
+
return difference(array, otherArrays);
|
| 1715 |
+
});
|
| 1716 |
+
|
| 1717 |
+
// Produce a duplicate-free version of the array. If the array has already
|
| 1718 |
+
// been sorted, you have the option of using a faster algorithm.
|
| 1719 |
+
// The faster algorithm will not work with an iteratee if the iteratee
|
| 1720 |
+
// is not a one-to-one function, so providing an iteratee will disable
|
| 1721 |
+
// the faster algorithm.
|
| 1722 |
+
function uniq(array, isSorted, iteratee, context) {
|
| 1723 |
+
if (!isBoolean(isSorted)) {
|
| 1724 |
+
context = iteratee;
|
| 1725 |
+
iteratee = isSorted;
|
| 1726 |
+
isSorted = false;
|
| 1727 |
+
}
|
| 1728 |
+
if (iteratee != null) iteratee = cb(iteratee, context);
|
| 1729 |
+
var result = [];
|
| 1730 |
+
var seen = [];
|
| 1731 |
+
for (var i = 0, length = getLength(array); i < length; i++) {
|
| 1732 |
+
var value = array[i],
|
| 1733 |
+
computed = iteratee ? iteratee(value, i, array) : value;
|
| 1734 |
+
if (isSorted && !iteratee) {
|
| 1735 |
+
if (!i || seen !== computed) result.push(value);
|
| 1736 |
+
seen = computed;
|
| 1737 |
+
} else if (iteratee) {
|
| 1738 |
+
if (!contains(seen, computed)) {
|
| 1739 |
+
seen.push(computed);
|
| 1740 |
+
result.push(value);
|
| 1741 |
+
}
|
| 1742 |
+
} else if (!contains(result, value)) {
|
| 1743 |
+
result.push(value);
|
| 1744 |
+
}
|
| 1745 |
+
}
|
| 1746 |
+
return result;
|
| 1747 |
+
}
|
| 1748 |
+
|
| 1749 |
+
// Produce an array that contains the union: each distinct element from all of
|
| 1750 |
+
// the passed-in arrays.
|
| 1751 |
+
var union = restArguments(function(arrays) {
|
| 1752 |
+
return uniq(flatten$1(arrays, true, true));
|
| 1753 |
+
});
|
| 1754 |
+
|
| 1755 |
+
// Produce an array that contains every item shared between all the
|
| 1756 |
+
// passed-in arrays.
|
| 1757 |
+
function intersection(array) {
|
| 1758 |
+
var result = [];
|
| 1759 |
+
var argsLength = arguments.length;
|
| 1760 |
+
for (var i = 0, length = getLength(array); i < length; i++) {
|
| 1761 |
+
var item = array[i];
|
| 1762 |
+
if (contains(result, item)) continue;
|
| 1763 |
+
var j;
|
| 1764 |
+
for (j = 1; j < argsLength; j++) {
|
| 1765 |
+
if (!contains(arguments[j], item)) break;
|
| 1766 |
+
}
|
| 1767 |
+
if (j === argsLength) result.push(item);
|
| 1768 |
+
}
|
| 1769 |
+
return result;
|
| 1770 |
+
}
|
| 1771 |
+
|
| 1772 |
+
// Complement of zip. Unzip accepts an array of arrays and groups
|
| 1773 |
+
// each array's elements on shared indices.
|
| 1774 |
+
function unzip(array) {
|
| 1775 |
+
var length = array && max(array, getLength).length || 0;
|
| 1776 |
+
var result = Array(length);
|
| 1777 |
+
|
| 1778 |
+
for (var index = 0; index < length; index++) {
|
| 1779 |
+
result[index] = pluck(array, index);
|
| 1780 |
+
}
|
| 1781 |
+
return result;
|
| 1782 |
+
}
|
| 1783 |
+
|
| 1784 |
+
// Zip together multiple lists into a single array -- elements that share
|
| 1785 |
+
// an index go together.
|
| 1786 |
+
var zip = restArguments(unzip);
|
| 1787 |
+
|
| 1788 |
+
// Converts lists into objects. Pass either a single array of `[key, value]`
|
| 1789 |
+
// pairs, or two parallel arrays of the same length -- one of keys, and one of
|
| 1790 |
+
// the corresponding values. Passing by pairs is the reverse of `_.pairs`.
|
| 1791 |
+
function object(list, values) {
|
| 1792 |
+
var result = {};
|
| 1793 |
+
for (var i = 0, length = getLength(list); i < length; i++) {
|
| 1794 |
+
if (values) {
|
| 1795 |
+
result[list[i]] = values[i];
|
| 1796 |
+
} else {
|
| 1797 |
+
result[list[i][0]] = list[i][1];
|
| 1798 |
+
}
|
| 1799 |
+
}
|
| 1800 |
+
return result;
|
| 1801 |
+
}
|
| 1802 |
+
|
| 1803 |
+
// Generate an integer Array containing an arithmetic progression. A port of
|
| 1804 |
+
// the native Python `range()` function. See
|
| 1805 |
+
// [the Python documentation](https://docs.python.org/library/functions.html#range).
|
| 1806 |
+
function range(start, stop, step) {
|
| 1807 |
+
if (stop == null) {
|
| 1808 |
+
stop = start || 0;
|
| 1809 |
+
start = 0;
|
| 1810 |
+
}
|
| 1811 |
+
if (!step) {
|
| 1812 |
+
step = stop < start ? -1 : 1;
|
| 1813 |
+
}
|
| 1814 |
+
|
| 1815 |
+
var length = Math.max(Math.ceil((stop - start) / step), 0);
|
| 1816 |
+
var range = Array(length);
|
| 1817 |
+
|
| 1818 |
+
for (var idx = 0; idx < length; idx++, start += step) {
|
| 1819 |
+
range[idx] = start;
|
| 1820 |
+
}
|
| 1821 |
+
|
| 1822 |
+
return range;
|
| 1823 |
+
}
|
| 1824 |
+
|
| 1825 |
+
// Chunk a single array into multiple arrays, each containing `count` or fewer
|
| 1826 |
+
// items.
|
| 1827 |
+
function chunk(array, count) {
|
| 1828 |
+
if (count == null || count < 1) return [];
|
| 1829 |
+
var result = [];
|
| 1830 |
+
var i = 0, length = array.length;
|
| 1831 |
+
while (i < length) {
|
| 1832 |
+
result.push(slice.call(array, i, i += count));
|
| 1833 |
+
}
|
| 1834 |
+
return result;
|
| 1835 |
+
}
|
| 1836 |
+
|
| 1837 |
+
// Helper function to continue chaining intermediate results.
|
| 1838 |
+
function chainResult(instance, obj) {
|
| 1839 |
+
return instance._chain ? _$1(obj).chain() : obj;
|
| 1840 |
+
}
|
| 1841 |
+
|
| 1842 |
+
// Add your own custom functions to the Underscore object.
|
| 1843 |
+
function mixin(obj) {
|
| 1844 |
+
each(functions(obj), function(name) {
|
| 1845 |
+
var func = _$1[name] = obj[name];
|
| 1846 |
+
_$1.prototype[name] = function() {
|
| 1847 |
+
var args = [this._wrapped];
|
| 1848 |
+
push.apply(args, arguments);
|
| 1849 |
+
return chainResult(this, func.apply(_$1, args));
|
| 1850 |
+
};
|
| 1851 |
+
});
|
| 1852 |
+
return _$1;
|
| 1853 |
+
}
|
| 1854 |
+
|
| 1855 |
+
// Add all mutator `Array` functions to the wrapper.
|
| 1856 |
+
each(['pop', 'push', 'reverse', 'shift', 'sort', 'splice', 'unshift'], function(name) {
|
| 1857 |
+
var method = ArrayProto[name];
|
| 1858 |
+
_$1.prototype[name] = function() {
|
| 1859 |
+
var obj = this._wrapped;
|
| 1860 |
+
if (obj != null) {
|
| 1861 |
+
method.apply(obj, arguments);
|
| 1862 |
+
if ((name === 'shift' || name === 'splice') && obj.length === 0) {
|
| 1863 |
+
delete obj[0];
|
| 1864 |
+
}
|
| 1865 |
+
}
|
| 1866 |
+
return chainResult(this, obj);
|
| 1867 |
+
};
|
| 1868 |
+
});
|
| 1869 |
+
|
| 1870 |
+
// Add all accessor `Array` functions to the wrapper.
|
| 1871 |
+
each(['concat', 'join', 'slice'], function(name) {
|
| 1872 |
+
var method = ArrayProto[name];
|
| 1873 |
+
_$1.prototype[name] = function() {
|
| 1874 |
+
var obj = this._wrapped;
|
| 1875 |
+
if (obj != null) obj = method.apply(obj, arguments);
|
| 1876 |
+
return chainResult(this, obj);
|
| 1877 |
+
};
|
| 1878 |
+
});
|
| 1879 |
+
|
| 1880 |
+
// Named Exports
|
| 1881 |
+
|
| 1882 |
+
var allExports = {
|
| 1883 |
+
__proto__: null,
|
| 1884 |
+
VERSION: VERSION,
|
| 1885 |
+
restArguments: restArguments,
|
| 1886 |
+
isObject: isObject,
|
| 1887 |
+
isNull: isNull,
|
| 1888 |
+
isUndefined: isUndefined,
|
| 1889 |
+
isBoolean: isBoolean,
|
| 1890 |
+
isElement: isElement,
|
| 1891 |
+
isString: isString,
|
| 1892 |
+
isNumber: isNumber,
|
| 1893 |
+
isDate: isDate,
|
| 1894 |
+
isRegExp: isRegExp,
|
| 1895 |
+
isError: isError,
|
| 1896 |
+
isSymbol: isSymbol,
|
| 1897 |
+
isArrayBuffer: isArrayBuffer,
|
| 1898 |
+
isDataView: isDataView$1,
|
| 1899 |
+
isArray: isArray,
|
| 1900 |
+
isFunction: isFunction$1,
|
| 1901 |
+
isArguments: isArguments$1,
|
| 1902 |
+
isFinite: isFinite$1,
|
| 1903 |
+
isNaN: isNaN$1,
|
| 1904 |
+
isTypedArray: isTypedArray$1,
|
| 1905 |
+
isEmpty: isEmpty,
|
| 1906 |
+
isMatch: isMatch,
|
| 1907 |
+
isEqual: isEqual,
|
| 1908 |
+
isMap: isMap,
|
| 1909 |
+
isWeakMap: isWeakMap,
|
| 1910 |
+
isSet: isSet,
|
| 1911 |
+
isWeakSet: isWeakSet,
|
| 1912 |
+
keys: keys,
|
| 1913 |
+
allKeys: allKeys,
|
| 1914 |
+
values: values,
|
| 1915 |
+
pairs: pairs,
|
| 1916 |
+
invert: invert,
|
| 1917 |
+
functions: functions,
|
| 1918 |
+
methods: functions,
|
| 1919 |
+
extend: extend,
|
| 1920 |
+
extendOwn: extendOwn,
|
| 1921 |
+
assign: extendOwn,
|
| 1922 |
+
defaults: defaults,
|
| 1923 |
+
create: create,
|
| 1924 |
+
clone: clone,
|
| 1925 |
+
tap: tap,
|
| 1926 |
+
get: get,
|
| 1927 |
+
has: has,
|
| 1928 |
+
mapObject: mapObject,
|
| 1929 |
+
identity: identity,
|
| 1930 |
+
constant: constant,
|
| 1931 |
+
noop: noop,
|
| 1932 |
+
toPath: toPath$1,
|
| 1933 |
+
property: property,
|
| 1934 |
+
propertyOf: propertyOf,
|
| 1935 |
+
matcher: matcher,
|
| 1936 |
+
matches: matcher,
|
| 1937 |
+
times: times,
|
| 1938 |
+
random: random,
|
| 1939 |
+
now: now,
|
| 1940 |
+
escape: _escape,
|
| 1941 |
+
unescape: _unescape,
|
| 1942 |
+
templateSettings: templateSettings,
|
| 1943 |
+
template: template,
|
| 1944 |
+
result: result,
|
| 1945 |
+
uniqueId: uniqueId,
|
| 1946 |
+
chain: chain,
|
| 1947 |
+
iteratee: iteratee,
|
| 1948 |
+
partial: partial,
|
| 1949 |
+
bind: bind,
|
| 1950 |
+
bindAll: bindAll,
|
| 1951 |
+
memoize: memoize,
|
| 1952 |
+
delay: delay,
|
| 1953 |
+
defer: defer,
|
| 1954 |
+
throttle: throttle,
|
| 1955 |
+
debounce: debounce,
|
| 1956 |
+
wrap: wrap,
|
| 1957 |
+
negate: negate,
|
| 1958 |
+
compose: compose,
|
| 1959 |
+
after: after,
|
| 1960 |
+
before: before,
|
| 1961 |
+
once: once,
|
| 1962 |
+
findKey: findKey,
|
| 1963 |
+
findIndex: findIndex,
|
| 1964 |
+
findLastIndex: findLastIndex,
|
| 1965 |
+
sortedIndex: sortedIndex,
|
| 1966 |
+
indexOf: indexOf,
|
| 1967 |
+
lastIndexOf: lastIndexOf,
|
| 1968 |
+
find: find,
|
| 1969 |
+
detect: find,
|
| 1970 |
+
findWhere: findWhere,
|
| 1971 |
+
each: each,
|
| 1972 |
+
forEach: each,
|
| 1973 |
+
map: map,
|
| 1974 |
+
collect: map,
|
| 1975 |
+
reduce: reduce,
|
| 1976 |
+
foldl: reduce,
|
| 1977 |
+
inject: reduce,
|
| 1978 |
+
reduceRight: reduceRight,
|
| 1979 |
+
foldr: reduceRight,
|
| 1980 |
+
filter: filter,
|
| 1981 |
+
select: filter,
|
| 1982 |
+
reject: reject,
|
| 1983 |
+
every: every,
|
| 1984 |
+
all: every,
|
| 1985 |
+
some: some,
|
| 1986 |
+
any: some,
|
| 1987 |
+
contains: contains,
|
| 1988 |
+
includes: contains,
|
| 1989 |
+
include: contains,
|
| 1990 |
+
invoke: invoke,
|
| 1991 |
+
pluck: pluck,
|
| 1992 |
+
where: where,
|
| 1993 |
+
max: max,
|
| 1994 |
+
min: min,
|
| 1995 |
+
shuffle: shuffle,
|
| 1996 |
+
sample: sample,
|
| 1997 |
+
sortBy: sortBy,
|
| 1998 |
+
groupBy: groupBy,
|
| 1999 |
+
indexBy: indexBy,
|
| 2000 |
+
countBy: countBy,
|
| 2001 |
+
partition: partition,
|
| 2002 |
+
toArray: toArray,
|
| 2003 |
+
size: size,
|
| 2004 |
+
pick: pick,
|
| 2005 |
+
omit: omit,
|
| 2006 |
+
first: first,
|
| 2007 |
+
head: first,
|
| 2008 |
+
take: first,
|
| 2009 |
+
initial: initial,
|
| 2010 |
+
last: last,
|
| 2011 |
+
rest: rest,
|
| 2012 |
+
tail: rest,
|
| 2013 |
+
drop: rest,
|
| 2014 |
+
compact: compact,
|
| 2015 |
+
flatten: flatten,
|
| 2016 |
+
without: without,
|
| 2017 |
+
uniq: uniq,
|
| 2018 |
+
unique: uniq,
|
| 2019 |
+
union: union,
|
| 2020 |
+
intersection: intersection,
|
| 2021 |
+
difference: difference,
|
| 2022 |
+
unzip: unzip,
|
| 2023 |
+
transpose: unzip,
|
| 2024 |
+
zip: zip,
|
| 2025 |
+
object: object,
|
| 2026 |
+
range: range,
|
| 2027 |
+
chunk: chunk,
|
| 2028 |
+
mixin: mixin,
|
| 2029 |
+
'default': _$1
|
| 2030 |
+
};
|
| 2031 |
+
|
| 2032 |
+
// Default Export
|
| 2033 |
+
|
| 2034 |
+
// Add all of the Underscore functions to the wrapper object.
|
| 2035 |
+
var _ = mixin(allExports);
|
| 2036 |
+
// Legacy Node.js API.
|
| 2037 |
+
_._ = _;
|
| 2038 |
+
|
| 2039 |
+
return _;
|
| 2040 |
+
|
| 2041 |
+
})));
|
| 2042 |
+
//# sourceMappingURL=underscore-umd.js.map
|
toolchain/cmake-3.27.9-linux-x86_64/doc/cmake/html/_static/underscore.js
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
!function(n,r){"object"==typeof exports&&"undefined"!=typeof module?module.exports=r():"function"==typeof define&&define.amd?define("underscore",r):(n="undefined"!=typeof globalThis?globalThis:n||self,function(){var t=n._,e=n._=r();e.noConflict=function(){return n._=t,e}}())}(this,(function(){
|
| 2 |
+
// Underscore.js 1.13.1
|
| 3 |
+
// https://underscorejs.org
|
| 4 |
+
// (c) 2009-2021 Jeremy Ashkenas, Julian Gonggrijp, and DocumentCloud and Investigative Reporters & Editors
|
| 5 |
+
// Underscore may be freely distributed under the MIT license.
|
| 6 |
+
var n="1.13.1",r="object"==typeof self&&self.self===self&&self||"object"==typeof global&&global.global===global&&global||Function("return this")()||{},t=Array.prototype,e=Object.prototype,u="undefined"!=typeof Symbol?Symbol.prototype:null,o=t.push,i=t.slice,a=e.toString,f=e.hasOwnProperty,c="undefined"!=typeof ArrayBuffer,l="undefined"!=typeof DataView,s=Array.isArray,p=Object.keys,v=Object.create,h=c&&ArrayBuffer.isView,y=isNaN,d=isFinite,g=!{toString:null}.propertyIsEnumerable("toString"),b=["valueOf","isPrototypeOf","toString","propertyIsEnumerable","hasOwnProperty","toLocaleString"],m=Math.pow(2,53)-1;function j(n,r){return r=null==r?n.length-1:+r,function(){for(var t=Math.max(arguments.length-r,0),e=Array(t),u=0;u<t;u++)e[u]=arguments[u+r];switch(r){case 0:return n.call(this,e);case 1:return n.call(this,arguments[0],e);case 2:return n.call(this,arguments[0],arguments[1],e)}var o=Array(r+1);for(u=0;u<r;u++)o[u]=arguments[u];return o[r]=e,n.apply(this,o)}}function _(n){var r=typeof n;return"function"===r||"object"===r&&!!n}function w(n){return void 0===n}function A(n){return!0===n||!1===n||"[object Boolean]"===a.call(n)}function x(n){var r="[object "+n+"]";return function(n){return a.call(n)===r}}var S=x("String"),O=x("Number"),M=x("Date"),E=x("RegExp"),B=x("Error"),N=x("Symbol"),I=x("ArrayBuffer"),T=x("Function"),k=r.document&&r.document.childNodes;"function"!=typeof/./&&"object"!=typeof Int8Array&&"function"!=typeof k&&(T=function(n){return"function"==typeof n||!1});var D=T,R=x("Object"),F=l&&R(new DataView(new ArrayBuffer(8))),V="undefined"!=typeof Map&&R(new Map),P=x("DataView");var q=F?function(n){return null!=n&&D(n.getInt8)&&I(n.buffer)}:P,U=s||x("Array");function W(n,r){return null!=n&&f.call(n,r)}var z=x("Arguments");!function(){z(arguments)||(z=function(n){return W(n,"callee")})}();var L=z;function $(n){return O(n)&&y(n)}function C(n){return function(){return n}}function K(n){return function(r){var t=n(r);return"number"==typeof t&&t>=0&&t<=m}}function J(n){return function(r){return null==r?void 0:r[n]}}var G=J("byteLength"),H=K(G),Q=/\[object ((I|Ui)nt(8|16|32)|Float(32|64)|Uint8Clamped|Big(I|Ui)nt64)Array\]/;var X=c?function(n){return h?h(n)&&!q(n):H(n)&&Q.test(a.call(n))}:C(!1),Y=J("length");function Z(n,r){r=function(n){for(var r={},t=n.length,e=0;e<t;++e)r[n[e]]=!0;return{contains:function(n){return r[n]},push:function(t){return r[t]=!0,n.push(t)}}}(r);var t=b.length,u=n.constructor,o=D(u)&&u.prototype||e,i="constructor";for(W(n,i)&&!r.contains(i)&&r.push(i);t--;)(i=b[t])in n&&n[i]!==o[i]&&!r.contains(i)&&r.push(i)}function nn(n){if(!_(n))return[];if(p)return p(n);var r=[];for(var t in n)W(n,t)&&r.push(t);return g&&Z(n,r),r}function rn(n,r){var t=nn(r),e=t.length;if(null==n)return!e;for(var u=Object(n),o=0;o<e;o++){var i=t[o];if(r[i]!==u[i]||!(i in u))return!1}return!0}function tn(n){return n instanceof tn?n:this instanceof tn?void(this._wrapped=n):new tn(n)}function en(n){return new Uint8Array(n.buffer||n,n.byteOffset||0,G(n))}tn.VERSION=n,tn.prototype.value=function(){return this._wrapped},tn.prototype.valueOf=tn.prototype.toJSON=tn.prototype.value,tn.prototype.toString=function(){return String(this._wrapped)};var un="[object DataView]";function on(n,r,t,e){if(n===r)return 0!==n||1/n==1/r;if(null==n||null==r)return!1;if(n!=n)return r!=r;var o=typeof n;return("function"===o||"object"===o||"object"==typeof r)&&function n(r,t,e,o){r instanceof tn&&(r=r._wrapped);t instanceof tn&&(t=t._wrapped);var i=a.call(r);if(i!==a.call(t))return!1;if(F&&"[object Object]"==i&&q(r)){if(!q(t))return!1;i=un}switch(i){case"[object RegExp]":case"[object String]":return""+r==""+t;case"[object Number]":return+r!=+r?+t!=+t:0==+r?1/+r==1/t:+r==+t;case"[object Date]":case"[object Boolean]":return+r==+t;case"[object Symbol]":return u.valueOf.call(r)===u.valueOf.call(t);case"[object ArrayBuffer]":case un:return n(en(r),en(t),e,o)}var f="[object Array]"===i;if(!f&&X(r)){if(G(r)!==G(t))return!1;if(r.buffer===t.buffer&&r.byteOffset===t.byteOffset)return!0;f=!0}if(!f){if("object"!=typeof r||"object"!=typeof t)return!1;var c=r.constructor,l=t.constructor;if(c!==l&&!(D(c)&&c instanceof c&&D(l)&&l instanceof l)&&"constructor"in r&&"constructor"in t)return!1}o=o||[];var s=(e=e||[]).length;for(;s--;)if(e[s]===r)return o[s]===t;if(e.push(r),o.push(t),f){if((s=r.length)!==t.length)return!1;for(;s--;)if(!on(r[s],t[s],e,o))return!1}else{var p,v=nn(r);if(s=v.length,nn(t).length!==s)return!1;for(;s--;)if(p=v[s],!W(t,p)||!on(r[p],t[p],e,o))return!1}return e.pop(),o.pop(),!0}(n,r,t,e)}function an(n){if(!_(n))return[];var r=[];for(var t in n)r.push(t);return g&&Z(n,r),r}function fn(n){var r=Y(n);return function(t){if(null==t)return!1;var e=an(t);if(Y(e))return!1;for(var u=0;u<r;u++)if(!D(t[n[u]]))return!1;return n!==hn||!D(t[cn])}}var cn="forEach",ln="has",sn=["clear","delete"],pn=["get",ln,"set"],vn=sn.concat(cn,pn),hn=sn.concat(pn),yn=["add"].concat(sn,cn,ln),dn=V?fn(vn):x("Map"),gn=V?fn(hn):x("WeakMap"),bn=V?fn(yn):x("Set"),mn=x("WeakSet");function jn(n){for(var r=nn(n),t=r.length,e=Array(t),u=0;u<t;u++)e[u]=n[r[u]];return e}function _n(n){for(var r={},t=nn(n),e=0,u=t.length;e<u;e++)r[n[t[e]]]=t[e];return r}function wn(n){var r=[];for(var t in n)D(n[t])&&r.push(t);return r.sort()}function An(n,r){return function(t){var e=arguments.length;if(r&&(t=Object(t)),e<2||null==t)return t;for(var u=1;u<e;u++)for(var o=arguments[u],i=n(o),a=i.length,f=0;f<a;f++){var c=i[f];r&&void 0!==t[c]||(t[c]=o[c])}return t}}var xn=An(an),Sn=An(nn),On=An(an,!0);function Mn(n){if(!_(n))return{};if(v)return v(n);var r=function(){};r.prototype=n;var t=new r;return r.prototype=null,t}function En(n){return _(n)?U(n)?n.slice():xn({},n):n}function Bn(n){return U(n)?n:[n]}function Nn(n){return tn.toPath(n)}function In(n,r){for(var t=r.length,e=0;e<t;e++){if(null==n)return;n=n[r[e]]}return t?n:void 0}function Tn(n,r,t){var e=In(n,Nn(r));return w(e)?t:e}function kn(n){return n}function Dn(n){return n=Sn({},n),function(r){return rn(r,n)}}function Rn(n){return n=Nn(n),function(r){return In(r,n)}}function Fn(n,r,t){if(void 0===r)return n;switch(null==t?3:t){case 1:return function(t){return n.call(r,t)};case 3:return function(t,e,u){return n.call(r,t,e,u)};case 4:return function(t,e,u,o){return n.call(r,t,e,u,o)}}return function(){return n.apply(r,arguments)}}function Vn(n,r,t){return null==n?kn:D(n)?Fn(n,r,t):_(n)&&!U(n)?Dn(n):Rn(n)}function Pn(n,r){return Vn(n,r,1/0)}function qn(n,r,t){return tn.iteratee!==Pn?tn.iteratee(n,r):Vn(n,r,t)}function Un(){}function Wn(n,r){return null==r&&(r=n,n=0),n+Math.floor(Math.random()*(r-n+1))}tn.toPath=Bn,tn.iteratee=Pn;var zn=Date.now||function(){return(new Date).getTime()};function Ln(n){var r=function(r){return n[r]},t="(?:"+nn(n).join("|")+")",e=RegExp(t),u=RegExp(t,"g");return function(n){return n=null==n?"":""+n,e.test(n)?n.replace(u,r):n}}var $n={"&":"&","<":"<",">":">",'"':""","'":"'","`":"`"},Cn=Ln($n),Kn=Ln(_n($n)),Jn=tn.templateSettings={evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,escape:/<%-([\s\S]+?)%>/g},Gn=/(.)^/,Hn={"'":"'","\\":"\\","\r":"r","\n":"n","\u2028":"u2028","\u2029":"u2029"},Qn=/\\|'|\r|\n|\u2028|\u2029/g;function Xn(n){return"\\"+Hn[n]}var Yn=/^\s*(\w|\$)+\s*$/;var Zn=0;function nr(n,r,t,e,u){if(!(e instanceof r))return n.apply(t,u);var o=Mn(n.prototype),i=n.apply(o,u);return _(i)?i:o}var rr=j((function(n,r){var t=rr.placeholder,e=function(){for(var u=0,o=r.length,i=Array(o),a=0;a<o;a++)i[a]=r[a]===t?arguments[u++]:r[a];for(;u<arguments.length;)i.push(arguments[u++]);return nr(n,e,this,this,i)};return e}));rr.placeholder=tn;var tr=j((function(n,r,t){if(!D(n))throw new TypeError("Bind must be called on a function");var e=j((function(u){return nr(n,e,r,this,t.concat(u))}));return e})),er=K(Y);function ur(n,r,t,e){if(e=e||[],r||0===r){if(r<=0)return e.concat(n)}else r=1/0;for(var u=e.length,o=0,i=Y(n);o<i;o++){var a=n[o];if(er(a)&&(U(a)||L(a)))if(r>1)ur(a,r-1,t,e),u=e.length;else for(var f=0,c=a.length;f<c;)e[u++]=a[f++];else t||(e[u++]=a)}return e}var or=j((function(n,r){var t=(r=ur(r,!1,!1)).length;if(t<1)throw new Error("bindAll must be passed function names");for(;t--;){var e=r[t];n[e]=tr(n[e],n)}return n}));var ir=j((function(n,r,t){return setTimeout((function(){return n.apply(null,t)}),r)})),ar=rr(ir,tn,1);function fr(n){return function(){return!n.apply(this,arguments)}}function cr(n,r){var t;return function(){return--n>0&&(t=r.apply(this,arguments)),n<=1&&(r=null),t}}var lr=rr(cr,2);function sr(n,r,t){r=qn(r,t);for(var e,u=nn(n),o=0,i=u.length;o<i;o++)if(r(n[e=u[o]],e,n))return e}function pr(n){return function(r,t,e){t=qn(t,e);for(var u=Y(r),o=n>0?0:u-1;o>=0&&o<u;o+=n)if(t(r[o],o,r))return o;return-1}}var vr=pr(1),hr=pr(-1);function yr(n,r,t,e){for(var u=(t=qn(t,e,1))(r),o=0,i=Y(n);o<i;){var a=Math.floor((o+i)/2);t(n[a])<u?o=a+1:i=a}return o}function dr(n,r,t){return function(e,u,o){var a=0,f=Y(e);if("number"==typeof o)n>0?a=o>=0?o:Math.max(o+f,a):f=o>=0?Math.min(o+1,f):o+f+1;else if(t&&o&&f)return e[o=t(e,u)]===u?o:-1;if(u!=u)return(o=r(i.call(e,a,f),$))>=0?o+a:-1;for(o=n>0?a:f-1;o>=0&&o<f;o+=n)if(e[o]===u)return o;return-1}}var gr=dr(1,vr,yr),br=dr(-1,hr);function mr(n,r,t){var e=(er(n)?vr:sr)(n,r,t);if(void 0!==e&&-1!==e)return n[e]}function jr(n,r,t){var e,u;if(r=Fn(r,t),er(n))for(e=0,u=n.length;e<u;e++)r(n[e],e,n);else{var o=nn(n);for(e=0,u=o.length;e<u;e++)r(n[o[e]],o[e],n)}return n}function _r(n,r,t){r=qn(r,t);for(var e=!er(n)&&nn(n),u=(e||n).length,o=Array(u),i=0;i<u;i++){var a=e?e[i]:i;o[i]=r(n[a],a,n)}return o}function wr(n){var r=function(r,t,e,u){var o=!er(r)&&nn(r),i=(o||r).length,a=n>0?0:i-1;for(u||(e=r[o?o[a]:a],a+=n);a>=0&&a<i;a+=n){var f=o?o[a]:a;e=t(e,r[f],f,r)}return e};return function(n,t,e,u){var o=arguments.length>=3;return r(n,Fn(t,u,4),e,o)}}var Ar=wr(1),xr=wr(-1);function Sr(n,r,t){var e=[];return r=qn(r,t),jr(n,(function(n,t,u){r(n,t,u)&&e.push(n)})),e}function Or(n,r,t){r=qn(r,t);for(var e=!er(n)&&nn(n),u=(e||n).length,o=0;o<u;o++){var i=e?e[o]:o;if(!r(n[i],i,n))return!1}return!0}function Mr(n,r,t){r=qn(r,t);for(var e=!er(n)&&nn(n),u=(e||n).length,o=0;o<u;o++){var i=e?e[o]:o;if(r(n[i],i,n))return!0}return!1}function Er(n,r,t,e){return er(n)||(n=jn(n)),("number"!=typeof t||e)&&(t=0),gr(n,r,t)>=0}var Br=j((function(n,r,t){var e,u;return D(r)?u=r:(r=Nn(r),e=r.slice(0,-1),r=r[r.length-1]),_r(n,(function(n){var o=u;if(!o){if(e&&e.length&&(n=In(n,e)),null==n)return;o=n[r]}return null==o?o:o.apply(n,t)}))}));function Nr(n,r){return _r(n,Rn(r))}function Ir(n,r,t){var e,u,o=-1/0,i=-1/0;if(null==r||"number"==typeof r&&"object"!=typeof n[0]&&null!=n)for(var a=0,f=(n=er(n)?n:jn(n)).length;a<f;a++)null!=(e=n[a])&&e>o&&(o=e);else r=qn(r,t),jr(n,(function(n,t,e){((u=r(n,t,e))>i||u===-1/0&&o===-1/0)&&(o=n,i=u)}));return o}function Tr(n,r,t){if(null==r||t)return er(n)||(n=jn(n)),n[Wn(n.length-1)];var e=er(n)?En(n):jn(n),u=Y(e);r=Math.max(Math.min(r,u),0);for(var o=u-1,i=0;i<r;i++){var a=Wn(i,o),f=e[i];e[i]=e[a],e[a]=f}return e.slice(0,r)}function kr(n,r){return function(t,e,u){var o=r?[[],[]]:{};return e=qn(e,u),jr(t,(function(r,u){var i=e(r,u,t);n(o,r,i)})),o}}var Dr=kr((function(n,r,t){W(n,t)?n[t].push(r):n[t]=[r]})),Rr=kr((function(n,r,t){n[t]=r})),Fr=kr((function(n,r,t){W(n,t)?n[t]++:n[t]=1})),Vr=kr((function(n,r,t){n[t?0:1].push(r)}),!0),Pr=/[^\ud800-\udfff]|[\ud800-\udbff][\udc00-\udfff]|[\ud800-\udfff]/g;function qr(n,r,t){return r in t}var Ur=j((function(n,r){var t={},e=r[0];if(null==n)return t;D(e)?(r.length>1&&(e=Fn(e,r[1])),r=an(n)):(e=qr,r=ur(r,!1,!1),n=Object(n));for(var u=0,o=r.length;u<o;u++){var i=r[u],a=n[i];e(a,i,n)&&(t[i]=a)}return t})),Wr=j((function(n,r){var t,e=r[0];return D(e)?(e=fr(e),r.length>1&&(t=r[1])):(r=_r(ur(r,!1,!1),String),e=function(n,t){return!Er(r,t)}),Ur(n,e,t)}));function zr(n,r,t){return i.call(n,0,Math.max(0,n.length-(null==r||t?1:r)))}function Lr(n,r,t){return null==n||n.length<1?null==r||t?void 0:[]:null==r||t?n[0]:zr(n,n.length-r)}function $r(n,r,t){return i.call(n,null==r||t?1:r)}var Cr=j((function(n,r){return r=ur(r,!0,!0),Sr(n,(function(n){return!Er(r,n)}))})),Kr=j((function(n,r){return Cr(n,r)}));function Jr(n,r,t,e){A(r)||(e=t,t=r,r=!1),null!=t&&(t=qn(t,e));for(var u=[],o=[],i=0,a=Y(n);i<a;i++){var f=n[i],c=t?t(f,i,n):f;r&&!t?(i&&o===c||u.push(f),o=c):t?Er(o,c)||(o.push(c),u.push(f)):Er(u,f)||u.push(f)}return u}var Gr=j((function(n){return Jr(ur(n,!0,!0))}));function Hr(n){for(var r=n&&Ir(n,Y).length||0,t=Array(r),e=0;e<r;e++)t[e]=Nr(n,e);return t}var Qr=j(Hr);function Xr(n,r){return n._chain?tn(r).chain():r}function Yr(n){return jr(wn(n),(function(r){var t=tn[r]=n[r];tn.prototype[r]=function(){var n=[this._wrapped];return o.apply(n,arguments),Xr(this,t.apply(tn,n))}})),tn}jr(["pop","push","reverse","shift","sort","splice","unshift"],(function(n){var r=t[n];tn.prototype[n]=function(){var t=this._wrapped;return null!=t&&(r.apply(t,arguments),"shift"!==n&&"splice"!==n||0!==t.length||delete t[0]),Xr(this,t)}})),jr(["concat","join","slice"],(function(n){var r=t[n];tn.prototype[n]=function(){var n=this._wrapped;return null!=n&&(n=r.apply(n,arguments)),Xr(this,n)}}));var Zr=Yr({__proto__:null,VERSION:n,restArguments:j,isObject:_,isNull:function(n){return null===n},isUndefined:w,isBoolean:A,isElement:function(n){return!(!n||1!==n.nodeType)},isString:S,isNumber:O,isDate:M,isRegExp:E,isError:B,isSymbol:N,isArrayBuffer:I,isDataView:q,isArray:U,isFunction:D,isArguments:L,isFinite:function(n){return!N(n)&&d(n)&&!isNaN(parseFloat(n))},isNaN:$,isTypedArray:X,isEmpty:function(n){if(null==n)return!0;var r=Y(n);return"number"==typeof r&&(U(n)||S(n)||L(n))?0===r:0===Y(nn(n))},isMatch:rn,isEqual:function(n,r){return on(n,r)},isMap:dn,isWeakMap:gn,isSet:bn,isWeakSet:mn,keys:nn,allKeys:an,values:jn,pairs:function(n){for(var r=nn(n),t=r.length,e=Array(t),u=0;u<t;u++)e[u]=[r[u],n[r[u]]];return e},invert:_n,functions:wn,methods:wn,extend:xn,extendOwn:Sn,assign:Sn,defaults:On,create:function(n,r){var t=Mn(n);return r&&Sn(t,r),t},clone:En,tap:function(n,r){return r(n),n},get:Tn,has:function(n,r){for(var t=(r=Nn(r)).length,e=0;e<t;e++){var u=r[e];if(!W(n,u))return!1;n=n[u]}return!!t},mapObject:function(n,r,t){r=qn(r,t);for(var e=nn(n),u=e.length,o={},i=0;i<u;i++){var a=e[i];o[a]=r(n[a],a,n)}return o},identity:kn,constant:C,noop:Un,toPath:Bn,property:Rn,propertyOf:function(n){return null==n?Un:function(r){return Tn(n,r)}},matcher:Dn,matches:Dn,times:function(n,r,t){var e=Array(Math.max(0,n));r=Fn(r,t,1);for(var u=0;u<n;u++)e[u]=r(u);return e},random:Wn,now:zn,escape:Cn,unescape:Kn,templateSettings:Jn,template:function(n,r,t){!r&&t&&(r=t),r=On({},r,tn.templateSettings);var e=RegExp([(r.escape||Gn).source,(r.interpolate||Gn).source,(r.evaluate||Gn).source].join("|")+"|$","g"),u=0,o="__p+='";n.replace(e,(function(r,t,e,i,a){return o+=n.slice(u,a).replace(Qn,Xn),u=a+r.length,t?o+="'+\n((__t=("+t+"))==null?'':_.escape(__t))+\n'":e?o+="'+\n((__t=("+e+"))==null?'':__t)+\n'":i&&(o+="';\n"+i+"\n__p+='"),r})),o+="';\n";var i,a=r.variable;if(a){if(!Yn.test(a))throw new Error("variable is not a bare identifier: "+a)}else o="with(obj||{}){\n"+o+"}\n",a="obj";o="var __t,__p='',__j=Array.prototype.join,"+"print=function(){__p+=__j.call(arguments,'');};\n"+o+"return __p;\n";try{i=new Function(a,"_",o)}catch(n){throw n.source=o,n}var f=function(n){return i.call(this,n,tn)};return f.source="function("+a+"){\n"+o+"}",f},result:function(n,r,t){var e=(r=Nn(r)).length;if(!e)return D(t)?t.call(n):t;for(var u=0;u<e;u++){var o=null==n?void 0:n[r[u]];void 0===o&&(o=t,u=e),n=D(o)?o.call(n):o}return n},uniqueId:function(n){var r=++Zn+"";return n?n+r:r},chain:function(n){var r=tn(n);return r._chain=!0,r},iteratee:Pn,partial:rr,bind:tr,bindAll:or,memoize:function(n,r){var t=function(e){var u=t.cache,o=""+(r?r.apply(this,arguments):e);return W(u,o)||(u[o]=n.apply(this,arguments)),u[o]};return t.cache={},t},delay:ir,defer:ar,throttle:function(n,r,t){var e,u,o,i,a=0;t||(t={});var f=function(){a=!1===t.leading?0:zn(),e=null,i=n.apply(u,o),e||(u=o=null)},c=function(){var c=zn();a||!1!==t.leading||(a=c);var l=r-(c-a);return u=this,o=arguments,l<=0||l>r?(e&&(clearTimeout(e),e=null),a=c,i=n.apply(u,o),e||(u=o=null)):e||!1===t.trailing||(e=setTimeout(f,l)),i};return c.cancel=function(){clearTimeout(e),a=0,e=u=o=null},c},debounce:function(n,r,t){var e,u,o,i,a,f=function(){var c=zn()-u;r>c?e=setTimeout(f,r-c):(e=null,t||(i=n.apply(a,o)),e||(o=a=null))},c=j((function(c){return a=this,o=c,u=zn(),e||(e=setTimeout(f,r),t&&(i=n.apply(a,o))),i}));return c.cancel=function(){clearTimeout(e),e=o=a=null},c},wrap:function(n,r){return rr(r,n)},negate:fr,compose:function(){var n=arguments,r=n.length-1;return function(){for(var t=r,e=n[r].apply(this,arguments);t--;)e=n[t].call(this,e);return e}},after:function(n,r){return function(){if(--n<1)return r.apply(this,arguments)}},before:cr,once:lr,findKey:sr,findIndex:vr,findLastIndex:hr,sortedIndex:yr,indexOf:gr,lastIndexOf:br,find:mr,detect:mr,findWhere:function(n,r){return mr(n,Dn(r))},each:jr,forEach:jr,map:_r,collect:_r,reduce:Ar,foldl:Ar,inject:Ar,reduceRight:xr,foldr:xr,filter:Sr,select:Sr,reject:function(n,r,t){return Sr(n,fr(qn(r)),t)},every:Or,all:Or,some:Mr,any:Mr,contains:Er,includes:Er,include:Er,invoke:Br,pluck:Nr,where:function(n,r){return Sr(n,Dn(r))},max:Ir,min:function(n,r,t){var e,u,o=1/0,i=1/0;if(null==r||"number"==typeof r&&"object"!=typeof n[0]&&null!=n)for(var a=0,f=(n=er(n)?n:jn(n)).length;a<f;a++)null!=(e=n[a])&&e<o&&(o=e);else r=qn(r,t),jr(n,(function(n,t,e){((u=r(n,t,e))<i||u===1/0&&o===1/0)&&(o=n,i=u)}));return o},shuffle:function(n){return Tr(n,1/0)},sample:Tr,sortBy:function(n,r,t){var e=0;return r=qn(r,t),Nr(_r(n,(function(n,t,u){return{value:n,index:e++,criteria:r(n,t,u)}})).sort((function(n,r){var t=n.criteria,e=r.criteria;if(t!==e){if(t>e||void 0===t)return 1;if(t<e||void 0===e)return-1}return n.index-r.index})),"value")},groupBy:Dr,indexBy:Rr,countBy:Fr,partition:Vr,toArray:function(n){return n?U(n)?i.call(n):S(n)?n.match(Pr):er(n)?_r(n,kn):jn(n):[]},size:function(n){return null==n?0:er(n)?n.length:nn(n).length},pick:Ur,omit:Wr,first:Lr,head:Lr,take:Lr,initial:zr,last:function(n,r,t){return null==n||n.length<1?null==r||t?void 0:[]:null==r||t?n[n.length-1]:$r(n,Math.max(0,n.length-r))},rest:$r,tail:$r,drop:$r,compact:function(n){return Sr(n,Boolean)},flatten:function(n,r){return ur(n,r,!1)},without:Kr,uniq:Jr,unique:Jr,union:Gr,intersection:function(n){for(var r=[],t=arguments.length,e=0,u=Y(n);e<u;e++){var o=n[e];if(!Er(r,o)){var i;for(i=1;i<t&&Er(arguments[i],o);i++);i===t&&r.push(o)}}return r},difference:Cr,unzip:Hr,transpose:Hr,zip:Qr,object:function(n,r){for(var t={},e=0,u=Y(n);e<u;e++)r?t[n[e]]=r[e]:t[n[e][0]]=n[e][1];return t},range:function(n,r,t){null==r&&(r=n||0,n=0),t||(t=r<n?-1:1);for(var e=Math.max(Math.ceil((r-n)/t),0),u=Array(e),o=0;o<e;o++,n+=t)u[o]=n;return u},chunk:function(n,r){if(null==r||r<1)return[];for(var t=[],e=0,u=n.length;e<u;)t.push(i.call(n,e,e+=r));return t},mixin:Yr,default:tn});return Zr._=Zr,Zr}));
|
toolchain/cmake-3.27.9-linux-x86_64/doc/cmake/html/command/add_compile_definitions.html
ADDED
|
@@ -0,0 +1,177 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
|
| 2 |
+
<!DOCTYPE html>
|
| 3 |
+
|
| 4 |
+
<html lang="en">
|
| 5 |
+
<head>
|
| 6 |
+
<meta charset="utf-8" />
|
| 7 |
+
<meta name="viewport" content="width=device-width, initial-scale=1.0" /><meta name="generator" content="Docutils 0.19: https://docutils.sourceforge.io/" />
|
| 8 |
+
|
| 9 |
+
<title>add_compile_definitions — CMake 3.27.9 Documentation</title>
|
| 10 |
+
|
| 11 |
+
<link rel="stylesheet" type="text/css" href="../_static/pygments.css" />
|
| 12 |
+
<link rel="stylesheet" type="text/css" href="../_static/cmake.css" />
|
| 13 |
+
|
| 14 |
+
<script data-url_root="../" id="documentation_options" src="../_static/documentation_options.js"></script>
|
| 15 |
+
<script src="../_static/jquery.js"></script>
|
| 16 |
+
<script src="../_static/underscore.js"></script>
|
| 17 |
+
<script src="../_static/_sphinx_javascript_frameworks_compat.js"></script>
|
| 18 |
+
<script src="../_static/doctools.js"></script>
|
| 19 |
+
<script src="../_static/sphinx_highlight.js"></script>
|
| 20 |
+
|
| 21 |
+
<link rel="shortcut icon" href="../_static/cmake-favicon.ico"/>
|
| 22 |
+
<link rel="index" title="Index" href="../genindex.html" />
|
| 23 |
+
<link rel="search" title="Search" href="../search.html" />
|
| 24 |
+
<link rel="next" title="add_compile_options" href="add_compile_options.html" />
|
| 25 |
+
<link rel="prev" title="while" href="while.html" />
|
| 26 |
+
|
| 27 |
+
|
| 28 |
+
</head><body>
|
| 29 |
+
|
| 30 |
+
<div class="related" role="navigation" aria-label="related navigation">
|
| 31 |
+
<h3>Navigation</h3>
|
| 32 |
+
<ul>
|
| 33 |
+
<li class="right" style="margin-right: 10px">
|
| 34 |
+
<a href="../genindex.html" title="General Index"
|
| 35 |
+
accesskey="I">index</a></li>
|
| 36 |
+
<li class="right" >
|
| 37 |
+
<a href="add_compile_options.html" title="add_compile_options"
|
| 38 |
+
accesskey="N">next</a> |</li>
|
| 39 |
+
<li class="right" >
|
| 40 |
+
<a href="while.html" title="while"
|
| 41 |
+
accesskey="P">previous</a> |</li>
|
| 42 |
+
<li>
|
| 43 |
+
<img src="../_static/cmake-logo-16.png" alt=""
|
| 44 |
+
style="vertical-align: middle; margin-top: -2px" />
|
| 45 |
+
</li>
|
| 46 |
+
<li>
|
| 47 |
+
<a href="https://cmake.org/">CMake</a> »
|
| 48 |
+
</li>
|
| 49 |
+
<li>
|
| 50 |
+
<a href="../index.html">3.27.9 Documentation</a> »
|
| 51 |
+
</li>
|
| 52 |
+
|
| 53 |
+
<li class="nav-item nav-item-1"><a href="../manual/cmake-commands.7.html" accesskey="U">cmake-commands(7)</a> »</li>
|
| 54 |
+
<li class="nav-item nav-item-this"><a href="">add_compile_definitions</a></li>
|
| 55 |
+
</ul>
|
| 56 |
+
</div>
|
| 57 |
+
|
| 58 |
+
<div class="document">
|
| 59 |
+
<div class="documentwrapper">
|
| 60 |
+
<div class="bodywrapper">
|
| 61 |
+
<div class="body" role="main">
|
| 62 |
+
|
| 63 |
+
<section id="add-compile-definitions">
|
| 64 |
+
<span id="command:add_compile_definitions"></span><h1>add_compile_definitions<a class="headerlink" href="#add-compile-definitions" title="Permalink to this heading">¶</a></h1>
|
| 65 |
+
<div class="versionadded">
|
| 66 |
+
<p><span class="versionmodified added">New in version 3.12.</span></p>
|
| 67 |
+
</div>
|
| 68 |
+
<p>Add preprocessor definitions to the compilation of source files.</p>
|
| 69 |
+
<div class="highlight-cmake notranslate"><div class="highlight"><pre><span></span><span class="nf">add_compile_definitions(</span><span class="nv"><definition></span><span class="w"> </span><span class="p">...</span><span class="nf">)</span>
|
| 70 |
+
</pre></div>
|
| 71 |
+
</div>
|
| 72 |
+
<p>Adds preprocessor definitions to the compiler command line.</p>
|
| 73 |
+
<p>The preprocessor definitions are added to the <span class="target" id="index-0-prop_dir:COMPILE_DEFINITIONS"></span><a class="reference internal" href="../prop_dir/COMPILE_DEFINITIONS.html#prop_dir:COMPILE_DEFINITIONS" title="COMPILE_DEFINITIONS"><code class="xref cmake cmake-prop_dir docutils literal notranslate"><span class="pre">COMPILE_DEFINITIONS</span></code></a>
|
| 74 |
+
directory property for the current <code class="docutils literal notranslate"><span class="pre">CMakeLists</span></code> file. They are also added to
|
| 75 |
+
the <span class="target" id="index-0-prop_tgt:COMPILE_DEFINITIONS"></span><a class="reference internal" href="../prop_tgt/COMPILE_DEFINITIONS.html#prop_tgt:COMPILE_DEFINITIONS" title="COMPILE_DEFINITIONS"><code class="xref cmake cmake-prop_tgt docutils literal notranslate"><span class="pre">COMPILE_DEFINITIONS</span></code></a> target property for each target in the
|
| 76 |
+
current <code class="docutils literal notranslate"><span class="pre">CMakeLists</span></code> file.</p>
|
| 77 |
+
<p>Definitions are specified using the syntax <code class="docutils literal notranslate"><span class="pre">VAR</span></code> or <code class="docutils literal notranslate"><span class="pre">VAR=value</span></code>.
|
| 78 |
+
Function-style definitions are not supported. CMake will automatically
|
| 79 |
+
escape the value correctly for the native build system (note that CMake
|
| 80 |
+
language syntax may require escapes to specify some values).</p>
|
| 81 |
+
<div class="versionadded">
|
| 82 |
+
<p><span class="versionmodified added">New in version 3.26: </span>Any leading <code class="docutils literal notranslate"><span class="pre">-D</span></code> on an item will be removed.</p>
|
| 83 |
+
</div>
|
| 84 |
+
<p>Arguments to <code class="docutils literal notranslate"><span class="pre">add_compile_definitions</span></code> may use generator expressions
|
| 85 |
+
with the syntax <code class="docutils literal notranslate"><span class="pre">$<...></span></code>. See the <span class="target" id="index-0-manual:cmake-generator-expressions(7)"></span><a class="reference internal" href="../manual/cmake-generator-expressions.7.html#manual:cmake-generator-expressions(7)" title="cmake-generator-expressions(7)"><code class="xref cmake cmake-manual docutils literal notranslate"><span class="pre">cmake-generator-expressions(7)</span></code></a>
|
| 86 |
+
manual for available expressions. See the <span class="target" id="index-1-manual:cmake-buildsystem(7)"></span><a class="reference internal" href="../manual/cmake-buildsystem.7.html#manual:cmake-buildsystem(7)" title="cmake-buildsystem(7)"><code class="xref cmake cmake-manual docutils literal notranslate"><span class="pre">cmake-buildsystem(7)</span></code></a> manual
|
| 87 |
+
for more on defining buildsystem properties.</p>
|
| 88 |
+
<section id="see-also">
|
| 89 |
+
<h2>See Also<a class="headerlink" href="#see-also" title="Permalink to this heading">¶</a></h2>
|
| 90 |
+
<ul class="simple">
|
| 91 |
+
<li><p>The command <span class="target" id="index-0-command:target_compile_definitions"></span><a class="reference internal" href="target_compile_definitions.html#command:target_compile_definitions" title="target_compile_definitions"><code class="xref cmake cmake-command docutils literal notranslate"><span class="pre">target_compile_definitions()</span></code></a> adds target-specific definitions.</p></li>
|
| 92 |
+
</ul>
|
| 93 |
+
</section>
|
| 94 |
+
</section>
|
| 95 |
+
|
| 96 |
+
|
| 97 |
+
<div class="clearer"></div>
|
| 98 |
+
</div>
|
| 99 |
+
</div>
|
| 100 |
+
</div>
|
| 101 |
+
<div class="sphinxsidebar" role="navigation" aria-label="main navigation">
|
| 102 |
+
<div class="sphinxsidebarwrapper">
|
| 103 |
+
<div>
|
| 104 |
+
<h3><a href="../index.html">Table of Contents</a></h3>
|
| 105 |
+
<ul>
|
| 106 |
+
<li><a class="reference internal" href="#">add_compile_definitions</a><ul>
|
| 107 |
+
<li><a class="reference internal" href="#see-also">See Also</a></li>
|
| 108 |
+
</ul>
|
| 109 |
+
</li>
|
| 110 |
+
</ul>
|
| 111 |
+
|
| 112 |
+
</div>
|
| 113 |
+
<div>
|
| 114 |
+
<h4>Previous topic</h4>
|
| 115 |
+
<p class="topless"><a href="while.html"
|
| 116 |
+
title="previous chapter">while</a></p>
|
| 117 |
+
</div>
|
| 118 |
+
<div>
|
| 119 |
+
<h4>Next topic</h4>
|
| 120 |
+
<p class="topless"><a href="add_compile_options.html"
|
| 121 |
+
title="next chapter">add_compile_options</a></p>
|
| 122 |
+
</div>
|
| 123 |
+
<div role="note" aria-label="source link">
|
| 124 |
+
<h3>This Page</h3>
|
| 125 |
+
<ul class="this-page-menu">
|
| 126 |
+
<li><a href="../_sources/command/add_compile_definitions.rst.txt"
|
| 127 |
+
rel="nofollow">Show Source</a></li>
|
| 128 |
+
</ul>
|
| 129 |
+
</div>
|
| 130 |
+
<div id="searchbox" style="display: none" role="search">
|
| 131 |
+
<h3 id="searchlabel">Quick search</h3>
|
| 132 |
+
<div class="searchformwrapper">
|
| 133 |
+
<form class="search" action="../search.html" method="get">
|
| 134 |
+
<input type="text" name="q" aria-labelledby="searchlabel" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/>
|
| 135 |
+
<input type="submit" value="Go" />
|
| 136 |
+
</form>
|
| 137 |
+
</div>
|
| 138 |
+
</div>
|
| 139 |
+
<script>document.getElementById('searchbox').style.display = "block"</script>
|
| 140 |
+
</div>
|
| 141 |
+
</div>
|
| 142 |
+
<div class="clearer"></div>
|
| 143 |
+
</div>
|
| 144 |
+
<div class="related" role="navigation" aria-label="related navigation">
|
| 145 |
+
<h3>Navigation</h3>
|
| 146 |
+
<ul>
|
| 147 |
+
<li class="right" style="margin-right: 10px">
|
| 148 |
+
<a href="../genindex.html" title="General Index"
|
| 149 |
+
>index</a></li>
|
| 150 |
+
<li class="right" >
|
| 151 |
+
<a href="add_compile_options.html" title="add_compile_options"
|
| 152 |
+
>next</a> |</li>
|
| 153 |
+
<li class="right" >
|
| 154 |
+
<a href="while.html" title="while"
|
| 155 |
+
>previous</a> |</li>
|
| 156 |
+
<li>
|
| 157 |
+
<img src="../_static/cmake-logo-16.png" alt=""
|
| 158 |
+
style="vertical-align: middle; margin-top: -2px" />
|
| 159 |
+
</li>
|
| 160 |
+
<li>
|
| 161 |
+
<a href="https://cmake.org/">CMake</a> »
|
| 162 |
+
</li>
|
| 163 |
+
<li>
|
| 164 |
+
<a href="../index.html">3.27.9 Documentation</a> »
|
| 165 |
+
</li>
|
| 166 |
+
|
| 167 |
+
<li class="nav-item nav-item-1"><a href="../manual/cmake-commands.7.html" >cmake-commands(7)</a> »</li>
|
| 168 |
+
<li class="nav-item nav-item-this"><a href="">add_compile_definitions</a></li>
|
| 169 |
+
</ul>
|
| 170 |
+
</div>
|
| 171 |
+
|
| 172 |
+
<div class="footer" role="contentinfo">
|
| 173 |
+
© Copyright 2000-2023 Kitware, Inc. and Contributors.
|
| 174 |
+
Created using <a href="https://www.sphinx-doc.org/">Sphinx</a> 5.3.0.
|
| 175 |
+
</div>
|
| 176 |
+
</body>
|
| 177 |
+
</html>
|
toolchain/cmake-3.27.9-linux-x86_64/doc/cmake/html/command/add_compile_options.html
ADDED
|
@@ -0,0 +1,220 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
|
| 2 |
+
<!DOCTYPE html>
|
| 3 |
+
|
| 4 |
+
<html lang="en">
|
| 5 |
+
<head>
|
| 6 |
+
<meta charset="utf-8" />
|
| 7 |
+
<meta name="viewport" content="width=device-width, initial-scale=1.0" /><meta name="generator" content="Docutils 0.19: https://docutils.sourceforge.io/" />
|
| 8 |
+
|
| 9 |
+
<title>add_compile_options — CMake 3.27.9 Documentation</title>
|
| 10 |
+
|
| 11 |
+
<link rel="stylesheet" type="text/css" href="../_static/pygments.css" />
|
| 12 |
+
<link rel="stylesheet" type="text/css" href="../_static/cmake.css" />
|
| 13 |
+
|
| 14 |
+
<script data-url_root="../" id="documentation_options" src="../_static/documentation_options.js"></script>
|
| 15 |
+
<script src="../_static/jquery.js"></script>
|
| 16 |
+
<script src="../_static/underscore.js"></script>
|
| 17 |
+
<script src="../_static/_sphinx_javascript_frameworks_compat.js"></script>
|
| 18 |
+
<script src="../_static/doctools.js"></script>
|
| 19 |
+
<script src="../_static/sphinx_highlight.js"></script>
|
| 20 |
+
|
| 21 |
+
<link rel="shortcut icon" href="../_static/cmake-favicon.ico"/>
|
| 22 |
+
<link rel="index" title="Index" href="../genindex.html" />
|
| 23 |
+
<link rel="search" title="Search" href="../search.html" />
|
| 24 |
+
<link rel="next" title="add_custom_command" href="add_custom_command.html" />
|
| 25 |
+
<link rel="prev" title="add_compile_definitions" href="add_compile_definitions.html" />
|
| 26 |
+
|
| 27 |
+
|
| 28 |
+
</head><body>
|
| 29 |
+
|
| 30 |
+
<div class="related" role="navigation" aria-label="related navigation">
|
| 31 |
+
<h3>Navigation</h3>
|
| 32 |
+
<ul>
|
| 33 |
+
<li class="right" style="margin-right: 10px">
|
| 34 |
+
<a href="../genindex.html" title="General Index"
|
| 35 |
+
accesskey="I">index</a></li>
|
| 36 |
+
<li class="right" >
|
| 37 |
+
<a href="add_custom_command.html" title="add_custom_command"
|
| 38 |
+
accesskey="N">next</a> |</li>
|
| 39 |
+
<li class="right" >
|
| 40 |
+
<a href="add_compile_definitions.html" title="add_compile_definitions"
|
| 41 |
+
accesskey="P">previous</a> |</li>
|
| 42 |
+
<li>
|
| 43 |
+
<img src="../_static/cmake-logo-16.png" alt=""
|
| 44 |
+
style="vertical-align: middle; margin-top: -2px" />
|
| 45 |
+
</li>
|
| 46 |
+
<li>
|
| 47 |
+
<a href="https://cmake.org/">CMake</a> »
|
| 48 |
+
</li>
|
| 49 |
+
<li>
|
| 50 |
+
<a href="../index.html">3.27.9 Documentation</a> »
|
| 51 |
+
</li>
|
| 52 |
+
|
| 53 |
+
<li class="nav-item nav-item-1"><a href="../manual/cmake-commands.7.html" accesskey="U">cmake-commands(7)</a> »</li>
|
| 54 |
+
<li class="nav-item nav-item-this"><a href="">add_compile_options</a></li>
|
| 55 |
+
</ul>
|
| 56 |
+
</div>
|
| 57 |
+
|
| 58 |
+
<div class="document">
|
| 59 |
+
<div class="documentwrapper">
|
| 60 |
+
<div class="bodywrapper">
|
| 61 |
+
<div class="body" role="main">
|
| 62 |
+
|
| 63 |
+
<section id="add-compile-options">
|
| 64 |
+
<span id="command:add_compile_options"></span><h1>add_compile_options<a class="headerlink" href="#add-compile-options" title="Permalink to this heading">¶</a></h1>
|
| 65 |
+
<p>Add options to the compilation of source files.</p>
|
| 66 |
+
<div class="highlight-cmake notranslate"><div class="highlight"><pre><span></span><span class="nf">add_compile_options(</span><span class="nv"><option></span><span class="w"> </span><span class="p">...</span><span class="nf">)</span>
|
| 67 |
+
</pre></div>
|
| 68 |
+
</div>
|
| 69 |
+
<p>Adds options to the <span class="target" id="index-0-prop_dir:COMPILE_OPTIONS"></span><a class="reference internal" href="../prop_dir/COMPILE_OPTIONS.html#prop_dir:COMPILE_OPTIONS" title="COMPILE_OPTIONS"><code class="xref cmake cmake-prop_dir docutils literal notranslate"><span class="pre">COMPILE_OPTIONS</span></code></a> directory property.
|
| 70 |
+
These options are used when compiling targets from the current
|
| 71 |
+
directory and below.</p>
|
| 72 |
+
<div class="admonition note">
|
| 73 |
+
<p class="admonition-title">Note</p>
|
| 74 |
+
<p>These options are not used when linking.
|
| 75 |
+
See the <span class="target" id="index-0-command:add_link_options"></span><a class="reference internal" href="add_link_options.html#command:add_link_options" title="add_link_options"><code class="xref cmake cmake-command docutils literal notranslate"><span class="pre">add_link_options()</span></code></a> command for that.</p>
|
| 76 |
+
</div>
|
| 77 |
+
<section id="arguments">
|
| 78 |
+
<h2>Arguments<a class="headerlink" href="#arguments" title="Permalink to this heading">¶</a></h2>
|
| 79 |
+
<p>Arguments to <code class="docutils literal notranslate"><span class="pre">add_compile_options</span></code> may use generator expressions
|
| 80 |
+
with the syntax <code class="docutils literal notranslate"><span class="pre">$<...></span></code>. See the <span class="target" id="index-0-manual:cmake-generator-expressions(7)"></span><a class="reference internal" href="../manual/cmake-generator-expressions.7.html#manual:cmake-generator-expressions(7)" title="cmake-generator-expressions(7)"><code class="xref cmake cmake-manual docutils literal notranslate"><span class="pre">cmake-generator-expressions(7)</span></code></a>
|
| 81 |
+
manual for available expressions. See the <span class="target" id="index-1-manual:cmake-buildsystem(7)"></span><a class="reference internal" href="../manual/cmake-buildsystem.7.html#manual:cmake-buildsystem(7)" title="cmake-buildsystem(7)"><code class="xref cmake cmake-manual docutils literal notranslate"><span class="pre">cmake-buildsystem(7)</span></code></a> manual
|
| 82 |
+
for more on defining buildsystem properties.</p>
|
| 83 |
+
</section>
|
| 84 |
+
<section id="option-de-duplication">
|
| 85 |
+
<h2>Option De-duplication<a class="headerlink" href="#option-de-duplication" title="Permalink to this heading">¶</a></h2>
|
| 86 |
+
<p>The final set of options used for a target is constructed by
|
| 87 |
+
accumulating options from the current target and the usage requirements of
|
| 88 |
+
its dependencies. The set of options is de-duplicated to avoid repetition.</p>
|
| 89 |
+
<div class="versionadded">
|
| 90 |
+
<p><span class="versionmodified added">New in version 3.12: </span>While beneficial for individual options, the de-duplication step can break
|
| 91 |
+
up option groups. For example, <code class="docutils literal notranslate"><span class="pre">-option</span> <span class="pre">A</span> <span class="pre">-option</span> <span class="pre">B</span></code> becomes
|
| 92 |
+
<code class="docutils literal notranslate"><span class="pre">-option</span> <span class="pre">A</span> <span class="pre">B</span></code>. One may specify a group of options using shell-like
|
| 93 |
+
quoting along with a <code class="docutils literal notranslate"><span class="pre">SHELL:</span></code> prefix. The <code class="docutils literal notranslate"><span class="pre">SHELL:</span></code> prefix is dropped,
|
| 94 |
+
and the rest of the option string is parsed using the
|
| 95 |
+
<span class="target" id="index-0-command:separate_arguments"></span><a class="reference internal" href="separate_arguments.html#command:separate_arguments" title="separate_arguments"><code class="xref cmake cmake-command docutils literal notranslate"><span class="pre">separate_arguments()</span></code></a> <code class="docutils literal notranslate"><span class="pre">UNIX_COMMAND</span></code> mode. For example,
|
| 96 |
+
<code class="docutils literal notranslate"><span class="pre">"SHELL:-option</span> <span class="pre">A"</span> <span class="pre">"SHELL:-option</span> <span class="pre">B"</span></code> becomes <code class="docutils literal notranslate"><span class="pre">-option</span> <span class="pre">A</span> <span class="pre">-option</span> <span class="pre">B</span></code>.</p>
|
| 97 |
+
</div>
|
| 98 |
+
</section>
|
| 99 |
+
<section id="example">
|
| 100 |
+
<h2>Example<a class="headerlink" href="#example" title="Permalink to this heading">¶</a></h2>
|
| 101 |
+
<p>Since different compilers support different options, a typical use of
|
| 102 |
+
this command is in a compiler-specific conditional clause:</p>
|
| 103 |
+
<div class="highlight-cmake notranslate"><div class="highlight"><pre><span></span><span class="nf">if</span> <span class="nf">(</span><span class="no">MSVC</span><span class="nf">)</span>
|
| 104 |
+
<span class="w"> </span><span class="c"># warning level 4</span>
|
| 105 |
+
<span class="w"> </span><span class="nf">add_compile_options(</span><span class="na">/W4</span><span class="nf">)</span>
|
| 106 |
+
<span class="nf">else()</span>
|
| 107 |
+
<span class="w"> </span><span class="c"># additional warnings</span>
|
| 108 |
+
<span class="w"> </span><span class="nf">add_compile_options(</span><span class="p">-</span><span class="nb">Wall</span><span class="w"> </span><span class="p">-</span><span class="nb">Wextra</span><span class="w"> </span><span class="p">-</span><span class="nb">Wpedantic</span><span class="nf">)</span>
|
| 109 |
+
<span class="nf">endif()</span>
|
| 110 |
+
</pre></div>
|
| 111 |
+
</div>
|
| 112 |
+
<p>To set per-language options, use the <span class="target" id="index-0-genex:COMPILE_LANGUAGE"></span><a class="reference internal" href="../manual/cmake-generator-expressions.7.html#genex:COMPILE_LANGUAGE" title="COMPILE_LANGUAGE"><code class="xref cmake cmake-genex docutils literal notranslate"><span class="pre">$<COMPILE_LANGUAGE></span></code></a>
|
| 113 |
+
or <span class="target" id="index-1-genex:COMPILE_LANGUAGE"></span><a class="reference internal" href="../manual/cmake-generator-expressions.7.html#genex:COMPILE_LANGUAGE" title="COMPILE_LANGUAGE"><code class="xref cmake cmake-genex docutils literal notranslate"><span class="pre">$<COMPILE_LANGUAGE:languages></span></code></a> generator expressions.</p>
|
| 114 |
+
</section>
|
| 115 |
+
<section id="see-also">
|
| 116 |
+
<h2>See Also<a class="headerlink" href="#see-also" title="Permalink to this heading">¶</a></h2>
|
| 117 |
+
<ul class="simple">
|
| 118 |
+
<li><p>This command can be used to add any options. However, for
|
| 119 |
+
adding preprocessor definitions and include directories it is recommended
|
| 120 |
+
to use the more specific commands <span class="target" id="index-0-command:add_compile_definitions"></span><a class="reference internal" href="add_compile_definitions.html#command:add_compile_definitions" title="add_compile_definitions"><code class="xref cmake cmake-command docutils literal notranslate"><span class="pre">add_compile_definitions()</span></code></a>
|
| 121 |
+
and <span class="target" id="index-0-command:include_directories"></span><a class="reference internal" href="include_directories.html#command:include_directories" title="include_directories"><code class="xref cmake cmake-command docutils literal notranslate"><span class="pre">include_directories()</span></code></a>.</p></li>
|
| 122 |
+
<li><p>The command <span class="target" id="index-0-command:target_compile_options"></span><a class="reference internal" href="target_compile_options.html#command:target_compile_options" title="target_compile_options"><code class="xref cmake cmake-command docutils literal notranslate"><span class="pre">target_compile_options()</span></code></a> adds target-specific options.</p></li>
|
| 123 |
+
<li><p>This command adds compile options for all languages.
|
| 124 |
+
Use the <span class="target" id="index-2-genex:COMPILE_LANGUAGE"></span><a class="reference internal" href="../manual/cmake-generator-expressions.7.html#genex:COMPILE_LANGUAGE" title="COMPILE_LANGUAGE"><code class="xref cmake cmake-genex docutils literal notranslate"><span class="pre">COMPILE_LANGUAGE</span></code></a> generator expression to specify
|
| 125 |
+
per-language compile options.</p></li>
|
| 126 |
+
<li><p>The source file property <span class="target" id="index-0-prop_sf:COMPILE_OPTIONS"></span><a class="reference internal" href="../prop_sf/COMPILE_OPTIONS.html#prop_sf:COMPILE_OPTIONS" title="COMPILE_OPTIONS"><code class="xref cmake cmake-prop_sf docutils literal notranslate"><span class="pre">COMPILE_OPTIONS</span></code></a> adds options to one
|
| 127 |
+
source file.</p></li>
|
| 128 |
+
<li><p><span class="target" id="index-1-command:add_link_options"></span><a class="reference internal" href="add_link_options.html#command:add_link_options" title="add_link_options"><code class="xref cmake cmake-command docutils literal notranslate"><span class="pre">add_link_options()</span></code></a> adds options for linking.</p></li>
|
| 129 |
+
<li><p><span class="target" id="index-0-variable:CMAKE_<LANG>_FLAGS"></span><a class="reference internal" href="../variable/CMAKE_LANG_FLAGS.html#variable:CMAKE_<LANG>_FLAGS" title="CMAKE_<LANG>_FLAGS"><code class="xref cmake cmake-variable docutils literal notranslate"><span class="pre">CMAKE_<LANG>_FLAGS</span></code></a> and <span class="target" id="index-0-variable:CMAKE_<LANG>_FLAGS_<CONFIG>"></span><a class="reference internal" href="../variable/CMAKE_LANG_FLAGS_CONFIG.html#variable:CMAKE_<LANG>_FLAGS_<CONFIG>" title="CMAKE_<LANG>_FLAGS_<CONFIG>"><code class="xref cmake cmake-variable docutils literal notranslate"><span class="pre">CMAKE_<LANG>_FLAGS_<CONFIG></span></code></a>
|
| 130 |
+
add language-wide flags passed to all invocations of the compiler.
|
| 131 |
+
This includes invocations that drive compiling and those that drive linking.</p></li>
|
| 132 |
+
</ul>
|
| 133 |
+
</section>
|
| 134 |
+
</section>
|
| 135 |
+
|
| 136 |
+
|
| 137 |
+
<div class="clearer"></div>
|
| 138 |
+
</div>
|
| 139 |
+
</div>
|
| 140 |
+
</div>
|
| 141 |
+
<div class="sphinxsidebar" role="navigation" aria-label="main navigation">
|
| 142 |
+
<div class="sphinxsidebarwrapper">
|
| 143 |
+
<div>
|
| 144 |
+
<h3><a href="../index.html">Table of Contents</a></h3>
|
| 145 |
+
<ul>
|
| 146 |
+
<li><a class="reference internal" href="#">add_compile_options</a><ul>
|
| 147 |
+
<li><a class="reference internal" href="#arguments">Arguments</a></li>
|
| 148 |
+
<li><a class="reference internal" href="#option-de-duplication">Option De-duplication</a></li>
|
| 149 |
+
<li><a class="reference internal" href="#example">Example</a></li>
|
| 150 |
+
<li><a class="reference internal" href="#see-also">See Also</a></li>
|
| 151 |
+
</ul>
|
| 152 |
+
</li>
|
| 153 |
+
</ul>
|
| 154 |
+
|
| 155 |
+
</div>
|
| 156 |
+
<div>
|
| 157 |
+
<h4>Previous topic</h4>
|
| 158 |
+
<p class="topless"><a href="add_compile_definitions.html"
|
| 159 |
+
title="previous chapter">add_compile_definitions</a></p>
|
| 160 |
+
</div>
|
| 161 |
+
<div>
|
| 162 |
+
<h4>Next topic</h4>
|
| 163 |
+
<p class="topless"><a href="add_custom_command.html"
|
| 164 |
+
title="next chapter">add_custom_command</a></p>
|
| 165 |
+
</div>
|
| 166 |
+
<div role="note" aria-label="source link">
|
| 167 |
+
<h3>This Page</h3>
|
| 168 |
+
<ul class="this-page-menu">
|
| 169 |
+
<li><a href="../_sources/command/add_compile_options.rst.txt"
|
| 170 |
+
rel="nofollow">Show Source</a></li>
|
| 171 |
+
</ul>
|
| 172 |
+
</div>
|
| 173 |
+
<div id="searchbox" style="display: none" role="search">
|
| 174 |
+
<h3 id="searchlabel">Quick search</h3>
|
| 175 |
+
<div class="searchformwrapper">
|
| 176 |
+
<form class="search" action="../search.html" method="get">
|
| 177 |
+
<input type="text" name="q" aria-labelledby="searchlabel" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/>
|
| 178 |
+
<input type="submit" value="Go" />
|
| 179 |
+
</form>
|
| 180 |
+
</div>
|
| 181 |
+
</div>
|
| 182 |
+
<script>document.getElementById('searchbox').style.display = "block"</script>
|
| 183 |
+
</div>
|
| 184 |
+
</div>
|
| 185 |
+
<div class="clearer"></div>
|
| 186 |
+
</div>
|
| 187 |
+
<div class="related" role="navigation" aria-label="related navigation">
|
| 188 |
+
<h3>Navigation</h3>
|
| 189 |
+
<ul>
|
| 190 |
+
<li class="right" style="margin-right: 10px">
|
| 191 |
+
<a href="../genindex.html" title="General Index"
|
| 192 |
+
>index</a></li>
|
| 193 |
+
<li class="right" >
|
| 194 |
+
<a href="add_custom_command.html" title="add_custom_command"
|
| 195 |
+
>next</a> |</li>
|
| 196 |
+
<li class="right" >
|
| 197 |
+
<a href="add_compile_definitions.html" title="add_compile_definitions"
|
| 198 |
+
>previous</a> |</li>
|
| 199 |
+
<li>
|
| 200 |
+
<img src="../_static/cmake-logo-16.png" alt=""
|
| 201 |
+
style="vertical-align: middle; margin-top: -2px" />
|
| 202 |
+
</li>
|
| 203 |
+
<li>
|
| 204 |
+
<a href="https://cmake.org/">CMake</a> »
|
| 205 |
+
</li>
|
| 206 |
+
<li>
|
| 207 |
+
<a href="../index.html">3.27.9 Documentation</a> »
|
| 208 |
+
</li>
|
| 209 |
+
|
| 210 |
+
<li class="nav-item nav-item-1"><a href="../manual/cmake-commands.7.html" >cmake-commands(7)</a> »</li>
|
| 211 |
+
<li class="nav-item nav-item-this"><a href="">add_compile_options</a></li>
|
| 212 |
+
</ul>
|
| 213 |
+
</div>
|
| 214 |
+
|
| 215 |
+
<div class="footer" role="contentinfo">
|
| 216 |
+
© Copyright 2000-2023 Kitware, Inc. and Contributors.
|
| 217 |
+
Created using <a href="https://www.sphinx-doc.org/">Sphinx</a> 5.3.0.
|
| 218 |
+
</div>
|
| 219 |
+
</body>
|
| 220 |
+
</html>
|
toolchain/cmake-3.27.9-linux-x86_64/doc/cmake/html/command/add_custom_command.html
ADDED
|
@@ -0,0 +1,671 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
|
| 2 |
+
<!DOCTYPE html>
|
| 3 |
+
|
| 4 |
+
<html lang="en">
|
| 5 |
+
<head>
|
| 6 |
+
<meta charset="utf-8" />
|
| 7 |
+
<meta name="viewport" content="width=device-width, initial-scale=1.0" /><meta name="generator" content="Docutils 0.19: https://docutils.sourceforge.io/" />
|
| 8 |
+
|
| 9 |
+
<title>add_custom_command — CMake 3.27.9 Documentation</title>
|
| 10 |
+
|
| 11 |
+
<link rel="stylesheet" type="text/css" href="../_static/pygments.css" />
|
| 12 |
+
<link rel="stylesheet" type="text/css" href="../_static/cmake.css" />
|
| 13 |
+
|
| 14 |
+
<script data-url_root="../" id="documentation_options" src="../_static/documentation_options.js"></script>
|
| 15 |
+
<script src="../_static/jquery.js"></script>
|
| 16 |
+
<script src="../_static/underscore.js"></script>
|
| 17 |
+
<script src="../_static/_sphinx_javascript_frameworks_compat.js"></script>
|
| 18 |
+
<script src="../_static/doctools.js"></script>
|
| 19 |
+
<script src="../_static/sphinx_highlight.js"></script>
|
| 20 |
+
|
| 21 |
+
<link rel="shortcut icon" href="../_static/cmake-favicon.ico"/>
|
| 22 |
+
<link rel="index" title="Index" href="../genindex.html" />
|
| 23 |
+
<link rel="search" title="Search" href="../search.html" />
|
| 24 |
+
<link rel="next" title="add_custom_target" href="add_custom_target.html" />
|
| 25 |
+
<link rel="prev" title="add_compile_options" href="add_compile_options.html" />
|
| 26 |
+
|
| 27 |
+
|
| 28 |
+
</head><body>
|
| 29 |
+
|
| 30 |
+
<div class="related" role="navigation" aria-label="related navigation">
|
| 31 |
+
<h3>Navigation</h3>
|
| 32 |
+
<ul>
|
| 33 |
+
<li class="right" style="margin-right: 10px">
|
| 34 |
+
<a href="../genindex.html" title="General Index"
|
| 35 |
+
accesskey="I">index</a></li>
|
| 36 |
+
<li class="right" >
|
| 37 |
+
<a href="add_custom_target.html" title="add_custom_target"
|
| 38 |
+
accesskey="N">next</a> |</li>
|
| 39 |
+
<li class="right" >
|
| 40 |
+
<a href="add_compile_options.html" title="add_compile_options"
|
| 41 |
+
accesskey="P">previous</a> |</li>
|
| 42 |
+
<li>
|
| 43 |
+
<img src="../_static/cmake-logo-16.png" alt=""
|
| 44 |
+
style="vertical-align: middle; margin-top: -2px" />
|
| 45 |
+
</li>
|
| 46 |
+
<li>
|
| 47 |
+
<a href="https://cmake.org/">CMake</a> »
|
| 48 |
+
</li>
|
| 49 |
+
<li>
|
| 50 |
+
<a href="../index.html">3.27.9 Documentation</a> »
|
| 51 |
+
</li>
|
| 52 |
+
|
| 53 |
+
<li class="nav-item nav-item-1"><a href="../manual/cmake-commands.7.html" accesskey="U">cmake-commands(7)</a> »</li>
|
| 54 |
+
<li class="nav-item nav-item-this"><a href="">add_custom_command</a></li>
|
| 55 |
+
</ul>
|
| 56 |
+
</div>
|
| 57 |
+
|
| 58 |
+
<div class="document">
|
| 59 |
+
<div class="documentwrapper">
|
| 60 |
+
<div class="bodywrapper">
|
| 61 |
+
<div class="body" role="main">
|
| 62 |
+
|
| 63 |
+
<section id="add-custom-command">
|
| 64 |
+
<span id="command:add_custom_command"></span><h1>add_custom_command<a class="headerlink" href="#add-custom-command" title="Permalink to this heading">¶</a></h1>
|
| 65 |
+
<p>Add a custom build rule to the generated build system.</p>
|
| 66 |
+
<p>There are two main signatures for <code class="docutils literal notranslate"><span class="pre">add_custom_command</span></code>.</p>
|
| 67 |
+
<section id="generating-files">
|
| 68 |
+
<h2>Generating Files<a class="headerlink" href="#generating-files" title="Permalink to this heading">¶</a></h2>
|
| 69 |
+
<p>The first signature is for adding a custom command to produce an output:</p>
|
| 70 |
+
<div class="highlight-cmake notranslate"><div class="highlight"><pre><span></span><span class="nf">add_custom_command(</span><span class="no">OUTPUT</span><span class="w"> </span><span class="nb">output1</span><span class="w"> </span><span class="p">[</span><span class="nb">output2</span><span class="w"> </span><span class="p">...]</span>
|
| 71 |
+
<span class="w"> </span><span class="no">COMMAND</span><span class="w"> </span><span class="nb">command1</span><span class="w"> </span><span class="p">[</span><span class="no">ARGS</span><span class="p">]</span><span class="w"> </span><span class="p">[</span><span class="nb">args1...</span><span class="p">]</span>
|
| 72 |
+
<span class="w"> </span><span class="p">[</span><span class="no">COMMAND</span><span class="w"> </span><span class="nb">command2</span><span class="w"> </span><span class="p">[</span><span class="no">ARGS</span><span class="p">]</span><span class="w"> </span><span class="p">[</span><span class="nb">args2...</span><span class="p">]</span><span class="w"> </span><span class="p">...]</span>
|
| 73 |
+
<span class="w"> </span><span class="p">[</span><span class="no">MAIN_DEPENDENCY</span><span class="w"> </span><span class="nb">depend</span><span class="p">]</span>
|
| 74 |
+
<span class="w"> </span><span class="p">[</span><span class="no">DEPENDS</span><span class="w"> </span><span class="p">[</span><span class="nb">depends...</span><span class="p">]]</span>
|
| 75 |
+
<span class="w"> </span><span class="p">[</span><span class="no">BYPRODUCTS</span><span class="w"> </span><span class="p">[</span><span class="nb">files...</span><span class="p">]]</span>
|
| 76 |
+
<span class="w"> </span><span class="p">[</span><span class="no">IMPLICIT_DEPENDS</span><span class="w"> </span><span class="nv"><lang1></span><span class="w"> </span><span class="nb">depend1</span>
|
| 77 |
+
<span class="w"> </span><span class="p">[</span><span class="nv"><lang2></span><span class="w"> </span><span class="nb">depend2</span><span class="p">]</span><span class="w"> </span><span class="p">...]</span>
|
| 78 |
+
<span class="w"> </span><span class="p">[</span><span class="no">WORKING_DIRECTORY</span><span class="w"> </span><span class="nb">dir</span><span class="p">]</span>
|
| 79 |
+
<span class="w"> </span><span class="p">[</span><span class="no">COMMENT</span><span class="w"> </span><span class="nb">comment</span><span class="p">]</span>
|
| 80 |
+
<span class="w"> </span><span class="p">[</span><span class="no">DEPFILE</span><span class="w"> </span><span class="nb">depfile</span><span class="p">]</span>
|
| 81 |
+
<span class="w"> </span><span class="p">[</span><span class="no">JOB_POOL</span><span class="w"> </span><span class="nb">job_pool</span><span class="p">]</span>
|
| 82 |
+
<span class="w"> </span><span class="p">[</span><span class="no">VERBATIM</span><span class="p">]</span><span class="w"> </span><span class="p">[</span><span class="no">APPEND</span><span class="p">]</span><span class="w"> </span><span class="p">[</span><span class="no">USES_TERMINAL</span><span class="p">]</span>
|
| 83 |
+
<span class="w"> </span><span class="p">[</span><span class="no">COMMAND_EXPAND_LISTS</span><span class="p">]</span>
|
| 84 |
+
<span class="w"> </span><span class="p">[</span><span class="no">DEPENDS_EXPLICIT_ONLY</span><span class="p">]</span><span class="nf">)</span>
|
| 85 |
+
</pre></div>
|
| 86 |
+
</div>
|
| 87 |
+
<p>This defines a command to generate specified <code class="docutils literal notranslate"><span class="pre">OUTPUT</span></code> file(s).
|
| 88 |
+
A target created in the same directory (<code class="docutils literal notranslate"><span class="pre">CMakeLists.txt</span></code> file)
|
| 89 |
+
that specifies any output of the custom command as a source file
|
| 90 |
+
is given a rule to generate the file using the command at build time.</p>
|
| 91 |
+
<p>Do not list the output in more than one independent target that
|
| 92 |
+
may build in parallel or the instances of the rule may conflict.
|
| 93 |
+
Instead, use the <span class="target" id="index-0-command:add_custom_target"></span><a class="reference internal" href="add_custom_target.html#command:add_custom_target" title="add_custom_target"><code class="xref cmake cmake-command docutils literal notranslate"><span class="pre">add_custom_target()</span></code></a> command to drive the
|
| 94 |
+
command and make the other targets depend on that one. See the
|
| 95 |
+
<a class="reference internal" href="#example-generating-files-for-multiple-targets">Example: Generating Files for Multiple Targets</a> below.</p>
|
| 96 |
+
<p>The options are:</p>
|
| 97 |
+
<dl>
|
| 98 |
+
<dt><code class="docutils literal notranslate"><span class="pre">APPEND</span></code></dt><dd><p>Append the <code class="docutils literal notranslate"><span class="pre">COMMAND</span></code> and <code class="docutils literal notranslate"><span class="pre">DEPENDS</span></code> option values to the custom
|
| 99 |
+
command for the first output specified. There must have already
|
| 100 |
+
been a previous call to this command with the same output.</p>
|
| 101 |
+
<p>If the previous call specified the output via a generator expression,
|
| 102 |
+
the output specified by the current call must match in at least one
|
| 103 |
+
configuration after evaluating generator expressions. In this case,
|
| 104 |
+
the appended commands and dependencies apply to all configurations.</p>
|
| 105 |
+
<p>The <code class="docutils literal notranslate"><span class="pre">COMMENT</span></code>, <code class="docutils literal notranslate"><span class="pre">MAIN_DEPENDENCY</span></code>, and <code class="docutils literal notranslate"><span class="pre">WORKING_DIRECTORY</span></code>
|
| 106 |
+
options are currently ignored when APPEND is given, but may be
|
| 107 |
+
used in the future.</p>
|
| 108 |
+
</dd>
|
| 109 |
+
<dt><code class="docutils literal notranslate"><span class="pre">BYPRODUCTS</span></code></dt><dd><div class="versionadded">
|
| 110 |
+
<p><span class="versionmodified added">New in version 3.2.</span></p>
|
| 111 |
+
</div>
|
| 112 |
+
<p>Specify the files the command is expected to produce but whose
|
| 113 |
+
modification time may or may not be newer than the dependencies.
|
| 114 |
+
If a byproduct name is a relative path it will be interpreted
|
| 115 |
+
relative to the build tree directory corresponding to the
|
| 116 |
+
current source directory.
|
| 117 |
+
Each byproduct file will be marked with the <span class="target" id="index-0-prop_sf:GENERATED"></span><a class="reference internal" href="../prop_sf/GENERATED.html#prop_sf:GENERATED" title="GENERATED"><code class="xref cmake cmake-prop_sf docutils literal notranslate"><span class="pre">GENERATED</span></code></a>
|
| 118 |
+
source file property automatically.</p>
|
| 119 |
+
<p><em>See policy</em> <span class="target" id="index-0-policy:CMP0058"></span><a class="reference internal" href="../policy/CMP0058.html#policy:CMP0058" title="CMP0058"><code class="xref cmake cmake-policy docutils literal notranslate"><span class="pre">CMP0058</span></code></a> <em>for the motivation behind this feature.</em></p>
|
| 120 |
+
<p>Explicit specification of byproducts is supported by the
|
| 121 |
+
<span class="target" id="index-0-generator:Ninja"></span><a class="reference internal" href="../generator/Ninja.html#generator:Ninja" title="Ninja"><code class="xref cmake cmake-generator docutils literal notranslate"><span class="pre">Ninja</span></code></a> generator to tell the <code class="docutils literal notranslate"><span class="pre">ninja</span></code> build tool
|
| 122 |
+
how to regenerate byproducts when they are missing. It is
|
| 123 |
+
also useful when other build rules (e.g. custom commands)
|
| 124 |
+
depend on the byproducts. Ninja requires a build rule for any
|
| 125 |
+
generated file on which another rule depends even if there are
|
| 126 |
+
order-only dependencies to ensure the byproducts will be
|
| 127 |
+
available before their dependents build.</p>
|
| 128 |
+
<p>The <a class="reference internal" href="../manual/cmake-generators.7.html#makefile-generators"><span class="std std-ref">Makefile Generators</span></a> will remove <code class="docutils literal notranslate"><span class="pre">BYPRODUCTS</span></code> and other
|
| 129 |
+
<span class="target" id="index-1-prop_sf:GENERATED"></span><a class="reference internal" href="../prop_sf/GENERATED.html#prop_sf:GENERATED" title="GENERATED"><code class="xref cmake cmake-prop_sf docutils literal notranslate"><span class="pre">GENERATED</span></code></a> files during <code class="docutils literal notranslate"><span class="pre">make</span> <span class="pre">clean</span></code>.</p>
|
| 130 |
+
<div class="versionadded">
|
| 131 |
+
<p><span class="versionmodified added">New in version 3.20: </span>Arguments to <code class="docutils literal notranslate"><span class="pre">BYPRODUCTS</span></code> may use a restricted set of
|
| 132 |
+
<span class="target" id="index-0-manual:cmake-generator-expressions(7)"></span><a class="reference internal" href="../manual/cmake-generator-expressions.7.html#manual:cmake-generator-expressions(7)" title="cmake-generator-expressions(7)"><code class="xref cmake cmake-manual docutils literal notranslate"><span class="pre">generator</span> <span class="pre">expressions</span></code></a>.
|
| 133 |
+
<a class="reference internal" href="../manual/cmake-generator-expressions.7.html#target-dependent-queries"><span class="std std-ref">Target-dependent expressions</span></a> are not
|
| 134 |
+
permitted.</p>
|
| 135 |
+
</div>
|
| 136 |
+
</dd>
|
| 137 |
+
<dt><code class="docutils literal notranslate"><span class="pre">COMMAND</span></code></dt><dd><p>Specify the command-line(s) to execute at build time.
|
| 138 |
+
If more than one <code class="docutils literal notranslate"><span class="pre">COMMAND</span></code> is specified they will be executed in order,
|
| 139 |
+
but <em>not</em> necessarily composed into a stateful shell or batch script.
|
| 140 |
+
(To run a full script, use the <span class="target" id="index-0-command:configure_file"></span><a class="reference internal" href="configure_file.html#command:configure_file" title="configure_file"><code class="xref cmake cmake-command docutils literal notranslate"><span class="pre">configure_file()</span></code></a> command or the
|
| 141 |
+
<span class="target" id="index-0-command:file"></span><a class="reference internal" href="file.html#generate" title="file(generate)"><code class="xref cmake cmake-command docutils literal notranslate"><span class="pre">file(GENERATE)</span></code></a> command to create it, and then specify
|
| 142 |
+
a <code class="docutils literal notranslate"><span class="pre">COMMAND</span></code> to launch it.)
|
| 143 |
+
The optional <code class="docutils literal notranslate"><span class="pre">ARGS</span></code> argument is for backward compatibility and
|
| 144 |
+
will be ignored.</p>
|
| 145 |
+
<p>If <code class="docutils literal notranslate"><span class="pre">COMMAND</span></code> specifies an executable target name (created by the
|
| 146 |
+
<span class="target" id="index-0-command:add_executable"></span><a class="reference internal" href="add_executable.html#command:add_executable" title="add_executable"><code class="xref cmake cmake-command docutils literal notranslate"><span class="pre">add_executable()</span></code></a> command), it will automatically be replaced
|
| 147 |
+
by the location of the executable created at build time if either of
|
| 148 |
+
the following is true:</p>
|
| 149 |
+
<ul>
|
| 150 |
+
<li><p>The target is not being cross-compiled (i.e. the
|
| 151 |
+
<span class="target" id="index-0-variable:CMAKE_CROSSCOMPILING"></span><a class="reference internal" href="../variable/CMAKE_CROSSCOMPILING.html#variable:CMAKE_CROSSCOMPILING" title="CMAKE_CROSSCOMPILING"><code class="xref cmake cmake-variable docutils literal notranslate"><span class="pre">CMAKE_CROSSCOMPILING</span></code></a> variable is not set to true).</p></li>
|
| 152 |
+
<li><div class="versionadded">
|
| 153 |
+
<p><span class="versionmodified added">New in version 3.6: </span>The target is being cross-compiled and an emulator is provided (i.e.
|
| 154 |
+
its <span class="target" id="index-0-prop_tgt:CROSSCOMPILING_EMULATOR"></span><a class="reference internal" href="../prop_tgt/CROSSCOMPILING_EMULATOR.html#prop_tgt:CROSSCOMPILING_EMULATOR" title="CROSSCOMPILING_EMULATOR"><code class="xref cmake cmake-prop_tgt docutils literal notranslate"><span class="pre">CROSSCOMPILING_EMULATOR</span></code></a> target property is set).
|
| 155 |
+
In this case, the contents of <span class="target" id="index-1-prop_tgt:CROSSCOMPILING_EMULATOR"></span><a class="reference internal" href="../prop_tgt/CROSSCOMPILING_EMULATOR.html#prop_tgt:CROSSCOMPILING_EMULATOR" title="CROSSCOMPILING_EMULATOR"><code class="xref cmake cmake-prop_tgt docutils literal notranslate"><span class="pre">CROSSCOMPILING_EMULATOR</span></code></a> will be
|
| 156 |
+
prepended to the command before the location of the target executable.</p>
|
| 157 |
+
</div>
|
| 158 |
+
</li>
|
| 159 |
+
</ul>
|
| 160 |
+
<p>If neither of the above conditions are met, it is assumed that the
|
| 161 |
+
command name is a program to be found on the <code class="docutils literal notranslate"><span class="pre">PATH</span></code> at build time.</p>
|
| 162 |
+
<p>Arguments to <code class="docutils literal notranslate"><span class="pre">COMMAND</span></code> may use
|
| 163 |
+
<span class="target" id="index-1-manual:cmake-generator-expressions(7)"></span><a class="reference internal" href="../manual/cmake-generator-expressions.7.html#manual:cmake-generator-expressions(7)" title="cmake-generator-expressions(7)"><code class="xref cmake cmake-manual docutils literal notranslate"><span class="pre">generator</span> <span class="pre">expressions</span></code></a>.
|
| 164 |
+
Use the <span class="target" id="index-0-genex:TARGET_FILE"></span><a class="reference internal" href="../manual/cmake-generator-expressions.7.html#genex:TARGET_FILE" title="TARGET_FILE"><code class="xref cmake cmake-genex docutils literal notranslate"><span class="pre">TARGET_FILE</span></code></a> generator expression to refer to the location
|
| 165 |
+
of a target later in the command line (i.e. as a command argument rather
|
| 166 |
+
than as the command to execute).</p>
|
| 167 |
+
<p>Whenever one of the following target based generator expressions are used as
|
| 168 |
+
a command to execute or is mentioned in a command argument, a target-level
|
| 169 |
+
dependency will be added automatically so that the mentioned target will be
|
| 170 |
+
built before any target using this custom command
|
| 171 |
+
(see policy <span class="target" id="index-0-policy:CMP0112"></span><a class="reference internal" href="../policy/CMP0112.html#policy:CMP0112" title="CMP0112"><code class="xref cmake cmake-policy docutils literal notranslate"><span class="pre">CMP0112</span></code></a>).</p>
|
| 172 |
+
<blockquote>
|
| 173 |
+
<div><ul class="simple">
|
| 174 |
+
<li><p><code class="docutils literal notranslate"><span class="pre">TARGET_FILE</span></code></p></li>
|
| 175 |
+
<li><p><code class="docutils literal notranslate"><span class="pre">TARGET_LINKER_FILE</span></code></p></li>
|
| 176 |
+
<li><p><code class="docutils literal notranslate"><span class="pre">TARGET_SONAME_FILE</span></code></p></li>
|
| 177 |
+
<li><p><code class="docutils literal notranslate"><span class="pre">TARGET_PDB_FILE</span></code></p></li>
|
| 178 |
+
</ul>
|
| 179 |
+
</div></blockquote>
|
| 180 |
+
<p>This target-level dependency does NOT add a file-level dependency that would
|
| 181 |
+
cause the custom command to re-run whenever the executable is recompiled.
|
| 182 |
+
List target names with the <code class="docutils literal notranslate"><span class="pre">DEPENDS</span></code> option to add such file-level
|
| 183 |
+
dependencies.</p>
|
| 184 |
+
</dd>
|
| 185 |
+
<dt><code class="docutils literal notranslate"><span class="pre">COMMENT</span></code></dt><dd><p>Display the given message before the commands are executed at
|
| 186 |
+
build time.</p>
|
| 187 |
+
<div class="versionadded">
|
| 188 |
+
<p><span class="versionmodified added">New in version 3.26: </span>Arguments to <code class="docutils literal notranslate"><span class="pre">COMMENT</span></code> may use
|
| 189 |
+
<span class="target" id="index-2-manual:cmake-generator-expressions(7)"></span><a class="reference internal" href="../manual/cmake-generator-expressions.7.html#manual:cmake-generator-expressions(7)" title="cmake-generator-expressions(7)"><code class="xref cmake cmake-manual docutils literal notranslate"><span class="pre">generator</span> <span class="pre">expressions</span></code></a>.</p>
|
| 190 |
+
</div>
|
| 191 |
+
</dd>
|
| 192 |
+
<dt><code class="docutils literal notranslate"><span class="pre">DEPENDS</span></code></dt><dd><p>Specify files on which the command depends. Each argument is converted
|
| 193 |
+
to a dependency as follows:</p>
|
| 194 |
+
<ol class="arabic simple">
|
| 195 |
+
<li><p>If the argument is the name of a target (created by the
|
| 196 |
+
<span class="target" id="index-1-command:add_custom_target"></span><a class="reference internal" href="add_custom_target.html#command:add_custom_target" title="add_custom_target"><code class="xref cmake cmake-command docutils literal notranslate"><span class="pre">add_custom_target()</span></code></a>, <span class="target" id="index-1-command:add_executable"></span><a class="reference internal" href="add_executable.html#command:add_executable" title="add_executable"><code class="xref cmake cmake-command docutils literal notranslate"><span class="pre">add_executable()</span></code></a>, or
|
| 197 |
+
<span class="target" id="index-0-command:add_library"></span><a class="reference internal" href="add_library.html#command:add_library" title="add_library"><code class="xref cmake cmake-command docutils literal notranslate"><span class="pre">add_library()</span></code></a> command) a target-level dependency is
|
| 198 |
+
created to make sure the target is built before any target
|
| 199 |
+
using this custom command. Additionally, if the target is an
|
| 200 |
+
executable or library, a file-level dependency is created to
|
| 201 |
+
cause the custom command to re-run whenever the target is
|
| 202 |
+
recompiled.</p></li>
|
| 203 |
+
<li><p>If the argument is an absolute path, a file-level dependency
|
| 204 |
+
is created on that path.</p></li>
|
| 205 |
+
<li><p>If the argument is the name of a source file that has been
|
| 206 |
+
added to a target or on which a source file property has been set,
|
| 207 |
+
a file-level dependency is created on that source file.</p></li>
|
| 208 |
+
<li><p>If the argument is a relative path and it exists in the current
|
| 209 |
+
source directory, a file-level dependency is created on that
|
| 210 |
+
file in the current source directory.</p></li>
|
| 211 |
+
<li><p>Otherwise, a file-level dependency is created on that path relative
|
| 212 |
+
to the current binary directory.</p></li>
|
| 213 |
+
</ol>
|
| 214 |
+
<p>If any dependency is an <code class="docutils literal notranslate"><span class="pre">OUTPUT</span></code> of another custom command in the same
|
| 215 |
+
directory (<code class="docutils literal notranslate"><span class="pre">CMakeLists.txt</span></code> file), CMake automatically brings the other
|
| 216 |
+
custom command into the target in which this command is built.</p>
|
| 217 |
+
<div class="versionadded">
|
| 218 |
+
<p><span class="versionmodified added">New in version 3.16: </span>A target-level dependency is added if any dependency is listed as
|
| 219 |
+
<code class="docutils literal notranslate"><span class="pre">BYPRODUCTS</span></code> of a target or any of its build events in the same
|
| 220 |
+
directory to ensure the byproducts will be available.</p>
|
| 221 |
+
</div>
|
| 222 |
+
<p>If <code class="docutils literal notranslate"><span class="pre">DEPENDS</span></code> is not specified, the command will run whenever
|
| 223 |
+
the <code class="docutils literal notranslate"><span class="pre">OUTPUT</span></code> is missing; if the command does not actually
|
| 224 |
+
create the <code class="docutils literal notranslate"><span class="pre">OUTPUT</span></code>, the rule will always run.</p>
|
| 225 |
+
<div class="versionadded">
|
| 226 |
+
<p><span class="versionmodified added">New in version 3.1: </span>Arguments to <code class="docutils literal notranslate"><span class="pre">DEPENDS</span></code> may use
|
| 227 |
+
<span class="target" id="index-3-manual:cmake-generator-expressions(7)"></span><a class="reference internal" href="../manual/cmake-generator-expressions.7.html#manual:cmake-generator-expressions(7)" title="cmake-generator-expressions(7)"><code class="xref cmake cmake-manual docutils literal notranslate"><span class="pre">generator</span> <span class="pre">expressions</span></code></a>.</p>
|
| 228 |
+
</div>
|
| 229 |
+
</dd>
|
| 230 |
+
<dt><code class="docutils literal notranslate"><span class="pre">COMMAND_EXPAND_LISTS</span></code></dt><dd><div class="versionadded">
|
| 231 |
+
<p><span class="versionmodified added">New in version 3.8.</span></p>
|
| 232 |
+
</div>
|
| 233 |
+
<p>Lists in <code class="docutils literal notranslate"><span class="pre">COMMAND</span></code> arguments will be expanded, including those
|
| 234 |
+
created with
|
| 235 |
+
<span class="target" id="index-4-manual:cmake-generator-expressions(7)"></span><a class="reference internal" href="../manual/cmake-generator-expressions.7.html#manual:cmake-generator-expressions(7)" title="cmake-generator-expressions(7)"><code class="xref cmake cmake-manual docutils literal notranslate"><span class="pre">generator</span> <span class="pre">expressions</span></code></a>,
|
| 236 |
+
allowing <code class="docutils literal notranslate"><span class="pre">COMMAND</span></code> arguments such as
|
| 237 |
+
<code class="docutils literal notranslate"><span class="pre">${CC}</span> <span class="pre">"-I$<JOIN:$<TARGET_PROPERTY:foo,INCLUDE_DIRECTORIES>,;-I>"</span> <span class="pre">foo.cc</span></code>
|
| 238 |
+
to be properly expanded.</p>
|
| 239 |
+
</dd>
|
| 240 |
+
<dt><code class="docutils literal notranslate"><span class="pre">IMPLICIT_DEPENDS</span></code></dt><dd><p>Request scanning of implicit dependencies of an input file.
|
| 241 |
+
The language given specifies the programming language whose
|
| 242 |
+
corresponding dependency scanner should be used.
|
| 243 |
+
Currently only <code class="docutils literal notranslate"><span class="pre">C</span></code> and <code class="docutils literal notranslate"><span class="pre">CXX</span></code> language scanners are supported.
|
| 244 |
+
The language has to be specified for every file in the
|
| 245 |
+
<code class="docutils literal notranslate"><span class="pre">IMPLICIT_DEPENDS</span></code> list. Dependencies discovered from the
|
| 246 |
+
scanning are added to those of the custom command at build time.
|
| 247 |
+
Note that the <code class="docutils literal notranslate"><span class="pre">IMPLICIT_DEPENDS</span></code> option is currently supported
|
| 248 |
+
only for Makefile generators and will be ignored by other generators.</p>
|
| 249 |
+
<div class="admonition note">
|
| 250 |
+
<p class="admonition-title">Note</p>
|
| 251 |
+
<p>This option cannot be specified at the same time as <code class="docutils literal notranslate"><span class="pre">DEPFILE</span></code> option.</p>
|
| 252 |
+
</div>
|
| 253 |
+
</dd>
|
| 254 |
+
<dt><code class="docutils literal notranslate"><span class="pre">JOB_POOL</span></code></dt><dd><div class="versionadded">
|
| 255 |
+
<p><span class="versionmodified added">New in version 3.15.</span></p>
|
| 256 |
+
</div>
|
| 257 |
+
<p>Specify a <span class="target" id="index-0-prop_gbl:JOB_POOLS"></span><a class="reference internal" href="../prop_gbl/JOB_POOLS.html#prop_gbl:JOB_POOLS" title="JOB_POOLS"><code class="xref cmake cmake-prop_gbl docutils literal notranslate"><span class="pre">pool</span></code></a> for the <span class="target" id="index-1-generator:Ninja"></span><a class="reference internal" href="../generator/Ninja.html#generator:Ninja" title="Ninja"><code class="xref cmake cmake-generator docutils literal notranslate"><span class="pre">Ninja</span></code></a>
|
| 258 |
+
generator. Incompatible with <code class="docutils literal notranslate"><span class="pre">USES_TERMINAL</span></code>, which implies
|
| 259 |
+
the <code class="docutils literal notranslate"><span class="pre">console</span></code> pool.
|
| 260 |
+
Using a pool that is not defined by <span class="target" id="index-1-prop_gbl:JOB_POOLS"></span><a class="reference internal" href="../prop_gbl/JOB_POOLS.html#prop_gbl:JOB_POOLS" title="JOB_POOLS"><code class="xref cmake cmake-prop_gbl docutils literal notranslate"><span class="pre">JOB_POOLS</span></code></a> causes
|
| 261 |
+
an error by ninja at build time.</p>
|
| 262 |
+
</dd>
|
| 263 |
+
<dt><code class="docutils literal notranslate"><span class="pre">MAIN_DEPENDENCY</span></code></dt><dd><p>Specify the primary input source file to the command. This is
|
| 264 |
+
treated just like any value given to the <code class="docutils literal notranslate"><span class="pre">DEPENDS</span></code> option
|
| 265 |
+
but also suggests to Visual Studio generators where to hang
|
| 266 |
+
the custom command. Each source file may have at most one command
|
| 267 |
+
specifying it as its main dependency. A compile command (i.e. for a
|
| 268 |
+
library or an executable) counts as an implicit main dependency which
|
| 269 |
+
gets silently overwritten by a custom command specification.</p>
|
| 270 |
+
</dd>
|
| 271 |
+
<dt><code class="docutils literal notranslate"><span class="pre">OUTPUT</span></code></dt><dd><p>Specify the output files the command is expected to produce.
|
| 272 |
+
Each output file will be marked with the <span class="target" id="index-2-prop_sf:GENERATED"></span><a class="reference internal" href="../prop_sf/GENERATED.html#prop_sf:GENERATED" title="GENERATED"><code class="xref cmake cmake-prop_sf docutils literal notranslate"><span class="pre">GENERATED</span></code></a>
|
| 273 |
+
source file property automatically.
|
| 274 |
+
If the output of the custom command is not actually created
|
| 275 |
+
as a file on disk it should be marked with the <span class="target" id="index-0-prop_sf:SYMBOLIC"></span><a class="reference internal" href="../prop_sf/SYMBOLIC.html#prop_sf:SYMBOLIC" title="SYMBOLIC"><code class="xref cmake cmake-prop_sf docutils literal notranslate"><span class="pre">SYMBOLIC</span></code></a>
|
| 276 |
+
source file property.</p>
|
| 277 |
+
<p>If an output file name is a relative path, its absolute path is
|
| 278 |
+
determined by interpreting it relative to:</p>
|
| 279 |
+
<ol class="arabic simple">
|
| 280 |
+
<li><p>the build directory corresponding to the current source directory
|
| 281 |
+
(<span class="target" id="index-0-variable:CMAKE_CURRENT_BINARY_DIR"></span><a class="reference internal" href="../variable/CMAKE_CURRENT_BINARY_DIR.html#variable:CMAKE_CURRENT_BINARY_DIR" title="CMAKE_CURRENT_BINARY_DIR"><code class="xref cmake cmake-variable docutils literal notranslate"><span class="pre">CMAKE_CURRENT_BINARY_DIR</span></code></a>), or</p></li>
|
| 282 |
+
<li><p>the current source directory (<span class="target" id="index-0-variable:CMAKE_CURRENT_SOURCE_DIR"></span><a class="reference internal" href="../variable/CMAKE_CURRENT_SOURCE_DIR.html#variable:CMAKE_CURRENT_SOURCE_DIR" title="CMAKE_CURRENT_SOURCE_DIR"><code class="xref cmake cmake-variable docutils literal notranslate"><span class="pre">CMAKE_CURRENT_SOURCE_DIR</span></code></a>).</p></li>
|
| 283 |
+
</ol>
|
| 284 |
+
<p>The path in the build directory is preferred unless the path in the
|
| 285 |
+
source tree is mentioned as an absolute source file path elsewhere
|
| 286 |
+
in the current directory.</p>
|
| 287 |
+
<div class="versionadded">
|
| 288 |
+
<p><span class="versionmodified added">New in version 3.20: </span>Arguments to <code class="docutils literal notranslate"><span class="pre">OUTPUT</span></code> may use a restricted set of
|
| 289 |
+
<span class="target" id="index-5-manual:cmake-generator-expressions(7)"></span><a class="reference internal" href="../manual/cmake-generator-expressions.7.html#manual:cmake-generator-expressions(7)" title="cmake-generator-expressions(7)"><code class="xref cmake cmake-manual docutils literal notranslate"><span class="pre">generator</span> <span class="pre">expressions</span></code></a>.
|
| 290 |
+
<a class="reference internal" href="../manual/cmake-generator-expressions.7.html#target-dependent-queries"><span class="std std-ref">Target-dependent expressions</span></a> are not
|
| 291 |
+
permitted.</p>
|
| 292 |
+
</div>
|
| 293 |
+
</dd>
|
| 294 |
+
<dt><code class="docutils literal notranslate"><span class="pre">USES_TERMINAL</span></code></dt><dd><div class="versionadded">
|
| 295 |
+
<p><span class="versionmodified added">New in version 3.2.</span></p>
|
| 296 |
+
</div>
|
| 297 |
+
<p>The command will be given direct access to the terminal if possible.
|
| 298 |
+
With the <span class="target" id="index-2-generator:Ninja"></span><a class="reference internal" href="../generator/Ninja.html#generator:Ninja" title="Ninja"><code class="xref cmake cmake-generator docutils literal notranslate"><span class="pre">Ninja</span></code></a> generator, this places the command in
|
| 299 |
+
the <code class="docutils literal notranslate"><span class="pre">console</span></code> <span class="target" id="index-2-prop_gbl:JOB_POOLS"></span><a class="reference internal" href="../prop_gbl/JOB_POOLS.html#prop_gbl:JOB_POOLS" title="JOB_POOLS"><code class="xref cmake cmake-prop_gbl docutils literal notranslate"><span class="pre">pool</span></code></a>.</p>
|
| 300 |
+
</dd>
|
| 301 |
+
<dt><code class="docutils literal notranslate"><span class="pre">VERBATIM</span></code></dt><dd><p>All arguments to the commands will be escaped properly for the
|
| 302 |
+
build tool so that the invoked command receives each argument
|
| 303 |
+
unchanged. Note that one level of escapes is still used by the
|
| 304 |
+
CMake language processor before add_custom_command even sees the
|
| 305 |
+
arguments. Use of <code class="docutils literal notranslate"><span class="pre">VERBATIM</span></code> is recommended as it enables
|
| 306 |
+
correct behavior. When <code class="docutils literal notranslate"><span class="pre">VERBATIM</span></code> is not given the behavior
|
| 307 |
+
is platform specific because there is no protection of
|
| 308 |
+
tool-specific special characters.</p>
|
| 309 |
+
</dd>
|
| 310 |
+
<dt><code class="docutils literal notranslate"><span class="pre">WORKING_DIRECTORY</span></code></dt><dd><p>Execute the command with the given current working directory.
|
| 311 |
+
If it is a relative path it will be interpreted relative to the
|
| 312 |
+
build tree directory corresponding to the current source directory.</p>
|
| 313 |
+
<div class="versionadded">
|
| 314 |
+
<p><span class="versionmodified added">New in version 3.13: </span>Arguments to <code class="docutils literal notranslate"><span class="pre">WORKING_DIRECTORY</span></code> may use
|
| 315 |
+
<span class="target" id="index-6-manual:cmake-generator-expressions(7)"></span><a class="reference internal" href="../manual/cmake-generator-expressions.7.html#manual:cmake-generator-expressions(7)" title="cmake-generator-expressions(7)"><code class="xref cmake cmake-manual docutils literal notranslate"><span class="pre">generator</span> <span class="pre">expressions</span></code></a>.</p>
|
| 316 |
+
</div>
|
| 317 |
+
</dd>
|
| 318 |
+
<dt><code class="docutils literal notranslate"><span class="pre">DEPFILE</span></code></dt><dd><div class="versionadded">
|
| 319 |
+
<p><span class="versionmodified added">New in version 3.7.</span></p>
|
| 320 |
+
</div>
|
| 321 |
+
<p>Specify a depfile which holds dependencies for the custom command. It is
|
| 322 |
+
usually emitted by the custom command itself. This keyword may only be used
|
| 323 |
+
if the generator supports it, as detailed below.</p>
|
| 324 |
+
<p>The expected format, compatible with what is generated by <code class="docutils literal notranslate"><span class="pre">gcc</span></code> with the
|
| 325 |
+
option <code class="docutils literal notranslate"><span class="pre">-M</span></code>, is independent of the generator or platform.</p>
|
| 326 |
+
<p>The formal syntax, as specified using
|
| 327 |
+
<a class="reference external" href="https://en.wikipedia.org/wiki/Backus%E2%80%93Naur_form">BNF</a> notation with
|
| 328 |
+
the regular extensions, is the following:</p>
|
| 329 |
+
<pre>
|
| 330 |
+
<strong id="grammar-token-depfile-depfile">depfile </strong> ::= <a class="reference internal" href="#grammar-token-depfile-rule"><code class="xref docutils literal notranslate"><span class="pre">rule</span></code></a>*
|
| 331 |
+
<strong id="grammar-token-depfile-rule">rule </strong> ::= <a class="reference internal" href="#grammar-token-depfile-targets"><code class="xref docutils literal notranslate"><span class="pre">targets</span></code></a> (':' (<a class="reference internal" href="#grammar-token-depfile-separator"><code class="xref docutils literal notranslate"><span class="pre">separator</span></code></a> <a class="reference internal" href="#grammar-token-depfile-dependencies"><code class="xref docutils literal notranslate"><span class="pre">dependencies</span></code></a>?)?)? <a class="reference internal" href="#grammar-token-depfile-eol"><code class="xref docutils literal notranslate"><span class="pre">eol</span></code></a>
|
| 332 |
+
<strong id="grammar-token-depfile-targets">targets </strong> ::= <a class="reference internal" href="#grammar-token-depfile-target"><code class="xref docutils literal notranslate"><span class="pre">target</span></code></a> (<a class="reference internal" href="#grammar-token-depfile-separator"><code class="xref docutils literal notranslate"><span class="pre">separator</span></code></a> <a class="reference internal" href="#grammar-token-depfile-target"><code class="xref docutils literal notranslate"><span class="pre">target</span></code></a>)* <a class="reference internal" href="#grammar-token-depfile-separator"><code class="xref docutils literal notranslate"><span class="pre">separator</span></code></a>*
|
| 333 |
+
<strong id="grammar-token-depfile-target">target </strong> ::= <a class="reference internal" href="#grammar-token-depfile-pathname"><code class="xref docutils literal notranslate"><span class="pre">pathname</span></code></a>
|
| 334 |
+
<strong id="grammar-token-depfile-dependencies">dependencies </strong> ::= <a class="reference internal" href="#grammar-token-depfile-dependency"><code class="xref docutils literal notranslate"><span class="pre">dependency</span></code></a> (<a class="reference internal" href="#grammar-token-depfile-separator"><code class="xref docutils literal notranslate"><span class="pre">separator</span></code></a> <a class="reference internal" href="#grammar-token-depfile-dependency"><code class="xref docutils literal notranslate"><span class="pre">dependency</span></code></a>)* <a class="reference internal" href="#grammar-token-depfile-separator"><code class="xref docutils literal notranslate"><span class="pre">separator</span></code></a>*
|
| 335 |
+
<strong id="grammar-token-depfile-dependency">dependency </strong> ::= <a class="reference internal" href="#grammar-token-depfile-pathname"><code class="xref docutils literal notranslate"><span class="pre">pathname</span></code></a>
|
| 336 |
+
<strong id="grammar-token-depfile-separator">separator </strong> ::= (<a class="reference internal" href="#grammar-token-depfile-space"><code class="xref docutils literal notranslate"><span class="pre">space</span></code></a> | <a class="reference internal" href="#grammar-token-depfile-line_continue"><code class="xref docutils literal notranslate"><span class="pre">line_continue</span></code></a>)+
|
| 337 |
+
<strong id="grammar-token-depfile-line_continue">line_continue</strong> ::= '\' <a class="reference internal" href="#grammar-token-depfile-eol"><code class="xref docutils literal notranslate"><span class="pre">eol</span></code></a>
|
| 338 |
+
<strong id="grammar-token-depfile-space">space </strong> ::= ' ' | '\t'
|
| 339 |
+
<strong id="grammar-token-depfile-pathname">pathname </strong> ::= <a class="reference internal" href="#grammar-token-depfile-character"><code class="xref docutils literal notranslate"><span class="pre">character</span></code></a>+
|
| 340 |
+
<strong id="grammar-token-depfile-character">character </strong> ::= <a class="reference internal" href="#grammar-token-depfile-std_character"><code class="xref docutils literal notranslate"><span class="pre">std_character</span></code></a> | <a class="reference internal" href="#grammar-token-depfile-dollar"><code class="xref docutils literal notranslate"><span class="pre">dollar</span></code></a> | <a class="reference internal" href="#grammar-token-depfile-hash"><code class="xref docutils literal notranslate"><span class="pre">hash</span></code></a> | <a class="reference internal" href="#grammar-token-depfile-whitespace"><code class="xref docutils literal notranslate"><span class="pre">whitespace</span></code></a>
|
| 341 |
+
<strong id="grammar-token-depfile-std_character">std_character</strong> ::= <any character except '$', '#' or ' '>
|
| 342 |
+
<strong id="grammar-token-depfile-dollar">dollar </strong> ::= '$$'
|
| 343 |
+
<strong id="grammar-token-depfile-hash">hash </strong> ::= '\#'
|
| 344 |
+
<strong id="grammar-token-depfile-whitespace">whitespace </strong> ::= '\ '
|
| 345 |
+
<strong id="grammar-token-depfile-eol">eol </strong> ::= '\r'? '\n'
|
| 346 |
+
</pre>
|
| 347 |
+
<div class="admonition note">
|
| 348 |
+
<p class="admonition-title">Note</p>
|
| 349 |
+
<p>As part of <code class="docutils literal notranslate"><span class="pre">pathname</span></code>, any slash and backslash is interpreted as
|
| 350 |
+
a directory separator.</p>
|
| 351 |
+
</div>
|
| 352 |
+
<div class="versionadded">
|
| 353 |
+
<p><span class="versionmodified added">New in version 3.7: </span>The <span class="target" id="index-3-generator:Ninja"></span><a class="reference internal" href="../generator/Ninja.html#generator:Ninja" title="Ninja"><code class="xref cmake cmake-generator docutils literal notranslate"><span class="pre">Ninja</span></code></a> generator supports <code class="docutils literal notranslate"><span class="pre">DEPFILE</span></code> since the keyword
|
| 354 |
+
was first added.</p>
|
| 355 |
+
</div>
|
| 356 |
+
<div class="versionadded">
|
| 357 |
+
<p><span class="versionmodified added">New in version 3.17: </span>Added the <span class="target" id="index-0-generator:Ninja Multi-Config"></span><a class="reference internal" href="../generator/Ninja%20Multi-Config.html#generator:Ninja Multi-Config" title="Ninja Multi-Config"><code class="xref cmake cmake-generator docutils literal notranslate"><span class="pre">Ninja</span> <span class="pre">Multi-Config</span></code></a> generator, which included
|
| 358 |
+
support for the <code class="docutils literal notranslate"><span class="pre">DEPFILE</span></code> keyword.</p>
|
| 359 |
+
</div>
|
| 360 |
+
<div class="versionadded">
|
| 361 |
+
<p><span class="versionmodified added">New in version 3.20: </span>Added support for <a class="reference internal" href="../manual/cmake-generators.7.html#makefile-generators"><span class="std std-ref">Makefile Generators</span></a>.</p>
|
| 362 |
+
<div class="admonition note">
|
| 363 |
+
<p class="admonition-title">Note</p>
|
| 364 |
+
<p><code class="docutils literal notranslate"><span class="pre">DEPFILE</span></code> cannot be specified at the same time as the
|
| 365 |
+
<code class="docutils literal notranslate"><span class="pre">IMPLICIT_DEPENDS</span></code> option for <a class="reference internal" href="../manual/cmake-generators.7.html#makefile-generators"><span class="std std-ref">Makefile Generators</span></a>.</p>
|
| 366 |
+
</div>
|
| 367 |
+
</div>
|
| 368 |
+
<div class="versionadded">
|
| 369 |
+
<p><span class="versionmodified added">New in version 3.21: </span>Added support for <a class="reference internal" href="../manual/cmake-generators.7.html#visual-studio-generators"><span class="std std-ref">Visual Studio Generators</span></a> with VS 2012 and above,
|
| 370 |
+
and for the <span class="target" id="index-0-generator:Xcode"></span><a class="reference internal" href="../generator/Xcode.html#generator:Xcode" title="Xcode"><code class="xref cmake cmake-generator docutils literal notranslate"><span class="pre">Xcode</span></code></a> generator. Support for
|
| 371 |
+
<span class="target" id="index-7-manual:cmake-generator-expressions(7)"></span><a class="reference internal" href="../manual/cmake-generator-expressions.7.html#manual:cmake-generator-expressions(7)" title="cmake-generator-expressions(7)"><code class="xref cmake cmake-manual docutils literal notranslate"><span class="pre">generator</span> <span class="pre">expressions</span></code></a> was also
|
| 372 |
+
added.</p>
|
| 373 |
+
</div>
|
| 374 |
+
<p>Using <code class="docutils literal notranslate"><span class="pre">DEPFILE</span></code> with generators other than those listed above is an error.</p>
|
| 375 |
+
<p>If the <code class="docutils literal notranslate"><span class="pre">DEPFILE</span></code> argument is relative, it should be relative to
|
| 376 |
+
<span class="target" id="index-1-variable:CMAKE_CURRENT_BINARY_DIR"></span><a class="reference internal" href="../variable/CMAKE_CURRENT_BINARY_DIR.html#variable:CMAKE_CURRENT_BINARY_DIR" title="CMAKE_CURRENT_BINARY_DIR"><code class="xref cmake cmake-variable docutils literal notranslate"><span class="pre">CMAKE_CURRENT_BINARY_DIR</span></code></a>, and any relative paths inside the
|
| 377 |
+
<code class="docutils literal notranslate"><span class="pre">DEPFILE</span></code> should also be relative to <span class="target" id="index-2-variable:CMAKE_CURRENT_BINARY_DIR"></span><a class="reference internal" href="../variable/CMAKE_CURRENT_BINARY_DIR.html#variable:CMAKE_CURRENT_BINARY_DIR" title="CMAKE_CURRENT_BINARY_DIR"><code class="xref cmake cmake-variable docutils literal notranslate"><span class="pre">CMAKE_CURRENT_BINARY_DIR</span></code></a>.
|
| 378 |
+
See policy <span class="target" id="index-0-policy:CMP0116"></span><a class="reference internal" href="../policy/CMP0116.html#policy:CMP0116" title="CMP0116"><code class="xref cmake cmake-policy docutils literal notranslate"><span class="pre">CMP0116</span></code></a>, which is always <code class="docutils literal notranslate"><span class="pre">NEW</span></code> for
|
| 379 |
+
<a class="reference internal" href="../manual/cmake-generators.7.html#makefile-generators"><span class="std std-ref">Makefile Generators</span></a>, <a class="reference internal" href="../manual/cmake-generators.7.html#visual-studio-generators"><span class="std std-ref">Visual Studio Generators</span></a>,
|
| 380 |
+
and the <span class="target" id="index-1-generator:Xcode"></span><a class="reference internal" href="../generator/Xcode.html#generator:Xcode" title="Xcode"><code class="xref cmake cmake-generator docutils literal notranslate"><span class="pre">Xcode</span></code></a> generator.</p>
|
| 381 |
+
</dd>
|
| 382 |
+
</dl>
|
| 383 |
+
<p><code class="docutils literal notranslate"><span class="pre">DEPENDS_EXPLICIT_ONLY</span></code></p>
|
| 384 |
+
<blockquote>
|
| 385 |
+
<div><div class="versionadded">
|
| 386 |
+
<p><span class="versionmodified added">New in version 3.27.</span></p>
|
| 387 |
+
</div>
|
| 388 |
+
<p>Indicates that the command's <code class="docutils literal notranslate"><span class="pre">DEPENDS</span></code> argument represents all files
|
| 389 |
+
required by the command and implicit dependencies are not required.</p>
|
| 390 |
+
<p>Without this option, if any target uses the output of the custom command,
|
| 391 |
+
CMake will consider that target's dependencies as implicit dependencies for
|
| 392 |
+
the custom command in case this custom command requires files implicitly
|
| 393 |
+
created by those targets.</p>
|
| 394 |
+
<p>This option can be enabled on all custom commands by setting
|
| 395 |
+
<span class="target" id="index-0-variable:CMAKE_ADD_CUSTOM_COMMAND_DEPENDS_EXPLICIT_ONLY"></span><a class="reference internal" href="../variable/CMAKE_ADD_CUSTOM_COMMAND_DEPENDS_EXPLICIT_ONLY.html#variable:CMAKE_ADD_CUSTOM_COMMAND_DEPENDS_EXPLICIT_ONLY" title="CMAKE_ADD_CUSTOM_COMMAND_DEPENDS_EXPLICIT_ONLY"><code class="xref cmake cmake-variable docutils literal notranslate"><span class="pre">CMAKE_ADD_CUSTOM_COMMAND_DEPENDS_EXPLICIT_ONLY</span></code></a> to <code class="docutils literal notranslate"><span class="pre">ON</span></code>.</p>
|
| 396 |
+
<p>Only the <a class="reference internal" href="../manual/cmake-generators.7.html#ninja-generators"><span class="std std-ref">Ninja Generators</span></a> actually use this information to remove
|
| 397 |
+
unnecessary implicit dependencies.</p>
|
| 398 |
+
<p>See also the <span class="target" id="index-0-prop_tgt:OPTIMIZE_DEPENDENCIES"></span><a class="reference internal" href="../prop_tgt/OPTIMIZE_DEPENDENCIES.html#prop_tgt:OPTIMIZE_DEPENDENCIES" title="OPTIMIZE_DEPENDENCIES"><code class="xref cmake cmake-prop_tgt docutils literal notranslate"><span class="pre">OPTIMIZE_DEPENDENCIES</span></code></a> target property, which may
|
| 399 |
+
provide another way for reducing the impact of target dependencies in some
|
| 400 |
+
scenarios.</p>
|
| 401 |
+
</div></blockquote>
|
| 402 |
+
</section>
|
| 403 |
+
<section id="examples-generating-files">
|
| 404 |
+
<h2>Examples: Generating Files<a class="headerlink" href="#examples-generating-files" title="Permalink to this heading">¶</a></h2>
|
| 405 |
+
<p>Custom commands may be used to generate source files.
|
| 406 |
+
For example, the code:</p>
|
| 407 |
+
<div class="highlight-cmake notranslate"><div class="highlight"><pre><span></span><span class="nf">add_custom_command(</span>
|
| 408 |
+
<span class="w"> </span><span class="no">OUTPUT</span><span class="w"> </span><span class="nb">out.c</span>
|
| 409 |
+
<span class="w"> </span><span class="no">COMMAND</span><span class="w"> </span><span class="nb">someTool</span><span class="w"> </span><span class="p">-</span><span class="nb">i</span><span class="w"> </span><span class="o">${</span><span class="nt">CMAKE_CURRENT_SOURCE_DIR</span><span class="o">}</span><span class="na">/in.txt</span>
|
| 410 |
+
<span class="w"> </span><span class="p">-</span><span class="nb">o</span><span class="w"> </span><span class="nb">out.c</span>
|
| 411 |
+
<span class="w"> </span><span class="no">DEPENDS</span><span class="w"> </span><span class="o">${</span><span class="nt">CMAKE_CURRENT_SOURCE_DIR</span><span class="o">}</span><span class="na">/in.txt</span>
|
| 412 |
+
<span class="w"> </span><span class="no">VERBATIM</span><span class="nf">)</span>
|
| 413 |
+
<span class="nf">add_library(</span><span class="nb">myLib</span><span class="w"> </span><span class="nb">out.c</span><span class="nf">)</span>
|
| 414 |
+
</pre></div>
|
| 415 |
+
</div>
|
| 416 |
+
<p>adds a custom command to run <code class="docutils literal notranslate"><span class="pre">someTool</span></code> to generate <code class="docutils literal notranslate"><span class="pre">out.c</span></code> and then
|
| 417 |
+
compile the generated source as part of a library. The generation rule
|
| 418 |
+
will re-run whenever <code class="docutils literal notranslate"><span class="pre">in.txt</span></code> changes.</p>
|
| 419 |
+
<div class="versionadded">
|
| 420 |
+
<p><span class="versionmodified added">New in version 3.20: </span>One may use generator expressions to specify per-configuration outputs.
|
| 421 |
+
For example, the code:</p>
|
| 422 |
+
<div class="highlight-cmake notranslate"><div class="highlight"><pre><span></span><span class="nf">add_custom_command(</span>
|
| 423 |
+
<span class="w"> </span><span class="no">OUTPUT</span><span class="w"> </span><span class="s">"out-$<CONFIG>.c"</span>
|
| 424 |
+
<span class="w"> </span><span class="no">COMMAND</span><span class="w"> </span><span class="nb">someTool</span><span class="w"> </span><span class="p">-</span><span class="nb">i</span><span class="w"> </span><span class="o">${</span><span class="nt">CMAKE_CURRENT_SOURCE_DIR</span><span class="o">}</span><span class="na">/in.txt</span>
|
| 425 |
+
<span class="w"> </span><span class="p">-</span><span class="nb">o</span><span class="w"> </span><span class="s">"out-$<CONFIG>.c"</span>
|
| 426 |
+
<span class="w"> </span><span class="p">-</span><span class="nb">c</span><span class="w"> </span><span class="s">"$<CONFIG>"</span>
|
| 427 |
+
<span class="w"> </span><span class="no">DEPENDS</span><span class="w"> </span><span class="o">${</span><span class="nt">CMAKE_CURRENT_SOURCE_DIR</span><span class="o">}</span><span class="na">/in.txt</span>
|
| 428 |
+
<span class="w"> </span><span class="no">VERBATIM</span><span class="nf">)</span>
|
| 429 |
+
<span class="nf">add_library(</span><span class="nb">myLib</span><span class="w"> </span><span class="s">"out-$<CONFIG>.c"</span><span class="nf">)</span>
|
| 430 |
+
</pre></div>
|
| 431 |
+
</div>
|
| 432 |
+
<p>adds a custom command to run <code class="docutils literal notranslate"><span class="pre">someTool</span></code> to generate <code class="docutils literal notranslate"><span class="pre">out-<config>.c</span></code>,
|
| 433 |
+
where <code class="docutils literal notranslate"><span class="pre"><config></span></code> is the build configuration, and then compile the generated
|
| 434 |
+
source as part of a library.</p>
|
| 435 |
+
</div>
|
| 436 |
+
<section id="example-generating-files-for-multiple-targets">
|
| 437 |
+
<h3>Example: Generating Files for Multiple Targets<a class="headerlink" href="#example-generating-files-for-multiple-targets" title="Permalink to this heading">¶</a></h3>
|
| 438 |
+
<p>If multiple independent targets need the same custom command output,
|
| 439 |
+
it must be attached to a single custom target on which they all depend.
|
| 440 |
+
Consider the following example:</p>
|
| 441 |
+
<div class="highlight-cmake notranslate"><div class="highlight"><pre><span></span><span class="nf">add_custom_command(</span>
|
| 442 |
+
<span class="w"> </span><span class="no">OUTPUT</span><span class="w"> </span><span class="nb">table.csv</span>
|
| 443 |
+
<span class="w"> </span><span class="no">COMMAND</span><span class="w"> </span><span class="nb">makeTable</span><span class="w"> </span><span class="p">-</span><span class="nb">i</span><span class="w"> </span><span class="o">${</span><span class="nt">CMAKE_CURRENT_SOURCE_DIR</span><span class="o">}</span><span class="na">/input.dat</span>
|
| 444 |
+
<span class="w"> </span><span class="p">-</span><span class="nb">o</span><span class="w"> </span><span class="nb">table.csv</span>
|
| 445 |
+
<span class="w"> </span><span class="no">DEPENDS</span><span class="w"> </span><span class="o">${</span><span class="nt">CMAKE_CURRENT_SOURCE_DIR</span><span class="o">}</span><span class="na">/input.dat</span>
|
| 446 |
+
<span class="w"> </span><span class="no">VERBATIM</span><span class="nf">)</span>
|
| 447 |
+
<span class="nf">add_custom_target(</span><span class="nb">generate_table_csv</span><span class="w"> </span><span class="no">DEPENDS</span><span class="w"> </span><span class="nb">table.csv</span><span class="nf">)</span>
|
| 448 |
+
|
| 449 |
+
<span class="nf">add_custom_command(</span>
|
| 450 |
+
<span class="w"> </span><span class="no">OUTPUT</span><span class="w"> </span><span class="nb">foo.cxx</span>
|
| 451 |
+
<span class="w"> </span><span class="no">COMMAND</span><span class="w"> </span><span class="nb">genFromTable</span><span class="w"> </span><span class="p">-</span><span class="nb">i</span><span class="w"> </span><span class="nb">table.csv</span><span class="w"> </span><span class="p">-</span><span class="nb">case</span><span class="w"> </span><span class="nb">foo</span><span class="w"> </span><span class="p">-</span><span class="nb">o</span><span class="w"> </span><span class="nb">foo.cxx</span>
|
| 452 |
+
<span class="w"> </span><span class="no">DEPENDS</span><span class="w"> </span><span class="nb">table.csv</span><span class="w"> </span><span class="c"># file-level dependency</span>
|
| 453 |
+
<span class="w"> </span><span class="nb">generate_table_csv</span><span class="w"> </span><span class="c"># target-level dependency</span>
|
| 454 |
+
<span class="w"> </span><span class="no">VERBATIM</span><span class="nf">)</span>
|
| 455 |
+
<span class="nf">add_library(</span><span class="nb">foo</span><span class="w"> </span><span class="nb">foo.cxx</span><span class="nf">)</span>
|
| 456 |
+
|
| 457 |
+
<span class="nf">add_custom_command(</span>
|
| 458 |
+
<span class="w"> </span><span class="no">OUTPUT</span><span class="w"> </span><span class="nb">bar.cxx</span>
|
| 459 |
+
<span class="w"> </span><span class="no">COMMAND</span><span class="w"> </span><span class="nb">genFromTable</span><span class="w"> </span><span class="p">-</span><span class="nb">i</span><span class="w"> </span><span class="nb">table.csv</span><span class="w"> </span><span class="p">-</span><span class="nb">case</span><span class="w"> </span><span class="nb">bar</span><span class="w"> </span><span class="p">-</span><span class="nb">o</span><span class="w"> </span><span class="nb">bar.cxx</span>
|
| 460 |
+
<span class="w"> </span><span class="no">DEPENDS</span><span class="w"> </span><span class="nb">table.csv</span><span class="w"> </span><span class="c"># file-level dependency</span>
|
| 461 |
+
<span class="w"> </span><span class="nb">generate_table_csv</span><span class="w"> </span><span class="c"># target-level dependency</span>
|
| 462 |
+
<span class="w"> </span><span class="no">VERBATIM</span><span class="nf">)</span>
|
| 463 |
+
<span class="nf">add_library(</span><span class="nb">bar</span><span class="w"> </span><span class="nb">bar.cxx</span><span class="nf">)</span>
|
| 464 |
+
</pre></div>
|
| 465 |
+
</div>
|
| 466 |
+
<p>Output <code class="docutils literal notranslate"><span class="pre">foo.cxx</span></code> is needed only by target <code class="docutils literal notranslate"><span class="pre">foo</span></code> and output <code class="docutils literal notranslate"><span class="pre">bar.cxx</span></code>
|
| 467 |
+
is needed only by target <code class="docutils literal notranslate"><span class="pre">bar</span></code>, but <em>both</em> targets need <code class="docutils literal notranslate"><span class="pre">table.csv</span></code>,
|
| 468 |
+
transitively. Since <code class="docutils literal notranslate"><span class="pre">foo</span></code> and <code class="docutils literal notranslate"><span class="pre">bar</span></code> are independent targets that may
|
| 469 |
+
build concurrently, we prevent them from racing to generate <code class="docutils literal notranslate"><span class="pre">table.csv</span></code>
|
| 470 |
+
by placing its custom command in a separate target, <code class="docutils literal notranslate"><span class="pre">generate_table_csv</span></code>.
|
| 471 |
+
The custom commands generating <code class="docutils literal notranslate"><span class="pre">foo.cxx</span></code> and <code class="docutils literal notranslate"><span class="pre">bar.cxx</span></code> each specify a
|
| 472 |
+
target-level dependency on <code class="docutils literal notranslate"><span class="pre">generate_table_csv</span></code>, so the targets using them,
|
| 473 |
+
<code class="docutils literal notranslate"><span class="pre">foo</span></code> and <code class="docutils literal notranslate"><span class="pre">bar</span></code>, will not build until after target <code class="docutils literal notranslate"><span class="pre">generate_table_csv</span></code>
|
| 474 |
+
is built.</p>
|
| 475 |
+
</section>
|
| 476 |
+
</section>
|
| 477 |
+
<section id="build-events">
|
| 478 |
+
<span id="add-custom-command-target"></span><h2>Build Events<a class="headerlink" href="#build-events" title="Permalink to this heading">¶</a></h2>
|
| 479 |
+
<p>The second signature adds a custom command to a target such as a
|
| 480 |
+
library or executable. This is useful for performing an operation
|
| 481 |
+
before or after building the target. The command becomes part of the
|
| 482 |
+
target and will only execute when the target itself is built. If the
|
| 483 |
+
target is already built, the command will not execute.</p>
|
| 484 |
+
<div class="highlight-cmake notranslate"><div class="highlight"><pre><span></span><span class="nf">add_custom_command(</span><span class="no">TARGET</span><span class="w"> </span><span class="nv"><target></span>
|
| 485 |
+
<span class="w"> </span><span class="no">PRE_BUILD</span><span class="w"> </span><span class="p">|</span><span class="w"> </span><span class="no">PRE_LINK</span><span class="w"> </span><span class="p">|</span><span class="w"> </span><span class="no">POST_BUILD</span>
|
| 486 |
+
<span class="w"> </span><span class="no">COMMAND</span><span class="w"> </span><span class="nb">command1</span><span class="w"> </span><span class="p">[</span><span class="no">ARGS</span><span class="p">]</span><span class="w"> </span><span class="p">[</span><span class="nb">args1...</span><span class="p">]</span>
|
| 487 |
+
<span class="w"> </span><span class="p">[</span><span class="no">COMMAND</span><span class="w"> </span><span class="nb">command2</span><span class="w"> </span><span class="p">[</span><span class="no">ARGS</span><span class="p">]</span><span class="w"> </span><span class="p">[</span><span class="nb">args2...</span><span class="p">]</span><span class="w"> </span><span class="p">...]</span>
|
| 488 |
+
<span class="w"> </span><span class="p">[</span><span class="no">BYPRODUCTS</span><span class="w"> </span><span class="p">[</span><span class="nb">files...</span><span class="p">]]</span>
|
| 489 |
+
<span class="w"> </span><span class="p">[</span><span class="no">WORKING_DIRECTORY</span><span class="w"> </span><span class="nb">dir</span><span class="p">]</span>
|
| 490 |
+
<span class="w"> </span><span class="p">[</span><span class="no">COMMENT</span><span class="w"> </span><span class="nb">comment</span><span class="p">]</span>
|
| 491 |
+
<span class="w"> </span><span class="p">[</span><span class="no">VERBATIM</span><span class="p">]</span>
|
| 492 |
+
<span class="w"> </span><span class="p">[</span><span class="no">COMMAND_EXPAND_LISTS</span><span class="p">]</span><span class="nf">)</span>
|
| 493 |
+
</pre></div>
|
| 494 |
+
</div>
|
| 495 |
+
<p>This defines a new command that will be associated with building the
|
| 496 |
+
specified <code class="docutils literal notranslate"><span class="pre"><target></span></code>. The <code class="docutils literal notranslate"><span class="pre"><target></span></code> must be defined in the current
|
| 497 |
+
directory; targets defined in other directories may not be specified.</p>
|
| 498 |
+
<p>When the command will happen is determined by which
|
| 499 |
+
of the following is specified:</p>
|
| 500 |
+
<dl class="simple">
|
| 501 |
+
<dt><code class="docutils literal notranslate"><span class="pre">PRE_BUILD</span></code></dt><dd><p>This option has unique behavior for the <a class="reference internal" href="../manual/cmake-generators.7.html#visual-studio-generators"><span class="std std-ref">Visual Studio Generators</span></a>.
|
| 502 |
+
When using one of the Visual Studio generators, the command will run before
|
| 503 |
+
any other rules are executed within the target. With all other generators,
|
| 504 |
+
this option behaves the same as <code class="docutils literal notranslate"><span class="pre">PRE_LINK</span></code> instead. Because of this,
|
| 505 |
+
it is recommended to avoid using <code class="docutils literal notranslate"><span class="pre">PRE_BUILD</span></code> except when it is known that
|
| 506 |
+
a Visual Studio generator is being used.</p>
|
| 507 |
+
</dd>
|
| 508 |
+
<dt><code class="docutils literal notranslate"><span class="pre">PRE_LINK</span></code></dt><dd><p>Run after sources have been compiled but before linking the binary
|
| 509 |
+
or running the librarian or archiver tool of a static library.
|
| 510 |
+
This is not defined for targets created by the
|
| 511 |
+
<span class="target" id="index-2-command:add_custom_target"></span><a class="reference internal" href="add_custom_target.html#command:add_custom_target" title="add_custom_target"><code class="xref cmake cmake-command docutils literal notranslate"><span class="pre">add_custom_target()</span></code></a> command.</p>
|
| 512 |
+
</dd>
|
| 513 |
+
<dt><code class="docutils literal notranslate"><span class="pre">POST_BUILD</span></code></dt><dd><p>Run after all other rules within the target have been executed.</p>
|
| 514 |
+
</dd>
|
| 515 |
+
</dl>
|
| 516 |
+
<p>Projects should always specify one of the above three keywords when using
|
| 517 |
+
the <code class="docutils literal notranslate"><span class="pre">TARGET</span></code> form. For backward compatibility reasons, <code class="docutils literal notranslate"><span class="pre">POST_BUILD</span></code> is
|
| 518 |
+
assumed if no such keyword is given, but projects should explicitly provide
|
| 519 |
+
one of the keywords to make clear the behavior they expect.</p>
|
| 520 |
+
<div class="admonition note">
|
| 521 |
+
<p class="admonition-title">Note</p>
|
| 522 |
+
<p>Because generator expressions can be used in custom commands,
|
| 523 |
+
it is possible to define <code class="docutils literal notranslate"><span class="pre">COMMAND</span></code> lines or whole custom commands
|
| 524 |
+
which evaluate to empty strings for certain configurations.
|
| 525 |
+
For <strong>Visual Studio 11 2012 (and newer)</strong> generators these command
|
| 526 |
+
lines or custom commands will be omitted for the specific
|
| 527 |
+
configuration and no "empty-string-command" will be added.</p>
|
| 528 |
+
<p>This allows to add individual build events for every configuration.</p>
|
| 529 |
+
</div>
|
| 530 |
+
<div class="versionadded">
|
| 531 |
+
<p><span class="versionmodified added">New in version 3.21: </span>Support for target-dependent generator expressions.</p>
|
| 532 |
+
</div>
|
| 533 |
+
</section>
|
| 534 |
+
<section id="examples-build-events">
|
| 535 |
+
<h2>Examples: Build Events<a class="headerlink" href="#examples-build-events" title="Permalink to this heading">¶</a></h2>
|
| 536 |
+
<p>A <code class="docutils literal notranslate"><span class="pre">POST_BUILD</span></code> event may be used to post-process a binary after linking.
|
| 537 |
+
For example, the code:</p>
|
| 538 |
+
<div class="highlight-cmake notranslate"><div class="highlight"><pre><span></span><span class="nf">add_executable(</span><span class="nb">myExe</span><span class="w"> </span><span class="nb">myExe.c</span><span class="nf">)</span>
|
| 539 |
+
<span class="nf">add_custom_command(</span>
|
| 540 |
+
<span class="w"> </span><span class="no">TARGET</span><span class="w"> </span><span class="nb">myExe</span><span class="w"> </span><span class="no">POST_BUILD</span>
|
| 541 |
+
<span class="w"> </span><span class="no">COMMAND</span><span class="w"> </span><span class="nb">someHasher</span><span class="w"> </span><span class="p">-</span><span class="nb">i</span><span class="w"> </span><span class="s">"$<TARGET_FILE:myExe>"</span>
|
| 542 |
+
<span class="w"> </span><span class="p">-</span><span class="nb">o</span><span class="w"> </span><span class="s">"$<TARGET_FILE:myExe>.hash"</span>
|
| 543 |
+
<span class="w"> </span><span class="no">VERBATIM</span><span class="nf">)</span>
|
| 544 |
+
</pre></div>
|
| 545 |
+
</div>
|
| 546 |
+
<p>will run <code class="docutils literal notranslate"><span class="pre">someHasher</span></code> to produce a <code class="docutils literal notranslate"><span class="pre">.hash</span></code> file next to the executable
|
| 547 |
+
after linking.</p>
|
| 548 |
+
<div class="versionadded">
|
| 549 |
+
<p><span class="versionmodified added">New in version 3.20: </span>One may use generator expressions to specify per-configuration byproducts.
|
| 550 |
+
For example, the code:</p>
|
| 551 |
+
<div class="highlight-cmake notranslate"><div class="highlight"><pre><span></span><span class="nf">add_library(</span><span class="nb">myPlugin</span><span class="w"> </span><span class="no">MODULE</span><span class="w"> </span><span class="nb">myPlugin.c</span><span class="nf">)</span>
|
| 552 |
+
<span class="nf">add_custom_command(</span>
|
| 553 |
+
<span class="w"> </span><span class="no">TARGET</span><span class="w"> </span><span class="nb">myPlugin</span><span class="w"> </span><span class="no">POST_BUILD</span>
|
| 554 |
+
<span class="w"> </span><span class="no">COMMAND</span><span class="w"> </span><span class="nb">someHasher</span><span class="w"> </span><span class="p">-</span><span class="nb">i</span><span class="w"> </span><span class="s">"$<TARGET_FILE:myPlugin>"</span>
|
| 555 |
+
<span class="w"> </span><span class="p">--</span><span class="nb">as-code</span><span class="w"> </span><span class="s">"myPlugin-hash-$<CONFIG>.c"</span>
|
| 556 |
+
<span class="w"> </span><span class="no">BYPRODUCTS</span><span class="w"> </span><span class="s">"myPlugin-hash-$<CONFIG>.c"</span>
|
| 557 |
+
<span class="w"> </span><span class="no">VERBATIM</span><span class="nf">)</span>
|
| 558 |
+
<span class="nf">add_executable(</span><span class="nb">myExe</span><span class="w"> </span><span class="nb">myExe.c</span><span class="w"> </span><span class="s">"myPlugin-hash-$<CONFIG>.c"</span><span class="nf">)</span>
|
| 559 |
+
</pre></div>
|
| 560 |
+
</div>
|
| 561 |
+
<p>will run <code class="docutils literal notranslate"><span class="pre">someHasher</span></code> after linking <code class="docutils literal notranslate"><span class="pre">myPlugin</span></code>, e.g. to produce a <code class="docutils literal notranslate"><span class="pre">.c</span></code>
|
| 562 |
+
file containing code to check the hash of <code class="docutils literal notranslate"><span class="pre">myPlugin</span></code> that the <code class="docutils literal notranslate"><span class="pre">myExe</span></code>
|
| 563 |
+
executable can use to verify it before loading.</p>
|
| 564 |
+
</div>
|
| 565 |
+
</section>
|
| 566 |
+
<section id="ninja-multi-config">
|
| 567 |
+
<h2>Ninja Multi-Config<a class="headerlink" href="#ninja-multi-config" title="Permalink to this heading">¶</a></h2>
|
| 568 |
+
<div class="versionadded">
|
| 569 |
+
<p><span class="versionmodified added">New in version 3.20: </span><code class="docutils literal notranslate"><span class="pre">add_custom_command</span></code> supports the <span class="target" id="index-1-generator:Ninja Multi-Config"></span><a class="reference internal" href="../generator/Ninja%20Multi-Config.html#generator:Ninja Multi-Config" title="Ninja Multi-Config"><code class="xref cmake cmake-generator docutils literal notranslate"><span class="pre">Ninja</span> <span class="pre">Multi-Config</span></code></a>
|
| 570 |
+
generator's cross-config capabilities. See the generator documentation
|
| 571 |
+
for more information.</p>
|
| 572 |
+
</div>
|
| 573 |
+
</section>
|
| 574 |
+
<section id="see-also">
|
| 575 |
+
<h2>See Also<a class="headerlink" href="#see-also" title="Permalink to this heading">¶</a></h2>
|
| 576 |
+
<ul class="simple">
|
| 577 |
+
<li><p><span class="target" id="index-3-command:add_custom_target"></span><a class="reference internal" href="add_custom_target.html#command:add_custom_target" title="add_custom_target"><code class="xref cmake cmake-command docutils literal notranslate"><span class="pre">add_custom_target()</span></code></a></p></li>
|
| 578 |
+
</ul>
|
| 579 |
+
</section>
|
| 580 |
+
</section>
|
| 581 |
+
|
| 582 |
+
|
| 583 |
+
<div class="clearer"></div>
|
| 584 |
+
</div>
|
| 585 |
+
</div>
|
| 586 |
+
</div>
|
| 587 |
+
<div class="sphinxsidebar" role="navigation" aria-label="main navigation">
|
| 588 |
+
<div class="sphinxsidebarwrapper">
|
| 589 |
+
<div>
|
| 590 |
+
<h3><a href="../index.html">Table of Contents</a></h3>
|
| 591 |
+
<ul>
|
| 592 |
+
<li><a class="reference internal" href="#">add_custom_command</a><ul>
|
| 593 |
+
<li><a class="reference internal" href="#generating-files">Generating Files</a></li>
|
| 594 |
+
<li><a class="reference internal" href="#examples-generating-files">Examples: Generating Files</a><ul>
|
| 595 |
+
<li><a class="reference internal" href="#example-generating-files-for-multiple-targets">Example: Generating Files for Multiple Targets</a></li>
|
| 596 |
+
</ul>
|
| 597 |
+
</li>
|
| 598 |
+
<li><a class="reference internal" href="#build-events">Build Events</a></li>
|
| 599 |
+
<li><a class="reference internal" href="#examples-build-events">Examples: Build Events</a></li>
|
| 600 |
+
<li><a class="reference internal" href="#ninja-multi-config">Ninja Multi-Config</a></li>
|
| 601 |
+
<li><a class="reference internal" href="#see-also">See Also</a></li>
|
| 602 |
+
</ul>
|
| 603 |
+
</li>
|
| 604 |
+
</ul>
|
| 605 |
+
|
| 606 |
+
</div>
|
| 607 |
+
<div>
|
| 608 |
+
<h4>Previous topic</h4>
|
| 609 |
+
<p class="topless"><a href="add_compile_options.html"
|
| 610 |
+
title="previous chapter">add_compile_options</a></p>
|
| 611 |
+
</div>
|
| 612 |
+
<div>
|
| 613 |
+
<h4>Next topic</h4>
|
| 614 |
+
<p class="topless"><a href="add_custom_target.html"
|
| 615 |
+
title="next chapter">add_custom_target</a></p>
|
| 616 |
+
</div>
|
| 617 |
+
<div role="note" aria-label="source link">
|
| 618 |
+
<h3>This Page</h3>
|
| 619 |
+
<ul class="this-page-menu">
|
| 620 |
+
<li><a href="../_sources/command/add_custom_command.rst.txt"
|
| 621 |
+
rel="nofollow">Show Source</a></li>
|
| 622 |
+
</ul>
|
| 623 |
+
</div>
|
| 624 |
+
<div id="searchbox" style="display: none" role="search">
|
| 625 |
+
<h3 id="searchlabel">Quick search</h3>
|
| 626 |
+
<div class="searchformwrapper">
|
| 627 |
+
<form class="search" action="../search.html" method="get">
|
| 628 |
+
<input type="text" name="q" aria-labelledby="searchlabel" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/>
|
| 629 |
+
<input type="submit" value="Go" />
|
| 630 |
+
</form>
|
| 631 |
+
</div>
|
| 632 |
+
</div>
|
| 633 |
+
<script>document.getElementById('searchbox').style.display = "block"</script>
|
| 634 |
+
</div>
|
| 635 |
+
</div>
|
| 636 |
+
<div class="clearer"></div>
|
| 637 |
+
</div>
|
| 638 |
+
<div class="related" role="navigation" aria-label="related navigation">
|
| 639 |
+
<h3>Navigation</h3>
|
| 640 |
+
<ul>
|
| 641 |
+
<li class="right" style="margin-right: 10px">
|
| 642 |
+
<a href="../genindex.html" title="General Index"
|
| 643 |
+
>index</a></li>
|
| 644 |
+
<li class="right" >
|
| 645 |
+
<a href="add_custom_target.html" title="add_custom_target"
|
| 646 |
+
>next</a> |</li>
|
| 647 |
+
<li class="right" >
|
| 648 |
+
<a href="add_compile_options.html" title="add_compile_options"
|
| 649 |
+
>previous</a> |</li>
|
| 650 |
+
<li>
|
| 651 |
+
<img src="../_static/cmake-logo-16.png" alt=""
|
| 652 |
+
style="vertical-align: middle; margin-top: -2px" />
|
| 653 |
+
</li>
|
| 654 |
+
<li>
|
| 655 |
+
<a href="https://cmake.org/">CMake</a> »
|
| 656 |
+
</li>
|
| 657 |
+
<li>
|
| 658 |
+
<a href="../index.html">3.27.9 Documentation</a> »
|
| 659 |
+
</li>
|
| 660 |
+
|
| 661 |
+
<li class="nav-item nav-item-1"><a href="../manual/cmake-commands.7.html" >cmake-commands(7)</a> »</li>
|
| 662 |
+
<li class="nav-item nav-item-this"><a href="">add_custom_command</a></li>
|
| 663 |
+
</ul>
|
| 664 |
+
</div>
|
| 665 |
+
|
| 666 |
+
<div class="footer" role="contentinfo">
|
| 667 |
+
© Copyright 2000-2023 Kitware, Inc. and Contributors.
|
| 668 |
+
Created using <a href="https://www.sphinx-doc.org/">Sphinx</a> 5.3.0.
|
| 669 |
+
</div>
|
| 670 |
+
</body>
|
| 671 |
+
</html>
|
toolchain/cmake-3.27.9-linux-x86_64/doc/cmake/html/command/add_custom_target.html
ADDED
|
@@ -0,0 +1,327 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
|
| 2 |
+
<!DOCTYPE html>
|
| 3 |
+
|
| 4 |
+
<html lang="en">
|
| 5 |
+
<head>
|
| 6 |
+
<meta charset="utf-8" />
|
| 7 |
+
<meta name="viewport" content="width=device-width, initial-scale=1.0" /><meta name="generator" content="Docutils 0.19: https://docutils.sourceforge.io/" />
|
| 8 |
+
|
| 9 |
+
<title>add_custom_target — CMake 3.27.9 Documentation</title>
|
| 10 |
+
|
| 11 |
+
<link rel="stylesheet" type="text/css" href="../_static/pygments.css" />
|
| 12 |
+
<link rel="stylesheet" type="text/css" href="../_static/cmake.css" />
|
| 13 |
+
|
| 14 |
+
<script data-url_root="../" id="documentation_options" src="../_static/documentation_options.js"></script>
|
| 15 |
+
<script src="../_static/jquery.js"></script>
|
| 16 |
+
<script src="../_static/underscore.js"></script>
|
| 17 |
+
<script src="../_static/_sphinx_javascript_frameworks_compat.js"></script>
|
| 18 |
+
<script src="../_static/doctools.js"></script>
|
| 19 |
+
<script src="../_static/sphinx_highlight.js"></script>
|
| 20 |
+
|
| 21 |
+
<link rel="shortcut icon" href="../_static/cmake-favicon.ico"/>
|
| 22 |
+
<link rel="index" title="Index" href="../genindex.html" />
|
| 23 |
+
<link rel="search" title="Search" href="../search.html" />
|
| 24 |
+
<link rel="next" title="add_definitions" href="add_definitions.html" />
|
| 25 |
+
<link rel="prev" title="add_custom_command" href="add_custom_command.html" />
|
| 26 |
+
|
| 27 |
+
|
| 28 |
+
</head><body>
|
| 29 |
+
|
| 30 |
+
<div class="related" role="navigation" aria-label="related navigation">
|
| 31 |
+
<h3>Navigation</h3>
|
| 32 |
+
<ul>
|
| 33 |
+
<li class="right" style="margin-right: 10px">
|
| 34 |
+
<a href="../genindex.html" title="General Index"
|
| 35 |
+
accesskey="I">index</a></li>
|
| 36 |
+
<li class="right" >
|
| 37 |
+
<a href="add_definitions.html" title="add_definitions"
|
| 38 |
+
accesskey="N">next</a> |</li>
|
| 39 |
+
<li class="right" >
|
| 40 |
+
<a href="add_custom_command.html" title="add_custom_command"
|
| 41 |
+
accesskey="P">previous</a> |</li>
|
| 42 |
+
<li>
|
| 43 |
+
<img src="../_static/cmake-logo-16.png" alt=""
|
| 44 |
+
style="vertical-align: middle; margin-top: -2px" />
|
| 45 |
+
</li>
|
| 46 |
+
<li>
|
| 47 |
+
<a href="https://cmake.org/">CMake</a> »
|
| 48 |
+
</li>
|
| 49 |
+
<li>
|
| 50 |
+
<a href="../index.html">3.27.9 Documentation</a> »
|
| 51 |
+
</li>
|
| 52 |
+
|
| 53 |
+
<li class="nav-item nav-item-1"><a href="../manual/cmake-commands.7.html" accesskey="U">cmake-commands(7)</a> »</li>
|
| 54 |
+
<li class="nav-item nav-item-this"><a href="">add_custom_target</a></li>
|
| 55 |
+
</ul>
|
| 56 |
+
</div>
|
| 57 |
+
|
| 58 |
+
<div class="document">
|
| 59 |
+
<div class="documentwrapper">
|
| 60 |
+
<div class="bodywrapper">
|
| 61 |
+
<div class="body" role="main">
|
| 62 |
+
|
| 63 |
+
<section id="add-custom-target">
|
| 64 |
+
<span id="command:add_custom_target"></span><h1>add_custom_target<a class="headerlink" href="#add-custom-target" title="Permalink to this heading">¶</a></h1>
|
| 65 |
+
<p>Add a target with no output so it will always be built.</p>
|
| 66 |
+
<div class="highlight-cmake notranslate"><div class="highlight"><pre><span></span><span class="nf">add_custom_target(</span><span class="nb">Name</span><span class="w"> </span><span class="p">[</span><span class="no">ALL</span><span class="p">]</span><span class="w"> </span><span class="p">[</span><span class="nb">command1</span><span class="w"> </span><span class="p">[</span><span class="nb">args1...</span><span class="p">]]</span>
|
| 67 |
+
<span class="w"> </span><span class="p">[</span><span class="no">COMMAND</span><span class="w"> </span><span class="nb">command2</span><span class="w"> </span><span class="p">[</span><span class="nb">args2...</span><span class="p">]</span><span class="w"> </span><span class="p">...]</span>
|
| 68 |
+
<span class="w"> </span><span class="p">[</span><span class="no">DEPENDS</span><span class="w"> </span><span class="nb">depend</span><span class="w"> </span><span class="nb">depend</span><span class="w"> </span><span class="nb">depend</span><span class="w"> </span><span class="p">...</span><span class="w"> </span><span class="p">]</span>
|
| 69 |
+
<span class="w"> </span><span class="p">[</span><span class="no">BYPRODUCTS</span><span class="w"> </span><span class="p">[</span><span class="nb">files...</span><span class="p">]]</span>
|
| 70 |
+
<span class="w"> </span><span class="p">[</span><span class="no">WORKING_DIRECTORY</span><span class="w"> </span><span class="nb">dir</span><span class="p">]</span>
|
| 71 |
+
<span class="w"> </span><span class="p">[</span><span class="no">COMMENT</span><span class="w"> </span><span class="nb">comment</span><span class="p">]</span>
|
| 72 |
+
<span class="w"> </span><span class="p">[</span><span class="no">JOB_POOL</span><span class="w"> </span><span class="nb">job_pool</span><span class="p">]</span>
|
| 73 |
+
<span class="w"> </span><span class="p">[</span><span class="no">VERBATIM</span><span class="p">]</span><span class="w"> </span><span class="p">[</span><span class="no">USES_TERMINAL</span><span class="p">]</span>
|
| 74 |
+
<span class="w"> </span><span class="p">[</span><span class="no">COMMAND_EXPAND_LISTS</span><span class="p">]</span>
|
| 75 |
+
<span class="w"> </span><span class="p">[</span><span class="no">SOURCES</span><span class="w"> </span><span class="nb">src1</span><span class="w"> </span><span class="p">[</span><span class="nb">src2...</span><span class="p">]]</span><span class="nf">)</span>
|
| 76 |
+
</pre></div>
|
| 77 |
+
</div>
|
| 78 |
+
<p>Adds a target with the given name that executes the given commands.
|
| 79 |
+
The target has no output file and is <em>always considered out of date</em>
|
| 80 |
+
even if the commands try to create a file with the name of the target.
|
| 81 |
+
Use the <span class="target" id="index-0-command:add_custom_command"></span><a class="reference internal" href="add_custom_command.html#command:add_custom_command" title="add_custom_command"><code class="xref cmake cmake-command docutils literal notranslate"><span class="pre">add_custom_command()</span></code></a> command to generate a file with
|
| 82 |
+
dependencies. By default nothing depends on the custom target. Use
|
| 83 |
+
the <span class="target" id="index-0-command:add_dependencies"></span><a class="reference internal" href="add_dependencies.html#command:add_dependencies" title="add_dependencies"><code class="xref cmake cmake-command docutils literal notranslate"><span class="pre">add_dependencies()</span></code></a> command to add dependencies to or
|
| 84 |
+
from other targets.</p>
|
| 85 |
+
<p>The options are:</p>
|
| 86 |
+
<dl>
|
| 87 |
+
<dt><code class="docutils literal notranslate"><span class="pre">ALL</span></code></dt><dd><p>Indicate that this target should be added to the default build
|
| 88 |
+
target so that it will be run every time (the command cannot be
|
| 89 |
+
called <code class="docutils literal notranslate"><span class="pre">ALL</span></code>).</p>
|
| 90 |
+
</dd>
|
| 91 |
+
<dt><code class="docutils literal notranslate"><span class="pre">BYPRODUCTS</span></code></dt><dd><div class="versionadded">
|
| 92 |
+
<p><span class="versionmodified added">New in version 3.2.</span></p>
|
| 93 |
+
</div>
|
| 94 |
+
<p>Specify the files the command is expected to produce but whose
|
| 95 |
+
modification time may or may not be updated on subsequent builds.
|
| 96 |
+
If a byproduct name is a relative path it will be interpreted
|
| 97 |
+
relative to the build tree directory corresponding to the
|
| 98 |
+
current source directory.
|
| 99 |
+
Each byproduct file will be marked with the <span class="target" id="index-0-prop_sf:GENERATED"></span><a class="reference internal" href="../prop_sf/GENERATED.html#prop_sf:GENERATED" title="GENERATED"><code class="xref cmake cmake-prop_sf docutils literal notranslate"><span class="pre">GENERATED</span></code></a>
|
| 100 |
+
source file property automatically.</p>
|
| 101 |
+
<p><em>See policy</em> <span class="target" id="index-0-policy:CMP0058"></span><a class="reference internal" href="../policy/CMP0058.html#policy:CMP0058" title="CMP0058"><code class="xref cmake cmake-policy docutils literal notranslate"><span class="pre">CMP0058</span></code></a> <em>for the motivation behind this feature.</em></p>
|
| 102 |
+
<p>Explicit specification of byproducts is supported by the
|
| 103 |
+
<span class="target" id="index-0-generator:Ninja"></span><a class="reference internal" href="../generator/Ninja.html#generator:Ninja" title="Ninja"><code class="xref cmake cmake-generator docutils literal notranslate"><span class="pre">Ninja</span></code></a> generator to tell the <code class="docutils literal notranslate"><span class="pre">ninja</span></code> build tool
|
| 104 |
+
how to regenerate byproducts when they are missing. It is
|
| 105 |
+
also useful when other build rules (e.g. custom commands)
|
| 106 |
+
depend on the byproducts. Ninja requires a build rule for any
|
| 107 |
+
generated file on which another rule depends even if there are
|
| 108 |
+
order-only dependencies to ensure the byproducts will be
|
| 109 |
+
available before their dependents build.</p>
|
| 110 |
+
<p>The <a class="reference internal" href="../manual/cmake-generators.7.html#makefile-generators"><span class="std std-ref">Makefile Generators</span></a> will remove <code class="docutils literal notranslate"><span class="pre">BYPRODUCTS</span></code> and other
|
| 111 |
+
<span class="target" id="index-1-prop_sf:GENERATED"></span><a class="reference internal" href="../prop_sf/GENERATED.html#prop_sf:GENERATED" title="GENERATED"><code class="xref cmake cmake-prop_sf docutils literal notranslate"><span class="pre">GENERATED</span></code></a> files during <code class="docutils literal notranslate"><span class="pre">make</span> <span class="pre">clean</span></code>.</p>
|
| 112 |
+
<div class="versionadded">
|
| 113 |
+
<p><span class="versionmodified added">New in version 3.20: </span>Arguments to <code class="docutils literal notranslate"><span class="pre">BYPRODUCTS</span></code> may use a restricted set of
|
| 114 |
+
<span class="target" id="index-0-manual:cmake-generator-expressions(7)"></span><a class="reference internal" href="../manual/cmake-generator-expressions.7.html#manual:cmake-generator-expressions(7)" title="cmake-generator-expressions(7)"><code class="xref cmake cmake-manual docutils literal notranslate"><span class="pre">generator</span> <span class="pre">expressions</span></code></a>.
|
| 115 |
+
<a class="reference internal" href="../manual/cmake-generator-expressions.7.html#target-dependent-queries"><span class="std std-ref">Target-dependent expressions</span></a> are not
|
| 116 |
+
permitted.</p>
|
| 117 |
+
</div>
|
| 118 |
+
</dd>
|
| 119 |
+
<dt><code class="docutils literal notranslate"><span class="pre">COMMAND</span></code></dt><dd><p>Specify the command-line(s) to execute at build time.
|
| 120 |
+
If more than one <code class="docutils literal notranslate"><span class="pre">COMMAND</span></code> is specified they will be executed in order,
|
| 121 |
+
but <em>not</em> necessarily composed into a stateful shell or batch script.
|
| 122 |
+
(To run a full script, use the <span class="target" id="index-0-command:configure_file"></span><a class="reference internal" href="configure_file.html#command:configure_file" title="configure_file"><code class="xref cmake cmake-command docutils literal notranslate"><span class="pre">configure_file()</span></code></a> command or the
|
| 123 |
+
<span class="target" id="index-0-command:file"></span><a class="reference internal" href="file.html#generate" title="file(generate)"><code class="xref cmake cmake-command docutils literal notranslate"><span class="pre">file(GENERATE)</span></code></a> command to create it, and then specify
|
| 124 |
+
a <code class="docutils literal notranslate"><span class="pre">COMMAND</span></code> to launch it.)</p>
|
| 125 |
+
<p>If <code class="docutils literal notranslate"><span class="pre">COMMAND</span></code> specifies an executable target name (created by the
|
| 126 |
+
<span class="target" id="index-0-command:add_executable"></span><a class="reference internal" href="add_executable.html#command:add_executable" title="add_executable"><code class="xref cmake cmake-command docutils literal notranslate"><span class="pre">add_executable()</span></code></a> command), it will automatically be replaced
|
| 127 |
+
by the location of the executable created at build time if either of
|
| 128 |
+
the following is true:</p>
|
| 129 |
+
<ul>
|
| 130 |
+
<li><p>The target is not being cross-compiled (i.e. the
|
| 131 |
+
<span class="target" id="index-0-variable:CMAKE_CROSSCOMPILING"></span><a class="reference internal" href="../variable/CMAKE_CROSSCOMPILING.html#variable:CMAKE_CROSSCOMPILING" title="CMAKE_CROSSCOMPILING"><code class="xref cmake cmake-variable docutils literal notranslate"><span class="pre">CMAKE_CROSSCOMPILING</span></code></a> variable is not set to true).</p></li>
|
| 132 |
+
<li><div class="versionadded">
|
| 133 |
+
<p><span class="versionmodified added">New in version 3.6: </span>The target is being cross-compiled and an emulator is provided (i.e.
|
| 134 |
+
its <span class="target" id="index-0-prop_tgt:CROSSCOMPILING_EMULATOR"></span><a class="reference internal" href="../prop_tgt/CROSSCOMPILING_EMULATOR.html#prop_tgt:CROSSCOMPILING_EMULATOR" title="CROSSCOMPILING_EMULATOR"><code class="xref cmake cmake-prop_tgt docutils literal notranslate"><span class="pre">CROSSCOMPILING_EMULATOR</span></code></a> target property is set).
|
| 135 |
+
In this case, the contents of <span class="target" id="index-1-prop_tgt:CROSSCOMPILING_EMULATOR"></span><a class="reference internal" href="../prop_tgt/CROSSCOMPILING_EMULATOR.html#prop_tgt:CROSSCOMPILING_EMULATOR" title="CROSSCOMPILING_EMULATOR"><code class="xref cmake cmake-prop_tgt docutils literal notranslate"><span class="pre">CROSSCOMPILING_EMULATOR</span></code></a> will be
|
| 136 |
+
prepended to the command before the location of the target executable.</p>
|
| 137 |
+
</div>
|
| 138 |
+
</li>
|
| 139 |
+
</ul>
|
| 140 |
+
<p>If neither of the above conditions are met, it is assumed that the
|
| 141 |
+
command name is a program to be found on the <code class="docutils literal notranslate"><span class="pre">PATH</span></code> at build time.</p>
|
| 142 |
+
<p>Arguments to <code class="docutils literal notranslate"><span class="pre">COMMAND</span></code> may use
|
| 143 |
+
<span class="target" id="index-1-manual:cmake-generator-expressions(7)"></span><a class="reference internal" href="../manual/cmake-generator-expressions.7.html#manual:cmake-generator-expressions(7)" title="cmake-generator-expressions(7)"><code class="xref cmake cmake-manual docutils literal notranslate"><span class="pre">generator</span> <span class="pre">expressions</span></code></a>.
|
| 144 |
+
Use the <span class="target" id="index-0-genex:TARGET_FILE"></span><a class="reference internal" href="../manual/cmake-generator-expressions.7.html#genex:TARGET_FILE" title="TARGET_FILE"><code class="xref cmake cmake-genex docutils literal notranslate"><span class="pre">TARGET_FILE</span></code></a> generator expression to refer to the location
|
| 145 |
+
of a target later in the command line (i.e. as a command argument rather
|
| 146 |
+
than as the command to execute).</p>
|
| 147 |
+
<p>Whenever one of the following target based generator expressions are used as
|
| 148 |
+
a command to execute or is mentioned in a command argument, a target-level
|
| 149 |
+
dependency will be added automatically so that the mentioned target will be
|
| 150 |
+
built before this custom target (see policy <span class="target" id="index-0-policy:CMP0112"></span><a class="reference internal" href="../policy/CMP0112.html#policy:CMP0112" title="CMP0112"><code class="xref cmake cmake-policy docutils literal notranslate"><span class="pre">CMP0112</span></code></a>).</p>
|
| 151 |
+
<blockquote>
|
| 152 |
+
<div><ul class="simple">
|
| 153 |
+
<li><p><code class="docutils literal notranslate"><span class="pre">TARGET_FILE</span></code></p></li>
|
| 154 |
+
<li><p><code class="docutils literal notranslate"><span class="pre">TARGET_LINKER_FILE</span></code></p></li>
|
| 155 |
+
<li><p><code class="docutils literal notranslate"><span class="pre">TARGET_SONAME_FILE</span></code></p></li>
|
| 156 |
+
<li><p><code class="docutils literal notranslate"><span class="pre">TARGET_PDB_FILE</span></code></p></li>
|
| 157 |
+
</ul>
|
| 158 |
+
</div></blockquote>
|
| 159 |
+
<p>The command and arguments are optional and if not specified an empty
|
| 160 |
+
target will be created.</p>
|
| 161 |
+
</dd>
|
| 162 |
+
<dt><code class="docutils literal notranslate"><span class="pre">COMMENT</span></code></dt><dd><p>Display the given message before the commands are executed at
|
| 163 |
+
build time.</p>
|
| 164 |
+
<div class="versionadded">
|
| 165 |
+
<p><span class="versionmodified added">New in version 3.26: </span>Arguments to <code class="docutils literal notranslate"><span class="pre">COMMENT</span></code> may use
|
| 166 |
+
<span class="target" id="index-2-manual:cmake-generator-expressions(7)"></span><a class="reference internal" href="../manual/cmake-generator-expressions.7.html#manual:cmake-generator-expressions(7)" title="cmake-generator-expressions(7)"><code class="xref cmake cmake-manual docutils literal notranslate"><span class="pre">generator</span> <span class="pre">expressions</span></code></a>.</p>
|
| 167 |
+
</div>
|
| 168 |
+
</dd>
|
| 169 |
+
<dt><code class="docutils literal notranslate"><span class="pre">DEPENDS</span></code></dt><dd><p>Reference files and outputs of custom commands created with
|
| 170 |
+
<span class="target" id="index-1-command:add_custom_command"></span><a class="reference internal" href="add_custom_command.html#command:add_custom_command" title="add_custom_command"><code class="xref cmake cmake-command docutils literal notranslate"><span class="pre">add_custom_command()</span></code></a> command calls in the same directory
|
| 171 |
+
(<code class="docutils literal notranslate"><span class="pre">CMakeLists.txt</span></code> file). They will be brought up to date when
|
| 172 |
+
the target is built.</p>
|
| 173 |
+
<div class="versionchanged">
|
| 174 |
+
<p><span class="versionmodified changed">Changed in version 3.16: </span>A target-level dependency is added if any dependency is a byproduct
|
| 175 |
+
of a target or any of its build events in the same directory to ensure
|
| 176 |
+
the byproducts will be available before this target is built.</p>
|
| 177 |
+
</div>
|
| 178 |
+
<p>Use the <span class="target" id="index-1-command:add_dependencies"></span><a class="reference internal" href="add_dependencies.html#command:add_dependencies" title="add_dependencies"><code class="xref cmake cmake-command docutils literal notranslate"><span class="pre">add_dependencies()</span></code></a> command to add dependencies
|
| 179 |
+
on other targets.</p>
|
| 180 |
+
</dd>
|
| 181 |
+
<dt><code class="docutils literal notranslate"><span class="pre">COMMAND_EXPAND_LISTS</span></code></dt><dd><div class="versionadded">
|
| 182 |
+
<p><span class="versionmodified added">New in version 3.8.</span></p>
|
| 183 |
+
</div>
|
| 184 |
+
<p>Lists in <code class="docutils literal notranslate"><span class="pre">COMMAND</span></code> arguments will be expanded, including those
|
| 185 |
+
created with
|
| 186 |
+
<span class="target" id="index-3-manual:cmake-generator-expressions(7)"></span><a class="reference internal" href="../manual/cmake-generator-expressions.7.html#manual:cmake-generator-expressions(7)" title="cmake-generator-expressions(7)"><code class="xref cmake cmake-manual docutils literal notranslate"><span class="pre">generator</span> <span class="pre">expressions</span></code></a>,
|
| 187 |
+
allowing <code class="docutils literal notranslate"><span class="pre">COMMAND</span></code> arguments such as
|
| 188 |
+
<code class="docutils literal notranslate"><span class="pre">${CC}</span> <span class="pre">"-I$<JOIN:$<TARGET_PROPERTY:foo,INCLUDE_DIRECTORIES>,;-I>"</span> <span class="pre">foo.cc</span></code>
|
| 189 |
+
to be properly expanded.</p>
|
| 190 |
+
</dd>
|
| 191 |
+
<dt><code class="docutils literal notranslate"><span class="pre">JOB_POOL</span></code></dt><dd><div class="versionadded">
|
| 192 |
+
<p><span class="versionmodified added">New in version 3.15.</span></p>
|
| 193 |
+
</div>
|
| 194 |
+
<p>Specify a <span class="target" id="index-0-prop_gbl:JOB_POOLS"></span><a class="reference internal" href="../prop_gbl/JOB_POOLS.html#prop_gbl:JOB_POOLS" title="JOB_POOLS"><code class="xref cmake cmake-prop_gbl docutils literal notranslate"><span class="pre">pool</span></code></a> for the <span class="target" id="index-1-generator:Ninja"></span><a class="reference internal" href="../generator/Ninja.html#generator:Ninja" title="Ninja"><code class="xref cmake cmake-generator docutils literal notranslate"><span class="pre">Ninja</span></code></a>
|
| 195 |
+
generator. Incompatible with <code class="docutils literal notranslate"><span class="pre">USES_TERMINAL</span></code>, which implies
|
| 196 |
+
the <code class="docutils literal notranslate"><span class="pre">console</span></code> pool.
|
| 197 |
+
Using a pool that is not defined by <span class="target" id="index-1-prop_gbl:JOB_POOLS"></span><a class="reference internal" href="../prop_gbl/JOB_POOLS.html#prop_gbl:JOB_POOLS" title="JOB_POOLS"><code class="xref cmake cmake-prop_gbl docutils literal notranslate"><span class="pre">JOB_POOLS</span></code></a> causes
|
| 198 |
+
an error by ninja at build time.</p>
|
| 199 |
+
</dd>
|
| 200 |
+
<dt><code class="docutils literal notranslate"><span class="pre">SOURCES</span></code></dt><dd><p>Specify additional source files to be included in the custom target.
|
| 201 |
+
Specified source files will be added to IDE project files for
|
| 202 |
+
convenience in editing even if they have no build rules.</p>
|
| 203 |
+
</dd>
|
| 204 |
+
<dt><code class="docutils literal notranslate"><span class="pre">VERBATIM</span></code></dt><dd><p>All arguments to the commands will be escaped properly for the
|
| 205 |
+
build tool so that the invoked command receives each argument
|
| 206 |
+
unchanged. Note that one level of escapes is still used by the
|
| 207 |
+
CMake language processor before <code class="docutils literal notranslate"><span class="pre">add_custom_target</span></code> even sees
|
| 208 |
+
the arguments. Use of <code class="docutils literal notranslate"><span class="pre">VERBATIM</span></code> is recommended as it enables
|
| 209 |
+
correct behavior. When <code class="docutils literal notranslate"><span class="pre">VERBATIM</span></code> is not given the behavior
|
| 210 |
+
is platform specific because there is no protection of
|
| 211 |
+
tool-specific special characters.</p>
|
| 212 |
+
</dd>
|
| 213 |
+
<dt><code class="docutils literal notranslate"><span class="pre">USES_TERMINAL</span></code></dt><dd><div class="versionadded">
|
| 214 |
+
<p><span class="versionmodified added">New in version 3.2.</span></p>
|
| 215 |
+
</div>
|
| 216 |
+
<p>The command will be given direct access to the terminal if possible.
|
| 217 |
+
With the <span class="target" id="index-2-generator:Ninja"></span><a class="reference internal" href="../generator/Ninja.html#generator:Ninja" title="Ninja"><code class="xref cmake cmake-generator docutils literal notranslate"><span class="pre">Ninja</span></code></a> generator, this places the command in
|
| 218 |
+
the <code class="docutils literal notranslate"><span class="pre">console</span></code> <span class="target" id="index-2-prop_gbl:JOB_POOLS"></span><a class="reference internal" href="../prop_gbl/JOB_POOLS.html#prop_gbl:JOB_POOLS" title="JOB_POOLS"><code class="xref cmake cmake-prop_gbl docutils literal notranslate"><span class="pre">pool</span></code></a>.</p>
|
| 219 |
+
</dd>
|
| 220 |
+
<dt><code class="docutils literal notranslate"><span class="pre">WORKING_DIRECTORY</span></code></dt><dd><p>Execute the command with the given current working directory.
|
| 221 |
+
If it is a relative path it will be interpreted relative to the
|
| 222 |
+
build tree directory corresponding to the current source directory.</p>
|
| 223 |
+
<div class="versionadded">
|
| 224 |
+
<p><span class="versionmodified added">New in version 3.13: </span>Arguments to <code class="docutils literal notranslate"><span class="pre">WORKING_DIRECTORY</span></code> may use
|
| 225 |
+
<span class="target" id="index-4-manual:cmake-generator-expressions(7)"></span><a class="reference internal" href="../manual/cmake-generator-expressions.7.html#manual:cmake-generator-expressions(7)" title="cmake-generator-expressions(7)"><code class="xref cmake cmake-manual docutils literal notranslate"><span class="pre">generator</span> <span class="pre">expressions</span></code></a>.</p>
|
| 226 |
+
</div>
|
| 227 |
+
</dd>
|
| 228 |
+
</dl>
|
| 229 |
+
<section id="ninja-multi-config">
|
| 230 |
+
<h2>Ninja Multi-Config<a class="headerlink" href="#ninja-multi-config" title="Permalink to this heading">¶</a></h2>
|
| 231 |
+
<div class="versionadded">
|
| 232 |
+
<p><span class="versionmodified added">New in version 3.20: </span><code class="docutils literal notranslate"><span class="pre">add_custom_target</span></code> supports the <span class="target" id="index-0-generator:Ninja Multi-Config"></span><a class="reference internal" href="../generator/Ninja%20Multi-Config.html#generator:Ninja Multi-Config" title="Ninja Multi-Config"><code class="xref cmake cmake-generator docutils literal notranslate"><span class="pre">Ninja</span> <span class="pre">Multi-Config</span></code></a>
|
| 233 |
+
generator's cross-config capabilities. See the generator documentation
|
| 234 |
+
for more information.</p>
|
| 235 |
+
</div>
|
| 236 |
+
</section>
|
| 237 |
+
<section id="see-also">
|
| 238 |
+
<h2>See Also<a class="headerlink" href="#see-also" title="Permalink to this heading">¶</a></h2>
|
| 239 |
+
<ul class="simple">
|
| 240 |
+
<li><p><span class="target" id="index-2-command:add_custom_command"></span><a class="reference internal" href="add_custom_command.html#command:add_custom_command" title="add_custom_command"><code class="xref cmake cmake-command docutils literal notranslate"><span class="pre">add_custom_command()</span></code></a></p></li>
|
| 241 |
+
</ul>
|
| 242 |
+
</section>
|
| 243 |
+
</section>
|
| 244 |
+
|
| 245 |
+
|
| 246 |
+
<div class="clearer"></div>
|
| 247 |
+
</div>
|
| 248 |
+
</div>
|
| 249 |
+
</div>
|
| 250 |
+
<div class="sphinxsidebar" role="navigation" aria-label="main navigation">
|
| 251 |
+
<div class="sphinxsidebarwrapper">
|
| 252 |
+
<div>
|
| 253 |
+
<h3><a href="../index.html">Table of Contents</a></h3>
|
| 254 |
+
<ul>
|
| 255 |
+
<li><a class="reference internal" href="#">add_custom_target</a><ul>
|
| 256 |
+
<li><a class="reference internal" href="#ninja-multi-config">Ninja Multi-Config</a></li>
|
| 257 |
+
<li><a class="reference internal" href="#see-also">See Also</a></li>
|
| 258 |
+
</ul>
|
| 259 |
+
</li>
|
| 260 |
+
</ul>
|
| 261 |
+
|
| 262 |
+
</div>
|
| 263 |
+
<div>
|
| 264 |
+
<h4>Previous topic</h4>
|
| 265 |
+
<p class="topless"><a href="add_custom_command.html"
|
| 266 |
+
title="previous chapter">add_custom_command</a></p>
|
| 267 |
+
</div>
|
| 268 |
+
<div>
|
| 269 |
+
<h4>Next topic</h4>
|
| 270 |
+
<p class="topless"><a href="add_definitions.html"
|
| 271 |
+
title="next chapter">add_definitions</a></p>
|
| 272 |
+
</div>
|
| 273 |
+
<div role="note" aria-label="source link">
|
| 274 |
+
<h3>This Page</h3>
|
| 275 |
+
<ul class="this-page-menu">
|
| 276 |
+
<li><a href="../_sources/command/add_custom_target.rst.txt"
|
| 277 |
+
rel="nofollow">Show Source</a></li>
|
| 278 |
+
</ul>
|
| 279 |
+
</div>
|
| 280 |
+
<div id="searchbox" style="display: none" role="search">
|
| 281 |
+
<h3 id="searchlabel">Quick search</h3>
|
| 282 |
+
<div class="searchformwrapper">
|
| 283 |
+
<form class="search" action="../search.html" method="get">
|
| 284 |
+
<input type="text" name="q" aria-labelledby="searchlabel" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/>
|
| 285 |
+
<input type="submit" value="Go" />
|
| 286 |
+
</form>
|
| 287 |
+
</div>
|
| 288 |
+
</div>
|
| 289 |
+
<script>document.getElementById('searchbox').style.display = "block"</script>
|
| 290 |
+
</div>
|
| 291 |
+
</div>
|
| 292 |
+
<div class="clearer"></div>
|
| 293 |
+
</div>
|
| 294 |
+
<div class="related" role="navigation" aria-label="related navigation">
|
| 295 |
+
<h3>Navigation</h3>
|
| 296 |
+
<ul>
|
| 297 |
+
<li class="right" style="margin-right: 10px">
|
| 298 |
+
<a href="../genindex.html" title="General Index"
|
| 299 |
+
>index</a></li>
|
| 300 |
+
<li class="right" >
|
| 301 |
+
<a href="add_definitions.html" title="add_definitions"
|
| 302 |
+
>next</a> |</li>
|
| 303 |
+
<li class="right" >
|
| 304 |
+
<a href="add_custom_command.html" title="add_custom_command"
|
| 305 |
+
>previous</a> |</li>
|
| 306 |
+
<li>
|
| 307 |
+
<img src="../_static/cmake-logo-16.png" alt=""
|
| 308 |
+
style="vertical-align: middle; margin-top: -2px" />
|
| 309 |
+
</li>
|
| 310 |
+
<li>
|
| 311 |
+
<a href="https://cmake.org/">CMake</a> »
|
| 312 |
+
</li>
|
| 313 |
+
<li>
|
| 314 |
+
<a href="../index.html">3.27.9 Documentation</a> »
|
| 315 |
+
</li>
|
| 316 |
+
|
| 317 |
+
<li class="nav-item nav-item-1"><a href="../manual/cmake-commands.7.html" >cmake-commands(7)</a> »</li>
|
| 318 |
+
<li class="nav-item nav-item-this"><a href="">add_custom_target</a></li>
|
| 319 |
+
</ul>
|
| 320 |
+
</div>
|
| 321 |
+
|
| 322 |
+
<div class="footer" role="contentinfo">
|
| 323 |
+
© Copyright 2000-2023 Kitware, Inc. and Contributors.
|
| 324 |
+
Created using <a href="https://www.sphinx-doc.org/">Sphinx</a> 5.3.0.
|
| 325 |
+
</div>
|
| 326 |
+
</body>
|
| 327 |
+
</html>
|
toolchain/cmake-3.27.9-linux-x86_64/doc/cmake/html/command/add_definitions.html
ADDED
|
@@ -0,0 +1,182 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
|
| 2 |
+
<!DOCTYPE html>
|
| 3 |
+
|
| 4 |
+
<html lang="en">
|
| 5 |
+
<head>
|
| 6 |
+
<meta charset="utf-8" />
|
| 7 |
+
<meta name="viewport" content="width=device-width, initial-scale=1.0" /><meta name="generator" content="Docutils 0.19: https://docutils.sourceforge.io/" />
|
| 8 |
+
|
| 9 |
+
<title>add_definitions — CMake 3.27.9 Documentation</title>
|
| 10 |
+
|
| 11 |
+
<link rel="stylesheet" type="text/css" href="../_static/pygments.css" />
|
| 12 |
+
<link rel="stylesheet" type="text/css" href="../_static/cmake.css" />
|
| 13 |
+
|
| 14 |
+
<script data-url_root="../" id="documentation_options" src="../_static/documentation_options.js"></script>
|
| 15 |
+
<script src="../_static/jquery.js"></script>
|
| 16 |
+
<script src="../_static/underscore.js"></script>
|
| 17 |
+
<script src="../_static/_sphinx_javascript_frameworks_compat.js"></script>
|
| 18 |
+
<script src="../_static/doctools.js"></script>
|
| 19 |
+
<script src="../_static/sphinx_highlight.js"></script>
|
| 20 |
+
|
| 21 |
+
<link rel="shortcut icon" href="../_static/cmake-favicon.ico"/>
|
| 22 |
+
<link rel="index" title="Index" href="../genindex.html" />
|
| 23 |
+
<link rel="search" title="Search" href="../search.html" />
|
| 24 |
+
<link rel="next" title="add_dependencies" href="add_dependencies.html" />
|
| 25 |
+
<link rel="prev" title="add_custom_target" href="add_custom_target.html" />
|
| 26 |
+
|
| 27 |
+
|
| 28 |
+
</head><body>
|
| 29 |
+
|
| 30 |
+
<div class="related" role="navigation" aria-label="related navigation">
|
| 31 |
+
<h3>Navigation</h3>
|
| 32 |
+
<ul>
|
| 33 |
+
<li class="right" style="margin-right: 10px">
|
| 34 |
+
<a href="../genindex.html" title="General Index"
|
| 35 |
+
accesskey="I">index</a></li>
|
| 36 |
+
<li class="right" >
|
| 37 |
+
<a href="add_dependencies.html" title="add_dependencies"
|
| 38 |
+
accesskey="N">next</a> |</li>
|
| 39 |
+
<li class="right" >
|
| 40 |
+
<a href="add_custom_target.html" title="add_custom_target"
|
| 41 |
+
accesskey="P">previous</a> |</li>
|
| 42 |
+
<li>
|
| 43 |
+
<img src="../_static/cmake-logo-16.png" alt=""
|
| 44 |
+
style="vertical-align: middle; margin-top: -2px" />
|
| 45 |
+
</li>
|
| 46 |
+
<li>
|
| 47 |
+
<a href="https://cmake.org/">CMake</a> »
|
| 48 |
+
</li>
|
| 49 |
+
<li>
|
| 50 |
+
<a href="../index.html">3.27.9 Documentation</a> »
|
| 51 |
+
</li>
|
| 52 |
+
|
| 53 |
+
<li class="nav-item nav-item-1"><a href="../manual/cmake-commands.7.html" accesskey="U">cmake-commands(7)</a> »</li>
|
| 54 |
+
<li class="nav-item nav-item-this"><a href="">add_definitions</a></li>
|
| 55 |
+
</ul>
|
| 56 |
+
</div>
|
| 57 |
+
|
| 58 |
+
<div class="document">
|
| 59 |
+
<div class="documentwrapper">
|
| 60 |
+
<div class="bodywrapper">
|
| 61 |
+
<div class="body" role="main">
|
| 62 |
+
|
| 63 |
+
<section id="add-definitions">
|
| 64 |
+
<span id="command:add_definitions"></span><h1>add_definitions<a class="headerlink" href="#add-definitions" title="Permalink to this heading">¶</a></h1>
|
| 65 |
+
<p>Add <code class="docutils literal notranslate"><span class="pre">-D</span></code> define flags to the compilation of source files.</p>
|
| 66 |
+
<div class="highlight-cmake notranslate"><div class="highlight"><pre><span></span><span class="nf">add_definitions(</span><span class="p">-</span><span class="no">DFOO</span><span class="w"> </span><span class="p">-</span><span class="no">DBAR</span><span class="w"> </span><span class="p">...</span><span class="nf">)</span>
|
| 67 |
+
</pre></div>
|
| 68 |
+
</div>
|
| 69 |
+
<p>Adds definitions to the compiler command line for targets in the current
|
| 70 |
+
directory, whether added before or after this command is invoked, and for
|
| 71 |
+
the ones in sub-directories added after. This command can be used to add any
|
| 72 |
+
flags, but it is intended to add preprocessor definitions.</p>
|
| 73 |
+
<div class="admonition note">
|
| 74 |
+
<p class="admonition-title">Note</p>
|
| 75 |
+
<p>This command has been superseded by alternatives:</p>
|
| 76 |
+
<ul class="simple">
|
| 77 |
+
<li><p>Use <span class="target" id="index-0-command:add_compile_definitions"></span><a class="reference internal" href="add_compile_definitions.html#command:add_compile_definitions" title="add_compile_definitions"><code class="xref cmake cmake-command docutils literal notranslate"><span class="pre">add_compile_definitions()</span></code></a> to add preprocessor definitions.</p></li>
|
| 78 |
+
<li><p>Use <span class="target" id="index-0-command:include_directories"></span><a class="reference internal" href="include_directories.html#command:include_directories" title="include_directories"><code class="xref cmake cmake-command docutils literal notranslate"><span class="pre">include_directories()</span></code></a> to add include directories.</p></li>
|
| 79 |
+
<li><p>Use <span class="target" id="index-0-command:add_compile_options"></span><a class="reference internal" href="add_compile_options.html#command:add_compile_options" title="add_compile_options"><code class="xref cmake cmake-command docutils literal notranslate"><span class="pre">add_compile_options()</span></code></a> to add other options.</p></li>
|
| 80 |
+
</ul>
|
| 81 |
+
</div>
|
| 82 |
+
<p>Flags beginning in <code class="docutils literal notranslate"><span class="pre">-D</span></code> or <code class="docutils literal notranslate"><span class="pre">/D</span></code> that look like preprocessor definitions are
|
| 83 |
+
automatically added to the <span class="target" id="index-0-prop_dir:COMPILE_DEFINITIONS"></span><a class="reference internal" href="../prop_dir/COMPILE_DEFINITIONS.html#prop_dir:COMPILE_DEFINITIONS" title="COMPILE_DEFINITIONS"><code class="xref cmake cmake-prop_dir docutils literal notranslate"><span class="pre">COMPILE_DEFINITIONS</span></code></a> directory
|
| 84 |
+
property for the current directory. Definitions with non-trivial values
|
| 85 |
+
may be left in the set of flags instead of being converted for reasons of
|
| 86 |
+
backwards compatibility. See documentation of the
|
| 87 |
+
<span class="target" id="index-1-prop_dir:COMPILE_DEFINITIONS"></span><a class="reference internal" href="../prop_dir/COMPILE_DEFINITIONS.html#prop_dir:COMPILE_DEFINITIONS" title="COMPILE_DEFINITIONS"><code class="xref cmake cmake-prop_dir docutils literal notranslate"><span class="pre">directory</span></code></a>,
|
| 88 |
+
<span class="target" id="index-0-prop_tgt:COMPILE_DEFINITIONS"></span><a class="reference internal" href="../prop_tgt/COMPILE_DEFINITIONS.html#prop_tgt:COMPILE_DEFINITIONS" title="COMPILE_DEFINITIONS"><code class="xref cmake cmake-prop_tgt docutils literal notranslate"><span class="pre">target</span></code></a>,
|
| 89 |
+
<span class="target" id="index-0-prop_sf:COMPILE_DEFINITIONS"></span><a class="reference internal" href="../prop_sf/COMPILE_DEFINITIONS.html#prop_sf:COMPILE_DEFINITIONS" title="COMPILE_DEFINITIONS"><code class="xref cmake cmake-prop_sf docutils literal notranslate"><span class="pre">source</span> <span class="pre">file</span></code></a> <code class="docutils literal notranslate"><span class="pre">COMPILE_DEFINITIONS</span></code>
|
| 90 |
+
properties for details on adding preprocessor definitions to specific
|
| 91 |
+
scopes and configurations.</p>
|
| 92 |
+
<section id="see-also">
|
| 93 |
+
<h2>See Also<a class="headerlink" href="#see-also" title="Permalink to this heading">¶</a></h2>
|
| 94 |
+
<ul class="simple">
|
| 95 |
+
<li><p>The <span class="target" id="index-0-manual:cmake-buildsystem(7)"></span><a class="reference internal" href="../manual/cmake-buildsystem.7.html#manual:cmake-buildsystem(7)" title="cmake-buildsystem(7)"><code class="xref cmake cmake-manual docutils literal notranslate"><span class="pre">cmake-buildsystem(7)</span></code></a> manual for more on defining
|
| 96 |
+
buildsystem properties.</p></li>
|
| 97 |
+
</ul>
|
| 98 |
+
</section>
|
| 99 |
+
</section>
|
| 100 |
+
|
| 101 |
+
|
| 102 |
+
<div class="clearer"></div>
|
| 103 |
+
</div>
|
| 104 |
+
</div>
|
| 105 |
+
</div>
|
| 106 |
+
<div class="sphinxsidebar" role="navigation" aria-label="main navigation">
|
| 107 |
+
<div class="sphinxsidebarwrapper">
|
| 108 |
+
<div>
|
| 109 |
+
<h3><a href="../index.html">Table of Contents</a></h3>
|
| 110 |
+
<ul>
|
| 111 |
+
<li><a class="reference internal" href="#">add_definitions</a><ul>
|
| 112 |
+
<li><a class="reference internal" href="#see-also">See Also</a></li>
|
| 113 |
+
</ul>
|
| 114 |
+
</li>
|
| 115 |
+
</ul>
|
| 116 |
+
|
| 117 |
+
</div>
|
| 118 |
+
<div>
|
| 119 |
+
<h4>Previous topic</h4>
|
| 120 |
+
<p class="topless"><a href="add_custom_target.html"
|
| 121 |
+
title="previous chapter">add_custom_target</a></p>
|
| 122 |
+
</div>
|
| 123 |
+
<div>
|
| 124 |
+
<h4>Next topic</h4>
|
| 125 |
+
<p class="topless"><a href="add_dependencies.html"
|
| 126 |
+
title="next chapter">add_dependencies</a></p>
|
| 127 |
+
</div>
|
| 128 |
+
<div role="note" aria-label="source link">
|
| 129 |
+
<h3>This Page</h3>
|
| 130 |
+
<ul class="this-page-menu">
|
| 131 |
+
<li><a href="../_sources/command/add_definitions.rst.txt"
|
| 132 |
+
rel="nofollow">Show Source</a></li>
|
| 133 |
+
</ul>
|
| 134 |
+
</div>
|
| 135 |
+
<div id="searchbox" style="display: none" role="search">
|
| 136 |
+
<h3 id="searchlabel">Quick search</h3>
|
| 137 |
+
<div class="searchformwrapper">
|
| 138 |
+
<form class="search" action="../search.html" method="get">
|
| 139 |
+
<input type="text" name="q" aria-labelledby="searchlabel" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/>
|
| 140 |
+
<input type="submit" value="Go" />
|
| 141 |
+
</form>
|
| 142 |
+
</div>
|
| 143 |
+
</div>
|
| 144 |
+
<script>document.getElementById('searchbox').style.display = "block"</script>
|
| 145 |
+
</div>
|
| 146 |
+
</div>
|
| 147 |
+
<div class="clearer"></div>
|
| 148 |
+
</div>
|
| 149 |
+
<div class="related" role="navigation" aria-label="related navigation">
|
| 150 |
+
<h3>Navigation</h3>
|
| 151 |
+
<ul>
|
| 152 |
+
<li class="right" style="margin-right: 10px">
|
| 153 |
+
<a href="../genindex.html" title="General Index"
|
| 154 |
+
>index</a></li>
|
| 155 |
+
<li class="right" >
|
| 156 |
+
<a href="add_dependencies.html" title="add_dependencies"
|
| 157 |
+
>next</a> |</li>
|
| 158 |
+
<li class="right" >
|
| 159 |
+
<a href="add_custom_target.html" title="add_custom_target"
|
| 160 |
+
>previous</a> |</li>
|
| 161 |
+
<li>
|
| 162 |
+
<img src="../_static/cmake-logo-16.png" alt=""
|
| 163 |
+
style="vertical-align: middle; margin-top: -2px" />
|
| 164 |
+
</li>
|
| 165 |
+
<li>
|
| 166 |
+
<a href="https://cmake.org/">CMake</a> »
|
| 167 |
+
</li>
|
| 168 |
+
<li>
|
| 169 |
+
<a href="../index.html">3.27.9 Documentation</a> »
|
| 170 |
+
</li>
|
| 171 |
+
|
| 172 |
+
<li class="nav-item nav-item-1"><a href="../manual/cmake-commands.7.html" >cmake-commands(7)</a> »</li>
|
| 173 |
+
<li class="nav-item nav-item-this"><a href="">add_definitions</a></li>
|
| 174 |
+
</ul>
|
| 175 |
+
</div>
|
| 176 |
+
|
| 177 |
+
<div class="footer" role="contentinfo">
|
| 178 |
+
© Copyright 2000-2023 Kitware, Inc. and Contributors.
|
| 179 |
+
Created using <a href="https://www.sphinx-doc.org/">Sphinx</a> 5.3.0.
|
| 180 |
+
</div>
|
| 181 |
+
</body>
|
| 182 |
+
</html>
|
toolchain/cmake-3.27.9-linux-x86_64/doc/cmake/html/command/add_dependencies.html
ADDED
|
@@ -0,0 +1,173 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
|
| 2 |
+
<!DOCTYPE html>
|
| 3 |
+
|
| 4 |
+
<html lang="en">
|
| 5 |
+
<head>
|
| 6 |
+
<meta charset="utf-8" />
|
| 7 |
+
<meta name="viewport" content="width=device-width, initial-scale=1.0" /><meta name="generator" content="Docutils 0.19: https://docutils.sourceforge.io/" />
|
| 8 |
+
|
| 9 |
+
<title>add_dependencies — CMake 3.27.9 Documentation</title>
|
| 10 |
+
|
| 11 |
+
<link rel="stylesheet" type="text/css" href="../_static/pygments.css" />
|
| 12 |
+
<link rel="stylesheet" type="text/css" href="../_static/cmake.css" />
|
| 13 |
+
|
| 14 |
+
<script data-url_root="../" id="documentation_options" src="../_static/documentation_options.js"></script>
|
| 15 |
+
<script src="../_static/jquery.js"></script>
|
| 16 |
+
<script src="../_static/underscore.js"></script>
|
| 17 |
+
<script src="../_static/_sphinx_javascript_frameworks_compat.js"></script>
|
| 18 |
+
<script src="../_static/doctools.js"></script>
|
| 19 |
+
<script src="../_static/sphinx_highlight.js"></script>
|
| 20 |
+
|
| 21 |
+
<link rel="shortcut icon" href="../_static/cmake-favicon.ico"/>
|
| 22 |
+
<link rel="index" title="Index" href="../genindex.html" />
|
| 23 |
+
<link rel="search" title="Search" href="../search.html" />
|
| 24 |
+
<link rel="next" title="add_executable" href="add_executable.html" />
|
| 25 |
+
<link rel="prev" title="add_definitions" href="add_definitions.html" />
|
| 26 |
+
|
| 27 |
+
|
| 28 |
+
</head><body>
|
| 29 |
+
|
| 30 |
+
<div class="related" role="navigation" aria-label="related navigation">
|
| 31 |
+
<h3>Navigation</h3>
|
| 32 |
+
<ul>
|
| 33 |
+
<li class="right" style="margin-right: 10px">
|
| 34 |
+
<a href="../genindex.html" title="General Index"
|
| 35 |
+
accesskey="I">index</a></li>
|
| 36 |
+
<li class="right" >
|
| 37 |
+
<a href="add_executable.html" title="add_executable"
|
| 38 |
+
accesskey="N">next</a> |</li>
|
| 39 |
+
<li class="right" >
|
| 40 |
+
<a href="add_definitions.html" title="add_definitions"
|
| 41 |
+
accesskey="P">previous</a> |</li>
|
| 42 |
+
<li>
|
| 43 |
+
<img src="../_static/cmake-logo-16.png" alt=""
|
| 44 |
+
style="vertical-align: middle; margin-top: -2px" />
|
| 45 |
+
</li>
|
| 46 |
+
<li>
|
| 47 |
+
<a href="https://cmake.org/">CMake</a> »
|
| 48 |
+
</li>
|
| 49 |
+
<li>
|
| 50 |
+
<a href="../index.html">3.27.9 Documentation</a> »
|
| 51 |
+
</li>
|
| 52 |
+
|
| 53 |
+
<li class="nav-item nav-item-1"><a href="../manual/cmake-commands.7.html" accesskey="U">cmake-commands(7)</a> »</li>
|
| 54 |
+
<li class="nav-item nav-item-this"><a href="">add_dependencies</a></li>
|
| 55 |
+
</ul>
|
| 56 |
+
</div>
|
| 57 |
+
|
| 58 |
+
<div class="document">
|
| 59 |
+
<div class="documentwrapper">
|
| 60 |
+
<div class="bodywrapper">
|
| 61 |
+
<div class="body" role="main">
|
| 62 |
+
|
| 63 |
+
<section id="add-dependencies">
|
| 64 |
+
<span id="command:add_dependencies"></span><h1>add_dependencies<a class="headerlink" href="#add-dependencies" title="Permalink to this heading">¶</a></h1>
|
| 65 |
+
<p>Add a dependency between top-level targets.</p>
|
| 66 |
+
<div class="highlight-cmake notranslate"><div class="highlight"><pre><span></span><span class="nf">add_dependencies(</span><span class="nv"><target></span><span class="w"> </span><span class="p">[</span><span class="nv"><target-dependency></span><span class="p">]...</span><span class="nf">)</span>
|
| 67 |
+
</pre></div>
|
| 68 |
+
</div>
|
| 69 |
+
<p>Makes a top-level <code class="docutils literal notranslate"><span class="pre"><target></span></code> depend on other top-level targets to
|
| 70 |
+
ensure that they build before <code class="docutils literal notranslate"><span class="pre"><target></span></code> does. A top-level target
|
| 71 |
+
is one created by one of the <span class="target" id="index-0-command:add_executable"></span><a class="reference internal" href="add_executable.html#command:add_executable" title="add_executable"><code class="xref cmake cmake-command docutils literal notranslate"><span class="pre">add_executable()</span></code></a>,
|
| 72 |
+
<span class="target" id="index-0-command:add_library"></span><a class="reference internal" href="add_library.html#command:add_library" title="add_library"><code class="xref cmake cmake-command docutils literal notranslate"><span class="pre">add_library()</span></code></a>, or <span class="target" id="index-0-command:add_custom_target"></span><a class="reference internal" href="add_custom_target.html#command:add_custom_target" title="add_custom_target"><code class="xref cmake cmake-command docutils literal notranslate"><span class="pre">add_custom_target()</span></code></a> commands
|
| 73 |
+
(but not targets generated by CMake like <code class="docutils literal notranslate"><span class="pre">install</span></code>).</p>
|
| 74 |
+
<p>Dependencies added to an <a class="reference internal" href="../manual/cmake-buildsystem.7.html#imported-targets"><span class="std std-ref">imported target</span></a>
|
| 75 |
+
or an <a class="reference internal" href="../manual/cmake-buildsystem.7.html#interface-libraries"><span class="std std-ref">interface library</span></a> are followed
|
| 76 |
+
transitively in its place since the target itself does not build.</p>
|
| 77 |
+
<div class="versionadded">
|
| 78 |
+
<p><span class="versionmodified added">New in version 3.3: </span>Allow adding dependencies to interface libraries.</p>
|
| 79 |
+
</div>
|
| 80 |
+
<section id="see-also">
|
| 81 |
+
<h2>See Also<a class="headerlink" href="#see-also" title="Permalink to this heading">¶</a></h2>
|
| 82 |
+
<ul class="simple">
|
| 83 |
+
<li><p>The <code class="docutils literal notranslate"><span class="pre">DEPENDS</span></code> option of <span class="target" id="index-1-command:add_custom_target"></span><a class="reference internal" href="add_custom_target.html#command:add_custom_target" title="add_custom_target"><code class="xref cmake cmake-command docutils literal notranslate"><span class="pre">add_custom_target()</span></code></a> and
|
| 84 |
+
<span class="target" id="index-0-command:add_custom_command"></span><a class="reference internal" href="add_custom_command.html#command:add_custom_command" title="add_custom_command"><code class="xref cmake cmake-command docutils literal notranslate"><span class="pre">add_custom_command()</span></code></a> commands for adding file-level
|
| 85 |
+
dependencies in custom rules.</p></li>
|
| 86 |
+
<li><p>The <span class="target" id="index-0-prop_sf:OBJECT_DEPENDS"></span><a class="reference internal" href="../prop_sf/OBJECT_DEPENDS.html#prop_sf:OBJECT_DEPENDS" title="OBJECT_DEPENDS"><code class="xref cmake cmake-prop_sf docutils literal notranslate"><span class="pre">OBJECT_DEPENDS</span></code></a> source file property to add
|
| 87 |
+
file-level dependencies to object files.</p></li>
|
| 88 |
+
</ul>
|
| 89 |
+
</section>
|
| 90 |
+
</section>
|
| 91 |
+
|
| 92 |
+
|
| 93 |
+
<div class="clearer"></div>
|
| 94 |
+
</div>
|
| 95 |
+
</div>
|
| 96 |
+
</div>
|
| 97 |
+
<div class="sphinxsidebar" role="navigation" aria-label="main navigation">
|
| 98 |
+
<div class="sphinxsidebarwrapper">
|
| 99 |
+
<div>
|
| 100 |
+
<h3><a href="../index.html">Table of Contents</a></h3>
|
| 101 |
+
<ul>
|
| 102 |
+
<li><a class="reference internal" href="#">add_dependencies</a><ul>
|
| 103 |
+
<li><a class="reference internal" href="#see-also">See Also</a></li>
|
| 104 |
+
</ul>
|
| 105 |
+
</li>
|
| 106 |
+
</ul>
|
| 107 |
+
|
| 108 |
+
</div>
|
| 109 |
+
<div>
|
| 110 |
+
<h4>Previous topic</h4>
|
| 111 |
+
<p class="topless"><a href="add_definitions.html"
|
| 112 |
+
title="previous chapter">add_definitions</a></p>
|
| 113 |
+
</div>
|
| 114 |
+
<div>
|
| 115 |
+
<h4>Next topic</h4>
|
| 116 |
+
<p class="topless"><a href="add_executable.html"
|
| 117 |
+
title="next chapter">add_executable</a></p>
|
| 118 |
+
</div>
|
| 119 |
+
<div role="note" aria-label="source link">
|
| 120 |
+
<h3>This Page</h3>
|
| 121 |
+
<ul class="this-page-menu">
|
| 122 |
+
<li><a href="../_sources/command/add_dependencies.rst.txt"
|
| 123 |
+
rel="nofollow">Show Source</a></li>
|
| 124 |
+
</ul>
|
| 125 |
+
</div>
|
| 126 |
+
<div id="searchbox" style="display: none" role="search">
|
| 127 |
+
<h3 id="searchlabel">Quick search</h3>
|
| 128 |
+
<div class="searchformwrapper">
|
| 129 |
+
<form class="search" action="../search.html" method="get">
|
| 130 |
+
<input type="text" name="q" aria-labelledby="searchlabel" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/>
|
| 131 |
+
<input type="submit" value="Go" />
|
| 132 |
+
</form>
|
| 133 |
+
</div>
|
| 134 |
+
</div>
|
| 135 |
+
<script>document.getElementById('searchbox').style.display = "block"</script>
|
| 136 |
+
</div>
|
| 137 |
+
</div>
|
| 138 |
+
<div class="clearer"></div>
|
| 139 |
+
</div>
|
| 140 |
+
<div class="related" role="navigation" aria-label="related navigation">
|
| 141 |
+
<h3>Navigation</h3>
|
| 142 |
+
<ul>
|
| 143 |
+
<li class="right" style="margin-right: 10px">
|
| 144 |
+
<a href="../genindex.html" title="General Index"
|
| 145 |
+
>index</a></li>
|
| 146 |
+
<li class="right" >
|
| 147 |
+
<a href="add_executable.html" title="add_executable"
|
| 148 |
+
>next</a> |</li>
|
| 149 |
+
<li class="right" >
|
| 150 |
+
<a href="add_definitions.html" title="add_definitions"
|
| 151 |
+
>previous</a> |</li>
|
| 152 |
+
<li>
|
| 153 |
+
<img src="../_static/cmake-logo-16.png" alt=""
|
| 154 |
+
style="vertical-align: middle; margin-top: -2px" />
|
| 155 |
+
</li>
|
| 156 |
+
<li>
|
| 157 |
+
<a href="https://cmake.org/">CMake</a> »
|
| 158 |
+
</li>
|
| 159 |
+
<li>
|
| 160 |
+
<a href="../index.html">3.27.9 Documentation</a> »
|
| 161 |
+
</li>
|
| 162 |
+
|
| 163 |
+
<li class="nav-item nav-item-1"><a href="../manual/cmake-commands.7.html" >cmake-commands(7)</a> »</li>
|
| 164 |
+
<li class="nav-item nav-item-this"><a href="">add_dependencies</a></li>
|
| 165 |
+
</ul>
|
| 166 |
+
</div>
|
| 167 |
+
|
| 168 |
+
<div class="footer" role="contentinfo">
|
| 169 |
+
© Copyright 2000-2023 Kitware, Inc. and Contributors.
|
| 170 |
+
Created using <a href="https://www.sphinx-doc.org/">Sphinx</a> 5.3.0.
|
| 171 |
+
</div>
|
| 172 |
+
</body>
|
| 173 |
+
</html>
|
toolchain/cmake-3.27.9-linux-x86_64/doc/cmake/html/command/add_executable.html
ADDED
|
@@ -0,0 +1,259 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
|
| 2 |
+
<!DOCTYPE html>
|
| 3 |
+
|
| 4 |
+
<html lang="en">
|
| 5 |
+
<head>
|
| 6 |
+
<meta charset="utf-8" />
|
| 7 |
+
<meta name="viewport" content="width=device-width, initial-scale=1.0" /><meta name="generator" content="Docutils 0.19: https://docutils.sourceforge.io/" />
|
| 8 |
+
|
| 9 |
+
<title>add_executable — CMake 3.27.9 Documentation</title>
|
| 10 |
+
|
| 11 |
+
<link rel="stylesheet" type="text/css" href="../_static/pygments.css" />
|
| 12 |
+
<link rel="stylesheet" type="text/css" href="../_static/cmake.css" />
|
| 13 |
+
|
| 14 |
+
<script data-url_root="../" id="documentation_options" src="../_static/documentation_options.js"></script>
|
| 15 |
+
<script src="../_static/jquery.js"></script>
|
| 16 |
+
<script src="../_static/underscore.js"></script>
|
| 17 |
+
<script src="../_static/_sphinx_javascript_frameworks_compat.js"></script>
|
| 18 |
+
<script src="../_static/doctools.js"></script>
|
| 19 |
+
<script src="../_static/sphinx_highlight.js"></script>
|
| 20 |
+
|
| 21 |
+
<link rel="shortcut icon" href="../_static/cmake-favicon.ico"/>
|
| 22 |
+
<link rel="index" title="Index" href="../genindex.html" />
|
| 23 |
+
<link rel="search" title="Search" href="../search.html" />
|
| 24 |
+
<link rel="next" title="add_library" href="add_library.html" />
|
| 25 |
+
<link rel="prev" title="add_dependencies" href="add_dependencies.html" />
|
| 26 |
+
|
| 27 |
+
|
| 28 |
+
</head><body>
|
| 29 |
+
|
| 30 |
+
<div class="related" role="navigation" aria-label="related navigation">
|
| 31 |
+
<h3>Navigation</h3>
|
| 32 |
+
<ul>
|
| 33 |
+
<li class="right" style="margin-right: 10px">
|
| 34 |
+
<a href="../genindex.html" title="General Index"
|
| 35 |
+
accesskey="I">index</a></li>
|
| 36 |
+
<li class="right" >
|
| 37 |
+
<a href="add_library.html" title="add_library"
|
| 38 |
+
accesskey="N">next</a> |</li>
|
| 39 |
+
<li class="right" >
|
| 40 |
+
<a href="add_dependencies.html" title="add_dependencies"
|
| 41 |
+
accesskey="P">previous</a> |</li>
|
| 42 |
+
<li>
|
| 43 |
+
<img src="../_static/cmake-logo-16.png" alt=""
|
| 44 |
+
style="vertical-align: middle; margin-top: -2px" />
|
| 45 |
+
</li>
|
| 46 |
+
<li>
|
| 47 |
+
<a href="https://cmake.org/">CMake</a> »
|
| 48 |
+
</li>
|
| 49 |
+
<li>
|
| 50 |
+
<a href="../index.html">3.27.9 Documentation</a> »
|
| 51 |
+
</li>
|
| 52 |
+
|
| 53 |
+
<li class="nav-item nav-item-1"><a href="../manual/cmake-commands.7.html" accesskey="U">cmake-commands(7)</a> »</li>
|
| 54 |
+
<li class="nav-item nav-item-this"><a href="">add_executable</a></li>
|
| 55 |
+
</ul>
|
| 56 |
+
</div>
|
| 57 |
+
|
| 58 |
+
<div class="document">
|
| 59 |
+
<div class="documentwrapper">
|
| 60 |
+
<div class="bodywrapper">
|
| 61 |
+
<div class="body" role="main">
|
| 62 |
+
|
| 63 |
+
<section id="add-executable">
|
| 64 |
+
<span id="command:add_executable"></span><h1><a class="toc-backref" href="#id1" role="doc-backlink">add_executable</a><a class="headerlink" href="#add-executable" title="Permalink to this heading">¶</a></h1>
|
| 65 |
+
<nav class="contents" id="contents">
|
| 66 |
+
<p class="topic-title">Contents</p>
|
| 67 |
+
<ul class="simple">
|
| 68 |
+
<li><p><a class="reference internal" href="#add-executable" id="id1">add_executable</a></p>
|
| 69 |
+
<ul>
|
| 70 |
+
<li><p><a class="reference internal" href="#normal-executables" id="id2">Normal Executables</a></p></li>
|
| 71 |
+
<li><p><a class="reference internal" href="#imported-executables" id="id3">Imported Executables</a></p></li>
|
| 72 |
+
<li><p><a class="reference internal" href="#alias-executables" id="id4">Alias Executables</a></p></li>
|
| 73 |
+
<li><p><a class="reference internal" href="#see-also" id="id5">See Also</a></p></li>
|
| 74 |
+
</ul>
|
| 75 |
+
</li>
|
| 76 |
+
</ul>
|
| 77 |
+
</nav>
|
| 78 |
+
<p>Add an executable to the project using the specified source files.</p>
|
| 79 |
+
<section id="normal-executables">
|
| 80 |
+
<h2><a class="toc-backref" href="#id2" role="doc-backlink">Normal Executables</a><a class="headerlink" href="#normal-executables" title="Permalink to this heading">¶</a></h2>
|
| 81 |
+
<div class="highlight-cmake notranslate"><div class="highlight"><pre><span></span><span class="nf">add_executable(</span><span class="nv"><name></span><span class="w"> </span><span class="p">[</span><span class="no">WIN32</span><span class="p">]</span><span class="w"> </span><span class="p">[</span><span class="no">MACOSX_BUNDLE</span><span class="p">]</span>
|
| 82 |
+
<span class="w"> </span><span class="p">[</span><span class="no">EXCLUDE_FROM_ALL</span><span class="p">]</span>
|
| 83 |
+
<span class="w"> </span><span class="p">[</span><span class="nb">source1</span><span class="p">]</span><span class="w"> </span><span class="p">[</span><span class="nb">source2</span><span class="w"> </span><span class="p">...]</span><span class="nf">)</span>
|
| 84 |
+
</pre></div>
|
| 85 |
+
</div>
|
| 86 |
+
<p>Adds an executable target called <code class="docutils literal notranslate"><span class="pre"><name></span></code> to be built from the source
|
| 87 |
+
files listed in the command invocation. The
|
| 88 |
+
<code class="docutils literal notranslate"><span class="pre"><name></span></code> corresponds to the logical target name and must be globally
|
| 89 |
+
unique within a project. The actual file name of the executable built is
|
| 90 |
+
constructed based on conventions of the native platform (such as
|
| 91 |
+
<code class="docutils literal notranslate"><span class="pre"><name>.exe</span></code> or just <code class="docutils literal notranslate"><span class="pre"><name></span></code>).</p>
|
| 92 |
+
<div class="versionadded">
|
| 93 |
+
<p><span class="versionmodified added">New in version 3.1: </span>Source arguments to <code class="docutils literal notranslate"><span class="pre">add_executable</span></code> may use "generator expressions" with
|
| 94 |
+
the syntax <code class="docutils literal notranslate"><span class="pre">$<...></span></code>. See the <span class="target" id="index-0-manual:cmake-generator-expressions(7)"></span><a class="reference internal" href="../manual/cmake-generator-expressions.7.html#manual:cmake-generator-expressions(7)" title="cmake-generator-expressions(7)"><code class="xref cmake cmake-manual docutils literal notranslate"><span class="pre">cmake-generator-expressions(7)</span></code></a>
|
| 95 |
+
manual for available expressions.</p>
|
| 96 |
+
</div>
|
| 97 |
+
<div class="versionadded">
|
| 98 |
+
<p><span class="versionmodified added">New in version 3.11: </span>The source files can be omitted if they are added later using
|
| 99 |
+
<span class="target" id="index-0-command:target_sources"></span><a class="reference internal" href="target_sources.html#command:target_sources" title="target_sources"><code class="xref cmake cmake-command docutils literal notranslate"><span class="pre">target_sources()</span></code></a>.</p>
|
| 100 |
+
</div>
|
| 101 |
+
<p>By default the executable file will be created in the build tree
|
| 102 |
+
directory corresponding to the source tree directory in which the
|
| 103 |
+
command was invoked. See documentation of the
|
| 104 |
+
<span class="target" id="index-0-prop_tgt:RUNTIME_OUTPUT_DIRECTORY"></span><a class="reference internal" href="../prop_tgt/RUNTIME_OUTPUT_DIRECTORY.html#prop_tgt:RUNTIME_OUTPUT_DIRECTORY" title="RUNTIME_OUTPUT_DIRECTORY"><code class="xref cmake cmake-prop_tgt docutils literal notranslate"><span class="pre">RUNTIME_OUTPUT_DIRECTORY</span></code></a> target property to change this
|
| 105 |
+
location. See documentation of the <span class="target" id="index-0-prop_tgt:OUTPUT_NAME"></span><a class="reference internal" href="../prop_tgt/OUTPUT_NAME.html#prop_tgt:OUTPUT_NAME" title="OUTPUT_NAME"><code class="xref cmake cmake-prop_tgt docutils literal notranslate"><span class="pre">OUTPUT_NAME</span></code></a> target property
|
| 106 |
+
to change the <code class="docutils literal notranslate"><span class="pre"><name></span></code> part of the final file name.</p>
|
| 107 |
+
<p>If <code class="docutils literal notranslate"><span class="pre">WIN32</span></code> is given the property <span class="target" id="index-0-prop_tgt:WIN32_EXECUTABLE"></span><a class="reference internal" href="../prop_tgt/WIN32_EXECUTABLE.html#prop_tgt:WIN32_EXECUTABLE" title="WIN32_EXECUTABLE"><code class="xref cmake cmake-prop_tgt docutils literal notranslate"><span class="pre">WIN32_EXECUTABLE</span></code></a> will be
|
| 108 |
+
set on the target created. See documentation of that target property for
|
| 109 |
+
details.</p>
|
| 110 |
+
<p>If <code class="docutils literal notranslate"><span class="pre">MACOSX_BUNDLE</span></code> is given the corresponding property will be set on
|
| 111 |
+
the created target. See documentation of the <span class="target" id="index-0-prop_tgt:MACOSX_BUNDLE"></span><a class="reference internal" href="../prop_tgt/MACOSX_BUNDLE.html#prop_tgt:MACOSX_BUNDLE" title="MACOSX_BUNDLE"><code class="xref cmake cmake-prop_tgt docutils literal notranslate"><span class="pre">MACOSX_BUNDLE</span></code></a>
|
| 112 |
+
target property for details.</p>
|
| 113 |
+
<p>If <code class="docutils literal notranslate"><span class="pre">EXCLUDE_FROM_ALL</span></code> is given the corresponding property will be set on
|
| 114 |
+
the created target. See documentation of the <span class="target" id="index-0-prop_tgt:EXCLUDE_FROM_ALL"></span><a class="reference internal" href="../prop_tgt/EXCLUDE_FROM_ALL.html#prop_tgt:EXCLUDE_FROM_ALL" title="EXCLUDE_FROM_ALL"><code class="xref cmake cmake-prop_tgt docutils literal notranslate"><span class="pre">EXCLUDE_FROM_ALL</span></code></a>
|
| 115 |
+
target property for details.</p>
|
| 116 |
+
<p>See the <span class="target" id="index-0-manual:cmake-buildsystem(7)"></span><a class="reference internal" href="../manual/cmake-buildsystem.7.html#manual:cmake-buildsystem(7)" title="cmake-buildsystem(7)"><code class="xref cmake cmake-manual docutils literal notranslate"><span class="pre">cmake-buildsystem(7)</span></code></a> manual for more on defining
|
| 117 |
+
buildsystem properties.</p>
|
| 118 |
+
<p>See also <span class="target" id="index-0-prop_sf:HEADER_FILE_ONLY"></span><a class="reference internal" href="../prop_sf/HEADER_FILE_ONLY.html#prop_sf:HEADER_FILE_ONLY" title="HEADER_FILE_ONLY"><code class="xref cmake cmake-prop_sf docutils literal notranslate"><span class="pre">HEADER_FILE_ONLY</span></code></a> on what to do if some sources are
|
| 119 |
+
pre-processed, and you want to have the original sources reachable from
|
| 120 |
+
within IDE.</p>
|
| 121 |
+
</section>
|
| 122 |
+
<section id="imported-executables">
|
| 123 |
+
<h2><a class="toc-backref" href="#id3" role="doc-backlink">Imported Executables</a><a class="headerlink" href="#imported-executables" title="Permalink to this heading">¶</a></h2>
|
| 124 |
+
<div class="highlight-cmake notranslate"><div class="highlight"><pre><span></span><span class="nf">add_executable(</span><span class="nv"><name></span><span class="w"> </span><span class="no">IMPORTED</span><span class="w"> </span><span class="p">[</span><span class="no">GLOBAL</span><span class="p">]</span><span class="nf">)</span>
|
| 125 |
+
</pre></div>
|
| 126 |
+
</div>
|
| 127 |
+
<p>An <a class="reference internal" href="../manual/cmake-buildsystem.7.html#imported-targets"><span class="std std-ref">IMPORTED executable target</span></a> references an
|
| 128 |
+
executable file located outside the project. No rules are generated to
|
| 129 |
+
build it, and the <span class="target" id="index-0-prop_tgt:IMPORTED"></span><a class="reference internal" href="../prop_tgt/IMPORTED.html#prop_tgt:IMPORTED" title="IMPORTED"><code class="xref cmake cmake-prop_tgt docutils literal notranslate"><span class="pre">IMPORTED</span></code></a> target property is <code class="docutils literal notranslate"><span class="pre">True</span></code>. The
|
| 130 |
+
target name has scope in the directory in which it is created and below, but
|
| 131 |
+
the <code class="docutils literal notranslate"><span class="pre">GLOBAL</span></code> option extends visibility. It may be referenced like any
|
| 132 |
+
target built within the project. <code class="docutils literal notranslate"><span class="pre">IMPORTED</span></code> executables are useful
|
| 133 |
+
for convenient reference from commands like <span class="target" id="index-0-command:add_custom_command"></span><a class="reference internal" href="add_custom_command.html#command:add_custom_command" title="add_custom_command"><code class="xref cmake cmake-command docutils literal notranslate"><span class="pre">add_custom_command()</span></code></a>.
|
| 134 |
+
Details about the imported executable are specified by setting properties
|
| 135 |
+
whose names begin in <code class="docutils literal notranslate"><span class="pre">IMPORTED_</span></code>. The most important such property is
|
| 136 |
+
<span class="target" id="index-0-prop_tgt:IMPORTED_LOCATION"></span><a class="reference internal" href="../prop_tgt/IMPORTED_LOCATION.html#prop_tgt:IMPORTED_LOCATION" title="IMPORTED_LOCATION"><code class="xref cmake cmake-prop_tgt docutils literal notranslate"><span class="pre">IMPORTED_LOCATION</span></code></a> (and its per-configuration version
|
| 137 |
+
<span class="target" id="index-0-prop_tgt:IMPORTED_LOCATION_<CONFIG>"></span><a class="reference internal" href="../prop_tgt/IMPORTED_LOCATION_CONFIG.html#prop_tgt:IMPORTED_LOCATION_<CONFIG>" title="IMPORTED_LOCATION_<CONFIG>"><code class="xref cmake cmake-prop_tgt docutils literal notranslate"><span class="pre">IMPORTED_LOCATION_<CONFIG></span></code></a>) which specifies the location of
|
| 138 |
+
the main executable file on disk. See documentation of the <code class="docutils literal notranslate"><span class="pre">IMPORTED_*</span></code>
|
| 139 |
+
properties for more information.</p>
|
| 140 |
+
</section>
|
| 141 |
+
<section id="alias-executables">
|
| 142 |
+
<h2><a class="toc-backref" href="#id4" role="doc-backlink">Alias Executables</a><a class="headerlink" href="#alias-executables" title="Permalink to this heading">¶</a></h2>
|
| 143 |
+
<div class="highlight-cmake notranslate"><div class="highlight"><pre><span></span><span class="nf">add_executable(</span><span class="nv"><name></span><span class="w"> </span><span class="no">ALIAS</span><span class="w"> </span><span class="nv"><target></span><span class="nf">)</span>
|
| 144 |
+
</pre></div>
|
| 145 |
+
</div>
|
| 146 |
+
<p>Creates an <a class="reference internal" href="../manual/cmake-buildsystem.7.html#alias-targets"><span class="std std-ref">Alias Target</span></a>, such that <code class="docutils literal notranslate"><span class="pre"><name></span></code> can
|
| 147 |
+
be used to refer to <code class="docutils literal notranslate"><span class="pre"><target></span></code> in subsequent commands. The <code class="docutils literal notranslate"><span class="pre"><name></span></code>
|
| 148 |
+
does not appear in the generated buildsystem as a make target. The
|
| 149 |
+
<code class="docutils literal notranslate"><span class="pre"><target></span></code> may not be an <code class="docutils literal notranslate"><span class="pre">ALIAS</span></code>.</p>
|
| 150 |
+
<div class="versionadded">
|
| 151 |
+
<p><span class="versionmodified added">New in version 3.11: </span>An <code class="docutils literal notranslate"><span class="pre">ALIAS</span></code> can target a <code class="docutils literal notranslate"><span class="pre">GLOBAL</span></code> <a class="reference internal" href="../manual/cmake-buildsystem.7.html#imported-targets"><span class="std std-ref">Imported Target</span></a></p>
|
| 152 |
+
</div>
|
| 153 |
+
<div class="versionadded">
|
| 154 |
+
<p><span class="versionmodified added">New in version 3.18: </span>An <code class="docutils literal notranslate"><span class="pre">ALIAS</span></code> can target a non-<code class="docutils literal notranslate"><span class="pre">GLOBAL</span></code> Imported Target. Such alias is
|
| 155 |
+
scoped to the directory in which it is created and subdirectories.
|
| 156 |
+
The <span class="target" id="index-0-prop_tgt:ALIAS_GLOBAL"></span><a class="reference internal" href="../prop_tgt/ALIAS_GLOBAL.html#prop_tgt:ALIAS_GLOBAL" title="ALIAS_GLOBAL"><code class="xref cmake cmake-prop_tgt docutils literal notranslate"><span class="pre">ALIAS_GLOBAL</span></code></a> target property can be used to check if the
|
| 157 |
+
alias is global or not.</p>
|
| 158 |
+
</div>
|
| 159 |
+
<p><code class="docutils literal notranslate"><span class="pre">ALIAS</span></code> targets can be used as targets to read properties
|
| 160 |
+
from, executables for custom commands and custom targets. They can also be
|
| 161 |
+
tested for existence with the regular <span class="target" id="index-0-command:if"></span><a class="reference internal" href="if.html#target" title="if(target)"><code class="xref cmake cmake-command docutils literal notranslate"><span class="pre">if(TARGET)</span></code></a> subcommand.
|
| 162 |
+
The <code class="docutils literal notranslate"><span class="pre"><name></span></code> may not be used to modify properties of <code class="docutils literal notranslate"><span class="pre"><target></span></code>, that
|
| 163 |
+
is, it may not be used as the operand of <span class="target" id="index-0-command:set_property"></span><a class="reference internal" href="set_property.html#command:set_property" title="set_property"><code class="xref cmake cmake-command docutils literal notranslate"><span class="pre">set_property()</span></code></a>,
|
| 164 |
+
<span class="target" id="index-0-command:set_target_properties"></span><a class="reference internal" href="set_target_properties.html#command:set_target_properties" title="set_target_properties"><code class="xref cmake cmake-command docutils literal notranslate"><span class="pre">set_target_properties()</span></code></a>, <span class="target" id="index-0-command:target_link_libraries"></span><a class="reference internal" href="target_link_libraries.html#command:target_link_libraries" title="target_link_libraries"><code class="xref cmake cmake-command docutils literal notranslate"><span class="pre">target_link_libraries()</span></code></a> etc.
|
| 165 |
+
An <code class="docutils literal notranslate"><span class="pre">ALIAS</span></code> target may not be installed or exported.</p>
|
| 166 |
+
</section>
|
| 167 |
+
<section id="see-also">
|
| 168 |
+
<h2><a class="toc-backref" href="#id5" role="doc-backlink">See Also</a><a class="headerlink" href="#see-also" title="Permalink to this heading">¶</a></h2>
|
| 169 |
+
<ul class="simple">
|
| 170 |
+
<li><p><span class="target" id="index-0-command:add_library"></span><a class="reference internal" href="add_library.html#command:add_library" title="add_library"><code class="xref cmake cmake-command docutils literal notranslate"><span class="pre">add_library()</span></code></a></p></li>
|
| 171 |
+
</ul>
|
| 172 |
+
</section>
|
| 173 |
+
</section>
|
| 174 |
+
|
| 175 |
+
|
| 176 |
+
<div class="clearer"></div>
|
| 177 |
+
</div>
|
| 178 |
+
</div>
|
| 179 |
+
</div>
|
| 180 |
+
<div class="sphinxsidebar" role="navigation" aria-label="main navigation">
|
| 181 |
+
<div class="sphinxsidebarwrapper">
|
| 182 |
+
<div>
|
| 183 |
+
<h3><a href="../index.html">Table of Contents</a></h3>
|
| 184 |
+
<ul>
|
| 185 |
+
<li><a class="reference internal" href="#">add_executable</a><ul>
|
| 186 |
+
<li><a class="reference internal" href="#normal-executables">Normal Executables</a></li>
|
| 187 |
+
<li><a class="reference internal" href="#imported-executables">Imported Executables</a></li>
|
| 188 |
+
<li><a class="reference internal" href="#alias-executables">Alias Executables</a></li>
|
| 189 |
+
<li><a class="reference internal" href="#see-also">See Also</a></li>
|
| 190 |
+
</ul>
|
| 191 |
+
</li>
|
| 192 |
+
</ul>
|
| 193 |
+
|
| 194 |
+
</div>
|
| 195 |
+
<div>
|
| 196 |
+
<h4>Previous topic</h4>
|
| 197 |
+
<p class="topless"><a href="add_dependencies.html"
|
| 198 |
+
title="previous chapter">add_dependencies</a></p>
|
| 199 |
+
</div>
|
| 200 |
+
<div>
|
| 201 |
+
<h4>Next topic</h4>
|
| 202 |
+
<p class="topless"><a href="add_library.html"
|
| 203 |
+
title="next chapter">add_library</a></p>
|
| 204 |
+
</div>
|
| 205 |
+
<div role="note" aria-label="source link">
|
| 206 |
+
<h3>This Page</h3>
|
| 207 |
+
<ul class="this-page-menu">
|
| 208 |
+
<li><a href="../_sources/command/add_executable.rst.txt"
|
| 209 |
+
rel="nofollow">Show Source</a></li>
|
| 210 |
+
</ul>
|
| 211 |
+
</div>
|
| 212 |
+
<div id="searchbox" style="display: none" role="search">
|
| 213 |
+
<h3 id="searchlabel">Quick search</h3>
|
| 214 |
+
<div class="searchformwrapper">
|
| 215 |
+
<form class="search" action="../search.html" method="get">
|
| 216 |
+
<input type="text" name="q" aria-labelledby="searchlabel" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/>
|
| 217 |
+
<input type="submit" value="Go" />
|
| 218 |
+
</form>
|
| 219 |
+
</div>
|
| 220 |
+
</div>
|
| 221 |
+
<script>document.getElementById('searchbox').style.display = "block"</script>
|
| 222 |
+
</div>
|
| 223 |
+
</div>
|
| 224 |
+
<div class="clearer"></div>
|
| 225 |
+
</div>
|
| 226 |
+
<div class="related" role="navigation" aria-label="related navigation">
|
| 227 |
+
<h3>Navigation</h3>
|
| 228 |
+
<ul>
|
| 229 |
+
<li class="right" style="margin-right: 10px">
|
| 230 |
+
<a href="../genindex.html" title="General Index"
|
| 231 |
+
>index</a></li>
|
| 232 |
+
<li class="right" >
|
| 233 |
+
<a href="add_library.html" title="add_library"
|
| 234 |
+
>next</a> |</li>
|
| 235 |
+
<li class="right" >
|
| 236 |
+
<a href="add_dependencies.html" title="add_dependencies"
|
| 237 |
+
>previous</a> |</li>
|
| 238 |
+
<li>
|
| 239 |
+
<img src="../_static/cmake-logo-16.png" alt=""
|
| 240 |
+
style="vertical-align: middle; margin-top: -2px" />
|
| 241 |
+
</li>
|
| 242 |
+
<li>
|
| 243 |
+
<a href="https://cmake.org/">CMake</a> »
|
| 244 |
+
</li>
|
| 245 |
+
<li>
|
| 246 |
+
<a href="../index.html">3.27.9 Documentation</a> »
|
| 247 |
+
</li>
|
| 248 |
+
|
| 249 |
+
<li class="nav-item nav-item-1"><a href="../manual/cmake-commands.7.html" >cmake-commands(7)</a> »</li>
|
| 250 |
+
<li class="nav-item nav-item-this"><a href="">add_executable</a></li>
|
| 251 |
+
</ul>
|
| 252 |
+
</div>
|
| 253 |
+
|
| 254 |
+
<div class="footer" role="contentinfo">
|
| 255 |
+
© Copyright 2000-2023 Kitware, Inc. and Contributors.
|
| 256 |
+
Created using <a href="https://www.sphinx-doc.org/">Sphinx</a> 5.3.0.
|
| 257 |
+
</div>
|
| 258 |
+
</body>
|
| 259 |
+
</html>
|
toolchain/cmake-3.27.9-linux-x86_64/doc/cmake/html/command/add_library.html
ADDED
|
@@ -0,0 +1,401 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
|
| 2 |
+
<!DOCTYPE html>
|
| 3 |
+
|
| 4 |
+
<html lang="en">
|
| 5 |
+
<head>
|
| 6 |
+
<meta charset="utf-8" />
|
| 7 |
+
<meta name="viewport" content="width=device-width, initial-scale=1.0" /><meta name="generator" content="Docutils 0.19: https://docutils.sourceforge.io/" />
|
| 8 |
+
|
| 9 |
+
<title>add_library — CMake 3.27.9 Documentation</title>
|
| 10 |
+
|
| 11 |
+
<link rel="stylesheet" type="text/css" href="../_static/pygments.css" />
|
| 12 |
+
<link rel="stylesheet" type="text/css" href="../_static/cmake.css" />
|
| 13 |
+
|
| 14 |
+
<script data-url_root="../" id="documentation_options" src="../_static/documentation_options.js"></script>
|
| 15 |
+
<script src="../_static/jquery.js"></script>
|
| 16 |
+
<script src="../_static/underscore.js"></script>
|
| 17 |
+
<script src="../_static/_sphinx_javascript_frameworks_compat.js"></script>
|
| 18 |
+
<script src="../_static/doctools.js"></script>
|
| 19 |
+
<script src="../_static/sphinx_highlight.js"></script>
|
| 20 |
+
|
| 21 |
+
<link rel="shortcut icon" href="../_static/cmake-favicon.ico"/>
|
| 22 |
+
<link rel="index" title="Index" href="../genindex.html" />
|
| 23 |
+
<link rel="search" title="Search" href="../search.html" />
|
| 24 |
+
<link rel="next" title="add_link_options" href="add_link_options.html" />
|
| 25 |
+
<link rel="prev" title="add_executable" href="add_executable.html" />
|
| 26 |
+
|
| 27 |
+
|
| 28 |
+
</head><body>
|
| 29 |
+
|
| 30 |
+
<div class="related" role="navigation" aria-label="related navigation">
|
| 31 |
+
<h3>Navigation</h3>
|
| 32 |
+
<ul>
|
| 33 |
+
<li class="right" style="margin-right: 10px">
|
| 34 |
+
<a href="../genindex.html" title="General Index"
|
| 35 |
+
accesskey="I">index</a></li>
|
| 36 |
+
<li class="right" >
|
| 37 |
+
<a href="add_link_options.html" title="add_link_options"
|
| 38 |
+
accesskey="N">next</a> |</li>
|
| 39 |
+
<li class="right" >
|
| 40 |
+
<a href="add_executable.html" title="add_executable"
|
| 41 |
+
accesskey="P">previous</a> |</li>
|
| 42 |
+
<li>
|
| 43 |
+
<img src="../_static/cmake-logo-16.png" alt=""
|
| 44 |
+
style="vertical-align: middle; margin-top: -2px" />
|
| 45 |
+
</li>
|
| 46 |
+
<li>
|
| 47 |
+
<a href="https://cmake.org/">CMake</a> »
|
| 48 |
+
</li>
|
| 49 |
+
<li>
|
| 50 |
+
<a href="../index.html">3.27.9 Documentation</a> »
|
| 51 |
+
</li>
|
| 52 |
+
|
| 53 |
+
<li class="nav-item nav-item-1"><a href="../manual/cmake-commands.7.html" accesskey="U">cmake-commands(7)</a> »</li>
|
| 54 |
+
<li class="nav-item nav-item-this"><a href="">add_library</a></li>
|
| 55 |
+
</ul>
|
| 56 |
+
</div>
|
| 57 |
+
|
| 58 |
+
<div class="document">
|
| 59 |
+
<div class="documentwrapper">
|
| 60 |
+
<div class="bodywrapper">
|
| 61 |
+
<div class="body" role="main">
|
| 62 |
+
|
| 63 |
+
<section id="add-library">
|
| 64 |
+
<span id="command:add_library"></span><h1><a class="toc-backref" href="#id1" role="doc-backlink">add_library</a><a class="headerlink" href="#add-library" title="Permalink to this heading">¶</a></h1>
|
| 65 |
+
<nav class="contents" id="contents">
|
| 66 |
+
<p class="topic-title">Contents</p>
|
| 67 |
+
<ul class="simple">
|
| 68 |
+
<li><p><a class="reference internal" href="#add-library" id="id1">add_library</a></p>
|
| 69 |
+
<ul>
|
| 70 |
+
<li><p><a class="reference internal" href="#normal-libraries" id="id2">Normal Libraries</a></p></li>
|
| 71 |
+
<li><p><a class="reference internal" href="#object-libraries" id="id3">Object Libraries</a></p></li>
|
| 72 |
+
<li><p><a class="reference internal" href="#interface-libraries" id="id4">Interface Libraries</a></p></li>
|
| 73 |
+
<li><p><a class="reference internal" href="#imported-libraries" id="id5">Imported Libraries</a></p></li>
|
| 74 |
+
<li><p><a class="reference internal" href="#alias-libraries" id="id6">Alias Libraries</a></p></li>
|
| 75 |
+
<li><p><a class="reference internal" href="#see-also" id="id7">See Also</a></p></li>
|
| 76 |
+
</ul>
|
| 77 |
+
</li>
|
| 78 |
+
</ul>
|
| 79 |
+
</nav>
|
| 80 |
+
<p>Add a library to the project using the specified source files.</p>
|
| 81 |
+
<section id="normal-libraries">
|
| 82 |
+
<h2><a class="toc-backref" href="#id2" role="doc-backlink">Normal Libraries</a><a class="headerlink" href="#normal-libraries" title="Permalink to this heading">¶</a></h2>
|
| 83 |
+
<div class="highlight-cmake notranslate"><div class="highlight"><pre><span></span><span class="nf">add_library(</span><span class="nv"><name></span><span class="w"> </span><span class="p">[</span><span class="no">STATIC</span><span class="w"> </span><span class="p">|</span><span class="w"> </span><span class="no">SHARED</span><span class="w"> </span><span class="p">|</span><span class="w"> </span><span class="no">MODULE</span><span class="p">]</span>
|
| 84 |
+
<span class="w"> </span><span class="p">[</span><span class="no">EXCLUDE_FROM_ALL</span><span class="p">]</span>
|
| 85 |
+
<span class="w"> </span><span class="p">[</span><span class="nv"><source>...</span><span class="p">]</span><span class="nf">)</span>
|
| 86 |
+
</pre></div>
|
| 87 |
+
</div>
|
| 88 |
+
<p>Adds a library target called <code class="docutils literal notranslate"><span class="pre"><name></span></code> to be built from the source files
|
| 89 |
+
listed in the command invocation. The <code class="docutils literal notranslate"><span class="pre"><name></span></code>
|
| 90 |
+
corresponds to the logical target name and must be globally unique within
|
| 91 |
+
a project. The actual file name of the library built is constructed based
|
| 92 |
+
on conventions of the native platform (such as <code class="docutils literal notranslate"><span class="pre">lib<name>.a</span></code> or
|
| 93 |
+
<code class="docutils literal notranslate"><span class="pre"><name>.lib</span></code>).</p>
|
| 94 |
+
<div class="versionadded">
|
| 95 |
+
<p><span class="versionmodified added">New in version 3.1: </span>Source arguments to <code class="docutils literal notranslate"><span class="pre">add_library</span></code> may use "generator expressions" with
|
| 96 |
+
the syntax <code class="docutils literal notranslate"><span class="pre">$<...></span></code>. See the <span class="target" id="index-0-manual:cmake-generator-expressions(7)"></span><a class="reference internal" href="../manual/cmake-generator-expressions.7.html#manual:cmake-generator-expressions(7)" title="cmake-generator-expressions(7)"><code class="xref cmake cmake-manual docutils literal notranslate"><span class="pre">cmake-generator-expressions(7)</span></code></a>
|
| 97 |
+
manual for available expressions.</p>
|
| 98 |
+
</div>
|
| 99 |
+
<div class="versionadded">
|
| 100 |
+
<p><span class="versionmodified added">New in version 3.11: </span>The source files can be omitted if they are added later using
|
| 101 |
+
<span class="target" id="index-0-command:target_sources"></span><a class="reference internal" href="target_sources.html#command:target_sources" title="target_sources"><code class="xref cmake cmake-command docutils literal notranslate"><span class="pre">target_sources()</span></code></a>.</p>
|
| 102 |
+
</div>
|
| 103 |
+
<p><code class="docutils literal notranslate"><span class="pre">STATIC</span></code>, <code class="docutils literal notranslate"><span class="pre">SHARED</span></code>, or <code class="docutils literal notranslate"><span class="pre">MODULE</span></code> may be given to specify the type of
|
| 104 |
+
library to be created. <code class="docutils literal notranslate"><span class="pre">STATIC</span></code> libraries are archives of object files
|
| 105 |
+
for use when linking other targets. <code class="docutils literal notranslate"><span class="pre">SHARED</span></code> libraries are linked
|
| 106 |
+
dynamically and loaded at runtime. <code class="docutils literal notranslate"><span class="pre">MODULE</span></code> libraries are plugins that
|
| 107 |
+
are not linked into other targets but may be loaded dynamically at runtime
|
| 108 |
+
using dlopen-like functionality. If no type is given explicitly the
|
| 109 |
+
type is <code class="docutils literal notranslate"><span class="pre">STATIC</span></code> or <code class="docutils literal notranslate"><span class="pre">SHARED</span></code> based on whether the current value of the
|
| 110 |
+
variable <span class="target" id="index-0-variable:BUILD_SHARED_LIBS"></span><a class="reference internal" href="../variable/BUILD_SHARED_LIBS.html#variable:BUILD_SHARED_LIBS" title="BUILD_SHARED_LIBS"><code class="xref cmake cmake-variable docutils literal notranslate"><span class="pre">BUILD_SHARED_LIBS</span></code></a> is <code class="docutils literal notranslate"><span class="pre">ON</span></code>. For <code class="docutils literal notranslate"><span class="pre">SHARED</span></code> and
|
| 111 |
+
<code class="docutils literal notranslate"><span class="pre">MODULE</span></code> libraries the <span class="target" id="index-0-prop_tgt:POSITION_INDEPENDENT_CODE"></span><a class="reference internal" href="../prop_tgt/POSITION_INDEPENDENT_CODE.html#prop_tgt:POSITION_INDEPENDENT_CODE" title="POSITION_INDEPENDENT_CODE"><code class="xref cmake cmake-prop_tgt docutils literal notranslate"><span class="pre">POSITION_INDEPENDENT_CODE</span></code></a> target
|
| 112 |
+
property is set to <code class="docutils literal notranslate"><span class="pre">ON</span></code> automatically.
|
| 113 |
+
A <code class="docutils literal notranslate"><span class="pre">SHARED</span></code> library may be marked with the <span class="target" id="index-0-prop_tgt:FRAMEWORK"></span><a class="reference internal" href="../prop_tgt/FRAMEWORK.html#prop_tgt:FRAMEWORK" title="FRAMEWORK"><code class="xref cmake cmake-prop_tgt docutils literal notranslate"><span class="pre">FRAMEWORK</span></code></a>
|
| 114 |
+
target property to create an macOS Framework.</p>
|
| 115 |
+
<div class="versionadded">
|
| 116 |
+
<p><span class="versionmodified added">New in version 3.8: </span>A <code class="docutils literal notranslate"><span class="pre">STATIC</span></code> library may be marked with the <span class="target" id="index-1-prop_tgt:FRAMEWORK"></span><a class="reference internal" href="../prop_tgt/FRAMEWORK.html#prop_tgt:FRAMEWORK" title="FRAMEWORK"><code class="xref cmake cmake-prop_tgt docutils literal notranslate"><span class="pre">FRAMEWORK</span></code></a>
|
| 117 |
+
target property to create a static Framework.</p>
|
| 118 |
+
</div>
|
| 119 |
+
<p>If a library does not export any symbols, it must not be declared as a
|
| 120 |
+
<code class="docutils literal notranslate"><span class="pre">SHARED</span></code> library. For example, a Windows resource DLL or a managed C++/CLI
|
| 121 |
+
DLL that exports no unmanaged symbols would need to be a <code class="docutils literal notranslate"><span class="pre">MODULE</span></code> library.
|
| 122 |
+
This is because CMake expects a <code class="docutils literal notranslate"><span class="pre">SHARED</span></code> library to always have an
|
| 123 |
+
associated import library on Windows.</p>
|
| 124 |
+
<p>By default the library file will be created in the build tree directory
|
| 125 |
+
corresponding to the source tree directory in which the command was
|
| 126 |
+
invoked. See documentation of the <span class="target" id="index-0-prop_tgt:ARCHIVE_OUTPUT_DIRECTORY"></span><a class="reference internal" href="../prop_tgt/ARCHIVE_OUTPUT_DIRECTORY.html#prop_tgt:ARCHIVE_OUTPUT_DIRECTORY" title="ARCHIVE_OUTPUT_DIRECTORY"><code class="xref cmake cmake-prop_tgt docutils literal notranslate"><span class="pre">ARCHIVE_OUTPUT_DIRECTORY</span></code></a>,
|
| 127 |
+
<span class="target" id="index-0-prop_tgt:LIBRARY_OUTPUT_DIRECTORY"></span><a class="reference internal" href="../prop_tgt/LIBRARY_OUTPUT_DIRECTORY.html#prop_tgt:LIBRARY_OUTPUT_DIRECTORY" title="LIBRARY_OUTPUT_DIRECTORY"><code class="xref cmake cmake-prop_tgt docutils literal notranslate"><span class="pre">LIBRARY_OUTPUT_DIRECTORY</span></code></a>, and
|
| 128 |
+
<span class="target" id="index-0-prop_tgt:RUNTIME_OUTPUT_DIRECTORY"></span><a class="reference internal" href="../prop_tgt/RUNTIME_OUTPUT_DIRECTORY.html#prop_tgt:RUNTIME_OUTPUT_DIRECTORY" title="RUNTIME_OUTPUT_DIRECTORY"><code class="xref cmake cmake-prop_tgt docutils literal notranslate"><span class="pre">RUNTIME_OUTPUT_DIRECTORY</span></code></a> target properties to change this
|
| 129 |
+
location. See documentation of the <span class="target" id="index-0-prop_tgt:OUTPUT_NAME"></span><a class="reference internal" href="../prop_tgt/OUTPUT_NAME.html#prop_tgt:OUTPUT_NAME" title="OUTPUT_NAME"><code class="xref cmake cmake-prop_tgt docutils literal notranslate"><span class="pre">OUTPUT_NAME</span></code></a> target
|
| 130 |
+
property to change the <code class="docutils literal notranslate"><span class="pre"><name></span></code> part of the final file name.</p>
|
| 131 |
+
<p>If <code class="docutils literal notranslate"><span class="pre">EXCLUDE_FROM_ALL</span></code> is given the corresponding property will be set on
|
| 132 |
+
the created target. See documentation of the <span class="target" id="index-0-prop_tgt:EXCLUDE_FROM_ALL"></span><a class="reference internal" href="../prop_tgt/EXCLUDE_FROM_ALL.html#prop_tgt:EXCLUDE_FROM_ALL" title="EXCLUDE_FROM_ALL"><code class="xref cmake cmake-prop_tgt docutils literal notranslate"><span class="pre">EXCLUDE_FROM_ALL</span></code></a>
|
| 133 |
+
target property for details.</p>
|
| 134 |
+
<p>See the <span class="target" id="index-0-manual:cmake-buildsystem(7)"></span><a class="reference internal" href="../manual/cmake-buildsystem.7.html#manual:cmake-buildsystem(7)" title="cmake-buildsystem(7)"><code class="xref cmake cmake-manual docutils literal notranslate"><span class="pre">cmake-buildsystem(7)</span></code></a> manual for more on defining
|
| 135 |
+
buildsystem properties.</p>
|
| 136 |
+
<p>See also <span class="target" id="index-0-prop_sf:HEADER_FILE_ONLY"></span><a class="reference internal" href="../prop_sf/HEADER_FILE_ONLY.html#prop_sf:HEADER_FILE_ONLY" title="HEADER_FILE_ONLY"><code class="xref cmake cmake-prop_sf docutils literal notranslate"><span class="pre">HEADER_FILE_ONLY</span></code></a> on what to do if some sources are
|
| 137 |
+
pre-processed, and you want to have the original sources reachable from
|
| 138 |
+
within IDE.</p>
|
| 139 |
+
</section>
|
| 140 |
+
<section id="object-libraries">
|
| 141 |
+
<h2><a class="toc-backref" href="#id3" role="doc-backlink">Object Libraries</a><a class="headerlink" href="#object-libraries" title="Permalink to this heading">¶</a></h2>
|
| 142 |
+
<div class="highlight-cmake notranslate"><div class="highlight"><pre><span></span><span class="nf">add_library(</span><span class="nv"><name></span><span class="w"> </span><span class="no">OBJECT</span><span class="w"> </span><span class="p">[</span><span class="nv"><source>...</span><span class="p">]</span><span class="nf">)</span>
|
| 143 |
+
</pre></div>
|
| 144 |
+
</div>
|
| 145 |
+
<p>Creates an <a class="reference internal" href="../manual/cmake-buildsystem.7.html#object-libraries"><span class="std std-ref">Object Library</span></a>. An object library
|
| 146 |
+
compiles source files but does not archive or link their object files into a
|
| 147 |
+
library. Instead other targets created by <code class="docutils literal notranslate"><span class="pre">add_library</span></code> or
|
| 148 |
+
<span class="target" id="index-0-command:add_executable"></span><a class="reference internal" href="add_executable.html#command:add_executable" title="add_executable"><code class="xref cmake cmake-command docutils literal notranslate"><span class="pre">add_executable()</span></code></a> may reference the objects using an expression of the
|
| 149 |
+
form <span class="target" id="index-0-genex:TARGET_OBJECTS"></span><a class="reference internal" href="../manual/cmake-generator-expressions.7.html#genex:TARGET_OBJECTS" title="TARGET_OBJECTS"><code class="xref cmake cmake-genex docutils literal notranslate"><span class="pre">$<TARGET_OBJECTS:objlib></span></code></a> as a source, where
|
| 150 |
+
<code class="docutils literal notranslate"><span class="pre">objlib</span></code> is the object library name. For example:</p>
|
| 151 |
+
<div class="highlight-cmake notranslate"><div class="highlight"><pre><span></span><span class="nf">add_library(</span><span class="p">...</span><span class="w"> </span><span class="o">$<</span><span class="no">TARGET_OBJECTS</span><span class="o">:</span><span class="nb">objlib</span><span class="o">></span><span class="w"> </span><span class="p">...</span><span class="nf">)</span>
|
| 152 |
+
<span class="nf">add_executable(</span><span class="p">...</span><span class="w"> </span><span class="o">$<</span><span class="no">TARGET_OBJECTS</span><span class="o">:</span><span class="nb">objlib</span><span class="o">></span><span class="w"> </span><span class="p">...</span><span class="nf">)</span>
|
| 153 |
+
</pre></div>
|
| 154 |
+
</div>
|
| 155 |
+
<p>will include objlib's object files in a library and an executable
|
| 156 |
+
along with those compiled from their own sources. Object libraries
|
| 157 |
+
may contain only sources that compile, header files, and other files
|
| 158 |
+
that would not affect linking of a normal library (e.g. <code class="docutils literal notranslate"><span class="pre">.txt</span></code>).
|
| 159 |
+
They may contain custom commands generating such sources, but not
|
| 160 |
+
<code class="docutils literal notranslate"><span class="pre">PRE_BUILD</span></code>, <code class="docutils literal notranslate"><span class="pre">PRE_LINK</span></code>, or <code class="docutils literal notranslate"><span class="pre">POST_BUILD</span></code> commands. Some native build
|
| 161 |
+
systems (such as Xcode) may not like targets that have only object files, so
|
| 162 |
+
consider adding at least one real source file to any target that references
|
| 163 |
+
<span class="target" id="index-1-genex:TARGET_OBJECTS"></span><a class="reference internal" href="../manual/cmake-generator-expressions.7.html#genex:TARGET_OBJECTS" title="TARGET_OBJECTS"><code class="xref cmake cmake-genex docutils literal notranslate"><span class="pre">$<TARGET_OBJECTS:objlib></span></code></a>.</p>
|
| 164 |
+
<div class="versionadded">
|
| 165 |
+
<p><span class="versionmodified added">New in version 3.12: </span>Object libraries can be linked to with <span class="target" id="index-0-command:target_link_libraries"></span><a class="reference internal" href="target_link_libraries.html#command:target_link_libraries" title="target_link_libraries"><code class="xref cmake cmake-command docutils literal notranslate"><span class="pre">target_link_libraries()</span></code></a>.</p>
|
| 166 |
+
</div>
|
| 167 |
+
</section>
|
| 168 |
+
<section id="interface-libraries">
|
| 169 |
+
<h2><a class="toc-backref" href="#id4" role="doc-backlink">Interface Libraries</a><a class="headerlink" href="#interface-libraries" title="Permalink to this heading">¶</a></h2>
|
| 170 |
+
<div class="highlight-cmake notranslate"><div class="highlight"><pre><span></span><span class="nf">add_library(</span><span class="nv"><name></span><span class="w"> </span><span class="no">INTERFACE</span><span class="nf">)</span>
|
| 171 |
+
</pre></div>
|
| 172 |
+
</div>
|
| 173 |
+
<p>Creates an <a class="reference internal" href="../manual/cmake-buildsystem.7.html#interface-libraries"><span class="std std-ref">Interface Library</span></a>.
|
| 174 |
+
An <code class="docutils literal notranslate"><span class="pre">INTERFACE</span></code> library target does not compile sources and does
|
| 175 |
+
not produce a library artifact on disk. However, it may have
|
| 176 |
+
properties set on it and it may be installed and exported.
|
| 177 |
+
Typically, <code class="docutils literal notranslate"><span class="pre">INTERFACE_*</span></code> properties are populated on an interface
|
| 178 |
+
target using the commands:</p>
|
| 179 |
+
<ul class="simple">
|
| 180 |
+
<li><p><span class="target" id="index-0-command:set_property"></span><a class="reference internal" href="set_property.html#command:set_property" title="set_property"><code class="xref cmake cmake-command docutils literal notranslate"><span class="pre">set_property()</span></code></a>,</p></li>
|
| 181 |
+
<li><p><span class="target" id="index-1-command:target_link_libraries"></span><a class="reference internal" href="target_link_libraries.html#command:target_link_libraries" title="target_link_libraries(interface)"><code class="xref cmake cmake-command docutils literal notranslate"><span class="pre">target_link_libraries(INTERFACE)</span></code></a>,</p></li>
|
| 182 |
+
<li><p><span class="target" id="index-0-command:target_link_options"></span><a class="reference internal" href="target_link_options.html#command:target_link_options" title="target_link_options(interface)"><code class="xref cmake cmake-command docutils literal notranslate"><span class="pre">target_link_options(INTERFACE)</span></code></a>,</p></li>
|
| 183 |
+
<li><p><span class="target" id="index-0-command:target_include_directories"></span><a class="reference internal" href="target_include_directories.html#command:target_include_directories" title="target_include_directories(interface)"><code class="xref cmake cmake-command docutils literal notranslate"><span class="pre">target_include_directories(INTERFACE)</span></code></a>,</p></li>
|
| 184 |
+
<li><p><span class="target" id="index-0-command:target_compile_options"></span><a class="reference internal" href="target_compile_options.html#command:target_compile_options" title="target_compile_options(interface)"><code class="xref cmake cmake-command docutils literal notranslate"><span class="pre">target_compile_options(INTERFACE)</span></code></a>,</p></li>
|
| 185 |
+
<li><p><span class="target" id="index-0-command:target_compile_definitions"></span><a class="reference internal" href="target_compile_definitions.html#command:target_compile_definitions" title="target_compile_definitions(interface)"><code class="xref cmake cmake-command docutils literal notranslate"><span class="pre">target_compile_definitions(INTERFACE)</span></code></a>, and</p></li>
|
| 186 |
+
<li><p><span class="target" id="index-1-command:target_sources"></span><a class="reference internal" href="target_sources.html#command:target_sources" title="target_sources(interface)"><code class="xref cmake cmake-command docutils literal notranslate"><span class="pre">target_sources(INTERFACE)</span></code></a>,</p></li>
|
| 187 |
+
</ul>
|
| 188 |
+
<p>and then it is used as an argument to <span class="target" id="index-2-command:target_link_libraries"></span><a class="reference internal" href="target_link_libraries.html#command:target_link_libraries" title="target_link_libraries"><code class="xref cmake cmake-command docutils literal notranslate"><span class="pre">target_link_libraries()</span></code></a>
|
| 189 |
+
like any other target.</p>
|
| 190 |
+
<p>An interface library created with the above signature has no source files
|
| 191 |
+
itself and is not included as a target in the generated buildsystem.</p>
|
| 192 |
+
<div class="versionadded">
|
| 193 |
+
<p><span class="versionmodified added">New in version 3.15: </span>An interface library can have <span class="target" id="index-0-prop_tgt:PUBLIC_HEADER"></span><a class="reference internal" href="../prop_tgt/PUBLIC_HEADER.html#prop_tgt:PUBLIC_HEADER" title="PUBLIC_HEADER"><code class="xref cmake cmake-prop_tgt docutils literal notranslate"><span class="pre">PUBLIC_HEADER</span></code></a> and
|
| 194 |
+
<span class="target" id="index-0-prop_tgt:PRIVATE_HEADER"></span><a class="reference internal" href="../prop_tgt/PRIVATE_HEADER.html#prop_tgt:PRIVATE_HEADER" title="PRIVATE_HEADER"><code class="xref cmake cmake-prop_tgt docutils literal notranslate"><span class="pre">PRIVATE_HEADER</span></code></a> properties. The headers specified by those
|
| 195 |
+
properties can be installed using the <span class="target" id="index-0-command:install"></span><a class="reference internal" href="install.html#command:install" title="install(targets)"><code class="xref cmake cmake-command docutils literal notranslate"><span class="pre">install(TARGETS)</span></code></a> command.</p>
|
| 196 |
+
</div>
|
| 197 |
+
<div class="versionadded">
|
| 198 |
+
<p><span class="versionmodified added">New in version 3.19: </span>An interface library target may be created with source files:</p>
|
| 199 |
+
<div class="highlight-cmake notranslate"><div class="highlight"><pre><span></span><span class="nf">add_library(</span><span class="nv"><name></span><span class="w"> </span><span class="no">INTERFACE</span><span class="w"> </span><span class="p">[</span><span class="nv"><source>...</span><span class="p">]</span><span class="w"> </span><span class="p">[</span><span class="no">EXCLUDE_FROM_ALL</span><span class="p">]</span><span class="nf">)</span>
|
| 200 |
+
</pre></div>
|
| 201 |
+
</div>
|
| 202 |
+
<p>Source files may be listed directly in the <code class="docutils literal notranslate"><span class="pre">add_library</span></code> call or added
|
| 203 |
+
later by calls to <span class="target" id="index-2-command:target_sources"></span><a class="reference internal" href="target_sources.html#command:target_sources" title="target_sources"><code class="xref cmake cmake-command docutils literal notranslate"><span class="pre">target_sources()</span></code></a> with the <code class="docutils literal notranslate"><span class="pre">PRIVATE</span></code> or
|
| 204 |
+
<code class="docutils literal notranslate"><span class="pre">PUBLIC</span></code> keywords.</p>
|
| 205 |
+
<p>If an interface library has source files (i.e. the <span class="target" id="index-0-prop_tgt:SOURCES"></span><a class="reference internal" href="../prop_tgt/SOURCES.html#prop_tgt:SOURCES" title="SOURCES"><code class="xref cmake cmake-prop_tgt docutils literal notranslate"><span class="pre">SOURCES</span></code></a>
|
| 206 |
+
target property is set), or header sets (i.e. the <span class="target" id="index-0-prop_tgt:HEADER_SETS"></span><a class="reference internal" href="../prop_tgt/HEADER_SETS.html#prop_tgt:HEADER_SETS" title="HEADER_SETS"><code class="xref cmake cmake-prop_tgt docutils literal notranslate"><span class="pre">HEADER_SETS</span></code></a>
|
| 207 |
+
target property is set), it will appear in the generated buildsystem
|
| 208 |
+
as a build target much like a target defined by the
|
| 209 |
+
<span class="target" id="index-0-command:add_custom_target"></span><a class="reference internal" href="add_custom_target.html#command:add_custom_target" title="add_custom_target"><code class="xref cmake cmake-command docutils literal notranslate"><span class="pre">add_custom_target()</span></code></a> command. It does not compile any sources,
|
| 210 |
+
but does contain build rules for custom commands created by the
|
| 211 |
+
<span class="target" id="index-0-command:add_custom_command"></span><a class="reference internal" href="add_custom_command.html#command:add_custom_command" title="add_custom_command"><code class="xref cmake cmake-command docutils literal notranslate"><span class="pre">add_custom_command()</span></code></a> command.</p>
|
| 212 |
+
</div>
|
| 213 |
+
<div class="admonition note">
|
| 214 |
+
<p class="admonition-title">Note</p>
|
| 215 |
+
<p>In most command signatures where the <code class="docutils literal notranslate"><span class="pre">INTERFACE</span></code> keyword appears,
|
| 216 |
+
the items listed after it only become part of that target's usage
|
| 217 |
+
requirements and are not part of the target's own settings. However,
|
| 218 |
+
in this signature of <code class="docutils literal notranslate"><span class="pre">add_library</span></code>, the <code class="docutils literal notranslate"><span class="pre">INTERFACE</span></code> keyword refers
|
| 219 |
+
to the library type only. Sources listed after it in the <code class="docutils literal notranslate"><span class="pre">add_library</span></code>
|
| 220 |
+
call are <code class="docutils literal notranslate"><span class="pre">PRIVATE</span></code> to the interface library and do not appear in its
|
| 221 |
+
<span class="target" id="index-0-prop_tgt:INTERFACE_SOURCES"></span><a class="reference internal" href="../prop_tgt/INTERFACE_SOURCES.html#prop_tgt:INTERFACE_SOURCES" title="INTERFACE_SOURCES"><code class="xref cmake cmake-prop_tgt docutils literal notranslate"><span class="pre">INTERFACE_SOURCES</span></code></a> target property.</p>
|
| 222 |
+
</div>
|
| 223 |
+
</section>
|
| 224 |
+
<section id="imported-libraries">
|
| 225 |
+
<span id="add-library-imported-libraries"></span><h2><a class="toc-backref" href="#id5" role="doc-backlink">Imported Libraries</a><a class="headerlink" href="#imported-libraries" title="Permalink to this heading">¶</a></h2>
|
| 226 |
+
<div class="highlight-cmake notranslate"><div class="highlight"><pre><span></span><span class="nf">add_library(</span><span class="nv"><name></span><span class="w"> </span><span class="nv"><type></span><span class="w"> </span><span class="no">IMPORTED</span><span class="w"> </span><span class="p">[</span><span class="no">GLOBAL</span><span class="p">]</span><span class="nf">)</span>
|
| 227 |
+
</pre></div>
|
| 228 |
+
</div>
|
| 229 |
+
<p>Creates an <a class="reference internal" href="../manual/cmake-buildsystem.7.html#imported-targets"><span class="std std-ref">IMPORTED library target</span></a> called <code class="docutils literal notranslate"><span class="pre"><name></span></code>.
|
| 230 |
+
No rules are generated to build it, and the <span class="target" id="index-0-prop_tgt:IMPORTED"></span><a class="reference internal" href="../prop_tgt/IMPORTED.html#prop_tgt:IMPORTED" title="IMPORTED"><code class="xref cmake cmake-prop_tgt docutils literal notranslate"><span class="pre">IMPORTED</span></code></a> target
|
| 231 |
+
property is <code class="docutils literal notranslate"><span class="pre">True</span></code>. The target name has scope in the directory in which
|
| 232 |
+
it is created and below, but the <code class="docutils literal notranslate"><span class="pre">GLOBAL</span></code> option extends visibility.
|
| 233 |
+
It may be referenced like any target built within the project.
|
| 234 |
+
<code class="docutils literal notranslate"><span class="pre">IMPORTED</span></code> libraries are useful for convenient reference from commands
|
| 235 |
+
like <span class="target" id="index-3-command:target_link_libraries"></span><a class="reference internal" href="target_link_libraries.html#command:target_link_libraries" title="target_link_libraries"><code class="xref cmake cmake-command docutils literal notranslate"><span class="pre">target_link_libraries()</span></code></a>. Details about the imported library
|
| 236 |
+
are specified by setting properties whose names begin in <code class="docutils literal notranslate"><span class="pre">IMPORTED_</span></code> and
|
| 237 |
+
<code class="docutils literal notranslate"><span class="pre">INTERFACE_</span></code>.</p>
|
| 238 |
+
<p>The <code class="docutils literal notranslate"><span class="pre"><type></span></code> must be one of:</p>
|
| 239 |
+
<dl>
|
| 240 |
+
<dt><code class="docutils literal notranslate"><span class="pre">STATIC</span></code>, <code class="docutils literal notranslate"><span class="pre">SHARED</span></code>, <code class="docutils literal notranslate"><span class="pre">MODULE</span></code>, <code class="docutils literal notranslate"><span class="pre">UNKNOWN</span></code></dt><dd><p>References a library file located outside the project. The
|
| 241 |
+
<span class="target" id="index-0-prop_tgt:IMPORTED_LOCATION"></span><a class="reference internal" href="../prop_tgt/IMPORTED_LOCATION.html#prop_tgt:IMPORTED_LOCATION" title="IMPORTED_LOCATION"><code class="xref cmake cmake-prop_tgt docutils literal notranslate"><span class="pre">IMPORTED_LOCATION</span></code></a> target property (or its per-configuration
|
| 242 |
+
variant <span class="target" id="index-0-prop_tgt:IMPORTED_LOCATION_<CONFIG>"></span><a class="reference internal" href="../prop_tgt/IMPORTED_LOCATION_CONFIG.html#prop_tgt:IMPORTED_LOCATION_<CONFIG>" title="IMPORTED_LOCATION_<CONFIG>"><code class="xref cmake cmake-prop_tgt docutils literal notranslate"><span class="pre">IMPORTED_LOCATION_<CONFIG></span></code></a>) specifies the
|
| 243 |
+
location of the main library file on disk:</p>
|
| 244 |
+
<ul class="simple">
|
| 245 |
+
<li><p>For a <code class="docutils literal notranslate"><span class="pre">SHARED</span></code> library on most non-Windows platforms, the main library
|
| 246 |
+
file is the <code class="docutils literal notranslate"><span class="pre">.so</span></code> or <code class="docutils literal notranslate"><span class="pre">.dylib</span></code> file used by both linkers and dynamic
|
| 247 |
+
loaders. If the referenced library file has a <code class="docutils literal notranslate"><span class="pre">SONAME</span></code> (or on macOS,
|
| 248 |
+
has a <code class="docutils literal notranslate"><span class="pre">LC_ID_DYLIB</span></code> starting in <code class="docutils literal notranslate"><span class="pre">@rpath/</span></code>), the value of that field
|
| 249 |
+
should be set in the <span class="target" id="index-0-prop_tgt:IMPORTED_SONAME"></span><a class="reference internal" href="../prop_tgt/IMPORTED_SONAME.html#prop_tgt:IMPORTED_SONAME" title="IMPORTED_SONAME"><code class="xref cmake cmake-prop_tgt docutils literal notranslate"><span class="pre">IMPORTED_SONAME</span></code></a> target property.
|
| 250 |
+
If the referenced library file does not have a <code class="docutils literal notranslate"><span class="pre">SONAME</span></code>, but the
|
| 251 |
+
platform supports it, then the <span class="target" id="index-0-prop_tgt:IMPORTED_NO_SONAME"></span><a class="reference internal" href="../prop_tgt/IMPORTED_NO_SONAME.html#prop_tgt:IMPORTED_NO_SONAME" title="IMPORTED_NO_SONAME"><code class="xref cmake cmake-prop_tgt docutils literal notranslate"><span class="pre">IMPORTED_NO_SONAME</span></code></a> target
|
| 252 |
+
property should be set.</p></li>
|
| 253 |
+
<li><p>For a <code class="docutils literal notranslate"><span class="pre">SHARED</span></code> library on Windows, the <span class="target" id="index-0-prop_tgt:IMPORTED_IMPLIB"></span><a class="reference internal" href="../prop_tgt/IMPORTED_IMPLIB.html#prop_tgt:IMPORTED_IMPLIB" title="IMPORTED_IMPLIB"><code class="xref cmake cmake-prop_tgt docutils literal notranslate"><span class="pre">IMPORTED_IMPLIB</span></code></a>
|
| 254 |
+
target property (or its per-configuration variant
|
| 255 |
+
<span class="target" id="index-0-prop_tgt:IMPORTED_IMPLIB_<CONFIG>"></span><a class="reference internal" href="../prop_tgt/IMPORTED_IMPLIB_CONFIG.html#prop_tgt:IMPORTED_IMPLIB_<CONFIG>" title="IMPORTED_IMPLIB_<CONFIG>"><code class="xref cmake cmake-prop_tgt docutils literal notranslate"><span class="pre">IMPORTED_IMPLIB_<CONFIG></span></code></a>) specifies the location of the
|
| 256 |
+
DLL import library file (<code class="docutils literal notranslate"><span class="pre">.lib</span></code> or <code class="docutils literal notranslate"><span class="pre">.dll.a</span></code>) on disk, and the
|
| 257 |
+
<code class="docutils literal notranslate"><span class="pre">IMPORTED_LOCATION</span></code> is the location of the <code class="docutils literal notranslate"><span class="pre">.dll</span></code> runtime
|
| 258 |
+
library (and is optional, but needed by the <span class="target" id="index-0-genex:TARGET_RUNTIME_DLLS"></span><a class="reference internal" href="../manual/cmake-generator-expressions.7.html#genex:TARGET_RUNTIME_DLLS" title="TARGET_RUNTIME_DLLS"><code class="xref cmake cmake-genex docutils literal notranslate"><span class="pre">TARGET_RUNTIME_DLLS</span></code></a>
|
| 259 |
+
generator expression).</p></li>
|
| 260 |
+
</ul>
|
| 261 |
+
<p>Additional usage requirements may be specified in <code class="docutils literal notranslate"><span class="pre">INTERFACE_*</span></code> properties.</p>
|
| 262 |
+
<p>An <code class="docutils literal notranslate"><span class="pre">UNKNOWN</span></code> library type is typically only used in the implementation of
|
| 263 |
+
<a class="reference internal" href="../manual/cmake-developer.7.html#find-modules"><span class="std std-ref">Find Modules</span></a>. It allows the path to an imported library (often found
|
| 264 |
+
using the <span class="target" id="index-0-command:find_library"></span><a class="reference internal" href="find_library.html#command:find_library" title="find_library"><code class="xref cmake cmake-command docutils literal notranslate"><span class="pre">find_library()</span></code></a> command) to be used without having to know
|
| 265 |
+
what type of library it is. This is especially useful on Windows where a
|
| 266 |
+
static library and a DLL's import library both have the same file extension.</p>
|
| 267 |
+
</dd>
|
| 268 |
+
<dt><code class="docutils literal notranslate"><span class="pre">OBJECT</span></code></dt><dd><p>References a set of object files located outside the project.
|
| 269 |
+
The <span class="target" id="index-0-prop_tgt:IMPORTED_OBJECTS"></span><a class="reference internal" href="../prop_tgt/IMPORTED_OBJECTS.html#prop_tgt:IMPORTED_OBJECTS" title="IMPORTED_OBJECTS"><code class="xref cmake cmake-prop_tgt docutils literal notranslate"><span class="pre">IMPORTED_OBJECTS</span></code></a> target property (or its per-configuration
|
| 270 |
+
variant <span class="target" id="index-0-prop_tgt:IMPORTED_OBJECTS_<CONFIG>"></span><a class="reference internal" href="../prop_tgt/IMPORTED_OBJECTS_CONFIG.html#prop_tgt:IMPORTED_OBJECTS_<CONFIG>" title="IMPORTED_OBJECTS_<CONFIG>"><code class="xref cmake cmake-prop_tgt docutils literal notranslate"><span class="pre">IMPORTED_OBJECTS_<CONFIG></span></code></a>) specifies the locations of
|
| 271 |
+
object files on disk.
|
| 272 |
+
Additional usage requirements may be specified in <code class="docutils literal notranslate"><span class="pre">INTERFACE_*</span></code> properties.</p>
|
| 273 |
+
</dd>
|
| 274 |
+
<dt><code class="docutils literal notranslate"><span class="pre">INTERFACE</span></code></dt><dd><p>Does not reference any library or object files on disk, but may
|
| 275 |
+
specify usage requirements in <code class="docutils literal notranslate"><span class="pre">INTERFACE_*</span></code> properties.</p>
|
| 276 |
+
</dd>
|
| 277 |
+
</dl>
|
| 278 |
+
<p>See documentation of the <code class="docutils literal notranslate"><span class="pre">IMPORTED_*</span></code> and <code class="docutils literal notranslate"><span class="pre">INTERFACE_*</span></code> properties
|
| 279 |
+
for more information.</p>
|
| 280 |
+
</section>
|
| 281 |
+
<section id="alias-libraries">
|
| 282 |
+
<h2><a class="toc-backref" href="#id6" role="doc-backlink">Alias Libraries</a><a class="headerlink" href="#alias-libraries" title="Permalink to this heading">¶</a></h2>
|
| 283 |
+
<div class="highlight-cmake notranslate"><div class="highlight"><pre><span></span><span class="nf">add_library(</span><span class="nv"><name></span><span class="w"> </span><span class="no">ALIAS</span><span class="w"> </span><span class="nv"><target></span><span class="nf">)</span>
|
| 284 |
+
</pre></div>
|
| 285 |
+
</div>
|
| 286 |
+
<p>Creates an <a class="reference internal" href="../manual/cmake-buildsystem.7.html#alias-targets"><span class="std std-ref">Alias Target</span></a>, such that <code class="docutils literal notranslate"><span class="pre"><name></span></code> can be
|
| 287 |
+
used to refer to <code class="docutils literal notranslate"><span class="pre"><target></span></code> in subsequent commands. The <code class="docutils literal notranslate"><span class="pre"><name></span></code> does
|
| 288 |
+
not appear in the generated buildsystem as a make target. The <code class="docutils literal notranslate"><span class="pre"><target></span></code>
|
| 289 |
+
may not be an <code class="docutils literal notranslate"><span class="pre">ALIAS</span></code>.</p>
|
| 290 |
+
<div class="versionadded">
|
| 291 |
+
<p><span class="versionmodified added">New in version 3.11: </span>An <code class="docutils literal notranslate"><span class="pre">ALIAS</span></code> can target a <code class="docutils literal notranslate"><span class="pre">GLOBAL</span></code> <a class="reference internal" href="../manual/cmake-buildsystem.7.html#imported-targets"><span class="std std-ref">Imported Target</span></a></p>
|
| 292 |
+
</div>
|
| 293 |
+
<div class="versionadded">
|
| 294 |
+
<p><span class="versionmodified added">New in version 3.18: </span>An <code class="docutils literal notranslate"><span class="pre">ALIAS</span></code> can target a non-<code class="docutils literal notranslate"><span class="pre">GLOBAL</span></code> Imported Target. Such alias is
|
| 295 |
+
scoped to the directory in which it is created and below.
|
| 296 |
+
The <span class="target" id="index-0-prop_tgt:ALIAS_GLOBAL"></span><a class="reference internal" href="../prop_tgt/ALIAS_GLOBAL.html#prop_tgt:ALIAS_GLOBAL" title="ALIAS_GLOBAL"><code class="xref cmake cmake-prop_tgt docutils literal notranslate"><span class="pre">ALIAS_GLOBAL</span></code></a> target property can be used to check if the
|
| 297 |
+
alias is global or not.</p>
|
| 298 |
+
</div>
|
| 299 |
+
<p><code class="docutils literal notranslate"><span class="pre">ALIAS</span></code> targets can be used as linkable targets and as targets to
|
| 300 |
+
read properties from. They can also be tested for existence with the
|
| 301 |
+
regular <span class="target" id="index-0-command:if"></span><a class="reference internal" href="if.html#target" title="if(target)"><code class="xref cmake cmake-command docutils literal notranslate"><span class="pre">if(TARGET)</span></code></a> subcommand. The <code class="docutils literal notranslate"><span class="pre"><name></span></code> may not be used
|
| 302 |
+
to modify properties of <code class="docutils literal notranslate"><span class="pre"><target></span></code>, that is, it may not be used as the
|
| 303 |
+
operand of <span class="target" id="index-1-command:set_property"></span><a class="reference internal" href="set_property.html#command:set_property" title="set_property"><code class="xref cmake cmake-command docutils literal notranslate"><span class="pre">set_property()</span></code></a>, <span class="target" id="index-0-command:set_target_properties"></span><a class="reference internal" href="set_target_properties.html#command:set_target_properties" title="set_target_properties"><code class="xref cmake cmake-command docutils literal notranslate"><span class="pre">set_target_properties()</span></code></a>,
|
| 304 |
+
<span class="target" id="index-4-command:target_link_libraries"></span><a class="reference internal" href="target_link_libraries.html#command:target_link_libraries" title="target_link_libraries"><code class="xref cmake cmake-command docutils literal notranslate"><span class="pre">target_link_libraries()</span></code></a> etc. An <code class="docutils literal notranslate"><span class="pre">ALIAS</span></code> target may not be
|
| 305 |
+
installed or exported.</p>
|
| 306 |
+
</section>
|
| 307 |
+
<section id="see-also">
|
| 308 |
+
<h2><a class="toc-backref" href="#id7" role="doc-backlink">See Also</a><a class="headerlink" href="#see-also" title="Permalink to this heading">¶</a></h2>
|
| 309 |
+
<ul class="simple">
|
| 310 |
+
<li><p><span class="target" id="index-1-command:add_executable"></span><a class="reference internal" href="add_executable.html#command:add_executable" title="add_executable"><code class="xref cmake cmake-command docutils literal notranslate"><span class="pre">add_executable()</span></code></a></p></li>
|
| 311 |
+
</ul>
|
| 312 |
+
</section>
|
| 313 |
+
</section>
|
| 314 |
+
|
| 315 |
+
|
| 316 |
+
<div class="clearer"></div>
|
| 317 |
+
</div>
|
| 318 |
+
</div>
|
| 319 |
+
</div>
|
| 320 |
+
<div class="sphinxsidebar" role="navigation" aria-label="main navigation">
|
| 321 |
+
<div class="sphinxsidebarwrapper">
|
| 322 |
+
<div>
|
| 323 |
+
<h3><a href="../index.html">Table of Contents</a></h3>
|
| 324 |
+
<ul>
|
| 325 |
+
<li><a class="reference internal" href="#">add_library</a><ul>
|
| 326 |
+
<li><a class="reference internal" href="#normal-libraries">Normal Libraries</a></li>
|
| 327 |
+
<li><a class="reference internal" href="#object-libraries">Object Libraries</a></li>
|
| 328 |
+
<li><a class="reference internal" href="#interface-libraries">Interface Libraries</a></li>
|
| 329 |
+
<li><a class="reference internal" href="#imported-libraries">Imported Libraries</a></li>
|
| 330 |
+
<li><a class="reference internal" href="#alias-libraries">Alias Libraries</a></li>
|
| 331 |
+
<li><a class="reference internal" href="#see-also">See Also</a></li>
|
| 332 |
+
</ul>
|
| 333 |
+
</li>
|
| 334 |
+
</ul>
|
| 335 |
+
|
| 336 |
+
</div>
|
| 337 |
+
<div>
|
| 338 |
+
<h4>Previous topic</h4>
|
| 339 |
+
<p class="topless"><a href="add_executable.html"
|
| 340 |
+
title="previous chapter">add_executable</a></p>
|
| 341 |
+
</div>
|
| 342 |
+
<div>
|
| 343 |
+
<h4>Next topic</h4>
|
| 344 |
+
<p class="topless"><a href="add_link_options.html"
|
| 345 |
+
title="next chapter">add_link_options</a></p>
|
| 346 |
+
</div>
|
| 347 |
+
<div role="note" aria-label="source link">
|
| 348 |
+
<h3>This Page</h3>
|
| 349 |
+
<ul class="this-page-menu">
|
| 350 |
+
<li><a href="../_sources/command/add_library.rst.txt"
|
| 351 |
+
rel="nofollow">Show Source</a></li>
|
| 352 |
+
</ul>
|
| 353 |
+
</div>
|
| 354 |
+
<div id="searchbox" style="display: none" role="search">
|
| 355 |
+
<h3 id="searchlabel">Quick search</h3>
|
| 356 |
+
<div class="searchformwrapper">
|
| 357 |
+
<form class="search" action="../search.html" method="get">
|
| 358 |
+
<input type="text" name="q" aria-labelledby="searchlabel" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/>
|
| 359 |
+
<input type="submit" value="Go" />
|
| 360 |
+
</form>
|
| 361 |
+
</div>
|
| 362 |
+
</div>
|
| 363 |
+
<script>document.getElementById('searchbox').style.display = "block"</script>
|
| 364 |
+
</div>
|
| 365 |
+
</div>
|
| 366 |
+
<div class="clearer"></div>
|
| 367 |
+
</div>
|
| 368 |
+
<div class="related" role="navigation" aria-label="related navigation">
|
| 369 |
+
<h3>Navigation</h3>
|
| 370 |
+
<ul>
|
| 371 |
+
<li class="right" style="margin-right: 10px">
|
| 372 |
+
<a href="../genindex.html" title="General Index"
|
| 373 |
+
>index</a></li>
|
| 374 |
+
<li class="right" >
|
| 375 |
+
<a href="add_link_options.html" title="add_link_options"
|
| 376 |
+
>next</a> |</li>
|
| 377 |
+
<li class="right" >
|
| 378 |
+
<a href="add_executable.html" title="add_executable"
|
| 379 |
+
>previous</a> |</li>
|
| 380 |
+
<li>
|
| 381 |
+
<img src="../_static/cmake-logo-16.png" alt=""
|
| 382 |
+
style="vertical-align: middle; margin-top: -2px" />
|
| 383 |
+
</li>
|
| 384 |
+
<li>
|
| 385 |
+
<a href="https://cmake.org/">CMake</a> »
|
| 386 |
+
</li>
|
| 387 |
+
<li>
|
| 388 |
+
<a href="../index.html">3.27.9 Documentation</a> »
|
| 389 |
+
</li>
|
| 390 |
+
|
| 391 |
+
<li class="nav-item nav-item-1"><a href="../manual/cmake-commands.7.html" >cmake-commands(7)</a> »</li>
|
| 392 |
+
<li class="nav-item nav-item-this"><a href="">add_library</a></li>
|
| 393 |
+
</ul>
|
| 394 |
+
</div>
|
| 395 |
+
|
| 396 |
+
<div class="footer" role="contentinfo">
|
| 397 |
+
© Copyright 2000-2023 Kitware, Inc. and Contributors.
|
| 398 |
+
Created using <a href="https://www.sphinx-doc.org/">Sphinx</a> 5.3.0.
|
| 399 |
+
</div>
|
| 400 |
+
</body>
|
| 401 |
+
</html>
|
toolchain/cmake-3.27.9-linux-x86_64/doc/cmake/html/command/add_link_options.html
ADDED
|
@@ -0,0 +1,236 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
|
| 2 |
+
<!DOCTYPE html>
|
| 3 |
+
|
| 4 |
+
<html lang="en">
|
| 5 |
+
<head>
|
| 6 |
+
<meta charset="utf-8" />
|
| 7 |
+
<meta name="viewport" content="width=device-width, initial-scale=1.0" /><meta name="generator" content="Docutils 0.19: https://docutils.sourceforge.io/" />
|
| 8 |
+
|
| 9 |
+
<title>add_link_options — CMake 3.27.9 Documentation</title>
|
| 10 |
+
|
| 11 |
+
<link rel="stylesheet" type="text/css" href="../_static/pygments.css" />
|
| 12 |
+
<link rel="stylesheet" type="text/css" href="../_static/cmake.css" />
|
| 13 |
+
|
| 14 |
+
<script data-url_root="../" id="documentation_options" src="../_static/documentation_options.js"></script>
|
| 15 |
+
<script src="../_static/jquery.js"></script>
|
| 16 |
+
<script src="../_static/underscore.js"></script>
|
| 17 |
+
<script src="../_static/_sphinx_javascript_frameworks_compat.js"></script>
|
| 18 |
+
<script src="../_static/doctools.js"></script>
|
| 19 |
+
<script src="../_static/sphinx_highlight.js"></script>
|
| 20 |
+
|
| 21 |
+
<link rel="shortcut icon" href="../_static/cmake-favicon.ico"/>
|
| 22 |
+
<link rel="index" title="Index" href="../genindex.html" />
|
| 23 |
+
<link rel="search" title="Search" href="../search.html" />
|
| 24 |
+
<link rel="next" title="add_subdirectory" href="add_subdirectory.html" />
|
| 25 |
+
<link rel="prev" title="add_library" href="add_library.html" />
|
| 26 |
+
|
| 27 |
+
|
| 28 |
+
</head><body>
|
| 29 |
+
|
| 30 |
+
<div class="related" role="navigation" aria-label="related navigation">
|
| 31 |
+
<h3>Navigation</h3>
|
| 32 |
+
<ul>
|
| 33 |
+
<li class="right" style="margin-right: 10px">
|
| 34 |
+
<a href="../genindex.html" title="General Index"
|
| 35 |
+
accesskey="I">index</a></li>
|
| 36 |
+
<li class="right" >
|
| 37 |
+
<a href="add_subdirectory.html" title="add_subdirectory"
|
| 38 |
+
accesskey="N">next</a> |</li>
|
| 39 |
+
<li class="right" >
|
| 40 |
+
<a href="add_library.html" title="add_library"
|
| 41 |
+
accesskey="P">previous</a> |</li>
|
| 42 |
+
<li>
|
| 43 |
+
<img src="../_static/cmake-logo-16.png" alt=""
|
| 44 |
+
style="vertical-align: middle; margin-top: -2px" />
|
| 45 |
+
</li>
|
| 46 |
+
<li>
|
| 47 |
+
<a href="https://cmake.org/">CMake</a> »
|
| 48 |
+
</li>
|
| 49 |
+
<li>
|
| 50 |
+
<a href="../index.html">3.27.9 Documentation</a> »
|
| 51 |
+
</li>
|
| 52 |
+
|
| 53 |
+
<li class="nav-item nav-item-1"><a href="../manual/cmake-commands.7.html" accesskey="U">cmake-commands(7)</a> »</li>
|
| 54 |
+
<li class="nav-item nav-item-this"><a href="">add_link_options</a></li>
|
| 55 |
+
</ul>
|
| 56 |
+
</div>
|
| 57 |
+
|
| 58 |
+
<div class="document">
|
| 59 |
+
<div class="documentwrapper">
|
| 60 |
+
<div class="bodywrapper">
|
| 61 |
+
<div class="body" role="main">
|
| 62 |
+
|
| 63 |
+
<section id="add-link-options">
|
| 64 |
+
<span id="command:add_link_options"></span><h1>add_link_options<a class="headerlink" href="#add-link-options" title="Permalink to this heading">¶</a></h1>
|
| 65 |
+
<div class="versionadded">
|
| 66 |
+
<p><span class="versionmodified added">New in version 3.13.</span></p>
|
| 67 |
+
</div>
|
| 68 |
+
<p>Add options to the link step for executable, shared library or module
|
| 69 |
+
library targets in the current directory and below that are added after
|
| 70 |
+
this command is invoked.</p>
|
| 71 |
+
<div class="highlight-cmake notranslate"><div class="highlight"><pre><span></span><span class="nf">add_link_options(</span><span class="nv"><option></span><span class="w"> </span><span class="p">...</span><span class="nf">)</span>
|
| 72 |
+
</pre></div>
|
| 73 |
+
</div>
|
| 74 |
+
<p>This command can be used to add any link options, but alternative commands
|
| 75 |
+
exist to add libraries (<span class="target" id="index-0-command:target_link_libraries"></span><a class="reference internal" href="target_link_libraries.html#command:target_link_libraries" title="target_link_libraries"><code class="xref cmake cmake-command docutils literal notranslate"><span class="pre">target_link_libraries()</span></code></a> or
|
| 76 |
+
<span class="target" id="index-0-command:link_libraries"></span><a class="reference internal" href="link_libraries.html#command:link_libraries" title="link_libraries"><code class="xref cmake cmake-command docutils literal notranslate"><span class="pre">link_libraries()</span></code></a>). See documentation of the
|
| 77 |
+
<span class="target" id="index-0-prop_dir:LINK_OPTIONS"></span><a class="reference internal" href="../prop_dir/LINK_OPTIONS.html#prop_dir:LINK_OPTIONS" title="LINK_OPTIONS"><code class="xref cmake cmake-prop_dir docutils literal notranslate"><span class="pre">directory</span></code></a> and
|
| 78 |
+
<span class="target" id="index-0-prop_tgt:LINK_OPTIONS"></span><a class="reference internal" href="../prop_tgt/LINK_OPTIONS.html#prop_tgt:LINK_OPTIONS" title="LINK_OPTIONS"><code class="xref cmake cmake-prop_tgt docutils literal notranslate"><span class="pre">target</span></code></a> <code class="docutils literal notranslate"><span class="pre">LINK_OPTIONS</span></code> properties.</p>
|
| 79 |
+
<div class="admonition note">
|
| 80 |
+
<p class="admonition-title">Note</p>
|
| 81 |
+
<p>This command cannot be used to add options for static library targets,
|
| 82 |
+
since they do not use a linker. To add archiver or MSVC librarian flags,
|
| 83 |
+
see the <span class="target" id="index-0-prop_tgt:STATIC_LIBRARY_OPTIONS"></span><a class="reference internal" href="../prop_tgt/STATIC_LIBRARY_OPTIONS.html#prop_tgt:STATIC_LIBRARY_OPTIONS" title="STATIC_LIBRARY_OPTIONS"><code class="xref cmake cmake-prop_tgt docutils literal notranslate"><span class="pre">STATIC_LIBRARY_OPTIONS</span></code></a> target property.</p>
|
| 84 |
+
</div>
|
| 85 |
+
<p>Arguments to <code class="docutils literal notranslate"><span class="pre">add_link_options</span></code> may use generator expressions
|
| 86 |
+
with the syntax <code class="docutils literal notranslate"><span class="pre">$<...></span></code>. See the <span class="target" id="index-0-manual:cmake-generator-expressions(7)"></span><a class="reference internal" href="../manual/cmake-generator-expressions.7.html#manual:cmake-generator-expressions(7)" title="cmake-generator-expressions(7)"><code class="xref cmake cmake-manual docutils literal notranslate"><span class="pre">cmake-generator-expressions(7)</span></code></a>
|
| 87 |
+
manual for available expressions. See the <span class="target" id="index-1-manual:cmake-buildsystem(7)"></span><a class="reference internal" href="../manual/cmake-buildsystem.7.html#manual:cmake-buildsystem(7)" title="cmake-buildsystem(7)"><code class="xref cmake cmake-manual docutils literal notranslate"><span class="pre">cmake-buildsystem(7)</span></code></a> manual
|
| 88 |
+
for more on defining buildsystem properties.</p>
|
| 89 |
+
<section id="host-and-device-specific-link-options">
|
| 90 |
+
<h2>Host And Device Specific Link Options<a class="headerlink" href="#host-and-device-specific-link-options" title="Permalink to this heading">¶</a></h2>
|
| 91 |
+
<div class="versionadded">
|
| 92 |
+
<p><span class="versionmodified added">New in version 3.18: </span>When a device link step is involved, which is controlled by
|
| 93 |
+
<span class="target" id="index-0-prop_tgt:CUDA_SEPARABLE_COMPILATION"></span><a class="reference internal" href="../prop_tgt/CUDA_SEPARABLE_COMPILATION.html#prop_tgt:CUDA_SEPARABLE_COMPILATION" title="CUDA_SEPARABLE_COMPILATION"><code class="xref cmake cmake-prop_tgt docutils literal notranslate"><span class="pre">CUDA_SEPARABLE_COMPILATION</span></code></a> and
|
| 94 |
+
<span class="target" id="index-0-prop_tgt:CUDA_RESOLVE_DEVICE_SYMBOLS"></span><a class="reference internal" href="../prop_tgt/CUDA_RESOLVE_DEVICE_SYMBOLS.html#prop_tgt:CUDA_RESOLVE_DEVICE_SYMBOLS" title="CUDA_RESOLVE_DEVICE_SYMBOLS"><code class="xref cmake cmake-prop_tgt docutils literal notranslate"><span class="pre">CUDA_RESOLVE_DEVICE_SYMBOLS</span></code></a> properties and policy <span class="target" id="index-0-policy:CMP0105"></span><a class="reference internal" href="../policy/CMP0105.html#policy:CMP0105" title="CMP0105"><code class="xref cmake cmake-policy docutils literal notranslate"><span class="pre">CMP0105</span></code></a>,
|
| 95 |
+
the raw options will be delivered to the host and device link steps (wrapped in
|
| 96 |
+
<code class="docutils literal notranslate"><span class="pre">-Xcompiler</span></code> or equivalent for device link). Options wrapped with
|
| 97 |
+
<span class="target" id="index-0-genex:DEVICE_LINK"></span><a class="reference internal" href="../manual/cmake-generator-expressions.7.html#genex:DEVICE_LINK" title="DEVICE_LINK"><code class="xref cmake cmake-genex docutils literal notranslate"><span class="pre">$<DEVICE_LINK:...></span></code></a> generator expression will be used
|
| 98 |
+
only for the device link step. Options wrapped with <span class="target" id="index-0-genex:HOST_LINK"></span><a class="reference internal" href="../manual/cmake-generator-expressions.7.html#genex:HOST_LINK" title="HOST_LINK"><code class="xref cmake cmake-genex docutils literal notranslate"><span class="pre">$<HOST_LINK:...></span></code></a>
|
| 99 |
+
generator expression will be used only for the host link step.</p>
|
| 100 |
+
</div>
|
| 101 |
+
</section>
|
| 102 |
+
<section id="option-de-duplication">
|
| 103 |
+
<h2>Option De-duplication<a class="headerlink" href="#option-de-duplication" title="Permalink to this heading">¶</a></h2>
|
| 104 |
+
<p>The final set of options used for a target is constructed by
|
| 105 |
+
accumulating options from the current target and the usage requirements of
|
| 106 |
+
its dependencies. The set of options is de-duplicated to avoid repetition.</p>
|
| 107 |
+
<div class="versionadded">
|
| 108 |
+
<p><span class="versionmodified added">New in version 3.12: </span>While beneficial for individual options, the de-duplication step can break
|
| 109 |
+
up option groups. For example, <code class="docutils literal notranslate"><span class="pre">-option</span> <span class="pre">A</span> <span class="pre">-option</span> <span class="pre">B</span></code> becomes
|
| 110 |
+
<code class="docutils literal notranslate"><span class="pre">-option</span> <span class="pre">A</span> <span class="pre">B</span></code>. One may specify a group of options using shell-like
|
| 111 |
+
quoting along with a <code class="docutils literal notranslate"><span class="pre">SHELL:</span></code> prefix. The <code class="docutils literal notranslate"><span class="pre">SHELL:</span></code> prefix is dropped,
|
| 112 |
+
and the rest of the option string is parsed using the
|
| 113 |
+
<span class="target" id="index-0-command:separate_arguments"></span><a class="reference internal" href="separate_arguments.html#command:separate_arguments" title="separate_arguments"><code class="xref cmake cmake-command docutils literal notranslate"><span class="pre">separate_arguments()</span></code></a> <code class="docutils literal notranslate"><span class="pre">UNIX_COMMAND</span></code> mode. For example,
|
| 114 |
+
<code class="docutils literal notranslate"><span class="pre">"SHELL:-option</span> <span class="pre">A"</span> <span class="pre">"SHELL:-option</span> <span class="pre">B"</span></code> becomes <code class="docutils literal notranslate"><span class="pre">-option</span> <span class="pre">A</span> <span class="pre">-option</span> <span class="pre">B</span></code>.</p>
|
| 115 |
+
</div>
|
| 116 |
+
</section>
|
| 117 |
+
<section id="handling-compiler-driver-differences">
|
| 118 |
+
<h2>Handling Compiler Driver Differences<a class="headerlink" href="#handling-compiler-driver-differences" title="Permalink to this heading">¶</a></h2>
|
| 119 |
+
<p>To pass options to the linker tool, each compiler driver has its own syntax.
|
| 120 |
+
The <code class="docutils literal notranslate"><span class="pre">LINKER:</span></code> prefix and <code class="docutils literal notranslate"><span class="pre">,</span></code> separator can be used to specify, in a portable
|
| 121 |
+
way, options to pass to the linker tool. <code class="docutils literal notranslate"><span class="pre">LINKER:</span></code> is replaced by the
|
| 122 |
+
appropriate driver option and <code class="docutils literal notranslate"><span class="pre">,</span></code> by the appropriate driver separator.
|
| 123 |
+
The driver prefix and driver separator are given by the values of the
|
| 124 |
+
<span class="target" id="index-0-variable:CMAKE_<LANG>_LINKER_WRAPPER_FLAG"></span><a class="reference internal" href="../variable/CMAKE_LANG_LINKER_WRAPPER_FLAG.html#variable:CMAKE_<LANG>_LINKER_WRAPPER_FLAG" title="CMAKE_<LANG>_LINKER_WRAPPER_FLAG"><code class="xref cmake cmake-variable docutils literal notranslate"><span class="pre">CMAKE_<LANG>_LINKER_WRAPPER_FLAG</span></code></a> and
|
| 125 |
+
<span class="target" id="index-0-variable:CMAKE_<LANG>_LINKER_WRAPPER_FLAG_SEP"></span><a class="reference internal" href="../variable/CMAKE_LANG_LINKER_WRAPPER_FLAG_SEP.html#variable:CMAKE_<LANG>_LINKER_WRAPPER_FLAG_SEP" title="CMAKE_<LANG>_LINKER_WRAPPER_FLAG_SEP"><code class="xref cmake cmake-variable docutils literal notranslate"><span class="pre">CMAKE_<LANG>_LINKER_WRAPPER_FLAG_SEP</span></code></a> variables.</p>
|
| 126 |
+
<p>For example, <code class="docutils literal notranslate"><span class="pre">"LINKER:-z,defs"</span></code> becomes <code class="docutils literal notranslate"><span class="pre">-Xlinker</span> <span class="pre">-z</span> <span class="pre">-Xlinker</span> <span class="pre">defs</span></code> for
|
| 127 |
+
<code class="docutils literal notranslate"><span class="pre">Clang</span></code> and <code class="docutils literal notranslate"><span class="pre">-Wl,-z,defs</span></code> for <code class="docutils literal notranslate"><span class="pre">GNU</span> <span class="pre">GCC</span></code>.</p>
|
| 128 |
+
<p>The <code class="docutils literal notranslate"><span class="pre">LINKER:</span></code> prefix can be specified as part of a <code class="docutils literal notranslate"><span class="pre">SHELL:</span></code> prefix
|
| 129 |
+
expression.</p>
|
| 130 |
+
<p>The <code class="docutils literal notranslate"><span class="pre">LINKER:</span></code> prefix supports, as an alternative syntax, specification of
|
| 131 |
+
arguments using the <code class="docutils literal notranslate"><span class="pre">SHELL:</span></code> prefix and space as separator. The previous
|
| 132 |
+
example then becomes <code class="docutils literal notranslate"><span class="pre">"LINKER:SHELL:-z</span> <span class="pre">defs"</span></code>.</p>
|
| 133 |
+
<div class="admonition note">
|
| 134 |
+
<p class="admonition-title">Note</p>
|
| 135 |
+
<p>Specifying the <code class="docutils literal notranslate"><span class="pre">SHELL:</span></code> prefix anywhere other than at the beginning of the
|
| 136 |
+
<code class="docutils literal notranslate"><span class="pre">LINKER:</span></code> prefix is not supported.</p>
|
| 137 |
+
</div>
|
| 138 |
+
</section>
|
| 139 |
+
<section id="see-also">
|
| 140 |
+
<h2>See Also<a class="headerlink" href="#see-also" title="Permalink to this heading">¶</a></h2>
|
| 141 |
+
<ul class="simple">
|
| 142 |
+
<li><p><span class="target" id="index-1-command:link_libraries"></span><a class="reference internal" href="link_libraries.html#command:link_libraries" title="link_libraries"><code class="xref cmake cmake-command docutils literal notranslate"><span class="pre">link_libraries()</span></code></a></p></li>
|
| 143 |
+
<li><p><span class="target" id="index-1-command:target_link_libraries"></span><a class="reference internal" href="target_link_libraries.html#command:target_link_libraries" title="target_link_libraries"><code class="xref cmake cmake-command docutils literal notranslate"><span class="pre">target_link_libraries()</span></code></a></p></li>
|
| 144 |
+
<li><p><span class="target" id="index-0-command:target_link_options"></span><a class="reference internal" href="target_link_options.html#command:target_link_options" title="target_link_options"><code class="xref cmake cmake-command docutils literal notranslate"><span class="pre">target_link_options()</span></code></a></p></li>
|
| 145 |
+
<li><p><span class="target" id="index-0-variable:CMAKE_<LANG>_FLAGS"></span><a class="reference internal" href="../variable/CMAKE_LANG_FLAGS.html#variable:CMAKE_<LANG>_FLAGS" title="CMAKE_<LANG>_FLAGS"><code class="xref cmake cmake-variable docutils literal notranslate"><span class="pre">CMAKE_<LANG>_FLAGS</span></code></a> and <span class="target" id="index-0-variable:CMAKE_<LANG>_FLAGS_<CONFIG>"></span><a class="reference internal" href="../variable/CMAKE_LANG_FLAGS_CONFIG.html#variable:CMAKE_<LANG>_FLAGS_<CONFIG>" title="CMAKE_<LANG>_FLAGS_<CONFIG>"><code class="xref cmake cmake-variable docutils literal notranslate"><span class="pre">CMAKE_<LANG>_FLAGS_<CONFIG></span></code></a>
|
| 146 |
+
add language-wide flags passed to all invocations of the compiler.
|
| 147 |
+
This includes invocations that drive compiling and those that drive linking.</p></li>
|
| 148 |
+
</ul>
|
| 149 |
+
</section>
|
| 150 |
+
</section>
|
| 151 |
+
|
| 152 |
+
|
| 153 |
+
<div class="clearer"></div>
|
| 154 |
+
</div>
|
| 155 |
+
</div>
|
| 156 |
+
</div>
|
| 157 |
+
<div class="sphinxsidebar" role="navigation" aria-label="main navigation">
|
| 158 |
+
<div class="sphinxsidebarwrapper">
|
| 159 |
+
<div>
|
| 160 |
+
<h3><a href="../index.html">Table of Contents</a></h3>
|
| 161 |
+
<ul>
|
| 162 |
+
<li><a class="reference internal" href="#">add_link_options</a><ul>
|
| 163 |
+
<li><a class="reference internal" href="#host-and-device-specific-link-options">Host And Device Specific Link Options</a></li>
|
| 164 |
+
<li><a class="reference internal" href="#option-de-duplication">Option De-duplication</a></li>
|
| 165 |
+
<li><a class="reference internal" href="#handling-compiler-driver-differences">Handling Compiler Driver Differences</a></li>
|
| 166 |
+
<li><a class="reference internal" href="#see-also">See Also</a></li>
|
| 167 |
+
</ul>
|
| 168 |
+
</li>
|
| 169 |
+
</ul>
|
| 170 |
+
|
| 171 |
+
</div>
|
| 172 |
+
<div>
|
| 173 |
+
<h4>Previous topic</h4>
|
| 174 |
+
<p class="topless"><a href="add_library.html"
|
| 175 |
+
title="previous chapter">add_library</a></p>
|
| 176 |
+
</div>
|
| 177 |
+
<div>
|
| 178 |
+
<h4>Next topic</h4>
|
| 179 |
+
<p class="topless"><a href="add_subdirectory.html"
|
| 180 |
+
title="next chapter">add_subdirectory</a></p>
|
| 181 |
+
</div>
|
| 182 |
+
<div role="note" aria-label="source link">
|
| 183 |
+
<h3>This Page</h3>
|
| 184 |
+
<ul class="this-page-menu">
|
| 185 |
+
<li><a href="../_sources/command/add_link_options.rst.txt"
|
| 186 |
+
rel="nofollow">Show Source</a></li>
|
| 187 |
+
</ul>
|
| 188 |
+
</div>
|
| 189 |
+
<div id="searchbox" style="display: none" role="search">
|
| 190 |
+
<h3 id="searchlabel">Quick search</h3>
|
| 191 |
+
<div class="searchformwrapper">
|
| 192 |
+
<form class="search" action="../search.html" method="get">
|
| 193 |
+
<input type="text" name="q" aria-labelledby="searchlabel" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/>
|
| 194 |
+
<input type="submit" value="Go" />
|
| 195 |
+
</form>
|
| 196 |
+
</div>
|
| 197 |
+
</div>
|
| 198 |
+
<script>document.getElementById('searchbox').style.display = "block"</script>
|
| 199 |
+
</div>
|
| 200 |
+
</div>
|
| 201 |
+
<div class="clearer"></div>
|
| 202 |
+
</div>
|
| 203 |
+
<div class="related" role="navigation" aria-label="related navigation">
|
| 204 |
+
<h3>Navigation</h3>
|
| 205 |
+
<ul>
|
| 206 |
+
<li class="right" style="margin-right: 10px">
|
| 207 |
+
<a href="../genindex.html" title="General Index"
|
| 208 |
+
>index</a></li>
|
| 209 |
+
<li class="right" >
|
| 210 |
+
<a href="add_subdirectory.html" title="add_subdirectory"
|
| 211 |
+
>next</a> |</li>
|
| 212 |
+
<li class="right" >
|
| 213 |
+
<a href="add_library.html" title="add_library"
|
| 214 |
+
>previous</a> |</li>
|
| 215 |
+
<li>
|
| 216 |
+
<img src="../_static/cmake-logo-16.png" alt=""
|
| 217 |
+
style="vertical-align: middle; margin-top: -2px" />
|
| 218 |
+
</li>
|
| 219 |
+
<li>
|
| 220 |
+
<a href="https://cmake.org/">CMake</a> »
|
| 221 |
+
</li>
|
| 222 |
+
<li>
|
| 223 |
+
<a href="../index.html">3.27.9 Documentation</a> »
|
| 224 |
+
</li>
|
| 225 |
+
|
| 226 |
+
<li class="nav-item nav-item-1"><a href="../manual/cmake-commands.7.html" >cmake-commands(7)</a> »</li>
|
| 227 |
+
<li class="nav-item nav-item-this"><a href="">add_link_options</a></li>
|
| 228 |
+
</ul>
|
| 229 |
+
</div>
|
| 230 |
+
|
| 231 |
+
<div class="footer" role="contentinfo">
|
| 232 |
+
© Copyright 2000-2023 Kitware, Inc. and Contributors.
|
| 233 |
+
Created using <a href="https://www.sphinx-doc.org/">Sphinx</a> 5.3.0.
|
| 234 |
+
</div>
|
| 235 |
+
</body>
|
| 236 |
+
</html>
|
toolchain/cmake-3.27.9-linux-x86_64/doc/cmake/html/command/add_subdirectory.html
ADDED
|
@@ -0,0 +1,173 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
|
| 2 |
+
<!DOCTYPE html>
|
| 3 |
+
|
| 4 |
+
<html lang="en">
|
| 5 |
+
<head>
|
| 6 |
+
<meta charset="utf-8" />
|
| 7 |
+
<meta name="viewport" content="width=device-width, initial-scale=1.0" /><meta name="generator" content="Docutils 0.19: https://docutils.sourceforge.io/" />
|
| 8 |
+
|
| 9 |
+
<title>add_subdirectory — CMake 3.27.9 Documentation</title>
|
| 10 |
+
|
| 11 |
+
<link rel="stylesheet" type="text/css" href="../_static/pygments.css" />
|
| 12 |
+
<link rel="stylesheet" type="text/css" href="../_static/cmake.css" />
|
| 13 |
+
|
| 14 |
+
<script data-url_root="../" id="documentation_options" src="../_static/documentation_options.js"></script>
|
| 15 |
+
<script src="../_static/jquery.js"></script>
|
| 16 |
+
<script src="../_static/underscore.js"></script>
|
| 17 |
+
<script src="../_static/_sphinx_javascript_frameworks_compat.js"></script>
|
| 18 |
+
<script src="../_static/doctools.js"></script>
|
| 19 |
+
<script src="../_static/sphinx_highlight.js"></script>
|
| 20 |
+
|
| 21 |
+
<link rel="shortcut icon" href="../_static/cmake-favicon.ico"/>
|
| 22 |
+
<link rel="index" title="Index" href="../genindex.html" />
|
| 23 |
+
<link rel="search" title="Search" href="../search.html" />
|
| 24 |
+
<link rel="next" title="add_test" href="add_test.html" />
|
| 25 |
+
<link rel="prev" title="add_link_options" href="add_link_options.html" />
|
| 26 |
+
|
| 27 |
+
|
| 28 |
+
</head><body>
|
| 29 |
+
|
| 30 |
+
<div class="related" role="navigation" aria-label="related navigation">
|
| 31 |
+
<h3>Navigation</h3>
|
| 32 |
+
<ul>
|
| 33 |
+
<li class="right" style="margin-right: 10px">
|
| 34 |
+
<a href="../genindex.html" title="General Index"
|
| 35 |
+
accesskey="I">index</a></li>
|
| 36 |
+
<li class="right" >
|
| 37 |
+
<a href="add_test.html" title="add_test"
|
| 38 |
+
accesskey="N">next</a> |</li>
|
| 39 |
+
<li class="right" >
|
| 40 |
+
<a href="add_link_options.html" title="add_link_options"
|
| 41 |
+
accesskey="P">previous</a> |</li>
|
| 42 |
+
<li>
|
| 43 |
+
<img src="../_static/cmake-logo-16.png" alt=""
|
| 44 |
+
style="vertical-align: middle; margin-top: -2px" />
|
| 45 |
+
</li>
|
| 46 |
+
<li>
|
| 47 |
+
<a href="https://cmake.org/">CMake</a> »
|
| 48 |
+
</li>
|
| 49 |
+
<li>
|
| 50 |
+
<a href="../index.html">3.27.9 Documentation</a> »
|
| 51 |
+
</li>
|
| 52 |
+
|
| 53 |
+
<li class="nav-item nav-item-1"><a href="../manual/cmake-commands.7.html" accesskey="U">cmake-commands(7)</a> »</li>
|
| 54 |
+
<li class="nav-item nav-item-this"><a href="">add_subdirectory</a></li>
|
| 55 |
+
</ul>
|
| 56 |
+
</div>
|
| 57 |
+
|
| 58 |
+
<div class="document">
|
| 59 |
+
<div class="documentwrapper">
|
| 60 |
+
<div class="bodywrapper">
|
| 61 |
+
<div class="body" role="main">
|
| 62 |
+
|
| 63 |
+
<section id="add-subdirectory">
|
| 64 |
+
<span id="command:add_subdirectory"></span><h1>add_subdirectory<a class="headerlink" href="#add-subdirectory" title="Permalink to this heading">¶</a></h1>
|
| 65 |
+
<p>Add a subdirectory to the build.</p>
|
| 66 |
+
<div class="highlight-cmake notranslate"><div class="highlight"><pre><span></span><span class="nf">add_subdirectory(</span><span class="nb">source_dir</span><span class="w"> </span><span class="p">[</span><span class="nb">binary_dir</span><span class="p">]</span><span class="w"> </span><span class="p">[</span><span class="no">EXCLUDE_FROM_ALL</span><span class="p">]</span><span class="w"> </span><span class="p">[</span><span class="no">SYSTEM</span><span class="p">]</span><span class="nf">)</span>
|
| 67 |
+
</pre></div>
|
| 68 |
+
</div>
|
| 69 |
+
<p>Adds a subdirectory to the build. The <code class="docutils literal notranslate"><span class="pre">source_dir</span></code> specifies the
|
| 70 |
+
directory in which the source <code class="docutils literal notranslate"><span class="pre">CMakeLists.txt</span></code> and code files are
|
| 71 |
+
located. If it is a relative path, it will be evaluated with respect
|
| 72 |
+
to the current directory (the typical usage), but it may also be an
|
| 73 |
+
absolute path. The <code class="docutils literal notranslate"><span class="pre">binary_dir</span></code> specifies the directory in which to
|
| 74 |
+
place the output files. If it is a relative path, it will be evaluated
|
| 75 |
+
with respect to the current output directory, but it may also be an
|
| 76 |
+
absolute path. If <code class="docutils literal notranslate"><span class="pre">binary_dir</span></code> is not specified, the value of
|
| 77 |
+
<code class="docutils literal notranslate"><span class="pre">source_dir</span></code>, before expanding any relative path, will be used (the
|
| 78 |
+
typical usage). The <code class="docutils literal notranslate"><span class="pre">CMakeLists.txt</span></code> file in the specified source
|
| 79 |
+
directory will be processed immediately by CMake before processing in
|
| 80 |
+
the current input file continues beyond this command.</p>
|
| 81 |
+
<p>If the <code class="docutils literal notranslate"><span class="pre">EXCLUDE_FROM_ALL</span></code> argument is provided then targets in the
|
| 82 |
+
subdirectory will not be included in the <code class="docutils literal notranslate"><span class="pre">ALL</span></code> target of the parent
|
| 83 |
+
directory by default, and will be excluded from IDE project files.
|
| 84 |
+
Users must explicitly build targets in the subdirectory. This is
|
| 85 |
+
meant for use when the subdirectory contains a separate part of the
|
| 86 |
+
project that is useful but not necessary, such as a set of examples.
|
| 87 |
+
Typically the subdirectory should contain its own <span class="target" id="index-0-command:project"></span><a class="reference internal" href="project.html#command:project" title="project"><code class="xref cmake cmake-command docutils literal notranslate"><span class="pre">project()</span></code></a>
|
| 88 |
+
command invocation so that a full build system will be generated in the
|
| 89 |
+
subdirectory (such as a Visual Studio IDE solution file). Note that
|
| 90 |
+
inter-target dependencies supersede this exclusion. If a target built by
|
| 91 |
+
the parent project depends on a target in the subdirectory, the dependee
|
| 92 |
+
target will be included in the parent project build system to satisfy
|
| 93 |
+
the dependency.</p>
|
| 94 |
+
<div class="versionadded">
|
| 95 |
+
<p><span class="versionmodified added">New in version 3.25: </span>If the <code class="docutils literal notranslate"><span class="pre">SYSTEM</span></code> argument is provided, the <span class="target" id="index-0-prop_dir:SYSTEM"></span><a class="reference internal" href="../prop_dir/SYSTEM.html#prop_dir:SYSTEM" title="SYSTEM"><code class="xref cmake cmake-prop_dir docutils literal notranslate"><span class="pre">SYSTEM</span></code></a> directory
|
| 96 |
+
property of the subdirectory will be set to true. This property is
|
| 97 |
+
used to initialize the <span class="target" id="index-0-prop_tgt:SYSTEM"></span><a class="reference internal" href="../prop_tgt/SYSTEM.html#prop_tgt:SYSTEM" title="SYSTEM"><code class="xref cmake cmake-prop_tgt docutils literal notranslate"><span class="pre">SYSTEM</span></code></a> property of each non-imported
|
| 98 |
+
target created in that subdirectory.</p>
|
| 99 |
+
</div>
|
| 100 |
+
</section>
|
| 101 |
+
|
| 102 |
+
|
| 103 |
+
<div class="clearer"></div>
|
| 104 |
+
</div>
|
| 105 |
+
</div>
|
| 106 |
+
</div>
|
| 107 |
+
<div class="sphinxsidebar" role="navigation" aria-label="main navigation">
|
| 108 |
+
<div class="sphinxsidebarwrapper">
|
| 109 |
+
<div>
|
| 110 |
+
<h4>Previous topic</h4>
|
| 111 |
+
<p class="topless"><a href="add_link_options.html"
|
| 112 |
+
title="previous chapter">add_link_options</a></p>
|
| 113 |
+
</div>
|
| 114 |
+
<div>
|
| 115 |
+
<h4>Next topic</h4>
|
| 116 |
+
<p class="topless"><a href="add_test.html"
|
| 117 |
+
title="next chapter">add_test</a></p>
|
| 118 |
+
</div>
|
| 119 |
+
<div role="note" aria-label="source link">
|
| 120 |
+
<h3>This Page</h3>
|
| 121 |
+
<ul class="this-page-menu">
|
| 122 |
+
<li><a href="../_sources/command/add_subdirectory.rst.txt"
|
| 123 |
+
rel="nofollow">Show Source</a></li>
|
| 124 |
+
</ul>
|
| 125 |
+
</div>
|
| 126 |
+
<div id="searchbox" style="display: none" role="search">
|
| 127 |
+
<h3 id="searchlabel">Quick search</h3>
|
| 128 |
+
<div class="searchformwrapper">
|
| 129 |
+
<form class="search" action="../search.html" method="get">
|
| 130 |
+
<input type="text" name="q" aria-labelledby="searchlabel" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/>
|
| 131 |
+
<input type="submit" value="Go" />
|
| 132 |
+
</form>
|
| 133 |
+
</div>
|
| 134 |
+
</div>
|
| 135 |
+
<script>document.getElementById('searchbox').style.display = "block"</script>
|
| 136 |
+
</div>
|
| 137 |
+
</div>
|
| 138 |
+
<div class="clearer"></div>
|
| 139 |
+
</div>
|
| 140 |
+
<div class="related" role="navigation" aria-label="related navigation">
|
| 141 |
+
<h3>Navigation</h3>
|
| 142 |
+
<ul>
|
| 143 |
+
<li class="right" style="margin-right: 10px">
|
| 144 |
+
<a href="../genindex.html" title="General Index"
|
| 145 |
+
>index</a></li>
|
| 146 |
+
<li class="right" >
|
| 147 |
+
<a href="add_test.html" title="add_test"
|
| 148 |
+
>next</a> |</li>
|
| 149 |
+
<li class="right" >
|
| 150 |
+
<a href="add_link_options.html" title="add_link_options"
|
| 151 |
+
>previous</a> |</li>
|
| 152 |
+
<li>
|
| 153 |
+
<img src="../_static/cmake-logo-16.png" alt=""
|
| 154 |
+
style="vertical-align: middle; margin-top: -2px" />
|
| 155 |
+
</li>
|
| 156 |
+
<li>
|
| 157 |
+
<a href="https://cmake.org/">CMake</a> »
|
| 158 |
+
</li>
|
| 159 |
+
<li>
|
| 160 |
+
<a href="../index.html">3.27.9 Documentation</a> »
|
| 161 |
+
</li>
|
| 162 |
+
|
| 163 |
+
<li class="nav-item nav-item-1"><a href="../manual/cmake-commands.7.html" >cmake-commands(7)</a> »</li>
|
| 164 |
+
<li class="nav-item nav-item-this"><a href="">add_subdirectory</a></li>
|
| 165 |
+
</ul>
|
| 166 |
+
</div>
|
| 167 |
+
|
| 168 |
+
<div class="footer" role="contentinfo">
|
| 169 |
+
© Copyright 2000-2023 Kitware, Inc. and Contributors.
|
| 170 |
+
Created using <a href="https://www.sphinx-doc.org/">Sphinx</a> 5.3.0.
|
| 171 |
+
</div>
|
| 172 |
+
</body>
|
| 173 |
+
</html>
|
toolchain/cmake-3.27.9-linux-x86_64/doc/cmake/html/command/add_test.html
ADDED
|
@@ -0,0 +1,208 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
|
| 2 |
+
<!DOCTYPE html>
|
| 3 |
+
|
| 4 |
+
<html lang="en">
|
| 5 |
+
<head>
|
| 6 |
+
<meta charset="utf-8" />
|
| 7 |
+
<meta name="viewport" content="width=device-width, initial-scale=1.0" /><meta name="generator" content="Docutils 0.19: https://docutils.sourceforge.io/" />
|
| 8 |
+
|
| 9 |
+
<title>add_test — CMake 3.27.9 Documentation</title>
|
| 10 |
+
|
| 11 |
+
<link rel="stylesheet" type="text/css" href="../_static/pygments.css" />
|
| 12 |
+
<link rel="stylesheet" type="text/css" href="../_static/cmake.css" />
|
| 13 |
+
|
| 14 |
+
<script data-url_root="../" id="documentation_options" src="../_static/documentation_options.js"></script>
|
| 15 |
+
<script src="../_static/jquery.js"></script>
|
| 16 |
+
<script src="../_static/underscore.js"></script>
|
| 17 |
+
<script src="../_static/_sphinx_javascript_frameworks_compat.js"></script>
|
| 18 |
+
<script src="../_static/doctools.js"></script>
|
| 19 |
+
<script src="../_static/sphinx_highlight.js"></script>
|
| 20 |
+
|
| 21 |
+
<link rel="shortcut icon" href="../_static/cmake-favicon.ico"/>
|
| 22 |
+
<link rel="index" title="Index" href="../genindex.html" />
|
| 23 |
+
<link rel="search" title="Search" href="../search.html" />
|
| 24 |
+
<link rel="next" title="aux_source_directory" href="aux_source_directory.html" />
|
| 25 |
+
<link rel="prev" title="add_subdirectory" href="add_subdirectory.html" />
|
| 26 |
+
|
| 27 |
+
|
| 28 |
+
</head><body>
|
| 29 |
+
|
| 30 |
+
<div class="related" role="navigation" aria-label="related navigation">
|
| 31 |
+
<h3>Navigation</h3>
|
| 32 |
+
<ul>
|
| 33 |
+
<li class="right" style="margin-right: 10px">
|
| 34 |
+
<a href="../genindex.html" title="General Index"
|
| 35 |
+
accesskey="I">index</a></li>
|
| 36 |
+
<li class="right" >
|
| 37 |
+
<a href="aux_source_directory.html" title="aux_source_directory"
|
| 38 |
+
accesskey="N">next</a> |</li>
|
| 39 |
+
<li class="right" >
|
| 40 |
+
<a href="add_subdirectory.html" title="add_subdirectory"
|
| 41 |
+
accesskey="P">previous</a> |</li>
|
| 42 |
+
<li>
|
| 43 |
+
<img src="../_static/cmake-logo-16.png" alt=""
|
| 44 |
+
style="vertical-align: middle; margin-top: -2px" />
|
| 45 |
+
</li>
|
| 46 |
+
<li>
|
| 47 |
+
<a href="https://cmake.org/">CMake</a> »
|
| 48 |
+
</li>
|
| 49 |
+
<li>
|
| 50 |
+
<a href="../index.html">3.27.9 Documentation</a> »
|
| 51 |
+
</li>
|
| 52 |
+
|
| 53 |
+
<li class="nav-item nav-item-1"><a href="../manual/cmake-commands.7.html" accesskey="U">cmake-commands(7)</a> »</li>
|
| 54 |
+
<li class="nav-item nav-item-this"><a href="">add_test</a></li>
|
| 55 |
+
</ul>
|
| 56 |
+
</div>
|
| 57 |
+
|
| 58 |
+
<div class="document">
|
| 59 |
+
<div class="documentwrapper">
|
| 60 |
+
<div class="bodywrapper">
|
| 61 |
+
<div class="body" role="main">
|
| 62 |
+
|
| 63 |
+
<section id="add-test">
|
| 64 |
+
<span id="command:add_test"></span><h1>add_test<a class="headerlink" href="#add-test" title="Permalink to this heading">¶</a></h1>
|
| 65 |
+
<p>Add a test to the project to be run by <span class="target" id="index-0-manual:ctest(1)"></span><a class="reference internal" href="../manual/ctest.1.html#manual:ctest(1)" title="ctest(1)"><code class="xref cmake cmake-manual docutils literal notranslate"><span class="pre">ctest(1)</span></code></a>.</p>
|
| 66 |
+
<div class="highlight-cmake notranslate"><div class="highlight"><pre><span></span><span class="nf">add_test(</span><span class="no">NAME</span><span class="w"> </span><span class="nv"><name></span><span class="w"> </span><span class="no">COMMAND</span><span class="w"> </span><span class="nv"><command></span><span class="w"> </span><span class="p">[</span><span class="nv"><arg>...</span><span class="p">]</span>
|
| 67 |
+
<span class="w"> </span><span class="p">[</span><span class="no">CONFIGURATIONS</span><span class="w"> </span><span class="nv"><config>...</span><span class="p">]</span>
|
| 68 |
+
<span class="w"> </span><span class="p">[</span><span class="no">WORKING_DIRECTORY</span><span class="w"> </span><span class="nv"><dir></span><span class="p">]</span>
|
| 69 |
+
<span class="w"> </span><span class="p">[</span><span class="no">COMMAND_EXPAND_LISTS</span><span class="p">]</span><span class="nf">)</span>
|
| 70 |
+
</pre></div>
|
| 71 |
+
</div>
|
| 72 |
+
<p>Adds a test called <code class="docutils literal notranslate"><span class="pre"><name></span></code>. The test name may contain arbitrary
|
| 73 |
+
characters, expressed as a <a class="reference internal" href="../manual/cmake-language.7.html#quoted-argument"><span class="std std-ref">Quoted Argument</span></a> or <a class="reference internal" href="../manual/cmake-language.7.html#bracket-argument"><span class="std std-ref">Bracket Argument</span></a>
|
| 74 |
+
if necessary. See policy <span class="target" id="index-0-policy:CMP0110"></span><a class="reference internal" href="../policy/CMP0110.html#policy:CMP0110" title="CMP0110"><code class="xref cmake cmake-policy docutils literal notranslate"><span class="pre">CMP0110</span></code></a>.</p>
|
| 75 |
+
<p>CMake only generates tests if the <span class="target" id="index-0-command:enable_testing"></span><a class="reference internal" href="enable_testing.html#command:enable_testing" title="enable_testing"><code class="xref cmake cmake-command docutils literal notranslate"><span class="pre">enable_testing()</span></code></a> command has been
|
| 76 |
+
invoked. The <span class="target" id="index-0-module:CTest"></span><a class="reference internal" href="../module/CTest.html#module:CTest" title="CTest"><code class="xref cmake cmake-module docutils literal notranslate"><span class="pre">CTest</span></code></a> module invokes <code class="docutils literal notranslate"><span class="pre">enable_testing</span></code> automatically
|
| 77 |
+
unless <code class="docutils literal notranslate"><span class="pre">BUILD_TESTING</span></code> is set to <code class="docutils literal notranslate"><span class="pre">OFF</span></code>.</p>
|
| 78 |
+
<p>Tests added with the <code class="docutils literal notranslate"><span class="pre">add_test(NAME)</span></code> signature support using
|
| 79 |
+
<span class="target" id="index-0-manual:cmake-generator-expressions(7)"></span><a class="reference internal" href="../manual/cmake-generator-expressions.7.html#manual:cmake-generator-expressions(7)" title="cmake-generator-expressions(7)"><code class="xref cmake cmake-manual docutils literal notranslate"><span class="pre">generator</span> <span class="pre">expressions</span></code></a>
|
| 80 |
+
in test properties set by <span class="target" id="index-0-command:set_property"></span><a class="reference internal" href="set_property.html#command:set_property" title="set_property(test)"><code class="xref cmake cmake-command docutils literal notranslate"><span class="pre">set_property(TEST)</span></code></a> or
|
| 81 |
+
<span class="target" id="index-0-command:set_tests_properties"></span><a class="reference internal" href="set_tests_properties.html#command:set_tests_properties" title="set_tests_properties"><code class="xref cmake cmake-command docutils literal notranslate"><span class="pre">set_tests_properties()</span></code></a>. Test properties may only be set in the
|
| 82 |
+
directory the test is created in.</p>
|
| 83 |
+
<p><code class="docutils literal notranslate"><span class="pre">add_test</span></code> options are:</p>
|
| 84 |
+
<dl>
|
| 85 |
+
<dt><code class="docutils literal notranslate"><span class="pre">COMMAND</span></code></dt><dd><p>Specify the test command-line. If <code class="docutils literal notranslate"><span class="pre"><command></span></code> specifies an executable
|
| 86 |
+
target created by <span class="target" id="index-0-command:add_executable"></span><a class="reference internal" href="add_executable.html#command:add_executable" title="add_executable"><code class="xref cmake cmake-command docutils literal notranslate"><span class="pre">add_executable()</span></code></a>, it will automatically be
|
| 87 |
+
replaced by the location of the executable created at build time.</p>
|
| 88 |
+
<p>The command may be specified using
|
| 89 |
+
<span class="target" id="index-1-manual:cmake-generator-expressions(7)"></span><a class="reference internal" href="../manual/cmake-generator-expressions.7.html#manual:cmake-generator-expressions(7)" title="cmake-generator-expressions(7)"><code class="xref cmake cmake-manual docutils literal notranslate"><span class="pre">generator</span> <span class="pre">expressions</span></code></a>.</p>
|
| 90 |
+
</dd>
|
| 91 |
+
<dt><code class="docutils literal notranslate"><span class="pre">CONFIGURATIONS</span></code></dt><dd><p>Restrict execution of the test only to the named configurations.</p>
|
| 92 |
+
</dd>
|
| 93 |
+
<dt><code class="docutils literal notranslate"><span class="pre">WORKING_DIRECTORY</span></code></dt><dd><p>Set the test property <span class="target" id="index-0-prop_test:WORKING_DIRECTORY"></span><a class="reference internal" href="../prop_test/WORKING_DIRECTORY.html#prop_test:WORKING_DIRECTORY" title="WORKING_DIRECTORY"><code class="xref cmake cmake-prop_test docutils literal notranslate"><span class="pre">WORKING_DIRECTORY</span></code></a> in which to execute the
|
| 94 |
+
test. If not specified, the test will be run in
|
| 95 |
+
<span class="target" id="index-0-variable:CMAKE_CURRENT_BINARY_DIR"></span><a class="reference internal" href="../variable/CMAKE_CURRENT_BINARY_DIR.html#variable:CMAKE_CURRENT_BINARY_DIR" title="CMAKE_CURRENT_BINARY_DIR"><code class="xref cmake cmake-variable docutils literal notranslate"><span class="pre">CMAKE_CURRENT_BINARY_DIR</span></code></a>. The working directory may be specified
|
| 96 |
+
using <span class="target" id="index-2-manual:cmake-generator-expressions(7)"></span><a class="reference internal" href="../manual/cmake-generator-expressions.7.html#manual:cmake-generator-expressions(7)" title="cmake-generator-expressions(7)"><code class="xref cmake cmake-manual docutils literal notranslate"><span class="pre">generator</span> <span class="pre">expressions</span></code></a>.</p>
|
| 97 |
+
</dd>
|
| 98 |
+
<dt><code class="docutils literal notranslate"><span class="pre">COMMAND_EXPAND_LISTS</span></code></dt><dd><div class="versionadded">
|
| 99 |
+
<p><span class="versionmodified added">New in version 3.16.</span></p>
|
| 100 |
+
</div>
|
| 101 |
+
<p>Lists in <code class="docutils literal notranslate"><span class="pre">COMMAND</span></code> arguments will be expanded, including those created with
|
| 102 |
+
<span class="target" id="index-3-manual:cmake-generator-expressions(7)"></span><a class="reference internal" href="../manual/cmake-generator-expressions.7.html#manual:cmake-generator-expressions(7)" title="cmake-generator-expressions(7)"><code class="xref cmake cmake-manual docutils literal notranslate"><span class="pre">generator</span> <span class="pre">expressions</span></code></a>.</p>
|
| 103 |
+
</dd>
|
| 104 |
+
</dl>
|
| 105 |
+
<p>If the test command exits with code <code class="docutils literal notranslate"><span class="pre">0</span></code> the test passes. Non-zero exit code
|
| 106 |
+
is a "failed" test. The test property <span class="target" id="index-0-prop_test:WILL_FAIL"></span><a class="reference internal" href="../prop_test/WILL_FAIL.html#prop_test:WILL_FAIL" title="WILL_FAIL"><code class="xref cmake cmake-prop_test docutils literal notranslate"><span class="pre">WILL_FAIL</span></code></a> inverts this
|
| 107 |
+
logic. Note that system-level test failures such as segmentation faults or
|
| 108 |
+
heap errors will still fail the test even if <code class="docutils literal notranslate"><span class="pre">WILL_FALL</span></code> is true. Output
|
| 109 |
+
written to stdout or stderr is captured by <span class="target" id="index-1-manual:ctest(1)"></span><a class="reference internal" href="../manual/ctest.1.html#manual:ctest(1)" title="ctest(1)"><code class="xref cmake cmake-manual docutils literal notranslate"><span class="pre">ctest(1)</span></code></a> and only
|
| 110 |
+
affects the pass/fail status via the <span class="target" id="index-0-prop_test:PASS_REGULAR_EXPRESSION"></span><a class="reference internal" href="../prop_test/PASS_REGULAR_EXPRESSION.html#prop_test:PASS_REGULAR_EXPRESSION" title="PASS_REGULAR_EXPRESSION"><code class="xref cmake cmake-prop_test docutils literal notranslate"><span class="pre">PASS_REGULAR_EXPRESSION</span></code></a>,
|
| 111 |
+
<span class="target" id="index-0-prop_test:FAIL_REGULAR_EXPRESSION"></span><a class="reference internal" href="../prop_test/FAIL_REGULAR_EXPRESSION.html#prop_test:FAIL_REGULAR_EXPRESSION" title="FAIL_REGULAR_EXPRESSION"><code class="xref cmake cmake-prop_test docutils literal notranslate"><span class="pre">FAIL_REGULAR_EXPRESSION</span></code></a>, or <span class="target" id="index-0-prop_test:SKIP_REGULAR_EXPRESSION"></span><a class="reference internal" href="../prop_test/SKIP_REGULAR_EXPRESSION.html#prop_test:SKIP_REGULAR_EXPRESSION" title="SKIP_REGULAR_EXPRESSION"><code class="xref cmake cmake-prop_test docutils literal notranslate"><span class="pre">SKIP_REGULAR_EXPRESSION</span></code></a>
|
| 112 |
+
test properties.</p>
|
| 113 |
+
<div class="versionadded">
|
| 114 |
+
<p><span class="versionmodified added">New in version 3.16: </span>Added <span class="target" id="index-1-prop_test:SKIP_REGULAR_EXPRESSION"></span><a class="reference internal" href="../prop_test/SKIP_REGULAR_EXPRESSION.html#prop_test:SKIP_REGULAR_EXPRESSION" title="SKIP_REGULAR_EXPRESSION"><code class="xref cmake cmake-prop_test docutils literal notranslate"><span class="pre">SKIP_REGULAR_EXPRESSION</span></code></a> property.</p>
|
| 115 |
+
</div>
|
| 116 |
+
<p>Example usage:</p>
|
| 117 |
+
<div class="highlight-cmake notranslate"><div class="highlight"><pre><span></span><span class="nf">add_test(</span><span class="no">NAME</span><span class="w"> </span><span class="nb">mytest</span>
|
| 118 |
+
<span class="w"> </span><span class="no">COMMAND</span><span class="w"> </span><span class="nb">testDriver</span><span class="w"> </span><span class="p">--</span><span class="nb">config</span><span class="w"> </span><span class="o">$<</span><span class="no">CONFIG</span><span class="o">></span>
|
| 119 |
+
<span class="w"> </span><span class="p">--</span><span class="nb">exe</span><span class="w"> </span><span class="o">$<</span><span class="no">TARGET_FILE</span><span class="o">:</span><span class="nb">myexe</span><span class="o">></span><span class="nf">)</span>
|
| 120 |
+
</pre></div>
|
| 121 |
+
</div>
|
| 122 |
+
<p>This creates a test <code class="docutils literal notranslate"><span class="pre">mytest</span></code> whose command runs a <code class="docutils literal notranslate"><span class="pre">testDriver</span></code> tool
|
| 123 |
+
passing the configuration name and the full path to the executable
|
| 124 |
+
file produced by target <code class="docutils literal notranslate"><span class="pre">myexe</span></code>.</p>
|
| 125 |
+
<hr class="docutils" />
|
| 126 |
+
<p>The command syntax above is recommended over the older, less flexible form:</p>
|
| 127 |
+
<div class="highlight-cmake notranslate"><div class="highlight"><pre><span></span><span class="nf">add_test(</span><span class="nv"><name></span><span class="w"> </span><span class="nv"><command></span><span class="w"> </span><span class="p">[</span><span class="nv"><arg>...</span><span class="p">]</span><span class="nf">)</span>
|
| 128 |
+
</pre></div>
|
| 129 |
+
</div>
|
| 130 |
+
<p>Add a test called <code class="docutils literal notranslate"><span class="pre"><name></span></code> with the given command-line.</p>
|
| 131 |
+
<p>Unlike the above <code class="docutils literal notranslate"><span class="pre">NAME</span></code> signature, target names are not supported
|
| 132 |
+
in the command-line. Furthermore, tests added with this signature do not
|
| 133 |
+
support <span class="target" id="index-4-manual:cmake-generator-expressions(7)"></span><a class="reference internal" href="../manual/cmake-generator-expressions.7.html#manual:cmake-generator-expressions(7)" title="cmake-generator-expressions(7)"><code class="xref cmake cmake-manual docutils literal notranslate"><span class="pre">generator</span> <span class="pre">expressions</span></code></a>
|
| 134 |
+
in the command-line or test properties.</p>
|
| 135 |
+
</section>
|
| 136 |
+
|
| 137 |
+
|
| 138 |
+
<div class="clearer"></div>
|
| 139 |
+
</div>
|
| 140 |
+
</div>
|
| 141 |
+
</div>
|
| 142 |
+
<div class="sphinxsidebar" role="navigation" aria-label="main navigation">
|
| 143 |
+
<div class="sphinxsidebarwrapper">
|
| 144 |
+
<div>
|
| 145 |
+
<h4>Previous topic</h4>
|
| 146 |
+
<p class="topless"><a href="add_subdirectory.html"
|
| 147 |
+
title="previous chapter">add_subdirectory</a></p>
|
| 148 |
+
</div>
|
| 149 |
+
<div>
|
| 150 |
+
<h4>Next topic</h4>
|
| 151 |
+
<p class="topless"><a href="aux_source_directory.html"
|
| 152 |
+
title="next chapter">aux_source_directory</a></p>
|
| 153 |
+
</div>
|
| 154 |
+
<div role="note" aria-label="source link">
|
| 155 |
+
<h3>This Page</h3>
|
| 156 |
+
<ul class="this-page-menu">
|
| 157 |
+
<li><a href="../_sources/command/add_test.rst.txt"
|
| 158 |
+
rel="nofollow">Show Source</a></li>
|
| 159 |
+
</ul>
|
| 160 |
+
</div>
|
| 161 |
+
<div id="searchbox" style="display: none" role="search">
|
| 162 |
+
<h3 id="searchlabel">Quick search</h3>
|
| 163 |
+
<div class="searchformwrapper">
|
| 164 |
+
<form class="search" action="../search.html" method="get">
|
| 165 |
+
<input type="text" name="q" aria-labelledby="searchlabel" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/>
|
| 166 |
+
<input type="submit" value="Go" />
|
| 167 |
+
</form>
|
| 168 |
+
</div>
|
| 169 |
+
</div>
|
| 170 |
+
<script>document.getElementById('searchbox').style.display = "block"</script>
|
| 171 |
+
</div>
|
| 172 |
+
</div>
|
| 173 |
+
<div class="clearer"></div>
|
| 174 |
+
</div>
|
| 175 |
+
<div class="related" role="navigation" aria-label="related navigation">
|
| 176 |
+
<h3>Navigation</h3>
|
| 177 |
+
<ul>
|
| 178 |
+
<li class="right" style="margin-right: 10px">
|
| 179 |
+
<a href="../genindex.html" title="General Index"
|
| 180 |
+
>index</a></li>
|
| 181 |
+
<li class="right" >
|
| 182 |
+
<a href="aux_source_directory.html" title="aux_source_directory"
|
| 183 |
+
>next</a> |</li>
|
| 184 |
+
<li class="right" >
|
| 185 |
+
<a href="add_subdirectory.html" title="add_subdirectory"
|
| 186 |
+
>previous</a> |</li>
|
| 187 |
+
<li>
|
| 188 |
+
<img src="../_static/cmake-logo-16.png" alt=""
|
| 189 |
+
style="vertical-align: middle; margin-top: -2px" />
|
| 190 |
+
</li>
|
| 191 |
+
<li>
|
| 192 |
+
<a href="https://cmake.org/">CMake</a> »
|
| 193 |
+
</li>
|
| 194 |
+
<li>
|
| 195 |
+
<a href="../index.html">3.27.9 Documentation</a> »
|
| 196 |
+
</li>
|
| 197 |
+
|
| 198 |
+
<li class="nav-item nav-item-1"><a href="../manual/cmake-commands.7.html" >cmake-commands(7)</a> »</li>
|
| 199 |
+
<li class="nav-item nav-item-this"><a href="">add_test</a></li>
|
| 200 |
+
</ul>
|
| 201 |
+
</div>
|
| 202 |
+
|
| 203 |
+
<div class="footer" role="contentinfo">
|
| 204 |
+
© Copyright 2000-2023 Kitware, Inc. and Contributors.
|
| 205 |
+
Created using <a href="https://www.sphinx-doc.org/">Sphinx</a> 5.3.0.
|
| 206 |
+
</div>
|
| 207 |
+
</body>
|
| 208 |
+
</html>
|
toolchain/cmake-3.27.9-linux-x86_64/doc/cmake/html/command/aux_source_directory.html
ADDED
|
@@ -0,0 +1,156 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
|
| 2 |
+
<!DOCTYPE html>
|
| 3 |
+
|
| 4 |
+
<html lang="en">
|
| 5 |
+
<head>
|
| 6 |
+
<meta charset="utf-8" />
|
| 7 |
+
<meta name="viewport" content="width=device-width, initial-scale=1.0" /><meta name="generator" content="Docutils 0.19: https://docutils.sourceforge.io/" />
|
| 8 |
+
|
| 9 |
+
<title>aux_source_directory — CMake 3.27.9 Documentation</title>
|
| 10 |
+
|
| 11 |
+
<link rel="stylesheet" type="text/css" href="../_static/pygments.css" />
|
| 12 |
+
<link rel="stylesheet" type="text/css" href="../_static/cmake.css" />
|
| 13 |
+
|
| 14 |
+
<script data-url_root="../" id="documentation_options" src="../_static/documentation_options.js"></script>
|
| 15 |
+
<script src="../_static/jquery.js"></script>
|
| 16 |
+
<script src="../_static/underscore.js"></script>
|
| 17 |
+
<script src="../_static/_sphinx_javascript_frameworks_compat.js"></script>
|
| 18 |
+
<script src="../_static/doctools.js"></script>
|
| 19 |
+
<script src="../_static/sphinx_highlight.js"></script>
|
| 20 |
+
|
| 21 |
+
<link rel="shortcut icon" href="../_static/cmake-favicon.ico"/>
|
| 22 |
+
<link rel="index" title="Index" href="../genindex.html" />
|
| 23 |
+
<link rel="search" title="Search" href="../search.html" />
|
| 24 |
+
<link rel="next" title="build_command" href="build_command.html" />
|
| 25 |
+
<link rel="prev" title="add_test" href="add_test.html" />
|
| 26 |
+
|
| 27 |
+
|
| 28 |
+
</head><body>
|
| 29 |
+
|
| 30 |
+
<div class="related" role="navigation" aria-label="related navigation">
|
| 31 |
+
<h3>Navigation</h3>
|
| 32 |
+
<ul>
|
| 33 |
+
<li class="right" style="margin-right: 10px">
|
| 34 |
+
<a href="../genindex.html" title="General Index"
|
| 35 |
+
accesskey="I">index</a></li>
|
| 36 |
+
<li class="right" >
|
| 37 |
+
<a href="build_command.html" title="build_command"
|
| 38 |
+
accesskey="N">next</a> |</li>
|
| 39 |
+
<li class="right" >
|
| 40 |
+
<a href="add_test.html" title="add_test"
|
| 41 |
+
accesskey="P">previous</a> |</li>
|
| 42 |
+
<li>
|
| 43 |
+
<img src="../_static/cmake-logo-16.png" alt=""
|
| 44 |
+
style="vertical-align: middle; margin-top: -2px" />
|
| 45 |
+
</li>
|
| 46 |
+
<li>
|
| 47 |
+
<a href="https://cmake.org/">CMake</a> »
|
| 48 |
+
</li>
|
| 49 |
+
<li>
|
| 50 |
+
<a href="../index.html">3.27.9 Documentation</a> »
|
| 51 |
+
</li>
|
| 52 |
+
|
| 53 |
+
<li class="nav-item nav-item-1"><a href="../manual/cmake-commands.7.html" accesskey="U">cmake-commands(7)</a> »</li>
|
| 54 |
+
<li class="nav-item nav-item-this"><a href="">aux_source_directory</a></li>
|
| 55 |
+
</ul>
|
| 56 |
+
</div>
|
| 57 |
+
|
| 58 |
+
<div class="document">
|
| 59 |
+
<div class="documentwrapper">
|
| 60 |
+
<div class="bodywrapper">
|
| 61 |
+
<div class="body" role="main">
|
| 62 |
+
|
| 63 |
+
<section id="aux-source-directory">
|
| 64 |
+
<span id="command:aux_source_directory"></span><h1>aux_source_directory<a class="headerlink" href="#aux-source-directory" title="Permalink to this heading">¶</a></h1>
|
| 65 |
+
<p>Find all source files in a directory.</p>
|
| 66 |
+
<div class="highlight-cmake notranslate"><div class="highlight"><pre><span></span><span class="nf">aux_source_directory(</span><span class="nv"><dir></span><span class="w"> </span><span class="nv"><variable></span><span class="nf">)</span>
|
| 67 |
+
</pre></div>
|
| 68 |
+
</div>
|
| 69 |
+
<p>Collects the names of all the source files in the specified directory
|
| 70 |
+
and stores the list in the <code class="docutils literal notranslate"><span class="pre"><variable></span></code> provided. This command is
|
| 71 |
+
intended to be used by projects that use explicit template
|
| 72 |
+
instantiation. Template instantiation files can be stored in a
|
| 73 |
+
<code class="docutils literal notranslate"><span class="pre">Templates</span></code> subdirectory and collected automatically using this
|
| 74 |
+
command to avoid manually listing all instantiations.</p>
|
| 75 |
+
<p>It is tempting to use this command to avoid writing the list of source
|
| 76 |
+
files for a library or executable target. While this seems to work,
|
| 77 |
+
there is no way for CMake to generate a build system that knows when a
|
| 78 |
+
new source file has been added. Normally the generated build system
|
| 79 |
+
knows when it needs to rerun CMake because the <code class="docutils literal notranslate"><span class="pre">CMakeLists.txt</span></code> file is
|
| 80 |
+
modified to add a new source. When the source is just added to the
|
| 81 |
+
directory without modifying this file, one would have to manually
|
| 82 |
+
rerun CMake to generate a build system incorporating the new file.</p>
|
| 83 |
+
</section>
|
| 84 |
+
|
| 85 |
+
|
| 86 |
+
<div class="clearer"></div>
|
| 87 |
+
</div>
|
| 88 |
+
</div>
|
| 89 |
+
</div>
|
| 90 |
+
<div class="sphinxsidebar" role="navigation" aria-label="main navigation">
|
| 91 |
+
<div class="sphinxsidebarwrapper">
|
| 92 |
+
<div>
|
| 93 |
+
<h4>Previous topic</h4>
|
| 94 |
+
<p class="topless"><a href="add_test.html"
|
| 95 |
+
title="previous chapter">add_test</a></p>
|
| 96 |
+
</div>
|
| 97 |
+
<div>
|
| 98 |
+
<h4>Next topic</h4>
|
| 99 |
+
<p class="topless"><a href="build_command.html"
|
| 100 |
+
title="next chapter">build_command</a></p>
|
| 101 |
+
</div>
|
| 102 |
+
<div role="note" aria-label="source link">
|
| 103 |
+
<h3>This Page</h3>
|
| 104 |
+
<ul class="this-page-menu">
|
| 105 |
+
<li><a href="../_sources/command/aux_source_directory.rst.txt"
|
| 106 |
+
rel="nofollow">Show Source</a></li>
|
| 107 |
+
</ul>
|
| 108 |
+
</div>
|
| 109 |
+
<div id="searchbox" style="display: none" role="search">
|
| 110 |
+
<h3 id="searchlabel">Quick search</h3>
|
| 111 |
+
<div class="searchformwrapper">
|
| 112 |
+
<form class="search" action="../search.html" method="get">
|
| 113 |
+
<input type="text" name="q" aria-labelledby="searchlabel" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/>
|
| 114 |
+
<input type="submit" value="Go" />
|
| 115 |
+
</form>
|
| 116 |
+
</div>
|
| 117 |
+
</div>
|
| 118 |
+
<script>document.getElementById('searchbox').style.display = "block"</script>
|
| 119 |
+
</div>
|
| 120 |
+
</div>
|
| 121 |
+
<div class="clearer"></div>
|
| 122 |
+
</div>
|
| 123 |
+
<div class="related" role="navigation" aria-label="related navigation">
|
| 124 |
+
<h3>Navigation</h3>
|
| 125 |
+
<ul>
|
| 126 |
+
<li class="right" style="margin-right: 10px">
|
| 127 |
+
<a href="../genindex.html" title="General Index"
|
| 128 |
+
>index</a></li>
|
| 129 |
+
<li class="right" >
|
| 130 |
+
<a href="build_command.html" title="build_command"
|
| 131 |
+
>next</a> |</li>
|
| 132 |
+
<li class="right" >
|
| 133 |
+
<a href="add_test.html" title="add_test"
|
| 134 |
+
>previous</a> |</li>
|
| 135 |
+
<li>
|
| 136 |
+
<img src="../_static/cmake-logo-16.png" alt=""
|
| 137 |
+
style="vertical-align: middle; margin-top: -2px" />
|
| 138 |
+
</li>
|
| 139 |
+
<li>
|
| 140 |
+
<a href="https://cmake.org/">CMake</a> »
|
| 141 |
+
</li>
|
| 142 |
+
<li>
|
| 143 |
+
<a href="../index.html">3.27.9 Documentation</a> »
|
| 144 |
+
</li>
|
| 145 |
+
|
| 146 |
+
<li class="nav-item nav-item-1"><a href="../manual/cmake-commands.7.html" >cmake-commands(7)</a> »</li>
|
| 147 |
+
<li class="nav-item nav-item-this"><a href="">aux_source_directory</a></li>
|
| 148 |
+
</ul>
|
| 149 |
+
</div>
|
| 150 |
+
|
| 151 |
+
<div class="footer" role="contentinfo">
|
| 152 |
+
© Copyright 2000-2023 Kitware, Inc. and Contributors.
|
| 153 |
+
Created using <a href="https://www.sphinx-doc.org/">Sphinx</a> 5.3.0.
|
| 154 |
+
</div>
|
| 155 |
+
</body>
|
| 156 |
+
</html>
|
toolchain/cmake-3.27.9-linux-x86_64/doc/cmake/html/command/block.html
ADDED
|
@@ -0,0 +1,214 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
|
| 2 |
+
<!DOCTYPE html>
|
| 3 |
+
|
| 4 |
+
<html lang="en">
|
| 5 |
+
<head>
|
| 6 |
+
<meta charset="utf-8" />
|
| 7 |
+
<meta name="viewport" content="width=device-width, initial-scale=1.0" /><meta name="generator" content="Docutils 0.19: https://docutils.sourceforge.io/" />
|
| 8 |
+
|
| 9 |
+
<title>block — CMake 3.27.9 Documentation</title>
|
| 10 |
+
|
| 11 |
+
<link rel="stylesheet" type="text/css" href="../_static/pygments.css" />
|
| 12 |
+
<link rel="stylesheet" type="text/css" href="../_static/cmake.css" />
|
| 13 |
+
|
| 14 |
+
<script data-url_root="../" id="documentation_options" src="../_static/documentation_options.js"></script>
|
| 15 |
+
<script src="../_static/jquery.js"></script>
|
| 16 |
+
<script src="../_static/underscore.js"></script>
|
| 17 |
+
<script src="../_static/_sphinx_javascript_frameworks_compat.js"></script>
|
| 18 |
+
<script src="../_static/doctools.js"></script>
|
| 19 |
+
<script src="../_static/sphinx_highlight.js"></script>
|
| 20 |
+
|
| 21 |
+
<link rel="shortcut icon" href="../_static/cmake-favicon.ico"/>
|
| 22 |
+
<link rel="index" title="Index" href="../genindex.html" />
|
| 23 |
+
<link rel="search" title="Search" href="../search.html" />
|
| 24 |
+
<link rel="next" title="break" href="break.html" />
|
| 25 |
+
<link rel="prev" title="cmake-commands(7)" href="../manual/cmake-commands.7.html" />
|
| 26 |
+
|
| 27 |
+
|
| 28 |
+
</head><body>
|
| 29 |
+
|
| 30 |
+
<div class="related" role="navigation" aria-label="related navigation">
|
| 31 |
+
<h3>Navigation</h3>
|
| 32 |
+
<ul>
|
| 33 |
+
<li class="right" style="margin-right: 10px">
|
| 34 |
+
<a href="../genindex.html" title="General Index"
|
| 35 |
+
accesskey="I">index</a></li>
|
| 36 |
+
<li class="right" >
|
| 37 |
+
<a href="break.html" title="break"
|
| 38 |
+
accesskey="N">next</a> |</li>
|
| 39 |
+
<li class="right" >
|
| 40 |
+
<a href="../manual/cmake-commands.7.html" title="cmake-commands(7)"
|
| 41 |
+
accesskey="P">previous</a> |</li>
|
| 42 |
+
<li>
|
| 43 |
+
<img src="../_static/cmake-logo-16.png" alt=""
|
| 44 |
+
style="vertical-align: middle; margin-top: -2px" />
|
| 45 |
+
</li>
|
| 46 |
+
<li>
|
| 47 |
+
<a href="https://cmake.org/">CMake</a> »
|
| 48 |
+
</li>
|
| 49 |
+
<li>
|
| 50 |
+
<a href="../index.html">3.27.9 Documentation</a> »
|
| 51 |
+
</li>
|
| 52 |
+
|
| 53 |
+
<li class="nav-item nav-item-1"><a href="../manual/cmake-commands.7.html" accesskey="U">cmake-commands(7)</a> »</li>
|
| 54 |
+
<li class="nav-item nav-item-this"><a href="">block</a></li>
|
| 55 |
+
</ul>
|
| 56 |
+
</div>
|
| 57 |
+
|
| 58 |
+
<div class="document">
|
| 59 |
+
<div class="documentwrapper">
|
| 60 |
+
<div class="bodywrapper">
|
| 61 |
+
<div class="body" role="main">
|
| 62 |
+
|
| 63 |
+
<section id="block">
|
| 64 |
+
<span id="command:block"></span><h1>block<a class="headerlink" href="#block" title="Permalink to this heading">¶</a></h1>
|
| 65 |
+
<div class="versionadded">
|
| 66 |
+
<p><span class="versionmodified added">New in version 3.25.</span></p>
|
| 67 |
+
</div>
|
| 68 |
+
<p>Evaluate a group of commands with a dedicated variable and/or policy scope.</p>
|
| 69 |
+
<div class="highlight-cmake notranslate"><div class="highlight"><pre><span></span><span class="nf">block(</span><span class="p">[</span><span class="no">SCOPE_FOR</span><span class="w"> </span><span class="p">[</span><span class="no">POLICIES</span><span class="p">]</span><span class="w"> </span><span class="p">[</span><span class="no">VARIABLES</span><span class="p">]</span><span class="w"> </span><span class="p">]</span><span class="w"> </span><span class="p">[</span><span class="no">PROPAGATE</span><span class="w"> </span><span class="nv"><var-name>...</span><span class="p">]</span><span class="nf">)</span>
|
| 70 |
+
<span class="w"> </span><span class="nv"><commands></span>
|
| 71 |
+
<span class="nf">endblock()</span>
|
| 72 |
+
</pre></div>
|
| 73 |
+
</div>
|
| 74 |
+
<p>All commands between <code class="docutils literal notranslate"><span class="pre">block()</span></code> and the matching <span class="target" id="index-0-command:endblock"></span><a class="reference internal" href="endblock.html#command:endblock" title="endblock"><code class="xref cmake cmake-command docutils literal notranslate"><span class="pre">endblock()</span></code></a> are
|
| 75 |
+
recorded without being invoked. Once the <span class="target" id="index-1-command:endblock"></span><a class="reference internal" href="endblock.html#command:endblock" title="endblock"><code class="xref cmake cmake-command docutils literal notranslate"><span class="pre">endblock()</span></code></a> is evaluated, the
|
| 76 |
+
recorded list of commands is invoked inside the requested scopes, then the
|
| 77 |
+
scopes created by the <code class="docutils literal notranslate"><span class="pre">block()</span></code> command are removed.</p>
|
| 78 |
+
<dl>
|
| 79 |
+
<dt><code class="docutils literal notranslate"><span class="pre">SCOPE_FOR</span></code></dt><dd><p>Specify which scopes must be created.</p>
|
| 80 |
+
<dl class="simple">
|
| 81 |
+
<dt><code class="docutils literal notranslate"><span class="pre">POLICIES</span></code></dt><dd><p>Create a new policy scope. This is equivalent to
|
| 82 |
+
<span class="target" id="index-0-command:cmake_policy"></span><a class="reference internal" href="cmake_policy.html#command:cmake_policy" title="cmake_policy(push)"><code class="xref cmake cmake-command docutils literal notranslate"><span class="pre">cmake_policy(PUSH)</span></code></a>.</p>
|
| 83 |
+
</dd>
|
| 84 |
+
<dt><code class="docutils literal notranslate"><span class="pre">VARIABLES</span></code></dt><dd><p>Create a new variable scope.</p>
|
| 85 |
+
</dd>
|
| 86 |
+
</dl>
|
| 87 |
+
<p>If <code class="docutils literal notranslate"><span class="pre">SCOPE_FOR</span></code> is not specified, this is equivalent to:</p>
|
| 88 |
+
<div class="highlight-cmake notranslate"><div class="highlight"><pre><span></span><span class="nf">block(</span><span class="no">SCOPE_FOR</span><span class="w"> </span><span class="no">VARIABLES</span><span class="w"> </span><span class="no">POLICIES</span><span class="nf">)</span>
|
| 89 |
+
</pre></div>
|
| 90 |
+
</div>
|
| 91 |
+
</dd>
|
| 92 |
+
<dt><code class="docutils literal notranslate"><span class="pre">PROPAGATE</span></code></dt><dd><p>When a variable scope is created by the <span class="target" id="index-0-command:block"></span><a class="reference internal" href="#command:block" title="block"><code class="xref cmake cmake-command docutils literal notranslate"><span class="pre">block()</span></code></a> command, this
|
| 93 |
+
option sets or unsets the specified variables in the parent scope. This is
|
| 94 |
+
equivalent to <span class="target" id="index-0-command:set"></span><a class="reference internal" href="set.html#command:set" title="set(parent_scope)"><code class="xref cmake cmake-command docutils literal notranslate"><span class="pre">set(PARENT_SCOPE)</span></code></a> or <span class="target" id="index-0-command:unset"></span><a class="reference internal" href="unset.html#command:unset" title="unset(parent_scope)"><code class="xref cmake cmake-command docutils literal notranslate"><span class="pre">unset(PARENT_SCOPE)</span></code></a>
|
| 95 |
+
commands.</p>
|
| 96 |
+
<div class="highlight-cmake notranslate"><div class="highlight"><pre><span></span><span class="nf">set(</span><span class="nb">var1</span><span class="w"> </span><span class="s">"INIT1"</span><span class="nf">)</span>
|
| 97 |
+
<span class="nf">set(</span><span class="nb">var2</span><span class="w"> </span><span class="s">"INIT2"</span><span class="nf">)</span>
|
| 98 |
+
|
| 99 |
+
<span class="nf">block(</span><span class="no">PROPAGATE</span><span class="w"> </span><span class="nb">var1</span><span class="w"> </span><span class="nb">var2</span><span class="nf">)</span>
|
| 100 |
+
<span class="w"> </span><span class="nf">set(</span><span class="nb">var1</span><span class="w"> </span><span class="s">"VALUE1"</span><span class="nf">)</span>
|
| 101 |
+
<span class="w"> </span><span class="nf">unset(</span><span class="nb">var2</span><span class="nf">)</span>
|
| 102 |
+
<span class="nf">endblock()</span>
|
| 103 |
+
|
| 104 |
+
<span class="c"># Now var1 holds VALUE1, and var2 is unset</span>
|
| 105 |
+
</pre></div>
|
| 106 |
+
</div>
|
| 107 |
+
<p>This option is only allowed when a variable scope is created. An error will
|
| 108 |
+
be raised in the other cases.</p>
|
| 109 |
+
</dd>
|
| 110 |
+
</dl>
|
| 111 |
+
<p>When the <code class="docutils literal notranslate"><span class="pre">block()</span></code> is inside a <span class="target" id="index-0-command:foreach"></span><a class="reference internal" href="foreach.html#command:foreach" title="foreach"><code class="xref cmake cmake-command docutils literal notranslate"><span class="pre">foreach()</span></code></a> or <span class="target" id="index-0-command:while"></span><a class="reference internal" href="while.html#command:while" title="while"><code class="xref cmake cmake-command docutils literal notranslate"><span class="pre">while()</span></code></a>
|
| 112 |
+
command, the <span class="target" id="index-0-command:break"></span><a class="reference internal" href="break.html#command:break" title="break"><code class="xref cmake cmake-command docutils literal notranslate"><span class="pre">break()</span></code></a> and <span class="target" id="index-0-command:continue"></span><a class="reference internal" href="continue.html#command:continue" title="continue"><code class="xref cmake cmake-command docutils literal notranslate"><span class="pre">continue()</span></code></a> commands can be used
|
| 113 |
+
inside the block.</p>
|
| 114 |
+
<div class="highlight-cmake notranslate"><div class="highlight"><pre><span></span><span class="nf">while(</span><span class="no">TRUE</span><span class="nf">)</span>
|
| 115 |
+
<span class="w"> </span><span class="nf">block()</span>
|
| 116 |
+
<span class="w"> </span><span class="p">...</span>
|
| 117 |
+
<span class="w"> </span><span class="c"># the break() command will terminate the while() command</span>
|
| 118 |
+
<span class="w"> </span><span class="nf">break()</span>
|
| 119 |
+
<span class="w"> </span><span class="nf">endblock()</span>
|
| 120 |
+
<span class="nf">endwhile()</span>
|
| 121 |
+
</pre></div>
|
| 122 |
+
</div>
|
| 123 |
+
<section id="see-also">
|
| 124 |
+
<h2>See Also<a class="headerlink" href="#see-also" title="Permalink to this heading">¶</a></h2>
|
| 125 |
+
<ul class="simple">
|
| 126 |
+
<li><p><span class="target" id="index-2-command:endblock"></span><a class="reference internal" href="endblock.html#command:endblock" title="endblock"><code class="xref cmake cmake-command docutils literal notranslate"><span class="pre">endblock()</span></code></a></p></li>
|
| 127 |
+
<li><p><span class="target" id="index-0-command:return"></span><a class="reference internal" href="return.html#command:return" title="return"><code class="xref cmake cmake-command docutils literal notranslate"><span class="pre">return()</span></code></a></p></li>
|
| 128 |
+
<li><p><span class="target" id="index-1-command:cmake_policy"></span><a class="reference internal" href="cmake_policy.html#command:cmake_policy" title="cmake_policy"><code class="xref cmake cmake-command docutils literal notranslate"><span class="pre">cmake_policy()</span></code></a></p></li>
|
| 129 |
+
</ul>
|
| 130 |
+
</section>
|
| 131 |
+
</section>
|
| 132 |
+
|
| 133 |
+
|
| 134 |
+
<div class="clearer"></div>
|
| 135 |
+
</div>
|
| 136 |
+
</div>
|
| 137 |
+
</div>
|
| 138 |
+
<div class="sphinxsidebar" role="navigation" aria-label="main navigation">
|
| 139 |
+
<div class="sphinxsidebarwrapper">
|
| 140 |
+
<div>
|
| 141 |
+
<h3><a href="../index.html">Table of Contents</a></h3>
|
| 142 |
+
<ul>
|
| 143 |
+
<li><a class="reference internal" href="#">block</a><ul>
|
| 144 |
+
<li><a class="reference internal" href="#see-also">See Also</a></li>
|
| 145 |
+
</ul>
|
| 146 |
+
</li>
|
| 147 |
+
</ul>
|
| 148 |
+
|
| 149 |
+
</div>
|
| 150 |
+
<div>
|
| 151 |
+
<h4>Previous topic</h4>
|
| 152 |
+
<p class="topless"><a href="../manual/cmake-commands.7.html"
|
| 153 |
+
title="previous chapter">cmake-commands(7)</a></p>
|
| 154 |
+
</div>
|
| 155 |
+
<div>
|
| 156 |
+
<h4>Next topic</h4>
|
| 157 |
+
<p class="topless"><a href="break.html"
|
| 158 |
+
title="next chapter">break</a></p>
|
| 159 |
+
</div>
|
| 160 |
+
<div role="note" aria-label="source link">
|
| 161 |
+
<h3>This Page</h3>
|
| 162 |
+
<ul class="this-page-menu">
|
| 163 |
+
<li><a href="../_sources/command/block.rst.txt"
|
| 164 |
+
rel="nofollow">Show Source</a></li>
|
| 165 |
+
</ul>
|
| 166 |
+
</div>
|
| 167 |
+
<div id="searchbox" style="display: none" role="search">
|
| 168 |
+
<h3 id="searchlabel">Quick search</h3>
|
| 169 |
+
<div class="searchformwrapper">
|
| 170 |
+
<form class="search" action="../search.html" method="get">
|
| 171 |
+
<input type="text" name="q" aria-labelledby="searchlabel" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/>
|
| 172 |
+
<input type="submit" value="Go" />
|
| 173 |
+
</form>
|
| 174 |
+
</div>
|
| 175 |
+
</div>
|
| 176 |
+
<script>document.getElementById('searchbox').style.display = "block"</script>
|
| 177 |
+
</div>
|
| 178 |
+
</div>
|
| 179 |
+
<div class="clearer"></div>
|
| 180 |
+
</div>
|
| 181 |
+
<div class="related" role="navigation" aria-label="related navigation">
|
| 182 |
+
<h3>Navigation</h3>
|
| 183 |
+
<ul>
|
| 184 |
+
<li class="right" style="margin-right: 10px">
|
| 185 |
+
<a href="../genindex.html" title="General Index"
|
| 186 |
+
>index</a></li>
|
| 187 |
+
<li class="right" >
|
| 188 |
+
<a href="break.html" title="break"
|
| 189 |
+
>next</a> |</li>
|
| 190 |
+
<li class="right" >
|
| 191 |
+
<a href="../manual/cmake-commands.7.html" title="cmake-commands(7)"
|
| 192 |
+
>previous</a> |</li>
|
| 193 |
+
<li>
|
| 194 |
+
<img src="../_static/cmake-logo-16.png" alt=""
|
| 195 |
+
style="vertical-align: middle; margin-top: -2px" />
|
| 196 |
+
</li>
|
| 197 |
+
<li>
|
| 198 |
+
<a href="https://cmake.org/">CMake</a> »
|
| 199 |
+
</li>
|
| 200 |
+
<li>
|
| 201 |
+
<a href="../index.html">3.27.9 Documentation</a> »
|
| 202 |
+
</li>
|
| 203 |
+
|
| 204 |
+
<li class="nav-item nav-item-1"><a href="../manual/cmake-commands.7.html" >cmake-commands(7)</a> »</li>
|
| 205 |
+
<li class="nav-item nav-item-this"><a href="">block</a></li>
|
| 206 |
+
</ul>
|
| 207 |
+
</div>
|
| 208 |
+
|
| 209 |
+
<div class="footer" role="contentinfo">
|
| 210 |
+
© Copyright 2000-2023 Kitware, Inc. and Contributors.
|
| 211 |
+
Created using <a href="https://www.sphinx-doc.org/">Sphinx</a> 5.3.0.
|
| 212 |
+
</div>
|
| 213 |
+
</body>
|
| 214 |
+
</html>
|
toolchain/cmake-3.27.9-linux-x86_64/doc/cmake/html/command/break.html
ADDED
|
@@ -0,0 +1,144 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
|
| 2 |
+
<!DOCTYPE html>
|
| 3 |
+
|
| 4 |
+
<html lang="en">
|
| 5 |
+
<head>
|
| 6 |
+
<meta charset="utf-8" />
|
| 7 |
+
<meta name="viewport" content="width=device-width, initial-scale=1.0" /><meta name="generator" content="Docutils 0.19: https://docutils.sourceforge.io/" />
|
| 8 |
+
|
| 9 |
+
<title>break — CMake 3.27.9 Documentation</title>
|
| 10 |
+
|
| 11 |
+
<link rel="stylesheet" type="text/css" href="../_static/pygments.css" />
|
| 12 |
+
<link rel="stylesheet" type="text/css" href="../_static/cmake.css" />
|
| 13 |
+
|
| 14 |
+
<script data-url_root="../" id="documentation_options" src="../_static/documentation_options.js"></script>
|
| 15 |
+
<script src="../_static/jquery.js"></script>
|
| 16 |
+
<script src="../_static/underscore.js"></script>
|
| 17 |
+
<script src="../_static/_sphinx_javascript_frameworks_compat.js"></script>
|
| 18 |
+
<script src="../_static/doctools.js"></script>
|
| 19 |
+
<script src="../_static/sphinx_highlight.js"></script>
|
| 20 |
+
|
| 21 |
+
<link rel="shortcut icon" href="../_static/cmake-favicon.ico"/>
|
| 22 |
+
<link rel="index" title="Index" href="../genindex.html" />
|
| 23 |
+
<link rel="search" title="Search" href="../search.html" />
|
| 24 |
+
<link rel="next" title="cmake_host_system_information" href="cmake_host_system_information.html" />
|
| 25 |
+
<link rel="prev" title="block" href="block.html" />
|
| 26 |
+
|
| 27 |
+
|
| 28 |
+
</head><body>
|
| 29 |
+
|
| 30 |
+
<div class="related" role="navigation" aria-label="related navigation">
|
| 31 |
+
<h3>Navigation</h3>
|
| 32 |
+
<ul>
|
| 33 |
+
<li class="right" style="margin-right: 10px">
|
| 34 |
+
<a href="../genindex.html" title="General Index"
|
| 35 |
+
accesskey="I">index</a></li>
|
| 36 |
+
<li class="right" >
|
| 37 |
+
<a href="cmake_host_system_information.html" title="cmake_host_system_information"
|
| 38 |
+
accesskey="N">next</a> |</li>
|
| 39 |
+
<li class="right" >
|
| 40 |
+
<a href="block.html" title="block"
|
| 41 |
+
accesskey="P">previous</a> |</li>
|
| 42 |
+
<li>
|
| 43 |
+
<img src="../_static/cmake-logo-16.png" alt=""
|
| 44 |
+
style="vertical-align: middle; margin-top: -2px" />
|
| 45 |
+
</li>
|
| 46 |
+
<li>
|
| 47 |
+
<a href="https://cmake.org/">CMake</a> »
|
| 48 |
+
</li>
|
| 49 |
+
<li>
|
| 50 |
+
<a href="../index.html">3.27.9 Documentation</a> »
|
| 51 |
+
</li>
|
| 52 |
+
|
| 53 |
+
<li class="nav-item nav-item-1"><a href="../manual/cmake-commands.7.html" accesskey="U">cmake-commands(7)</a> »</li>
|
| 54 |
+
<li class="nav-item nav-item-this"><a href="">break</a></li>
|
| 55 |
+
</ul>
|
| 56 |
+
</div>
|
| 57 |
+
|
| 58 |
+
<div class="document">
|
| 59 |
+
<div class="documentwrapper">
|
| 60 |
+
<div class="bodywrapper">
|
| 61 |
+
<div class="body" role="main">
|
| 62 |
+
|
| 63 |
+
<section id="break">
|
| 64 |
+
<span id="command:break"></span><h1>break<a class="headerlink" href="#break" title="Permalink to this heading">¶</a></h1>
|
| 65 |
+
<p>Break from an enclosing foreach or while loop.</p>
|
| 66 |
+
<div class="highlight-cmake notranslate"><div class="highlight"><pre><span></span><span class="nf">break()</span>
|
| 67 |
+
</pre></div>
|
| 68 |
+
</div>
|
| 69 |
+
<p>Breaks from an enclosing <span class="target" id="index-0-command:foreach"></span><a class="reference internal" href="foreach.html#command:foreach" title="foreach"><code class="xref cmake cmake-command docutils literal notranslate"><span class="pre">foreach()</span></code></a> or <span class="target" id="index-0-command:while"></span><a class="reference internal" href="while.html#command:while" title="while"><code class="xref cmake cmake-command docutils literal notranslate"><span class="pre">while()</span></code></a> loop.</p>
|
| 70 |
+
<p>See also the <span class="target" id="index-0-command:continue"></span><a class="reference internal" href="continue.html#command:continue" title="continue"><code class="xref cmake cmake-command docutils literal notranslate"><span class="pre">continue()</span></code></a> command.</p>
|
| 71 |
+
</section>
|
| 72 |
+
|
| 73 |
+
|
| 74 |
+
<div class="clearer"></div>
|
| 75 |
+
</div>
|
| 76 |
+
</div>
|
| 77 |
+
</div>
|
| 78 |
+
<div class="sphinxsidebar" role="navigation" aria-label="main navigation">
|
| 79 |
+
<div class="sphinxsidebarwrapper">
|
| 80 |
+
<div>
|
| 81 |
+
<h4>Previous topic</h4>
|
| 82 |
+
<p class="topless"><a href="block.html"
|
| 83 |
+
title="previous chapter">block</a></p>
|
| 84 |
+
</div>
|
| 85 |
+
<div>
|
| 86 |
+
<h4>Next topic</h4>
|
| 87 |
+
<p class="topless"><a href="cmake_host_system_information.html"
|
| 88 |
+
title="next chapter">cmake_host_system_information</a></p>
|
| 89 |
+
</div>
|
| 90 |
+
<div role="note" aria-label="source link">
|
| 91 |
+
<h3>This Page</h3>
|
| 92 |
+
<ul class="this-page-menu">
|
| 93 |
+
<li><a href="../_sources/command/break.rst.txt"
|
| 94 |
+
rel="nofollow">Show Source</a></li>
|
| 95 |
+
</ul>
|
| 96 |
+
</div>
|
| 97 |
+
<div id="searchbox" style="display: none" role="search">
|
| 98 |
+
<h3 id="searchlabel">Quick search</h3>
|
| 99 |
+
<div class="searchformwrapper">
|
| 100 |
+
<form class="search" action="../search.html" method="get">
|
| 101 |
+
<input type="text" name="q" aria-labelledby="searchlabel" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/>
|
| 102 |
+
<input type="submit" value="Go" />
|
| 103 |
+
</form>
|
| 104 |
+
</div>
|
| 105 |
+
</div>
|
| 106 |
+
<script>document.getElementById('searchbox').style.display = "block"</script>
|
| 107 |
+
</div>
|
| 108 |
+
</div>
|
| 109 |
+
<div class="clearer"></div>
|
| 110 |
+
</div>
|
| 111 |
+
<div class="related" role="navigation" aria-label="related navigation">
|
| 112 |
+
<h3>Navigation</h3>
|
| 113 |
+
<ul>
|
| 114 |
+
<li class="right" style="margin-right: 10px">
|
| 115 |
+
<a href="../genindex.html" title="General Index"
|
| 116 |
+
>index</a></li>
|
| 117 |
+
<li class="right" >
|
| 118 |
+
<a href="cmake_host_system_information.html" title="cmake_host_system_information"
|
| 119 |
+
>next</a> |</li>
|
| 120 |
+
<li class="right" >
|
| 121 |
+
<a href="block.html" title="block"
|
| 122 |
+
>previous</a> |</li>
|
| 123 |
+
<li>
|
| 124 |
+
<img src="../_static/cmake-logo-16.png" alt=""
|
| 125 |
+
style="vertical-align: middle; margin-top: -2px" />
|
| 126 |
+
</li>
|
| 127 |
+
<li>
|
| 128 |
+
<a href="https://cmake.org/">CMake</a> »
|
| 129 |
+
</li>
|
| 130 |
+
<li>
|
| 131 |
+
<a href="../index.html">3.27.9 Documentation</a> »
|
| 132 |
+
</li>
|
| 133 |
+
|
| 134 |
+
<li class="nav-item nav-item-1"><a href="../manual/cmake-commands.7.html" >cmake-commands(7)</a> »</li>
|
| 135 |
+
<li class="nav-item nav-item-this"><a href="">break</a></li>
|
| 136 |
+
</ul>
|
| 137 |
+
</div>
|
| 138 |
+
|
| 139 |
+
<div class="footer" role="contentinfo">
|
| 140 |
+
© Copyright 2000-2023 Kitware, Inc. and Contributors.
|
| 141 |
+
Created using <a href="https://www.sphinx-doc.org/">Sphinx</a> 5.3.0.
|
| 142 |
+
</div>
|
| 143 |
+
</body>
|
| 144 |
+
</html>
|
toolchain/cmake-3.27.9-linux-x86_64/doc/cmake/html/command/build_command.html
ADDED
|
@@ -0,0 +1,181 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
|
| 2 |
+
<!DOCTYPE html>
|
| 3 |
+
|
| 4 |
+
<html lang="en">
|
| 5 |
+
<head>
|
| 6 |
+
<meta charset="utf-8" />
|
| 7 |
+
<meta name="viewport" content="width=device-width, initial-scale=1.0" /><meta name="generator" content="Docutils 0.19: https://docutils.sourceforge.io/" />
|
| 8 |
+
|
| 9 |
+
<title>build_command — CMake 3.27.9 Documentation</title>
|
| 10 |
+
|
| 11 |
+
<link rel="stylesheet" type="text/css" href="../_static/pygments.css" />
|
| 12 |
+
<link rel="stylesheet" type="text/css" href="../_static/cmake.css" />
|
| 13 |
+
|
| 14 |
+
<script data-url_root="../" id="documentation_options" src="../_static/documentation_options.js"></script>
|
| 15 |
+
<script src="../_static/jquery.js"></script>
|
| 16 |
+
<script src="../_static/underscore.js"></script>
|
| 17 |
+
<script src="../_static/_sphinx_javascript_frameworks_compat.js"></script>
|
| 18 |
+
<script src="../_static/doctools.js"></script>
|
| 19 |
+
<script src="../_static/sphinx_highlight.js"></script>
|
| 20 |
+
|
| 21 |
+
<link rel="shortcut icon" href="../_static/cmake-favicon.ico"/>
|
| 22 |
+
<link rel="index" title="Index" href="../genindex.html" />
|
| 23 |
+
<link rel="search" title="Search" href="../search.html" />
|
| 24 |
+
<link rel="next" title="cmake_file_api" href="cmake_file_api.html" />
|
| 25 |
+
<link rel="prev" title="aux_source_directory" href="aux_source_directory.html" />
|
| 26 |
+
|
| 27 |
+
|
| 28 |
+
</head><body>
|
| 29 |
+
|
| 30 |
+
<div class="related" role="navigation" aria-label="related navigation">
|
| 31 |
+
<h3>Navigation</h3>
|
| 32 |
+
<ul>
|
| 33 |
+
<li class="right" style="margin-right: 10px">
|
| 34 |
+
<a href="../genindex.html" title="General Index"
|
| 35 |
+
accesskey="I">index</a></li>
|
| 36 |
+
<li class="right" >
|
| 37 |
+
<a href="cmake_file_api.html" title="cmake_file_api"
|
| 38 |
+
accesskey="N">next</a> |</li>
|
| 39 |
+
<li class="right" >
|
| 40 |
+
<a href="aux_source_directory.html" title="aux_source_directory"
|
| 41 |
+
accesskey="P">previous</a> |</li>
|
| 42 |
+
<li>
|
| 43 |
+
<img src="../_static/cmake-logo-16.png" alt=""
|
| 44 |
+
style="vertical-align: middle; margin-top: -2px" />
|
| 45 |
+
</li>
|
| 46 |
+
<li>
|
| 47 |
+
<a href="https://cmake.org/">CMake</a> »
|
| 48 |
+
</li>
|
| 49 |
+
<li>
|
| 50 |
+
<a href="../index.html">3.27.9 Documentation</a> »
|
| 51 |
+
</li>
|
| 52 |
+
|
| 53 |
+
<li class="nav-item nav-item-1"><a href="../manual/cmake-commands.7.html" accesskey="U">cmake-commands(7)</a> »</li>
|
| 54 |
+
<li class="nav-item nav-item-this"><a href="">build_command</a></li>
|
| 55 |
+
</ul>
|
| 56 |
+
</div>
|
| 57 |
+
|
| 58 |
+
<div class="document">
|
| 59 |
+
<div class="documentwrapper">
|
| 60 |
+
<div class="bodywrapper">
|
| 61 |
+
<div class="body" role="main">
|
| 62 |
+
|
| 63 |
+
<section id="build-command">
|
| 64 |
+
<span id="command:build_command"></span><h1>build_command<a class="headerlink" href="#build-command" title="Permalink to this heading">¶</a></h1>
|
| 65 |
+
<p>Get a command line to build the current project.
|
| 66 |
+
This is mainly intended for internal use by the <span class="target" id="index-0-module:CTest"></span><a class="reference internal" href="../module/CTest.html#module:CTest" title="CTest"><code class="xref cmake cmake-module docutils literal notranslate"><span class="pre">CTest</span></code></a> module.</p>
|
| 67 |
+
<div class="highlight-cmake notranslate"><div class="highlight"><pre><span></span><span class="nf">build_command(</span><span class="nv"><variable></span>
|
| 68 |
+
<span class="w"> </span><span class="p">[</span><span class="no">CONFIGURATION</span><span class="w"> </span><span class="nv"><config></span><span class="p">]</span>
|
| 69 |
+
<span class="w"> </span><span class="p">[</span><span class="no">PARALLEL_LEVEL</span><span class="w"> </span><span class="nv"><parallel></span><span class="p">]</span>
|
| 70 |
+
<span class="w"> </span><span class="p">[</span><span class="no">TARGET</span><span class="w"> </span><span class="nv"><target></span><span class="p">]</span>
|
| 71 |
+
<span class="w"> </span><span class="p">[</span><span class="no">PROJECT_NAME</span><span class="w"> </span><span class="nv"><projname></span><span class="p">]</span><span class="w"> </span><span class="c"># legacy, causes warning</span>
|
| 72 |
+
<span class="w"> </span><span class="nf">)</span>
|
| 73 |
+
</pre></div>
|
| 74 |
+
</div>
|
| 75 |
+
<p>Sets the given <code class="docutils literal notranslate"><span class="pre"><variable></span></code> to a command-line string of the form:</p>
|
| 76 |
+
<div class="highlight-none notranslate"><div class="highlight"><pre><span></span><cmake> --build . [--config <config>] [--parallel <parallel>] [--target <target>...] [-- -i]
|
| 77 |
+
</pre></div>
|
| 78 |
+
</div>
|
| 79 |
+
<p>where <code class="docutils literal notranslate"><span class="pre"><cmake></span></code> is the location of the <span class="target" id="index-0-manual:cmake(1)"></span><a class="reference internal" href="../manual/cmake.1.html#manual:cmake(1)" title="cmake(1)"><code class="xref cmake cmake-manual docutils literal notranslate"><span class="pre">cmake(1)</span></code></a> command-line
|
| 80 |
+
tool, and <code class="docutils literal notranslate"><span class="pre"><config></span></code>, <code class="docutils literal notranslate"><span class="pre"><parallel></span></code> and <code class="docutils literal notranslate"><span class="pre"><target></span></code> are the values
|
| 81 |
+
provided to the <code class="docutils literal notranslate"><span class="pre">CONFIGURATION</span></code>, <code class="docutils literal notranslate"><span class="pre">PARALLEL_LEVEL</span></code> and <code class="docutils literal notranslate"><span class="pre">TARGET</span></code>
|
| 82 |
+
options, if any. The trailing <code class="docutils literal notranslate"><span class="pre">--</span> <span class="pre">-i</span></code> option is added for
|
| 83 |
+
<a class="reference internal" href="../manual/cmake-generators.7.html#makefile-generators"><span class="std std-ref">Makefile Generators</span></a> if policy <span class="target" id="index-0-policy:CMP0061"></span><a class="reference internal" href="../policy/CMP0061.html#policy:CMP0061" title="CMP0061"><code class="xref cmake cmake-policy docutils literal notranslate"><span class="pre">CMP0061</span></code></a> is not set to
|
| 84 |
+
<code class="docutils literal notranslate"><span class="pre">NEW</span></code>.</p>
|
| 85 |
+
<p>When invoked, this <a class="reference internal" href="../manual/cmake.1.html#cmdoption-cmake-build"><code class="xref std std-option docutils literal notranslate"><span class="pre">cmake</span> <span class="pre">--build</span></code></a> command line will launch the
|
| 86 |
+
underlying build system tool.</p>
|
| 87 |
+
<div class="versionadded">
|
| 88 |
+
<p><span class="versionmodified added">New in version 3.21: </span>The <code class="docutils literal notranslate"><span class="pre">PARALLEL_LEVEL</span></code> argument can be used to set the
|
| 89 |
+
<a class="reference internal" href="../manual/cmake.1.html#cmdoption-cmake-build-j"><code class="xref std std-option docutils literal notranslate"><span class="pre">--parallel</span></code></a> flag.</p>
|
| 90 |
+
</div>
|
| 91 |
+
<div class="highlight-cmake notranslate"><div class="highlight"><pre><span></span><span class="nf">build_command(</span><span class="nv"><cachevariable></span><span class="w"> </span><span class="nv"><makecommand></span><span class="nf">)</span>
|
| 92 |
+
</pre></div>
|
| 93 |
+
</div>
|
| 94 |
+
<p>This second signature is deprecated, but still available for backwards
|
| 95 |
+
compatibility. Use the first signature instead.</p>
|
| 96 |
+
<p>It sets the given <code class="docutils literal notranslate"><span class="pre"><cachevariable></span></code> to a command-line string as
|
| 97 |
+
above but without the <a class="reference internal" href="../manual/cmake.1.html#cmdoption-cmake-build-t"><code class="xref std std-option docutils literal notranslate"><span class="pre">--target</span></code></a> option.
|
| 98 |
+
The <code class="docutils literal notranslate"><span class="pre"><makecommand></span></code> is ignored but should be the full path to
|
| 99 |
+
devenv, nmake, make or one of the end user build tools
|
| 100 |
+
for legacy invocations.</p>
|
| 101 |
+
<div class="admonition note">
|
| 102 |
+
<p class="admonition-title">Note</p>
|
| 103 |
+
<p>In CMake versions prior to 3.0 this command returned a command
|
| 104 |
+
line that directly invokes the native build tool for the current
|
| 105 |
+
generator. Their implementation of the <code class="docutils literal notranslate"><span class="pre">PROJECT_NAME</span></code> option
|
| 106 |
+
had no useful effects, so CMake now warns on use of the option.</p>
|
| 107 |
+
</div>
|
| 108 |
+
</section>
|
| 109 |
+
|
| 110 |
+
|
| 111 |
+
<div class="clearer"></div>
|
| 112 |
+
</div>
|
| 113 |
+
</div>
|
| 114 |
+
</div>
|
| 115 |
+
<div class="sphinxsidebar" role="navigation" aria-label="main navigation">
|
| 116 |
+
<div class="sphinxsidebarwrapper">
|
| 117 |
+
<div>
|
| 118 |
+
<h4>Previous topic</h4>
|
| 119 |
+
<p class="topless"><a href="aux_source_directory.html"
|
| 120 |
+
title="previous chapter">aux_source_directory</a></p>
|
| 121 |
+
</div>
|
| 122 |
+
<div>
|
| 123 |
+
<h4>Next topic</h4>
|
| 124 |
+
<p class="topless"><a href="cmake_file_api.html"
|
| 125 |
+
title="next chapter">cmake_file_api</a></p>
|
| 126 |
+
</div>
|
| 127 |
+
<div role="note" aria-label="source link">
|
| 128 |
+
<h3>This Page</h3>
|
| 129 |
+
<ul class="this-page-menu">
|
| 130 |
+
<li><a href="../_sources/command/build_command.rst.txt"
|
| 131 |
+
rel="nofollow">Show Source</a></li>
|
| 132 |
+
</ul>
|
| 133 |
+
</div>
|
| 134 |
+
<div id="searchbox" style="display: none" role="search">
|
| 135 |
+
<h3 id="searchlabel">Quick search</h3>
|
| 136 |
+
<div class="searchformwrapper">
|
| 137 |
+
<form class="search" action="../search.html" method="get">
|
| 138 |
+
<input type="text" name="q" aria-labelledby="searchlabel" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/>
|
| 139 |
+
<input type="submit" value="Go" />
|
| 140 |
+
</form>
|
| 141 |
+
</div>
|
| 142 |
+
</div>
|
| 143 |
+
<script>document.getElementById('searchbox').style.display = "block"</script>
|
| 144 |
+
</div>
|
| 145 |
+
</div>
|
| 146 |
+
<div class="clearer"></div>
|
| 147 |
+
</div>
|
| 148 |
+
<div class="related" role="navigation" aria-label="related navigation">
|
| 149 |
+
<h3>Navigation</h3>
|
| 150 |
+
<ul>
|
| 151 |
+
<li class="right" style="margin-right: 10px">
|
| 152 |
+
<a href="../genindex.html" title="General Index"
|
| 153 |
+
>index</a></li>
|
| 154 |
+
<li class="right" >
|
| 155 |
+
<a href="cmake_file_api.html" title="cmake_file_api"
|
| 156 |
+
>next</a> |</li>
|
| 157 |
+
<li class="right" >
|
| 158 |
+
<a href="aux_source_directory.html" title="aux_source_directory"
|
| 159 |
+
>previous</a> |</li>
|
| 160 |
+
<li>
|
| 161 |
+
<img src="../_static/cmake-logo-16.png" alt=""
|
| 162 |
+
style="vertical-align: middle; margin-top: -2px" />
|
| 163 |
+
</li>
|
| 164 |
+
<li>
|
| 165 |
+
<a href="https://cmake.org/">CMake</a> »
|
| 166 |
+
</li>
|
| 167 |
+
<li>
|
| 168 |
+
<a href="../index.html">3.27.9 Documentation</a> »
|
| 169 |
+
</li>
|
| 170 |
+
|
| 171 |
+
<li class="nav-item nav-item-1"><a href="../manual/cmake-commands.7.html" >cmake-commands(7)</a> »</li>
|
| 172 |
+
<li class="nav-item nav-item-this"><a href="">build_command</a></li>
|
| 173 |
+
</ul>
|
| 174 |
+
</div>
|
| 175 |
+
|
| 176 |
+
<div class="footer" role="contentinfo">
|
| 177 |
+
© Copyright 2000-2023 Kitware, Inc. and Contributors.
|
| 178 |
+
Created using <a href="https://www.sphinx-doc.org/">Sphinx</a> 5.3.0.
|
| 179 |
+
</div>
|
| 180 |
+
</body>
|
| 181 |
+
</html>
|
toolchain/cmake-3.27.9-linux-x86_64/doc/cmake/html/command/build_name.html
ADDED
|
@@ -0,0 +1,147 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
|
| 2 |
+
<!DOCTYPE html>
|
| 3 |
+
|
| 4 |
+
<html lang="en">
|
| 5 |
+
<head>
|
| 6 |
+
<meta charset="utf-8" />
|
| 7 |
+
<meta name="viewport" content="width=device-width, initial-scale=1.0" /><meta name="generator" content="Docutils 0.19: https://docutils.sourceforge.io/" />
|
| 8 |
+
|
| 9 |
+
<title>build_name — CMake 3.27.9 Documentation</title>
|
| 10 |
+
|
| 11 |
+
<link rel="stylesheet" type="text/css" href="../_static/pygments.css" />
|
| 12 |
+
<link rel="stylesheet" type="text/css" href="../_static/cmake.css" />
|
| 13 |
+
|
| 14 |
+
<script data-url_root="../" id="documentation_options" src="../_static/documentation_options.js"></script>
|
| 15 |
+
<script src="../_static/jquery.js"></script>
|
| 16 |
+
<script src="../_static/underscore.js"></script>
|
| 17 |
+
<script src="../_static/_sphinx_javascript_frameworks_compat.js"></script>
|
| 18 |
+
<script src="../_static/doctools.js"></script>
|
| 19 |
+
<script src="../_static/sphinx_highlight.js"></script>
|
| 20 |
+
|
| 21 |
+
<link rel="shortcut icon" href="../_static/cmake-favicon.ico"/>
|
| 22 |
+
<link rel="index" title="Index" href="../genindex.html" />
|
| 23 |
+
<link rel="search" title="Search" href="../search.html" />
|
| 24 |
+
<link rel="next" title="exec_program" href="exec_program.html" />
|
| 25 |
+
<link rel="prev" title="ctest_upload" href="ctest_upload.html" />
|
| 26 |
+
|
| 27 |
+
|
| 28 |
+
</head><body>
|
| 29 |
+
|
| 30 |
+
<div class="related" role="navigation" aria-label="related navigation">
|
| 31 |
+
<h3>Navigation</h3>
|
| 32 |
+
<ul>
|
| 33 |
+
<li class="right" style="margin-right: 10px">
|
| 34 |
+
<a href="../genindex.html" title="General Index"
|
| 35 |
+
accesskey="I">index</a></li>
|
| 36 |
+
<li class="right" >
|
| 37 |
+
<a href="exec_program.html" title="exec_program"
|
| 38 |
+
accesskey="N">next</a> |</li>
|
| 39 |
+
<li class="right" >
|
| 40 |
+
<a href="ctest_upload.html" title="ctest_upload"
|
| 41 |
+
accesskey="P">previous</a> |</li>
|
| 42 |
+
<li>
|
| 43 |
+
<img src="../_static/cmake-logo-16.png" alt=""
|
| 44 |
+
style="vertical-align: middle; margin-top: -2px" />
|
| 45 |
+
</li>
|
| 46 |
+
<li>
|
| 47 |
+
<a href="https://cmake.org/">CMake</a> »
|
| 48 |
+
</li>
|
| 49 |
+
<li>
|
| 50 |
+
<a href="../index.html">3.27.9 Documentation</a> »
|
| 51 |
+
</li>
|
| 52 |
+
|
| 53 |
+
<li class="nav-item nav-item-1"><a href="../manual/cmake-commands.7.html" accesskey="U">cmake-commands(7)</a> »</li>
|
| 54 |
+
<li class="nav-item nav-item-this"><a href="">build_name</a></li>
|
| 55 |
+
</ul>
|
| 56 |
+
</div>
|
| 57 |
+
|
| 58 |
+
<div class="document">
|
| 59 |
+
<div class="documentwrapper">
|
| 60 |
+
<div class="bodywrapper">
|
| 61 |
+
<div class="body" role="main">
|
| 62 |
+
|
| 63 |
+
<section id="build-name">
|
| 64 |
+
<span id="command:build_name"></span><h1>build_name<a class="headerlink" href="#build-name" title="Permalink to this heading">¶</a></h1>
|
| 65 |
+
<p>Disallowed since version 3.0. See CMake Policy <span class="target" id="index-0-policy:CMP0036"></span><a class="reference internal" href="../policy/CMP0036.html#policy:CMP0036" title="CMP0036"><code class="xref cmake cmake-policy docutils literal notranslate"><span class="pre">CMP0036</span></code></a>.</p>
|
| 66 |
+
<p>Use <code class="docutils literal notranslate"><span class="pre">${CMAKE_SYSTEM}</span></code> and <code class="docutils literal notranslate"><span class="pre">${CMAKE_CXX_COMPILER}</span></code> instead.</p>
|
| 67 |
+
<div class="highlight-cmake notranslate"><div class="highlight"><pre><span></span><span class="nf">build_name(</span><span class="nb">variable</span><span class="nf">)</span>
|
| 68 |
+
</pre></div>
|
| 69 |
+
</div>
|
| 70 |
+
<p>Sets the specified variable to a string representing the platform and
|
| 71 |
+
compiler settings. These values are now available through the
|
| 72 |
+
<span class="target" id="index-0-variable:CMAKE_SYSTEM"></span><a class="reference internal" href="../variable/CMAKE_SYSTEM.html#variable:CMAKE_SYSTEM" title="CMAKE_SYSTEM"><code class="xref cmake cmake-variable docutils literal notranslate"><span class="pre">CMAKE_SYSTEM</span></code></a> and
|
| 73 |
+
<span class="target" id="index-0-variable:CMAKE_<LANG>_COMPILER"></span><a class="reference internal" href="../variable/CMAKE_LANG_COMPILER.html#variable:CMAKE_<LANG>_COMPILER" title="CMAKE_<LANG>_COMPILER"><code class="xref cmake cmake-variable docutils literal notranslate"><span class="pre">CMAKE_CXX_COMPILER</span></code></a> variables.</p>
|
| 74 |
+
</section>
|
| 75 |
+
|
| 76 |
+
|
| 77 |
+
<div class="clearer"></div>
|
| 78 |
+
</div>
|
| 79 |
+
</div>
|
| 80 |
+
</div>
|
| 81 |
+
<div class="sphinxsidebar" role="navigation" aria-label="main navigation">
|
| 82 |
+
<div class="sphinxsidebarwrapper">
|
| 83 |
+
<div>
|
| 84 |
+
<h4>Previous topic</h4>
|
| 85 |
+
<p class="topless"><a href="ctest_upload.html"
|
| 86 |
+
title="previous chapter">ctest_upload</a></p>
|
| 87 |
+
</div>
|
| 88 |
+
<div>
|
| 89 |
+
<h4>Next topic</h4>
|
| 90 |
+
<p class="topless"><a href="exec_program.html"
|
| 91 |
+
title="next chapter">exec_program</a></p>
|
| 92 |
+
</div>
|
| 93 |
+
<div role="note" aria-label="source link">
|
| 94 |
+
<h3>This Page</h3>
|
| 95 |
+
<ul class="this-page-menu">
|
| 96 |
+
<li><a href="../_sources/command/build_name.rst.txt"
|
| 97 |
+
rel="nofollow">Show Source</a></li>
|
| 98 |
+
</ul>
|
| 99 |
+
</div>
|
| 100 |
+
<div id="searchbox" style="display: none" role="search">
|
| 101 |
+
<h3 id="searchlabel">Quick search</h3>
|
| 102 |
+
<div class="searchformwrapper">
|
| 103 |
+
<form class="search" action="../search.html" method="get">
|
| 104 |
+
<input type="text" name="q" aria-labelledby="searchlabel" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/>
|
| 105 |
+
<input type="submit" value="Go" />
|
| 106 |
+
</form>
|
| 107 |
+
</div>
|
| 108 |
+
</div>
|
| 109 |
+
<script>document.getElementById('searchbox').style.display = "block"</script>
|
| 110 |
+
</div>
|
| 111 |
+
</div>
|
| 112 |
+
<div class="clearer"></div>
|
| 113 |
+
</div>
|
| 114 |
+
<div class="related" role="navigation" aria-label="related navigation">
|
| 115 |
+
<h3>Navigation</h3>
|
| 116 |
+
<ul>
|
| 117 |
+
<li class="right" style="margin-right: 10px">
|
| 118 |
+
<a href="../genindex.html" title="General Index"
|
| 119 |
+
>index</a></li>
|
| 120 |
+
<li class="right" >
|
| 121 |
+
<a href="exec_program.html" title="exec_program"
|
| 122 |
+
>next</a> |</li>
|
| 123 |
+
<li class="right" >
|
| 124 |
+
<a href="ctest_upload.html" title="ctest_upload"
|
| 125 |
+
>previous</a> |</li>
|
| 126 |
+
<li>
|
| 127 |
+
<img src="../_static/cmake-logo-16.png" alt=""
|
| 128 |
+
style="vertical-align: middle; margin-top: -2px" />
|
| 129 |
+
</li>
|
| 130 |
+
<li>
|
| 131 |
+
<a href="https://cmake.org/">CMake</a> »
|
| 132 |
+
</li>
|
| 133 |
+
<li>
|
| 134 |
+
<a href="../index.html">3.27.9 Documentation</a> »
|
| 135 |
+
</li>
|
| 136 |
+
|
| 137 |
+
<li class="nav-item nav-item-1"><a href="../manual/cmake-commands.7.html" >cmake-commands(7)</a> »</li>
|
| 138 |
+
<li class="nav-item nav-item-this"><a href="">build_name</a></li>
|
| 139 |
+
</ul>
|
| 140 |
+
</div>
|
| 141 |
+
|
| 142 |
+
<div class="footer" role="contentinfo">
|
| 143 |
+
© Copyright 2000-2023 Kitware, Inc. and Contributors.
|
| 144 |
+
Created using <a href="https://www.sphinx-doc.org/">Sphinx</a> 5.3.0.
|
| 145 |
+
</div>
|
| 146 |
+
</body>
|
| 147 |
+
</html>
|
toolchain/cmake-3.27.9-linux-x86_64/doc/cmake/html/command/cmake_file_api.html
ADDED
|
@@ -0,0 +1,217 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
|
| 2 |
+
<!DOCTYPE html>
|
| 3 |
+
|
| 4 |
+
<html lang="en">
|
| 5 |
+
<head>
|
| 6 |
+
<meta charset="utf-8" />
|
| 7 |
+
<meta name="viewport" content="width=device-width, initial-scale=1.0" /><meta name="generator" content="Docutils 0.19: https://docutils.sourceforge.io/" />
|
| 8 |
+
|
| 9 |
+
<title>cmake_file_api — CMake 3.27.9 Documentation</title>
|
| 10 |
+
|
| 11 |
+
<link rel="stylesheet" type="text/css" href="../_static/pygments.css" />
|
| 12 |
+
<link rel="stylesheet" type="text/css" href="../_static/cmake.css" />
|
| 13 |
+
|
| 14 |
+
<script data-url_root="../" id="documentation_options" src="../_static/documentation_options.js"></script>
|
| 15 |
+
<script src="../_static/jquery.js"></script>
|
| 16 |
+
<script src="../_static/underscore.js"></script>
|
| 17 |
+
<script src="../_static/_sphinx_javascript_frameworks_compat.js"></script>
|
| 18 |
+
<script src="../_static/doctools.js"></script>
|
| 19 |
+
<script src="../_static/sphinx_highlight.js"></script>
|
| 20 |
+
|
| 21 |
+
<link rel="shortcut icon" href="../_static/cmake-favicon.ico"/>
|
| 22 |
+
<link rel="index" title="Index" href="../genindex.html" />
|
| 23 |
+
<link rel="search" title="Search" href="../search.html" />
|
| 24 |
+
<link rel="next" title="create_test_sourcelist" href="create_test_sourcelist.html" />
|
| 25 |
+
<link rel="prev" title="build_command" href="build_command.html" />
|
| 26 |
+
|
| 27 |
+
|
| 28 |
+
</head><body>
|
| 29 |
+
|
| 30 |
+
<div class="related" role="navigation" aria-label="related navigation">
|
| 31 |
+
<h3>Navigation</h3>
|
| 32 |
+
<ul>
|
| 33 |
+
<li class="right" style="margin-right: 10px">
|
| 34 |
+
<a href="../genindex.html" title="General Index"
|
| 35 |
+
accesskey="I">index</a></li>
|
| 36 |
+
<li class="right" >
|
| 37 |
+
<a href="create_test_sourcelist.html" title="create_test_sourcelist"
|
| 38 |
+
accesskey="N">next</a> |</li>
|
| 39 |
+
<li class="right" >
|
| 40 |
+
<a href="build_command.html" title="build_command"
|
| 41 |
+
accesskey="P">previous</a> |</li>
|
| 42 |
+
<li>
|
| 43 |
+
<img src="../_static/cmake-logo-16.png" alt=""
|
| 44 |
+
style="vertical-align: middle; margin-top: -2px" />
|
| 45 |
+
</li>
|
| 46 |
+
<li>
|
| 47 |
+
<a href="https://cmake.org/">CMake</a> »
|
| 48 |
+
</li>
|
| 49 |
+
<li>
|
| 50 |
+
<a href="../index.html">3.27.9 Documentation</a> »
|
| 51 |
+
</li>
|
| 52 |
+
|
| 53 |
+
<li class="nav-item nav-item-1"><a href="../manual/cmake-commands.7.html" accesskey="U">cmake-commands(7)</a> »</li>
|
| 54 |
+
<li class="nav-item nav-item-this"><a href="">cmake_file_api</a></li>
|
| 55 |
+
</ul>
|
| 56 |
+
</div>
|
| 57 |
+
|
| 58 |
+
<div class="document">
|
| 59 |
+
<div class="documentwrapper">
|
| 60 |
+
<div class="bodywrapper">
|
| 61 |
+
<div class="body" role="main">
|
| 62 |
+
|
| 63 |
+
<section id="cmake-file-api">
|
| 64 |
+
<span id="command:cmake_file_api"></span><h1>cmake_file_api<a class="headerlink" href="#cmake-file-api" title="Permalink to this heading">¶</a></h1>
|
| 65 |
+
<div class="versionadded">
|
| 66 |
+
<p><span class="versionmodified added">New in version 3.27.</span></p>
|
| 67 |
+
</div>
|
| 68 |
+
<p>Enables interacting with the <span class="target" id="index-0-manual:cmake-file-api(7)"></span><a class="reference internal" href="../manual/cmake-file-api.7.html#manual:cmake-file-api(7)" title="cmake-file-api(7)"><code class="xref cmake cmake-manual docutils literal notranslate"><span class="pre">CMake</span> <span class="pre">file</span> <span class="pre">API</span></code></a>.</p>
|
| 69 |
+
<dl class="cmake signature">
|
| 70 |
+
<dt class="sig sig-object cmake" id="query">
|
| 71 |
+
<span class="code cmake highlight sig-name descname"><span class="nf"><span class="pre">cmake_file_api(</span></span><span class="no"><span class="pre">QUERY</span></span><span class="w"> </span><span class="p"><span class="pre">...</span></span><span class="nf"><span class="pre">)</span></span></span><a class="headerlink" href="#query" title="Permalink to this definition">¶</a></dt>
|
| 72 |
+
<dd><p>The <code class="docutils literal notranslate"><span class="pre">QUERY</span></code> subcommand adds a file API query for the current CMake
|
| 73 |
+
invocation.</p>
|
| 74 |
+
<div class="highlight-cmake notranslate"><div class="highlight"><pre><span></span><span class="nf">cmake_file_api(</span>
|
| 75 |
+
<span class="w"> </span><span class="no">QUERY</span>
|
| 76 |
+
<span class="w"> </span><span class="no">API_VERSION</span><span class="w"> </span><span class="nv"><version></span>
|
| 77 |
+
<span class="w"> </span><span class="p">[</span><span class="no">CODEMODEL</span><span class="w"> </span><span class="nv"><versions>...</span><span class="p">]</span>
|
| 78 |
+
<span class="w"> </span><span class="p">[</span><span class="no">CACHE</span><span class="w"> </span><span class="nv"><versions>...</span><span class="p">]</span>
|
| 79 |
+
<span class="w"> </span><span class="p">[</span><span class="no">CMAKEFILES</span><span class="w"> </span><span class="nv"><versions>...</span><span class="p">]</span>
|
| 80 |
+
<span class="w"> </span><span class="p">[</span><span class="no">TOOLCHAINS</span><span class="w"> </span><span class="nv"><versions>...</span><span class="p">]</span>
|
| 81 |
+
<span class="nf">)</span>
|
| 82 |
+
</pre></div>
|
| 83 |
+
</div>
|
| 84 |
+
<p>The <code class="docutils literal notranslate"><span class="pre">API_VERSION</span></code> must always be given. Currently, the only supported
|
| 85 |
+
value for <code class="docutils literal notranslate"><span class="pre"><version></span></code> is 1. See <a class="reference internal" href="../manual/cmake-file-api.7.html#file-api-v1"><span class="std std-ref">API v1</span></a> for details of the
|
| 86 |
+
reply content and location.</p>
|
| 87 |
+
<p>Each of the optional keywords <code class="docutils literal notranslate"><span class="pre">CODEMODEL</span></code>, <code class="docutils literal notranslate"><span class="pre">CACHE</span></code>, <code class="docutils literal notranslate"><span class="pre">CMAKEFILES</span></code> and
|
| 88 |
+
<code class="docutils literal notranslate"><span class="pre">TOOLCHAINS</span></code> correspond to one of the object kinds that can be requested
|
| 89 |
+
by the project. The <code class="docutils literal notranslate"><span class="pre">configureLog</span></code> object kind cannot be set with this
|
| 90 |
+
command, since it must be set before CMake starts reading the top level
|
| 91 |
+
<code class="docutils literal notranslate"><span class="pre">CMakeLists.txt</span></code> file.</p>
|
| 92 |
+
<p>For each of the optional keywords, the <code class="docutils literal notranslate"><span class="pre"><versions></span></code> list must contain one
|
| 93 |
+
or more version values of the form <code class="docutils literal notranslate"><span class="pre">major</span></code> or <code class="docutils literal notranslate"><span class="pre">major.minor</span></code>, where
|
| 94 |
+
<code class="docutils literal notranslate"><span class="pre">major</span></code> and <code class="docutils literal notranslate"><span class="pre">minor</span></code> are integers. Projects should list the versions they
|
| 95 |
+
accept in their preferred order, as only the first supported value from the
|
| 96 |
+
list will be selected. The command will ignore versions with a <code class="docutils literal notranslate"><span class="pre">major</span></code>
|
| 97 |
+
version higher than any major version it supports for that object kind.
|
| 98 |
+
It will raise an error if it encounters an invalid version number, or if none
|
| 99 |
+
of the requested versions is supported.</p>
|
| 100 |
+
<p>For each type of object kind requested, a query equivalent to a shared,
|
| 101 |
+
stateless query will be added internally. No query file will be created in
|
| 102 |
+
the file system. The reply <em>will</em> be written to the file system at
|
| 103 |
+
generation time.</p>
|
| 104 |
+
<p>It is not an error to add a query for the same thing more than once, whether
|
| 105 |
+
from query files or from multiple calls to <code class="docutils literal notranslate"><span class="pre">cmake_file_api(QUERY)</span></code>.
|
| 106 |
+
The final set of queries will be a merged combination of all queries
|
| 107 |
+
specified on disk and queries submitted by the project.</p>
|
| 108 |
+
</dd></dl>
|
| 109 |
+
|
| 110 |
+
<section id="example">
|
| 111 |
+
<h2>Example<a class="headerlink" href="#example" title="Permalink to this heading">¶</a></h2>
|
| 112 |
+
<p>A project may want to use replies from the file API at build time to implement
|
| 113 |
+
some form of verification task. Instead of relying on something outside of
|
| 114 |
+
CMake to create a query file, the project can use <code class="docutils literal notranslate"><span class="pre">cmake_file_api(QUERY)</span></code>
|
| 115 |
+
to request the required information for the current run. It can then create
|
| 116 |
+
a custom command to run at build time, knowing that the requested information
|
| 117 |
+
should always be available.</p>
|
| 118 |
+
<div class="highlight-cmake notranslate"><div class="highlight"><pre><span></span><span class="nf">cmake_file_api(</span>
|
| 119 |
+
<span class="w"> </span><span class="no">QUERY</span>
|
| 120 |
+
<span class="w"> </span><span class="no">API_VERSION</span><span class="w"> </span><span class="m">1</span>
|
| 121 |
+
<span class="w"> </span><span class="no">CODEMODEL</span><span class="w"> </span><span class="m">2.3</span>
|
| 122 |
+
<span class="w"> </span><span class="no">TOOLCHAINS</span><span class="w"> </span><span class="m">1</span>
|
| 123 |
+
<span class="nf">)</span>
|
| 124 |
+
|
| 125 |
+
<span class="nf">add_custom_target(</span><span class="nb">verify_project</span>
|
| 126 |
+
<span class="w"> </span><span class="no">COMMAND</span><span class="w"> </span><span class="o">${</span><span class="nt">CMAKE_COMMAND</span><span class="o">}</span>
|
| 127 |
+
<span class="w"> </span><span class="p">-</span><span class="no">D</span><span class="w"> </span><span class="no">BUILD_DIR</span><span class="p">=</span><span class="o">${</span><span class="nt">CMAKE_BINARY_DIR</span><span class="o">}</span>
|
| 128 |
+
<span class="w"> </span><span class="p">-</span><span class="no">D</span><span class="w"> </span><span class="no">CONFIG</span><span class="p">=</span><span class="o">$<</span><span class="no">CONFIG</span><span class="o">></span>
|
| 129 |
+
<span class="w"> </span><span class="p">-</span><span class="no">P</span><span class="w"> </span><span class="o">${</span><span class="nt">CMAKE_CURRENT_SOURCE_DIR</span><span class="o">}</span><span class="na">/verify_project.cmake</span>
|
| 130 |
+
<span class="nf">)</span>
|
| 131 |
+
</pre></div>
|
| 132 |
+
</div>
|
| 133 |
+
</section>
|
| 134 |
+
</section>
|
| 135 |
+
|
| 136 |
+
|
| 137 |
+
<div class="clearer"></div>
|
| 138 |
+
</div>
|
| 139 |
+
</div>
|
| 140 |
+
</div>
|
| 141 |
+
<div class="sphinxsidebar" role="navigation" aria-label="main navigation">
|
| 142 |
+
<div class="sphinxsidebarwrapper">
|
| 143 |
+
<div>
|
| 144 |
+
<h3><a href="../index.html">Table of Contents</a></h3>
|
| 145 |
+
<ul>
|
| 146 |
+
<li><a class="reference internal" href="#">cmake_file_api</a><ul>
|
| 147 |
+
<li><a class="reference internal" href="#example">Example</a></li>
|
| 148 |
+
</ul>
|
| 149 |
+
</li>
|
| 150 |
+
</ul>
|
| 151 |
+
|
| 152 |
+
</div>
|
| 153 |
+
<div>
|
| 154 |
+
<h4>Previous topic</h4>
|
| 155 |
+
<p class="topless"><a href="build_command.html"
|
| 156 |
+
title="previous chapter">build_command</a></p>
|
| 157 |
+
</div>
|
| 158 |
+
<div>
|
| 159 |
+
<h4>Next topic</h4>
|
| 160 |
+
<p class="topless"><a href="create_test_sourcelist.html"
|
| 161 |
+
title="next chapter">create_test_sourcelist</a></p>
|
| 162 |
+
</div>
|
| 163 |
+
<div role="note" aria-label="source link">
|
| 164 |
+
<h3>This Page</h3>
|
| 165 |
+
<ul class="this-page-menu">
|
| 166 |
+
<li><a href="../_sources/command/cmake_file_api.rst.txt"
|
| 167 |
+
rel="nofollow">Show Source</a></li>
|
| 168 |
+
</ul>
|
| 169 |
+
</div>
|
| 170 |
+
<div id="searchbox" style="display: none" role="search">
|
| 171 |
+
<h3 id="searchlabel">Quick search</h3>
|
| 172 |
+
<div class="searchformwrapper">
|
| 173 |
+
<form class="search" action="../search.html" method="get">
|
| 174 |
+
<input type="text" name="q" aria-labelledby="searchlabel" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/>
|
| 175 |
+
<input type="submit" value="Go" />
|
| 176 |
+
</form>
|
| 177 |
+
</div>
|
| 178 |
+
</div>
|
| 179 |
+
<script>document.getElementById('searchbox').style.display = "block"</script>
|
| 180 |
+
</div>
|
| 181 |
+
</div>
|
| 182 |
+
<div class="clearer"></div>
|
| 183 |
+
</div>
|
| 184 |
+
<div class="related" role="navigation" aria-label="related navigation">
|
| 185 |
+
<h3>Navigation</h3>
|
| 186 |
+
<ul>
|
| 187 |
+
<li class="right" style="margin-right: 10px">
|
| 188 |
+
<a href="../genindex.html" title="General Index"
|
| 189 |
+
>index</a></li>
|
| 190 |
+
<li class="right" >
|
| 191 |
+
<a href="create_test_sourcelist.html" title="create_test_sourcelist"
|
| 192 |
+
>next</a> |</li>
|
| 193 |
+
<li class="right" >
|
| 194 |
+
<a href="build_command.html" title="build_command"
|
| 195 |
+
>previous</a> |</li>
|
| 196 |
+
<li>
|
| 197 |
+
<img src="../_static/cmake-logo-16.png" alt=""
|
| 198 |
+
style="vertical-align: middle; margin-top: -2px" />
|
| 199 |
+
</li>
|
| 200 |
+
<li>
|
| 201 |
+
<a href="https://cmake.org/">CMake</a> »
|
| 202 |
+
</li>
|
| 203 |
+
<li>
|
| 204 |
+
<a href="../index.html">3.27.9 Documentation</a> »
|
| 205 |
+
</li>
|
| 206 |
+
|
| 207 |
+
<li class="nav-item nav-item-1"><a href="../manual/cmake-commands.7.html" >cmake-commands(7)</a> »</li>
|
| 208 |
+
<li class="nav-item nav-item-this"><a href="">cmake_file_api</a></li>
|
| 209 |
+
</ul>
|
| 210 |
+
</div>
|
| 211 |
+
|
| 212 |
+
<div class="footer" role="contentinfo">
|
| 213 |
+
© Copyright 2000-2023 Kitware, Inc. and Contributors.
|
| 214 |
+
Created using <a href="https://www.sphinx-doc.org/">Sphinx</a> 5.3.0.
|
| 215 |
+
</div>
|
| 216 |
+
</body>
|
| 217 |
+
</html>
|
toolchain/cmake-3.27.9-linux-x86_64/doc/cmake/html/command/cmake_host_system_information.html
ADDED
|
@@ -0,0 +1,519 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
|
| 2 |
+
<!DOCTYPE html>
|
| 3 |
+
|
| 4 |
+
<html lang="en">
|
| 5 |
+
<head>
|
| 6 |
+
<meta charset="utf-8" />
|
| 7 |
+
<meta name="viewport" content="width=device-width, initial-scale=1.0" /><meta name="generator" content="Docutils 0.19: https://docutils.sourceforge.io/" />
|
| 8 |
+
|
| 9 |
+
<title>cmake_host_system_information — CMake 3.27.9 Documentation</title>
|
| 10 |
+
|
| 11 |
+
<link rel="stylesheet" type="text/css" href="../_static/pygments.css" />
|
| 12 |
+
<link rel="stylesheet" type="text/css" href="../_static/cmake.css" />
|
| 13 |
+
|
| 14 |
+
<script data-url_root="../" id="documentation_options" src="../_static/documentation_options.js"></script>
|
| 15 |
+
<script src="../_static/jquery.js"></script>
|
| 16 |
+
<script src="../_static/underscore.js"></script>
|
| 17 |
+
<script src="../_static/_sphinx_javascript_frameworks_compat.js"></script>
|
| 18 |
+
<script src="../_static/doctools.js"></script>
|
| 19 |
+
<script src="../_static/sphinx_highlight.js"></script>
|
| 20 |
+
|
| 21 |
+
<link rel="shortcut icon" href="../_static/cmake-favicon.ico"/>
|
| 22 |
+
<link rel="index" title="Index" href="../genindex.html" />
|
| 23 |
+
<link rel="search" title="Search" href="../search.html" />
|
| 24 |
+
<link rel="next" title="cmake_language" href="cmake_language.html" />
|
| 25 |
+
<link rel="prev" title="break" href="break.html" />
|
| 26 |
+
|
| 27 |
+
|
| 28 |
+
</head><body>
|
| 29 |
+
|
| 30 |
+
<div class="related" role="navigation" aria-label="related navigation">
|
| 31 |
+
<h3>Navigation</h3>
|
| 32 |
+
<ul>
|
| 33 |
+
<li class="right" style="margin-right: 10px">
|
| 34 |
+
<a href="../genindex.html" title="General Index"
|
| 35 |
+
accesskey="I">index</a></li>
|
| 36 |
+
<li class="right" >
|
| 37 |
+
<a href="cmake_language.html" title="cmake_language"
|
| 38 |
+
accesskey="N">next</a> |</li>
|
| 39 |
+
<li class="right" >
|
| 40 |
+
<a href="break.html" title="break"
|
| 41 |
+
accesskey="P">previous</a> |</li>
|
| 42 |
+
<li>
|
| 43 |
+
<img src="../_static/cmake-logo-16.png" alt=""
|
| 44 |
+
style="vertical-align: middle; margin-top: -2px" />
|
| 45 |
+
</li>
|
| 46 |
+
<li>
|
| 47 |
+
<a href="https://cmake.org/">CMake</a> »
|
| 48 |
+
</li>
|
| 49 |
+
<li>
|
| 50 |
+
<a href="../index.html">3.27.9 Documentation</a> »
|
| 51 |
+
</li>
|
| 52 |
+
|
| 53 |
+
<li class="nav-item nav-item-1"><a href="../manual/cmake-commands.7.html" accesskey="U">cmake-commands(7)</a> »</li>
|
| 54 |
+
<li class="nav-item nav-item-this"><a href="">cmake_host_system_information</a></li>
|
| 55 |
+
</ul>
|
| 56 |
+
</div>
|
| 57 |
+
|
| 58 |
+
<div class="document">
|
| 59 |
+
<div class="documentwrapper">
|
| 60 |
+
<div class="bodywrapper">
|
| 61 |
+
<div class="body" role="main">
|
| 62 |
+
|
| 63 |
+
<section id="cmake-host-system-information">
|
| 64 |
+
<span id="command:cmake_host_system_information"></span><h1>cmake_host_system_information<a class="headerlink" href="#cmake-host-system-information" title="Permalink to this heading">¶</a></h1>
|
| 65 |
+
<p>Query various host system information.</p>
|
| 66 |
+
<section id="synopsis">
|
| 67 |
+
<h2>Synopsis<a class="headerlink" href="#synopsis" title="Permalink to this heading">¶</a></h2>
|
| 68 |
+
<pre class="literal-block"><a class="reference internal" href="#query-host-system-specific-information">Query host system specific information</a>
|
| 69 |
+
cmake_host_system_information(RESULT <variable> QUERY <key> ...)
|
| 70 |
+
|
| 71 |
+
<a class="reference internal" href="#query-windows-registry">Query Windows registry</a>
|
| 72 |
+
cmake_host_system_information(RESULT <variable> QUERY WINDOWS_REGISTRY <key> ...)</pre>
|
| 73 |
+
</section>
|
| 74 |
+
<section id="query-host-system-specific-information">
|
| 75 |
+
<h2>Query host system specific information<a class="headerlink" href="#query-host-system-specific-information" title="Permalink to this heading">¶</a></h2>
|
| 76 |
+
<div class="highlight-cmake notranslate"><div class="highlight"><pre><span></span><span class="nf">cmake_host_system_information(</span><span class="no">RESULT</span><span class="w"> </span><span class="nv"><variable></span><span class="w"> </span><span class="no">QUERY</span><span class="w"> </span><span class="nv"><key></span><span class="w"> </span><span class="p">...</span><span class="nf">)</span>
|
| 77 |
+
</pre></div>
|
| 78 |
+
</div>
|
| 79 |
+
<p>Queries system information of the host system on which cmake runs.
|
| 80 |
+
One or more <code class="docutils literal notranslate"><span class="pre"><key></span></code> can be provided to select the information to be
|
| 81 |
+
queried. The list of queried values is stored in <code class="docutils literal notranslate"><span class="pre"><variable></span></code>.</p>
|
| 82 |
+
<p><code class="docutils literal notranslate"><span class="pre"><key></span></code> can be one of the following values:</p>
|
| 83 |
+
<dl>
|
| 84 |
+
<dt><code class="docutils literal notranslate"><span class="pre">NUMBER_OF_LOGICAL_CORES</span></code></dt><dd><p>Number of logical cores</p>
|
| 85 |
+
</dd>
|
| 86 |
+
<dt><code class="docutils literal notranslate"><span class="pre">NUMBER_OF_PHYSICAL_CORES</span></code></dt><dd><p>Number of physical cores</p>
|
| 87 |
+
</dd>
|
| 88 |
+
<dt><code class="docutils literal notranslate"><span class="pre">HOSTNAME</span></code></dt><dd><p>Hostname</p>
|
| 89 |
+
</dd>
|
| 90 |
+
<dt><code class="docutils literal notranslate"><span class="pre">FQDN</span></code></dt><dd><p>Fully qualified domain name</p>
|
| 91 |
+
</dd>
|
| 92 |
+
<dt><code class="docutils literal notranslate"><span class="pre">TOTAL_VIRTUAL_MEMORY</span></code></dt><dd><p>Total virtual memory in MiB <a class="footnote-reference brackets" href="#mebibytes" id="id1" role="doc-noteref"><span class="fn-bracket">[</span>1<span class="fn-bracket">]</span></a></p>
|
| 93 |
+
</dd>
|
| 94 |
+
<dt><code class="docutils literal notranslate"><span class="pre">AVAILABLE_VIRTUAL_MEMORY</span></code></dt><dd><p>Available virtual memory in MiB <a class="footnote-reference brackets" href="#mebibytes" id="id2" role="doc-noteref"><span class="fn-bracket">[</span>1<span class="fn-bracket">]</span></a></p>
|
| 95 |
+
</dd>
|
| 96 |
+
<dt><code class="docutils literal notranslate"><span class="pre">TOTAL_PHYSICAL_MEMORY</span></code></dt><dd><p>Total physical memory in MiB <a class="footnote-reference brackets" href="#mebibytes" id="id3" role="doc-noteref"><span class="fn-bracket">[</span>1<span class="fn-bracket">]</span></a></p>
|
| 97 |
+
</dd>
|
| 98 |
+
<dt><code class="docutils literal notranslate"><span class="pre">AVAILABLE_PHYSICAL_MEMORY</span></code></dt><dd><p>Available physical memory in MiB <a class="footnote-reference brackets" href="#mebibytes" id="id4" role="doc-noteref"><span class="fn-bracket">[</span>1<span class="fn-bracket">]</span></a></p>
|
| 99 |
+
</dd>
|
| 100 |
+
<dt><code class="docutils literal notranslate"><span class="pre">IS_64BIT</span></code></dt><dd><div class="versionadded">
|
| 101 |
+
<p><span class="versionmodified added">New in version 3.10.</span></p>
|
| 102 |
+
</div>
|
| 103 |
+
<p>One if processor is 64Bit</p>
|
| 104 |
+
</dd>
|
| 105 |
+
<dt><code class="docutils literal notranslate"><span class="pre">HAS_FPU</span></code></dt><dd><div class="versionadded">
|
| 106 |
+
<p><span class="versionmodified added">New in version 3.10.</span></p>
|
| 107 |
+
</div>
|
| 108 |
+
<p>One if processor has floating point unit</p>
|
| 109 |
+
</dd>
|
| 110 |
+
<dt><code class="docutils literal notranslate"><span class="pre">HAS_MMX</span></code></dt><dd><div class="versionadded">
|
| 111 |
+
<p><span class="versionmodified added">New in version 3.10.</span></p>
|
| 112 |
+
</div>
|
| 113 |
+
<p>One if processor supports MMX instructions</p>
|
| 114 |
+
</dd>
|
| 115 |
+
<dt><code class="docutils literal notranslate"><span class="pre">HAS_MMX_PLUS</span></code></dt><dd><div class="versionadded">
|
| 116 |
+
<p><span class="versionmodified added">New in version 3.10.</span></p>
|
| 117 |
+
</div>
|
| 118 |
+
<p>One if processor supports Ext. MMX instructions</p>
|
| 119 |
+
</dd>
|
| 120 |
+
<dt><code class="docutils literal notranslate"><span class="pre">HAS_SSE</span></code></dt><dd><div class="versionadded">
|
| 121 |
+
<p><span class="versionmodified added">New in version 3.10.</span></p>
|
| 122 |
+
</div>
|
| 123 |
+
<p>One if processor supports SSE instructions</p>
|
| 124 |
+
</dd>
|
| 125 |
+
<dt><code class="docutils literal notranslate"><span class="pre">HAS_SSE2</span></code></dt><dd><div class="versionadded">
|
| 126 |
+
<p><span class="versionmodified added">New in version 3.10.</span></p>
|
| 127 |
+
</div>
|
| 128 |
+
<p>One if processor supports SSE2 instructions</p>
|
| 129 |
+
</dd>
|
| 130 |
+
<dt><code class="docutils literal notranslate"><span class="pre">HAS_SSE_FP</span></code></dt><dd><div class="versionadded">
|
| 131 |
+
<p><span class="versionmodified added">New in version 3.10.</span></p>
|
| 132 |
+
</div>
|
| 133 |
+
<p>One if processor supports SSE FP instructions</p>
|
| 134 |
+
</dd>
|
| 135 |
+
<dt><code class="docutils literal notranslate"><span class="pre">HAS_SSE_MMX</span></code></dt><dd><div class="versionadded">
|
| 136 |
+
<p><span class="versionmodified added">New in version 3.10.</span></p>
|
| 137 |
+
</div>
|
| 138 |
+
<p>One if processor supports SSE MMX instructions</p>
|
| 139 |
+
</dd>
|
| 140 |
+
<dt><code class="docutils literal notranslate"><span class="pre">HAS_AMD_3DNOW</span></code></dt><dd><div class="versionadded">
|
| 141 |
+
<p><span class="versionmodified added">New in version 3.10.</span></p>
|
| 142 |
+
</div>
|
| 143 |
+
<p>One if processor supports 3DNow instructions</p>
|
| 144 |
+
</dd>
|
| 145 |
+
<dt><code class="docutils literal notranslate"><span class="pre">HAS_AMD_3DNOW_PLUS</span></code></dt><dd><div class="versionadded">
|
| 146 |
+
<p><span class="versionmodified added">New in version 3.10.</span></p>
|
| 147 |
+
</div>
|
| 148 |
+
<p>One if processor supports 3DNow+ instructions</p>
|
| 149 |
+
</dd>
|
| 150 |
+
<dt><code class="docutils literal notranslate"><span class="pre">HAS_IA64</span></code></dt><dd><div class="versionadded">
|
| 151 |
+
<p><span class="versionmodified added">New in version 3.10.</span></p>
|
| 152 |
+
</div>
|
| 153 |
+
<p>One if IA64 processor emulating x86</p>
|
| 154 |
+
</dd>
|
| 155 |
+
<dt><code class="docutils literal notranslate"><span class="pre">HAS_SERIAL_NUMBER</span></code></dt><dd><div class="versionadded">
|
| 156 |
+
<p><span class="versionmodified added">New in version 3.10.</span></p>
|
| 157 |
+
</div>
|
| 158 |
+
<p>One if processor has serial number</p>
|
| 159 |
+
</dd>
|
| 160 |
+
<dt><code class="docutils literal notranslate"><span class="pre">PROCESSOR_SERIAL_NUMBER</span></code></dt><dd><div class="versionadded">
|
| 161 |
+
<p><span class="versionmodified added">New in version 3.10.</span></p>
|
| 162 |
+
</div>
|
| 163 |
+
<p>Processor serial number</p>
|
| 164 |
+
</dd>
|
| 165 |
+
<dt><code class="docutils literal notranslate"><span class="pre">PROCESSOR_NAME</span></code></dt><dd><div class="versionadded">
|
| 166 |
+
<p><span class="versionmodified added">New in version 3.10.</span></p>
|
| 167 |
+
</div>
|
| 168 |
+
<p>Human readable processor name</p>
|
| 169 |
+
</dd>
|
| 170 |
+
<dt><code class="docutils literal notranslate"><span class="pre">PROCESSOR_DESCRIPTION</span></code></dt><dd><div class="versionadded">
|
| 171 |
+
<p><span class="versionmodified added">New in version 3.10.</span></p>
|
| 172 |
+
</div>
|
| 173 |
+
<p>Human readable full processor description</p>
|
| 174 |
+
</dd>
|
| 175 |
+
<dt><code class="docutils literal notranslate"><span class="pre">OS_NAME</span></code></dt><dd><div class="versionadded">
|
| 176 |
+
<p><span class="versionmodified added">New in version 3.10.</span></p>
|
| 177 |
+
</div>
|
| 178 |
+
<p>See <span class="target" id="index-0-variable:CMAKE_HOST_SYSTEM_NAME"></span><a class="reference internal" href="../variable/CMAKE_HOST_SYSTEM_NAME.html#variable:CMAKE_HOST_SYSTEM_NAME" title="CMAKE_HOST_SYSTEM_NAME"><code class="xref cmake cmake-variable docutils literal notranslate"><span class="pre">CMAKE_HOST_SYSTEM_NAME</span></code></a></p>
|
| 179 |
+
</dd>
|
| 180 |
+
<dt><code class="docutils literal notranslate"><span class="pre">OS_RELEASE</span></code></dt><dd><div class="versionadded">
|
| 181 |
+
<p><span class="versionmodified added">New in version 3.10.</span></p>
|
| 182 |
+
</div>
|
| 183 |
+
<p>The OS sub-type e.g. on Windows <code class="docutils literal notranslate"><span class="pre">Professional</span></code></p>
|
| 184 |
+
</dd>
|
| 185 |
+
<dt><code class="docutils literal notranslate"><span class="pre">OS_VERSION</span></code></dt><dd><div class="versionadded">
|
| 186 |
+
<p><span class="versionmodified added">New in version 3.10.</span></p>
|
| 187 |
+
</div>
|
| 188 |
+
<p>The OS build ID</p>
|
| 189 |
+
</dd>
|
| 190 |
+
<dt><code class="docutils literal notranslate"><span class="pre">OS_PLATFORM</span></code></dt><dd><div class="versionadded">
|
| 191 |
+
<p><span class="versionmodified added">New in version 3.10.</span></p>
|
| 192 |
+
</div>
|
| 193 |
+
<p>See <span class="target" id="index-0-variable:CMAKE_HOST_SYSTEM_PROCESSOR"></span><a class="reference internal" href="../variable/CMAKE_HOST_SYSTEM_PROCESSOR.html#variable:CMAKE_HOST_SYSTEM_PROCESSOR" title="CMAKE_HOST_SYSTEM_PROCESSOR"><code class="xref cmake cmake-variable docutils literal notranslate"><span class="pre">CMAKE_HOST_SYSTEM_PROCESSOR</span></code></a></p>
|
| 194 |
+
</dd>
|
| 195 |
+
<dt><code class="docutils literal notranslate"><span class="pre">DISTRIB_INFO</span></code></dt><dd><div class="versionadded">
|
| 196 |
+
<p><span class="versionmodified added">New in version 3.22.</span></p>
|
| 197 |
+
</div>
|
| 198 |
+
<p>Read <code class="file docutils literal notranslate"><span class="pre">/etc/os-release</span></code> file and define the given <code class="docutils literal notranslate"><span class="pre"><variable></span></code>
|
| 199 |
+
into a list of read variables</p>
|
| 200 |
+
</dd>
|
| 201 |
+
<dt><code class="docutils literal notranslate"><span class="pre">DISTRIB_<name></span></code></dt><dd><div class="versionadded">
|
| 202 |
+
<p><span class="versionmodified added">New in version 3.22.</span></p>
|
| 203 |
+
</div>
|
| 204 |
+
<p>Get the <code class="docutils literal notranslate"><span class="pre"><name></span></code> variable (see <a class="reference external" href="https://www.freedesktop.org/software/systemd/man/os-release.html">man 5 os-release</a>) if it exists in the
|
| 205 |
+
<code class="file docutils literal notranslate"><span class="pre">/etc/os-release</span></code> file</p>
|
| 206 |
+
<p>Example:</p>
|
| 207 |
+
<div class="highlight-cmake notranslate"><div class="highlight"><pre><span></span><span class="nf">cmake_host_system_information(</span><span class="no">RESULT</span><span class="w"> </span><span class="no">PRETTY_NAME</span><span class="w"> </span><span class="no">QUERY</span><span class="w"> </span><span class="no">DISTRIB_PRETTY_NAME</span><span class="nf">)</span>
|
| 208 |
+
<span class="nf">message(</span><span class="no">STATUS</span><span class="w"> </span><span class="s">"${PRETTY_NAME}"</span><span class="nf">)</span>
|
| 209 |
+
|
| 210 |
+
<span class="nf">cmake_host_system_information(</span><span class="no">RESULT</span><span class="w"> </span><span class="no">DISTRO</span><span class="w"> </span><span class="no">QUERY</span><span class="w"> </span><span class="no">DISTRIB_INFO</span><span class="nf">)</span>
|
| 211 |
+
|
| 212 |
+
<span class="nf">foreach(</span><span class="no">VAR</span><span class="w"> </span><span class="no">IN</span><span class="w"> </span><span class="no">LISTS</span><span class="w"> </span><span class="no">DISTRO</span><span class="nf">)</span>
|
| 213 |
+
<span class="w"> </span><span class="nf">message(</span><span class="no">STATUS</span><span class="w"> </span><span class="s">"${VAR}=`${${VAR}}`"</span><span class="nf">)</span>
|
| 214 |
+
<span class="nf">endforeach()</span>
|
| 215 |
+
</pre></div>
|
| 216 |
+
</div>
|
| 217 |
+
<p>Output:</p>
|
| 218 |
+
<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>-- Ubuntu 20.04.2 LTS
|
| 219 |
+
-- DISTRO_BUG_REPORT_URL=`https://bugs.launchpad.net/ubuntu/`
|
| 220 |
+
-- DISTRO_HOME_URL=`https://www.ubuntu.com/`
|
| 221 |
+
-- DISTRO_ID=`ubuntu`
|
| 222 |
+
-- DISTRO_ID_LIKE=`debian`
|
| 223 |
+
-- DISTRO_NAME=`Ubuntu`
|
| 224 |
+
-- DISTRO_PRETTY_NAME=`Ubuntu 20.04.2 LTS`
|
| 225 |
+
-- DISTRO_PRIVACY_POLICY_URL=`https://www.ubuntu.com/legal/terms-and-policies/privacy-policy`
|
| 226 |
+
-- DISTRO_SUPPORT_URL=`https://help.ubuntu.com/`
|
| 227 |
+
-- DISTRO_UBUNTU_CODENAME=`focal`
|
| 228 |
+
-- DISTRO_VERSION=`20.04.2 LTS (Focal Fossa)`
|
| 229 |
+
-- DISTRO_VERSION_CODENAME=`focal`
|
| 230 |
+
-- DISTRO_VERSION_ID=`20.04`
|
| 231 |
+
</pre></div>
|
| 232 |
+
</div>
|
| 233 |
+
</dd>
|
| 234 |
+
</dl>
|
| 235 |
+
<p>If <code class="file docutils literal notranslate"><span class="pre">/etc/os-release</span></code> file is not found, the command tries to gather OS
|
| 236 |
+
identification via fallback scripts. The fallback script can use <a class="reference external" href="http://linuxmafia.com/faq/Admin/release-files.html">various
|
| 237 |
+
distribution-specific files</a> to collect OS identification data and map it
|
| 238 |
+
into <a class="reference external" href="https://www.freedesktop.org/software/systemd/man/os-release.html">man 5 os-release</a> variables.</p>
|
| 239 |
+
<section id="fallback-interface-variables">
|
| 240 |
+
<h3>Fallback Interface Variables<a class="headerlink" href="#fallback-interface-variables" title="Permalink to this heading">¶</a></h3>
|
| 241 |
+
<dl class="cmake variable">
|
| 242 |
+
<dt class="sig sig-object cmake" id="variable:CMAKE_GET_OS_RELEASE_FALLBACK_SCRIPTS">
|
| 243 |
+
<span class="sig-name descname"><span class="pre">CMAKE_GET_OS_RELEASE_FALLBACK_SCRIPTS</span></span><a class="headerlink" href="#variable:CMAKE_GET_OS_RELEASE_FALLBACK_SCRIPTS" title="Permalink to this definition">¶</a></dt>
|
| 244 |
+
<dd><p>In addition to the scripts shipped with CMake, a user may append full
|
| 245 |
+
paths to his script(s) to the this list. The script filename has the
|
| 246 |
+
following format: <code class="docutils literal notranslate"><span class="pre">NNN-<name>.cmake</span></code>, where <code class="docutils literal notranslate"><span class="pre">NNN</span></code> is three digits
|
| 247 |
+
used to apply collected scripts in a specific order.</p>
|
| 248 |
+
</dd></dl>
|
| 249 |
+
|
| 250 |
+
<dl class="cmake variable">
|
| 251 |
+
<dt class="sig sig-object cmake" id="variable:CMAKE_GET_OS_RELEASE_FALLBACK_RESULT_<varname>">
|
| 252 |
+
<span class="sig-name descname"><span class="pre">CMAKE_GET_OS_RELEASE_FALLBACK_RESULT_<varname></span></span><a class="headerlink" href="#variable:CMAKE_GET_OS_RELEASE_FALLBACK_RESULT_<varname>" title="Permalink to this definition">¶</a></dt>
|
| 253 |
+
<dd><p>Variables collected by the user provided fallback script
|
| 254 |
+
ought to be assigned to CMake variables using this naming
|
| 255 |
+
convention. Example, the <code class="docutils literal notranslate"><span class="pre">ID</span></code> variable from the manual becomes
|
| 256 |
+
<code class="docutils literal notranslate"><span class="pre">CMAKE_GET_OS_RELEASE_FALLBACK_RESULT_ID</span></code>.</p>
|
| 257 |
+
</dd></dl>
|
| 258 |
+
|
| 259 |
+
<dl class="cmake variable">
|
| 260 |
+
<dt class="sig sig-object cmake" id="variable:CMAKE_GET_OS_RELEASE_FALLBACK_RESULT">
|
| 261 |
+
<span class="sig-name descname"><span class="pre">CMAKE_GET_OS_RELEASE_FALLBACK_RESULT</span></span><a class="headerlink" href="#variable:CMAKE_GET_OS_RELEASE_FALLBACK_RESULT" title="Permalink to this definition">¶</a></dt>
|
| 262 |
+
<dd><p>The fallback script ought to store names of all assigned
|
| 263 |
+
<code class="docutils literal notranslate"><span class="pre">CMAKE_GET_OS_RELEASE_FALLBACK_RESULT_<varname></span></code> variables in this list.</p>
|
| 264 |
+
</dd></dl>
|
| 265 |
+
|
| 266 |
+
<p>Example:</p>
|
| 267 |
+
<div class="highlight-cmake notranslate"><div class="highlight"><pre><span></span><span class="c"># Try to detect some old distribution</span>
|
| 268 |
+
<span class="c"># See also</span>
|
| 269 |
+
<span class="c"># - http://linuxmafia.com/faq/Admin/release-files.html</span>
|
| 270 |
+
<span class="c">#</span>
|
| 271 |
+
<span class="nf">if(</span><span class="no">NOT</span><span class="w"> </span><span class="no">EXISTS</span><span class="w"> </span><span class="s">"${CMAKE_SYSROOT}/etc/foobar-release"</span><span class="nf">)</span>
|
| 272 |
+
<span class="w"> </span><span class="nf">return()</span>
|
| 273 |
+
<span class="nf">endif()</span>
|
| 274 |
+
<span class="c"># Get the first string only</span>
|
| 275 |
+
<span class="nf">file(</span>
|
| 276 |
+
<span class="w"> </span><span class="no">STRINGS</span><span class="w"> </span><span class="s">"${CMAKE_SYSROOT}/etc/foobar-release"</span><span class="w"> </span><span class="no">CMAKE_GET_OS_RELEASE_FALLBACK_CONTENT</span>
|
| 277 |
+
<span class="w"> </span><span class="no">LIMIT_COUNT</span><span class="w"> </span><span class="m">1</span>
|
| 278 |
+
<span class="w"> </span><span class="nf">)</span>
|
| 279 |
+
<span class="c">#</span>
|
| 280 |
+
<span class="c"># Example:</span>
|
| 281 |
+
<span class="c">#</span>
|
| 282 |
+
<span class="c"># Foobar distribution release 1.2.3 (server)</span>
|
| 283 |
+
<span class="c">#</span>
|
| 284 |
+
<span class="nf">if(</span><span class="no">CMAKE_GET_OS_RELEASE_FALLBACK_CONTENT</span><span class="w"> </span><span class="no">MATCHES</span><span class="w"> </span><span class="s">"Foobar distribution release ([0-9\.]+) .*"</span><span class="nf">)</span>
|
| 285 |
+
<span class="w"> </span><span class="nf">set(</span><span class="no">CMAKE_GET_OS_RELEASE_FALLBACK_RESULT_NAME</span><span class="w"> </span><span class="nb">Foobar</span><span class="nf">)</span>
|
| 286 |
+
<span class="w"> </span><span class="nf">set(</span><span class="no">CMAKE_GET_OS_RELEASE_FALLBACK_RESULT_PRETTY_NAME</span><span class="w"> </span><span class="s">"${CMAKE_GET_OS_RELEASE_FALLBACK_CONTENT}"</span><span class="nf">)</span>
|
| 287 |
+
<span class="w"> </span><span class="nf">set(</span><span class="no">CMAKE_GET_OS_RELEASE_FALLBACK_RESULT_ID</span><span class="w"> </span><span class="nb">foobar</span><span class="nf">)</span>
|
| 288 |
+
<span class="w"> </span><span class="nf">set(</span><span class="no">CMAKE_GET_OS_RELEASE_FALLBACK_RESULT_VERSION</span><span class="w"> </span><span class="o">${</span><span class="nt">CMAKE_MATCH_1</span><span class="o">}</span><span class="nf">)</span>
|
| 289 |
+
<span class="w"> </span><span class="nf">set(</span><span class="no">CMAKE_GET_OS_RELEASE_FALLBACK_RESULT_VERSION_ID</span><span class="w"> </span><span class="o">${</span><span class="nt">CMAKE_MATCH_1</span><span class="o">}</span><span class="nf">)</span>
|
| 290 |
+
<span class="w"> </span><span class="nf">list(</span>
|
| 291 |
+
<span class="w"> </span><span class="no">APPEND</span><span class="w"> </span><span class="no">CMAKE_GET_OS_RELEASE_FALLBACK_RESULT</span>
|
| 292 |
+
<span class="w"> </span><span class="no">CMAKE_GET_OS_RELEASE_FALLBACK_RESULT_NAME</span>
|
| 293 |
+
<span class="w"> </span><span class="no">CMAKE_GET_OS_RELEASE_FALLBACK_RESULT_PRETTY_NAME</span>
|
| 294 |
+
<span class="w"> </span><span class="no">CMAKE_GET_OS_RELEASE_FALLBACK_RESULT_ID</span>
|
| 295 |
+
<span class="w"> </span><span class="no">CMAKE_GET_OS_RELEASE_FALLBACK_RESULT_VERSION</span>
|
| 296 |
+
<span class="w"> </span><span class="no">CMAKE_GET_OS_RELEASE_FALLBACK_RESULT_VERSION_ID</span>
|
| 297 |
+
<span class="w"> </span><span class="nf">)</span>
|
| 298 |
+
<span class="nf">endif()</span>
|
| 299 |
+
<span class="nf">unset(</span><span class="no">CMAKE_GET_OS_RELEASE_FALLBACK_CONTENT</span><span class="nf">)</span>
|
| 300 |
+
</pre></div>
|
| 301 |
+
</div>
|
| 302 |
+
<p class="rubric">Footnotes</p>
|
| 303 |
+
<aside class="footnote-list brackets">
|
| 304 |
+
<aside class="footnote brackets" id="mebibytes" role="note">
|
| 305 |
+
<span class="label"><span class="fn-bracket">[</span>1<span class="fn-bracket">]</span></span>
|
| 306 |
+
<span class="backrefs">(<a role="doc-backlink" href="#id1">1</a>,<a role="doc-backlink" href="#id2">2</a>,<a role="doc-backlink" href="#id3">3</a>,<a role="doc-backlink" href="#id4">4</a>)</span>
|
| 307 |
+
<p>One MiB (mebibyte) is equal to 1024x1024 bytes.</p>
|
| 308 |
+
</aside>
|
| 309 |
+
</aside>
|
| 310 |
+
</section>
|
| 311 |
+
</section>
|
| 312 |
+
<section id="query-windows-registry">
|
| 313 |
+
<span id="id5"></span><h2>Query Windows registry<a class="headerlink" href="#query-windows-registry" title="Permalink to this heading">¶</a></h2>
|
| 314 |
+
<div class="versionadded">
|
| 315 |
+
<p><span class="versionmodified added">New in version 3.24.</span></p>
|
| 316 |
+
</div>
|
| 317 |
+
<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>cmake_host_system_information(RESULT <variable>
|
| 318 |
+
QUERY WINDOWS_REGISTRY <key> [VALUE_NAMES|SUBKEYS|VALUE <name>]
|
| 319 |
+
[VIEW (64|32|64_32|32_64|HOST|TARGET|BOTH)]
|
| 320 |
+
[SEPARATOR <separator>]
|
| 321 |
+
[ERROR_VARIABLE <result>])
|
| 322 |
+
</pre></div>
|
| 323 |
+
</div>
|
| 324 |
+
<p>Performs query operations on local computer registry subkey. Returns a list of
|
| 325 |
+
subkeys or value names that are located under the specified subkey in the
|
| 326 |
+
registry or the data of the specified value name. The result of the queried
|
| 327 |
+
entity is stored in <code class="docutils literal notranslate"><span class="pre"><variable></span></code>.</p>
|
| 328 |
+
<div class="admonition note">
|
| 329 |
+
<p class="admonition-title">Note</p>
|
| 330 |
+
<p>Querying registry for any other platforms than <code class="docutils literal notranslate"><span class="pre">Windows</span></code>, including
|
| 331 |
+
<code class="docutils literal notranslate"><span class="pre">CYGWIN</span></code>, will always returns an empty string and sets an error message in
|
| 332 |
+
the variable specified with sub-option <code class="docutils literal notranslate"><span class="pre">ERROR_VARIABLE</span></code>.</p>
|
| 333 |
+
</div>
|
| 334 |
+
<p><code class="docutils literal notranslate"><span class="pre"><key></span></code> specify the full path of a subkey on the local computer. The
|
| 335 |
+
<code class="docutils literal notranslate"><span class="pre"><key></span></code> must include a valid root key. Valid root keys for the local computer
|
| 336 |
+
are:</p>
|
| 337 |
+
<ul class="simple">
|
| 338 |
+
<li><p><code class="docutils literal notranslate"><span class="pre">HKLM</span></code> or <code class="docutils literal notranslate"><span class="pre">HKEY_LOCAL_MACHINE</span></code></p></li>
|
| 339 |
+
<li><p><code class="docutils literal notranslate"><span class="pre">HKCU</span></code> or <code class="docutils literal notranslate"><span class="pre">HKEY_CURRENT_USER</span></code></p></li>
|
| 340 |
+
<li><p><code class="docutils literal notranslate"><span class="pre">HKCR</span></code> or <code class="docutils literal notranslate"><span class="pre">HKEY_CLASSES_ROOT</span></code></p></li>
|
| 341 |
+
<li><p><code class="docutils literal notranslate"><span class="pre">HKU</span></code> or <code class="docutils literal notranslate"><span class="pre">HKEY_USERS</span></code></p></li>
|
| 342 |
+
<li><p><code class="docutils literal notranslate"><span class="pre">HKCC</span></code> or <code class="docutils literal notranslate"><span class="pre">HKEY_CURRENT_CONFIG</span></code></p></li>
|
| 343 |
+
</ul>
|
| 344 |
+
<p>And, optionally, the path to a subkey under the specified root key. The path
|
| 345 |
+
separator can be the slash or the backslash. <code class="docutils literal notranslate"><span class="pre"><key></span></code> is not case sensitive.
|
| 346 |
+
For example:</p>
|
| 347 |
+
<div class="highlight-cmake notranslate"><div class="highlight"><pre><span></span><span class="nf">cmake_host_system_information(</span><span class="no">RESULT</span><span class="w"> </span><span class="nb">result</span><span class="w"> </span><span class="no">QUERY</span><span class="w"> </span><span class="no">WINDOWS_REGISTRY</span><span class="w"> </span><span class="s">"HKLM"</span><span class="nf">)</span>
|
| 348 |
+
<span class="nf">cmake_host_system_information(</span><span class="no">RESULT</span><span class="w"> </span><span class="nb">result</span><span class="w"> </span><span class="no">QUERY</span><span class="w"> </span><span class="no">WINDOWS_REGISTRY</span><span class="w"> </span><span class="s">"HKLM/SOFTWARE/Kitware"</span><span class="nf">)</span>
|
| 349 |
+
<span class="nf">cmake_host_system_information(</span><span class="no">RESULT</span><span class="w"> </span><span class="nb">result</span><span class="w"> </span><span class="no">QUERY</span><span class="w"> </span><span class="no">WINDOWS_REGISTRY</span><span class="w"> </span><span class="s">"HKCU\\SOFTWARE\\Kitware"</span><span class="nf">)</span>
|
| 350 |
+
</pre></div>
|
| 351 |
+
</div>
|
| 352 |
+
<dl>
|
| 353 |
+
<dt><code class="docutils literal notranslate"><span class="pre">VALUE_NAMES</span></code></dt><dd><p>Request the list of value names defined under <code class="docutils literal notranslate"><span class="pre"><key></span></code>. If a default value
|
| 354 |
+
is defined, it will be identified with the special name <code class="docutils literal notranslate"><span class="pre">(default)</span></code>.</p>
|
| 355 |
+
</dd>
|
| 356 |
+
<dt><code class="docutils literal notranslate"><span class="pre">SUBKEYS</span></code></dt><dd><p>Request the list of subkeys defined under <code class="docutils literal notranslate"><span class="pre"><key></span></code>.</p>
|
| 357 |
+
</dd>
|
| 358 |
+
<dt><code class="docutils literal notranslate"><span class="pre">VALUE</span> <span class="pre"><name></span></code></dt><dd><p>Request the data stored in value named <code class="docutils literal notranslate"><span class="pre"><name></span></code>. If <code class="docutils literal notranslate"><span class="pre">VALUE</span></code> is not
|
| 359 |
+
specified or argument is the special name <code class="docutils literal notranslate"><span class="pre">(default)</span></code>, the content of the
|
| 360 |
+
default value, if any, will be returned.</p>
|
| 361 |
+
<div class="highlight-cmake notranslate"><div class="highlight"><pre><span></span><span class="c"># query default value for HKLM/SOFTWARE/Kitware key</span>
|
| 362 |
+
<span class="nf">cmake_host_system_information(</span><span class="no">RESULT</span><span class="w"> </span><span class="nb">result</span>
|
| 363 |
+
<span class="w"> </span><span class="no">QUERY</span><span class="w"> </span><span class="no">WINDOWS_REGISTRY</span><span class="w"> </span><span class="s">"HKLM/SOFTWARE/Kitware"</span><span class="nf">)</span>
|
| 364 |
+
|
| 365 |
+
<span class="c"># query default value for HKLM/SOFTWARE/Kitware key using special value name</span>
|
| 366 |
+
<span class="nf">cmake_host_system_information(</span><span class="no">RESULT</span><span class="w"> </span><span class="nb">result</span>
|
| 367 |
+
<span class="w"> </span><span class="no">QUERY</span><span class="w"> </span><span class="no">WINDOWS_REGISTRY</span><span class="w"> </span><span class="s">"HKLM/SOFTWARE/Kitware"</span>
|
| 368 |
+
<span class="w"> </span><span class="no">VALUE</span><span class="w"> </span><span class="s">"(default)"</span><span class="nf">)</span>
|
| 369 |
+
</pre></div>
|
| 370 |
+
</div>
|
| 371 |
+
<p>Supported types are:</p>
|
| 372 |
+
<ul class="simple">
|
| 373 |
+
<li><p><code class="docutils literal notranslate"><span class="pre">REG_SZ</span></code>.</p></li>
|
| 374 |
+
<li><p><code class="docutils literal notranslate"><span class="pre">REG_EXPAND_SZ</span></code>. The returned data is expanded.</p></li>
|
| 375 |
+
<li><p><code class="docutils literal notranslate"><span class="pre">REG_MULTI_SZ</span></code>. The returned is expressed as a CMake list. See also
|
| 376 |
+
<code class="docutils literal notranslate"><span class="pre">SEPARATOR</span></code> sub-option.</p></li>
|
| 377 |
+
<li><p><code class="docutils literal notranslate"><span class="pre">REG_DWORD</span></code>.</p></li>
|
| 378 |
+
<li><p><code class="docutils literal notranslate"><span class="pre">REG_QWORD</span></code>.</p></li>
|
| 379 |
+
</ul>
|
| 380 |
+
<p>For all other types, an empty string is returned.</p>
|
| 381 |
+
</dd>
|
| 382 |
+
<dt><code class="docutils literal notranslate"><span class="pre">VIEW</span></code></dt><dd><p>Specify which registry views must be queried. When not specified, <code class="docutils literal notranslate"><span class="pre">BOTH</span></code>
|
| 383 |
+
view is used.</p>
|
| 384 |
+
<dl>
|
| 385 |
+
<dt><code class="docutils literal notranslate"><span class="pre">64</span></code></dt><dd><p>Query the 64bit registry. On <code class="docutils literal notranslate"><span class="pre">32bit</span> <span class="pre">Windows</span></code>, returns always an empty
|
| 386 |
+
string.</p>
|
| 387 |
+
</dd>
|
| 388 |
+
<dt><code class="docutils literal notranslate"><span class="pre">32</span></code></dt><dd><p>Query the 32bit registry.</p>
|
| 389 |
+
</dd>
|
| 390 |
+
<dt><code class="docutils literal notranslate"><span class="pre">64_32</span></code></dt><dd><p>For <code class="docutils literal notranslate"><span class="pre">VALUE</span></code> sub-option or default value, query the registry using view
|
| 391 |
+
<code class="docutils literal notranslate"><span class="pre">64</span></code>, and if the request failed, query the registry using view <code class="docutils literal notranslate"><span class="pre">32</span></code>.
|
| 392 |
+
For <code class="docutils literal notranslate"><span class="pre">VALUE_NAMES</span></code> and <code class="docutils literal notranslate"><span class="pre">SUBKEYS</span></code> sub-options, query both views (<code class="docutils literal notranslate"><span class="pre">64</span></code>
|
| 393 |
+
and <code class="docutils literal notranslate"><span class="pre">32</span></code>) and merge the results (sorted and duplicates removed).</p>
|
| 394 |
+
</dd>
|
| 395 |
+
<dt><code class="docutils literal notranslate"><span class="pre">32_64</span></code></dt><dd><p>For <code class="docutils literal notranslate"><span class="pre">VALUE</span></code> sub-option or default value, query the registry using view
|
| 396 |
+
<code class="docutils literal notranslate"><span class="pre">32</span></code>, and if the request failed, query the registry using view <code class="docutils literal notranslate"><span class="pre">64</span></code>.
|
| 397 |
+
For <code class="docutils literal notranslate"><span class="pre">VALUE_NAMES</span></code> and <code class="docutils literal notranslate"><span class="pre">SUBKEYS</span></code> sub-options, query both views (<code class="docutils literal notranslate"><span class="pre">32</span></code>
|
| 398 |
+
and <code class="docutils literal notranslate"><span class="pre">64</span></code>) and merge the results (sorted and duplicates removed).</p>
|
| 399 |
+
</dd>
|
| 400 |
+
<dt><code class="docutils literal notranslate"><span class="pre">HOST</span></code></dt><dd><p>Query the registry matching the architecture of the host: <code class="docutils literal notranslate"><span class="pre">64</span></code> on <code class="docutils literal notranslate"><span class="pre">64bit</span>
|
| 401 |
+
<span class="pre">Windows</span></code> and <code class="docutils literal notranslate"><span class="pre">32</span></code> on <code class="docutils literal notranslate"><span class="pre">32bit</span> <span class="pre">Windows</span></code>.</p>
|
| 402 |
+
</dd>
|
| 403 |
+
<dt><code class="docutils literal notranslate"><span class="pre">TARGET</span></code></dt><dd><p>Query the registry matching the architecture specified by
|
| 404 |
+
<span class="target" id="index-0-variable:CMAKE_SIZEOF_VOID_P"></span><a class="reference internal" href="../variable/CMAKE_SIZEOF_VOID_P.html#variable:CMAKE_SIZEOF_VOID_P" title="CMAKE_SIZEOF_VOID_P"><code class="xref cmake cmake-variable docutils literal notranslate"><span class="pre">CMAKE_SIZEOF_VOID_P</span></code></a> variable. If not defined, fallback to
|
| 405 |
+
<code class="docutils literal notranslate"><span class="pre">HOST</span></code> view.</p>
|
| 406 |
+
</dd>
|
| 407 |
+
<dt><code class="docutils literal notranslate"><span class="pre">BOTH</span></code></dt><dd><p>Query both views (<code class="docutils literal notranslate"><span class="pre">32</span></code> and <code class="docutils literal notranslate"><span class="pre">64</span></code>). The order depends of the following
|
| 408 |
+
rules: If <span class="target" id="index-1-variable:CMAKE_SIZEOF_VOID_P"></span><a class="reference internal" href="../variable/CMAKE_SIZEOF_VOID_P.html#variable:CMAKE_SIZEOF_VOID_P" title="CMAKE_SIZEOF_VOID_P"><code class="xref cmake cmake-variable docutils literal notranslate"><span class="pre">CMAKE_SIZEOF_VOID_P</span></code></a> variable is defined. Use the
|
| 409 |
+
following view depending of the content of this variable:</p>
|
| 410 |
+
<ul class="simple">
|
| 411 |
+
<li><p><code class="docutils literal notranslate"><span class="pre">8</span></code>: <code class="docutils literal notranslate"><span class="pre">64_32</span></code></p></li>
|
| 412 |
+
<li><p><code class="docutils literal notranslate"><span class="pre">4</span></code>: <code class="docutils literal notranslate"><span class="pre">32_64</span></code></p></li>
|
| 413 |
+
</ul>
|
| 414 |
+
<p>If <span class="target" id="index-2-variable:CMAKE_SIZEOF_VOID_P"></span><a class="reference internal" href="../variable/CMAKE_SIZEOF_VOID_P.html#variable:CMAKE_SIZEOF_VOID_P" title="CMAKE_SIZEOF_VOID_P"><code class="xref cmake cmake-variable docutils literal notranslate"><span class="pre">CMAKE_SIZEOF_VOID_P</span></code></a> variable is not defined, rely on
|
| 415 |
+
architecture of the host:</p>
|
| 416 |
+
<ul class="simple">
|
| 417 |
+
<li><p><code class="docutils literal notranslate"><span class="pre">64bit</span></code>: <code class="docutils literal notranslate"><span class="pre">64_32</span></code></p></li>
|
| 418 |
+
<li><p><code class="docutils literal notranslate"><span class="pre">32bit</span></code>: <code class="docutils literal notranslate"><span class="pre">32</span></code></p></li>
|
| 419 |
+
</ul>
|
| 420 |
+
</dd>
|
| 421 |
+
</dl>
|
| 422 |
+
</dd>
|
| 423 |
+
<dt><code class="docutils literal notranslate"><span class="pre">SEPARATOR</span></code></dt><dd><p>Specify the separator character for <code class="docutils literal notranslate"><span class="pre">REG_MULTI_SZ</span></code> type. When not
|
| 424 |
+
specified, the character <code class="docutils literal notranslate"><span class="pre">\0</span></code> is used.</p>
|
| 425 |
+
</dd>
|
| 426 |
+
<dt><code class="docutils literal notranslate"><span class="pre">ERROR_VARIABLE</span> <span class="pre"><result></span></code></dt><dd><p>Returns any error raised during query operation. In case of success, the
|
| 427 |
+
variable holds an empty string.</p>
|
| 428 |
+
</dd>
|
| 429 |
+
</dl>
|
| 430 |
+
</section>
|
| 431 |
+
</section>
|
| 432 |
+
|
| 433 |
+
|
| 434 |
+
<div class="clearer"></div>
|
| 435 |
+
</div>
|
| 436 |
+
</div>
|
| 437 |
+
</div>
|
| 438 |
+
<div class="sphinxsidebar" role="navigation" aria-label="main navigation">
|
| 439 |
+
<div class="sphinxsidebarwrapper">
|
| 440 |
+
<div>
|
| 441 |
+
<h3><a href="../index.html">Table of Contents</a></h3>
|
| 442 |
+
<ul>
|
| 443 |
+
<li><a class="reference internal" href="#">cmake_host_system_information</a><ul>
|
| 444 |
+
<li><a class="reference internal" href="#synopsis">Synopsis</a></li>
|
| 445 |
+
<li><a class="reference internal" href="#query-host-system-specific-information">Query host system specific information</a><ul>
|
| 446 |
+
<li><a class="reference internal" href="#fallback-interface-variables">Fallback Interface Variables</a></li>
|
| 447 |
+
</ul>
|
| 448 |
+
</li>
|
| 449 |
+
<li><a class="reference internal" href="#query-windows-registry">Query Windows registry</a></li>
|
| 450 |
+
</ul>
|
| 451 |
+
</li>
|
| 452 |
+
</ul>
|
| 453 |
+
|
| 454 |
+
</div>
|
| 455 |
+
<div>
|
| 456 |
+
<h4>Previous topic</h4>
|
| 457 |
+
<p class="topless"><a href="break.html"
|
| 458 |
+
title="previous chapter">break</a></p>
|
| 459 |
+
</div>
|
| 460 |
+
<div>
|
| 461 |
+
<h4>Next topic</h4>
|
| 462 |
+
<p class="topless"><a href="cmake_language.html"
|
| 463 |
+
title="next chapter">cmake_language</a></p>
|
| 464 |
+
</div>
|
| 465 |
+
<div role="note" aria-label="source link">
|
| 466 |
+
<h3>This Page</h3>
|
| 467 |
+
<ul class="this-page-menu">
|
| 468 |
+
<li><a href="../_sources/command/cmake_host_system_information.rst.txt"
|
| 469 |
+
rel="nofollow">Show Source</a></li>
|
| 470 |
+
</ul>
|
| 471 |
+
</div>
|
| 472 |
+
<div id="searchbox" style="display: none" role="search">
|
| 473 |
+
<h3 id="searchlabel">Quick search</h3>
|
| 474 |
+
<div class="searchformwrapper">
|
| 475 |
+
<form class="search" action="../search.html" method="get">
|
| 476 |
+
<input type="text" name="q" aria-labelledby="searchlabel" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/>
|
| 477 |
+
<input type="submit" value="Go" />
|
| 478 |
+
</form>
|
| 479 |
+
</div>
|
| 480 |
+
</div>
|
| 481 |
+
<script>document.getElementById('searchbox').style.display = "block"</script>
|
| 482 |
+
</div>
|
| 483 |
+
</div>
|
| 484 |
+
<div class="clearer"></div>
|
| 485 |
+
</div>
|
| 486 |
+
<div class="related" role="navigation" aria-label="related navigation">
|
| 487 |
+
<h3>Navigation</h3>
|
| 488 |
+
<ul>
|
| 489 |
+
<li class="right" style="margin-right: 10px">
|
| 490 |
+
<a href="../genindex.html" title="General Index"
|
| 491 |
+
>index</a></li>
|
| 492 |
+
<li class="right" >
|
| 493 |
+
<a href="cmake_language.html" title="cmake_language"
|
| 494 |
+
>next</a> |</li>
|
| 495 |
+
<li class="right" >
|
| 496 |
+
<a href="break.html" title="break"
|
| 497 |
+
>previous</a> |</li>
|
| 498 |
+
<li>
|
| 499 |
+
<img src="../_static/cmake-logo-16.png" alt=""
|
| 500 |
+
style="vertical-align: middle; margin-top: -2px" />
|
| 501 |
+
</li>
|
| 502 |
+
<li>
|
| 503 |
+
<a href="https://cmake.org/">CMake</a> »
|
| 504 |
+
</li>
|
| 505 |
+
<li>
|
| 506 |
+
<a href="../index.html">3.27.9 Documentation</a> »
|
| 507 |
+
</li>
|
| 508 |
+
|
| 509 |
+
<li class="nav-item nav-item-1"><a href="../manual/cmake-commands.7.html" >cmake-commands(7)</a> »</li>
|
| 510 |
+
<li class="nav-item nav-item-this"><a href="">cmake_host_system_information</a></li>
|
| 511 |
+
</ul>
|
| 512 |
+
</div>
|
| 513 |
+
|
| 514 |
+
<div class="footer" role="contentinfo">
|
| 515 |
+
© Copyright 2000-2023 Kitware, Inc. and Contributors.
|
| 516 |
+
Created using <a href="https://www.sphinx-doc.org/">Sphinx</a> 5.3.0.
|
| 517 |
+
</div>
|
| 518 |
+
</body>
|
| 519 |
+
</html>
|
toolchain/cmake-3.27.9-linux-x86_64/doc/cmake/html/command/cmake_language.html
ADDED
|
@@ -0,0 +1,627 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
|
| 2 |
+
<!DOCTYPE html>
|
| 3 |
+
|
| 4 |
+
<html lang="en">
|
| 5 |
+
<head>
|
| 6 |
+
<meta charset="utf-8" />
|
| 7 |
+
<meta name="viewport" content="width=device-width, initial-scale=1.0" /><meta name="generator" content="Docutils 0.19: https://docutils.sourceforge.io/" />
|
| 8 |
+
|
| 9 |
+
<title>cmake_language — CMake 3.27.9 Documentation</title>
|
| 10 |
+
|
| 11 |
+
<link rel="stylesheet" type="text/css" href="../_static/pygments.css" />
|
| 12 |
+
<link rel="stylesheet" type="text/css" href="../_static/cmake.css" />
|
| 13 |
+
|
| 14 |
+
<script data-url_root="../" id="documentation_options" src="../_static/documentation_options.js"></script>
|
| 15 |
+
<script src="../_static/jquery.js"></script>
|
| 16 |
+
<script src="../_static/underscore.js"></script>
|
| 17 |
+
<script src="../_static/_sphinx_javascript_frameworks_compat.js"></script>
|
| 18 |
+
<script src="../_static/doctools.js"></script>
|
| 19 |
+
<script src="../_static/sphinx_highlight.js"></script>
|
| 20 |
+
|
| 21 |
+
<link rel="shortcut icon" href="../_static/cmake-favicon.ico"/>
|
| 22 |
+
<link rel="index" title="Index" href="../genindex.html" />
|
| 23 |
+
<link rel="search" title="Search" href="../search.html" />
|
| 24 |
+
<link rel="next" title="cmake_minimum_required" href="cmake_minimum_required.html" />
|
| 25 |
+
<link rel="prev" title="cmake_host_system_information" href="cmake_host_system_information.html" />
|
| 26 |
+
|
| 27 |
+
|
| 28 |
+
</head><body>
|
| 29 |
+
|
| 30 |
+
<div class="related" role="navigation" aria-label="related navigation">
|
| 31 |
+
<h3>Navigation</h3>
|
| 32 |
+
<ul>
|
| 33 |
+
<li class="right" style="margin-right: 10px">
|
| 34 |
+
<a href="../genindex.html" title="General Index"
|
| 35 |
+
accesskey="I">index</a></li>
|
| 36 |
+
<li class="right" >
|
| 37 |
+
<a href="cmake_minimum_required.html" title="cmake_minimum_required"
|
| 38 |
+
accesskey="N">next</a> |</li>
|
| 39 |
+
<li class="right" >
|
| 40 |
+
<a href="cmake_host_system_information.html" title="cmake_host_system_information"
|
| 41 |
+
accesskey="P">previous</a> |</li>
|
| 42 |
+
<li>
|
| 43 |
+
<img src="../_static/cmake-logo-16.png" alt=""
|
| 44 |
+
style="vertical-align: middle; margin-top: -2px" />
|
| 45 |
+
</li>
|
| 46 |
+
<li>
|
| 47 |
+
<a href="https://cmake.org/">CMake</a> »
|
| 48 |
+
</li>
|
| 49 |
+
<li>
|
| 50 |
+
<a href="../index.html">3.27.9 Documentation</a> »
|
| 51 |
+
</li>
|
| 52 |
+
|
| 53 |
+
<li class="nav-item nav-item-1"><a href="../manual/cmake-commands.7.html" accesskey="U">cmake-commands(7)</a> »</li>
|
| 54 |
+
<li class="nav-item nav-item-this"><a href="">cmake_language</a></li>
|
| 55 |
+
</ul>
|
| 56 |
+
</div>
|
| 57 |
+
|
| 58 |
+
<div class="document">
|
| 59 |
+
<div class="documentwrapper">
|
| 60 |
+
<div class="bodywrapper">
|
| 61 |
+
<div class="body" role="main">
|
| 62 |
+
|
| 63 |
+
<section id="cmake-language">
|
| 64 |
+
<span id="command:cmake_language"></span><h1>cmake_language<a class="headerlink" href="#cmake-language" title="Permalink to this heading">¶</a></h1>
|
| 65 |
+
<div class="versionadded">
|
| 66 |
+
<p><span class="versionmodified added">New in version 3.18.</span></p>
|
| 67 |
+
</div>
|
| 68 |
+
<p>Call meta-operations on CMake commands.</p>
|
| 69 |
+
<section id="synopsis">
|
| 70 |
+
<h2>Synopsis<a class="headerlink" href="#synopsis" title="Permalink to this heading">¶</a></h2>
|
| 71 |
+
<pre class="literal-block">cmake_language(<a class="reference internal" href="#call">CALL</a> <command> [<arg>...])
|
| 72 |
+
cmake_language(<a class="reference internal" href="#eval">EVAL</a> CODE <code>...)
|
| 73 |
+
cmake_language(<a class="reference internal" href="#defer">DEFER</a> <options>... CALL <command> [<arg>...])
|
| 74 |
+
cmake_language(<a class="reference internal" href="#set-dependency-provider">SET_DEPENDENCY_PROVIDER</a> <command> SUPPORTED_METHODS <methods>...)
|
| 75 |
+
cmake_language(<a class="reference internal" href="#get-message-log-level">GET_MESSAGE_LOG_LEVEL</a> <out-var>)</pre>
|
| 76 |
+
</section>
|
| 77 |
+
<section id="introduction">
|
| 78 |
+
<h2>Introduction<a class="headerlink" href="#introduction" title="Permalink to this heading">¶</a></h2>
|
| 79 |
+
<p>This command will call meta-operations on built-in CMake commands or
|
| 80 |
+
those created via the <span class="target" id="index-0-command:macro"></span><a class="reference internal" href="macro.html#command:macro" title="macro"><code class="xref cmake cmake-command docutils literal notranslate"><span class="pre">macro()</span></code></a> or <span class="target" id="index-0-command:function"></span><a class="reference internal" href="function.html#command:function" title="function"><code class="xref cmake cmake-command docutils literal notranslate"><span class="pre">function()</span></code></a> commands.</p>
|
| 81 |
+
<p><code class="docutils literal notranslate"><span class="pre">cmake_language</span></code> does not introduce a new variable or policy scope.</p>
|
| 82 |
+
</section>
|
| 83 |
+
<section id="calling-commands">
|
| 84 |
+
<h2>Calling Commands<a class="headerlink" href="#calling-commands" title="Permalink to this heading">¶</a></h2>
|
| 85 |
+
<dl class="cmake signature">
|
| 86 |
+
<dt class="sig sig-object cmake" id="call">
|
| 87 |
+
<span class="code cmake highlight sig-name descname"><span class="nf"><span class="pre">cmake_language(</span></span><span class="no"><span class="pre">CALL</span></span><span class="w"> </span><span class="nv"><span class="pre"><command></span></span><span class="w"> </span><span class="p"><span class="pre">[</span></span><span class="nv"><span class="pre"><arg>...</span></span><span class="p"><span class="pre">]</span></span><span class="nf"><span class="pre">)</span></span></span><a class="headerlink" href="#call" title="Permalink to this definition">¶</a></dt>
|
| 88 |
+
<dd><p>Calls the named <code class="docutils literal notranslate"><span class="pre"><command></span></code> with the given arguments (if any).
|
| 89 |
+
For example, the code:</p>
|
| 90 |
+
<div class="highlight-cmake notranslate"><div class="highlight"><pre><span></span><span class="nf">set(</span><span class="nb">message_command</span><span class="w"> </span><span class="s">"message"</span><span class="nf">)</span>
|
| 91 |
+
<span class="nf">cmake_language(</span><span class="no">CALL</span><span class="w"> </span><span class="o">${</span><span class="nt">message_command</span><span class="o">}</span><span class="w"> </span><span class="no">STATUS</span><span class="w"> </span><span class="s">"Hello World!"</span><span class="nf">)</span>
|
| 92 |
+
</pre></div>
|
| 93 |
+
</div>
|
| 94 |
+
<p>is equivalent to</p>
|
| 95 |
+
<div class="highlight-cmake notranslate"><div class="highlight"><pre><span></span><span class="nf">message(</span><span class="no">STATUS</span><span class="w"> </span><span class="s">"Hello World!"</span><span class="nf">)</span>
|
| 96 |
+
</pre></div>
|
| 97 |
+
</div>
|
| 98 |
+
<div class="admonition note">
|
| 99 |
+
<p class="admonition-title">Note</p>
|
| 100 |
+
<p>To ensure consistency of the code, the following commands are not allowed:</p>
|
| 101 |
+
<ul class="simple">
|
| 102 |
+
<li><p><code class="docutils literal notranslate"><span class="pre">if</span></code> / <code class="docutils literal notranslate"><span class="pre">elseif</span></code> / <code class="docutils literal notranslate"><span class="pre">else</span></code> / <code class="docutils literal notranslate"><span class="pre">endif</span></code></p></li>
|
| 103 |
+
<li><p><code class="docutils literal notranslate"><span class="pre">block</span></code> / <code class="docutils literal notranslate"><span class="pre">endblock</span></code></p></li>
|
| 104 |
+
<li><p><code class="docutils literal notranslate"><span class="pre">while</span></code> / <code class="docutils literal notranslate"><span class="pre">endwhile</span></code></p></li>
|
| 105 |
+
<li><p><code class="docutils literal notranslate"><span class="pre">foreach</span></code> / <code class="docutils literal notranslate"><span class="pre">endforeach</span></code></p></li>
|
| 106 |
+
<li><p><code class="docutils literal notranslate"><span class="pre">function</span></code> / <code class="docutils literal notranslate"><span class="pre">endfunction</span></code></p></li>
|
| 107 |
+
<li><p><code class="docutils literal notranslate"><span class="pre">macro</span></code> / <code class="docutils literal notranslate"><span class="pre">endmacro</span></code></p></li>
|
| 108 |
+
</ul>
|
| 109 |
+
</div>
|
| 110 |
+
</dd></dl>
|
| 111 |
+
|
| 112 |
+
</section>
|
| 113 |
+
<section id="evaluating-code">
|
| 114 |
+
<h2>Evaluating Code<a class="headerlink" href="#evaluating-code" title="Permalink to this heading">¶</a></h2>
|
| 115 |
+
<dl class="cmake signature">
|
| 116 |
+
<dt class="sig sig-object cmake" id="eval">
|
| 117 |
+
<span class="code cmake highlight sig-name descname"><span class="nf"><span class="pre">cmake_language(</span></span><span class="no"><span class="pre">EVAL</span></span><span class="w"> </span><span class="no"><span class="pre">CODE</span></span><span class="w"> </span><span class="nv"><span class="pre"><code>...</span></span><span class="nf"><span class="pre">)</span></span></span><a class="headerlink" href="#eval" title="Permalink to this definition">¶</a></dt>
|
| 118 |
+
<dd><p>Evaluates the <code class="docutils literal notranslate"><span class="pre"><code>...</span></code> as CMake code.</p>
|
| 119 |
+
<p>For example, the code:</p>
|
| 120 |
+
<div class="highlight-cmake notranslate"><div class="highlight"><pre><span></span><span class="nf">set(</span><span class="no">A</span><span class="w"> </span><span class="no">TRUE</span><span class="nf">)</span>
|
| 121 |
+
<span class="nf">set(</span><span class="no">B</span><span class="w"> </span><span class="no">TRUE</span><span class="nf">)</span>
|
| 122 |
+
<span class="nf">set(</span><span class="no">C</span><span class="w"> </span><span class="no">TRUE</span><span class="nf">)</span>
|
| 123 |
+
<span class="nf">set(</span><span class="nb">condition</span><span class="w"> </span><span class="s">"(A AND B) OR C"</span><span class="nf">)</span>
|
| 124 |
+
|
| 125 |
+
<span class="nf">cmake_language(</span><span class="no">EVAL</span><span class="w"> </span><span class="no">CODE</span><span class="w"> </span><span class="s">"</span>
|
| 126 |
+
<span class="s"> if (${condition})</span>
|
| 127 |
+
<span class="s"> message(STATUS TRUE)</span>
|
| 128 |
+
<span class="s"> else()</span>
|
| 129 |
+
<span class="s"> message(STATUS FALSE)</span>
|
| 130 |
+
<span class="s"> endif()"</span>
|
| 131 |
+
<span class="nf">)</span>
|
| 132 |
+
</pre></div>
|
| 133 |
+
</div>
|
| 134 |
+
<p>is equivalent to</p>
|
| 135 |
+
<div class="highlight-cmake notranslate"><div class="highlight"><pre><span></span><span class="nf">set(</span><span class="no">A</span><span class="w"> </span><span class="no">TRUE</span><span class="nf">)</span>
|
| 136 |
+
<span class="nf">set(</span><span class="no">B</span><span class="w"> </span><span class="no">TRUE</span><span class="nf">)</span>
|
| 137 |
+
<span class="nf">set(</span><span class="no">C</span><span class="w"> </span><span class="no">TRUE</span><span class="nf">)</span>
|
| 138 |
+
<span class="nf">set(</span><span class="nb">condition</span><span class="w"> </span><span class="s">"(A AND B) OR C"</span><span class="nf">)</span>
|
| 139 |
+
|
| 140 |
+
<span class="nf">file(</span><span class="no">WRITE</span><span class="w"> </span><span class="o">${</span><span class="nt">CMAKE_CURRENT_BINARY_DIR</span><span class="o">}</span><span class="na">/eval.cmake</span><span class="w"> </span><span class="s">"</span>
|
| 141 |
+
<span class="s"> if (${condition})</span>
|
| 142 |
+
<span class="s"> message(STATUS TRUE)</span>
|
| 143 |
+
<span class="s"> else()</span>
|
| 144 |
+
<span class="s"> message(STATUS FALSE)</span>
|
| 145 |
+
<span class="s"> endif()"</span>
|
| 146 |
+
<span class="nf">)</span>
|
| 147 |
+
|
| 148 |
+
<span class="nf">include(</span><span class="o">${</span><span class="nt">CMAKE_CURRENT_BINARY_DIR</span><span class="o">}</span><span class="na">/eval.cmake</span><span class="nf">)</span>
|
| 149 |
+
</pre></div>
|
| 150 |
+
</div>
|
| 151 |
+
</dd></dl>
|
| 152 |
+
|
| 153 |
+
</section>
|
| 154 |
+
<section id="deferring-calls">
|
| 155 |
+
<h2>Deferring Calls<a class="headerlink" href="#deferring-calls" title="Permalink to this heading">¶</a></h2>
|
| 156 |
+
<div class="versionadded">
|
| 157 |
+
<p><span class="versionmodified added">New in version 3.19.</span></p>
|
| 158 |
+
</div>
|
| 159 |
+
<dl class="cmake signature">
|
| 160 |
+
<dt class="sig sig-object cmake" id="defer">
|
| 161 |
+
<span class="code cmake highlight sig-name descname"><span class="nf"><span class="pre">cmake_language(</span></span><span class="no"><span class="pre">DEFER</span></span><span class="w"> </span><span class="nv"><span class="pre"><options>...</span></span><span class="w"> </span><span class="no"><span class="pre">CALL</span></span><span class="w"> </span><span class="nv"><span class="pre"><command></span></span><span class="w"> </span><span class="p"><span class="pre">[</span></span><span class="nv"><span class="pre"><arg>...</span></span><span class="p"><span class="pre">]</span></span><span class="nf"><span class="pre">)</span></span></span><a class="headerlink" href="#defer" title="Permalink to this definition">¶</a></dt>
|
| 162 |
+
<dd><p>Schedules a call to the named <code class="docutils literal notranslate"><span class="pre"><command></span></code> with the given arguments (if any)
|
| 163 |
+
to occur at a later time. By default, deferred calls are executed as if
|
| 164 |
+
written at the end of the current directory's <code class="docutils literal notranslate"><span class="pre">CMakeLists.txt</span></code> file,
|
| 165 |
+
except that they run even after a <span class="target" id="index-0-command:return"></span><a class="reference internal" href="return.html#command:return" title="return"><code class="xref cmake cmake-command docutils literal notranslate"><span class="pre">return()</span></code></a> call. Variable
|
| 166 |
+
references in arguments are evaluated at the time the deferred call is
|
| 167 |
+
executed.</p>
|
| 168 |
+
<p>The options are:</p>
|
| 169 |
+
<dl>
|
| 170 |
+
<dt><code class="docutils literal notranslate"><span class="pre">DIRECTORY</span> <span class="pre"><dir></span></code></dt><dd><p>Schedule the call for the end of the given directory instead of the
|
| 171 |
+
current directory. The <code class="docutils literal notranslate"><span class="pre"><dir></span></code> may reference either a source
|
| 172 |
+
directory or its corresponding binary directory. Relative paths are
|
| 173 |
+
treated as relative to the current source directory.</p>
|
| 174 |
+
<p>The given directory must be known to CMake, being either the top-level
|
| 175 |
+
directory or one added by <span class="target" id="index-0-command:add_subdirectory"></span><a class="reference internal" href="add_subdirectory.html#command:add_subdirectory" title="add_subdirectory"><code class="xref cmake cmake-command docutils literal notranslate"><span class="pre">add_subdirectory()</span></code></a>. Furthermore,
|
| 176 |
+
the given directory must not yet be finished processing. This means
|
| 177 |
+
it can be the current directory or one of its ancestors.</p>
|
| 178 |
+
</dd>
|
| 179 |
+
<dt><code class="docutils literal notranslate"><span class="pre">ID</span> <span class="pre"><id></span></code></dt><dd><p>Specify an identification for the deferred call.
|
| 180 |
+
The <code class="docutils literal notranslate"><span class="pre"><id></span></code> may not be empty and may not begin with a capital letter <code class="docutils literal notranslate"><span class="pre">A-Z</span></code>.
|
| 181 |
+
The <code class="docutils literal notranslate"><span class="pre"><id></span></code> may begin with an underscore (<code class="docutils literal notranslate"><span class="pre">_</span></code>) only if it was generated
|
| 182 |
+
automatically by an earlier call that used <code class="docutils literal notranslate"><span class="pre">ID_VAR</span></code> to get the id.</p>
|
| 183 |
+
</dd>
|
| 184 |
+
<dt><code class="docutils literal notranslate"><span class="pre">ID_VAR</span> <span class="pre"><var></span></code></dt><dd><p>Specify a variable in which to store the identification for the
|
| 185 |
+
deferred call. If <code class="docutils literal notranslate"><span class="pre">ID</span> <span class="pre"><id></span></code> is not given, a new identification
|
| 186 |
+
will be generated and the generated id will start with an underscore (<code class="docutils literal notranslate"><span class="pre">_</span></code>).</p>
|
| 187 |
+
</dd>
|
| 188 |
+
</dl>
|
| 189 |
+
<p>The currently scheduled list of deferred calls may be retrieved:</p>
|
| 190 |
+
<div class="highlight-cmake notranslate"><div class="highlight"><pre><span></span><span class="nf">cmake_language(</span><span class="no">DEFER</span><span class="w"> </span><span class="p">[</span><span class="no">DIRECTORY</span><span class="w"> </span><span class="nv"><dir></span><span class="p">]</span><span class="w"> </span><span class="no">GET_CALL_IDS</span><span class="w"> </span><span class="nv"><var></span><span class="nf">)</span>
|
| 191 |
+
</pre></div>
|
| 192 |
+
</div>
|
| 193 |
+
<p>This will store in <code class="docutils literal notranslate"><span class="pre"><var></span></code> a <a class="reference internal" href="../manual/cmake-language.7.html#cmake-language-lists"><span class="std std-ref">semicolon-separated list</span></a> of deferred call ids. The ids are for the directory scope in which
|
| 194 |
+
the calls have been deferred to (i.e. where they will be executed), which can
|
| 195 |
+
be different to the scope in which they were created. The <code class="docutils literal notranslate"><span class="pre">DIRECTORY</span></code>
|
| 196 |
+
option can be used to specify the scope for which to retrieve the call ids.
|
| 197 |
+
If that option is not given, the call ids for the current directory scope
|
| 198 |
+
will be returned.</p>
|
| 199 |
+
<p>Details of a specific call may be retrieved from its id:</p>
|
| 200 |
+
<div class="highlight-cmake notranslate"><div class="highlight"><pre><span></span><span class="nf">cmake_language(</span><span class="no">DEFER</span><span class="w"> </span><span class="p">[</span><span class="no">DIRECTORY</span><span class="w"> </span><span class="nv"><dir></span><span class="p">]</span><span class="w"> </span><span class="no">GET_CALL</span><span class="w"> </span><span class="nv"><id></span><span class="w"> </span><span class="nv"><var></span><span class="nf">)</span>
|
| 201 |
+
</pre></div>
|
| 202 |
+
</div>
|
| 203 |
+
<p>This will store in <code class="docutils literal notranslate"><span class="pre"><var></span></code> a <a class="reference internal" href="../manual/cmake-language.7.html#cmake-language-lists"><span class="std std-ref">semicolon-separated list</span></a> in which the first element is the name of the command to be
|
| 204 |
+
called, and the remaining elements are its unevaluated arguments (any
|
| 205 |
+
contained <code class="docutils literal notranslate"><span class="pre">;</span></code> characters are included literally and cannot be distinguished
|
| 206 |
+
from multiple arguments). If multiple calls are scheduled with the same id,
|
| 207 |
+
this retrieves the first one. If no call is scheduled with the given id in
|
| 208 |
+
the specified <code class="docutils literal notranslate"><span class="pre">DIRECTORY</span></code> scope (or the current directory scope if no
|
| 209 |
+
<code class="docutils literal notranslate"><span class="pre">DIRECTORY</span></code> option is given), this stores an empty string in the variable.</p>
|
| 210 |
+
<p>Deferred calls may be canceled by their id:</p>
|
| 211 |
+
<div class="highlight-cmake notranslate"><div class="highlight"><pre><span></span><span class="nf">cmake_language(</span><span class="no">DEFER</span><span class="w"> </span><span class="p">[</span><span class="no">DIRECTORY</span><span class="w"> </span><span class="nv"><dir></span><span class="p">]</span><span class="w"> </span><span class="no">CANCEL_CALL</span><span class="w"> </span><span class="nv"><id>...</span><span class="nf">)</span>
|
| 212 |
+
</pre></div>
|
| 213 |
+
</div>
|
| 214 |
+
<p>This cancels all deferred calls matching any of the given ids in the specified
|
| 215 |
+
<code class="docutils literal notranslate"><span class="pre">DIRECTORY</span></code> scope (or the current directory scope if no <code class="docutils literal notranslate"><span class="pre">DIRECTORY</span></code> option
|
| 216 |
+
is given). Unknown ids are silently ignored.</p>
|
| 217 |
+
</dd></dl>
|
| 218 |
+
|
| 219 |
+
<section id="deferred-call-examples">
|
| 220 |
+
<h3>Deferred Call Examples<a class="headerlink" href="#deferred-call-examples" title="Permalink to this heading">¶</a></h3>
|
| 221 |
+
<p>For example, the code:</p>
|
| 222 |
+
<div class="highlight-cmake notranslate"><div class="highlight"><pre><span></span><span class="nf">cmake_language(</span><span class="no">DEFER</span><span class="w"> </span><span class="no">CALL</span><span class="w"> </span><span class="nb">message</span><span class="w"> </span><span class="s">"${deferred_message}"</span><span class="nf">)</span>
|
| 223 |
+
<span class="nf">cmake_language(</span><span class="no">DEFER</span><span class="w"> </span><span class="no">ID_VAR</span><span class="w"> </span><span class="nb">id</span><span class="w"> </span><span class="no">CALL</span><span class="w"> </span><span class="nb">message</span><span class="w"> </span><span class="s">"Canceled Message"</span><span class="nf">)</span>
|
| 224 |
+
<span class="nf">cmake_language(</span><span class="no">DEFER</span><span class="w"> </span><span class="no">CANCEL_CALL</span><span class="w"> </span><span class="o">${</span><span class="nt">id</span><span class="o">}</span><span class="nf">)</span>
|
| 225 |
+
<span class="nf">message(</span><span class="s">"Immediate Message"</span><span class="nf">)</span>
|
| 226 |
+
<span class="nf">set(</span><span class="nb">deferred_message</span><span class="w"> </span><span class="s">"Deferred Message"</span><span class="nf">)</span>
|
| 227 |
+
</pre></div>
|
| 228 |
+
</div>
|
| 229 |
+
<p>prints:</p>
|
| 230 |
+
<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>Immediate Message
|
| 231 |
+
Deferred Message
|
| 232 |
+
</pre></div>
|
| 233 |
+
</div>
|
| 234 |
+
<p>The <code class="docutils literal notranslate"><span class="pre">Cancelled</span> <span class="pre">Message</span></code> is never printed because its command is
|
| 235 |
+
canceled. The <code class="docutils literal notranslate"><span class="pre">deferred_message</span></code> variable reference is not evaluated
|
| 236 |
+
until the call site, so it can be set after the deferred call is scheduled.</p>
|
| 237 |
+
<p>In order to evaluate variable references immediately when scheduling a
|
| 238 |
+
deferred call, wrap it using <code class="docutils literal notranslate"><span class="pre">cmake_language(EVAL)</span></code>. However, note that
|
| 239 |
+
arguments will be re-evaluated in the deferred call, though that can be
|
| 240 |
+
avoided by using bracket arguments. For example:</p>
|
| 241 |
+
<div class="highlight-cmake notranslate"><div class="highlight"><pre><span></span><span class="nf">set(</span><span class="nb">deferred_message</span><span class="w"> </span><span class="s">"Deferred Message 1"</span><span class="nf">)</span>
|
| 242 |
+
<span class="nf">set(</span><span class="nb">re_evaluated</span><span class="w"> </span><span class="p">[[</span><span class="o">${</span><span class="nt">deferred_message</span><span class="o">}</span><span class="p">]]</span><span class="nf">)</span>
|
| 243 |
+
<span class="nf">cmake_language(</span><span class="no">EVAL</span><span class="w"> </span><span class="no">CODE</span><span class="w"> </span><span class="s">"</span>
|
| 244 |
+
<span class="s"> cmake_language(DEFER CALL message [[${deferred_message}]])</span>
|
| 245 |
+
<span class="s"> cmake_language(DEFER CALL message \"${re_evaluated}\")</span>
|
| 246 |
+
<span class="s">"</span><span class="nf">)</span>
|
| 247 |
+
<span class="nf">message(</span><span class="s">"Immediate Message"</span><span class="nf">)</span>
|
| 248 |
+
<span class="nf">set(</span><span class="nb">deferred_message</span><span class="w"> </span><span class="s">"Deferred Message 2"</span><span class="nf">)</span>
|
| 249 |
+
</pre></div>
|
| 250 |
+
</div>
|
| 251 |
+
<p>also prints:</p>
|
| 252 |
+
<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>Immediate Message
|
| 253 |
+
Deferred Message 1
|
| 254 |
+
Deferred Message 2
|
| 255 |
+
</pre></div>
|
| 256 |
+
</div>
|
| 257 |
+
</section>
|
| 258 |
+
</section>
|
| 259 |
+
<section id="dependency-providers">
|
| 260 |
+
<span id="id1"></span><h2>Dependency Providers<a class="headerlink" href="#dependency-providers" title="Permalink to this heading">¶</a></h2>
|
| 261 |
+
<div class="versionadded">
|
| 262 |
+
<p><span class="versionmodified added">New in version 3.24.</span></p>
|
| 263 |
+
</div>
|
| 264 |
+
<div class="admonition note">
|
| 265 |
+
<p class="admonition-title">Note</p>
|
| 266 |
+
<p>A high-level introduction to this feature can be found in the
|
| 267 |
+
<a class="reference internal" href="../guide/using-dependencies/index.html#dependency-providers-overview"><span class="std std-ref">Using Dependencies Guide</span></a>.</p>
|
| 268 |
+
</div>
|
| 269 |
+
<dl class="cmake signature">
|
| 270 |
+
<dt class="sig sig-object cmake" id="set-dependency-provider">
|
| 271 |
+
<span class="code cmake highlight sig-name descname"><span class="nf"><span class="pre">cmake_language(</span></span><span class="no"><span class="pre">SET_DEPENDENCY_PROVIDER</span></span><span class="w"> </span><span class="nv"><span class="pre"><command></span></span><span class="w"> </span><span class="no"><span class="pre">SUPPORTED_METHODS</span></span><span class="w"> </span><span class="nv"><span class="pre"><methods>...</span></span><span class="nf"><span class="pre">)</span></span></span><a class="headerlink" href="#set-dependency-provider" title="Permalink to this definition">¶</a></dt>
|
| 272 |
+
<dd><p>When a call is made to <span class="target" id="index-0-command:find_package"></span><a class="reference internal" href="find_package.html#command:find_package" title="find_package"><code class="xref cmake cmake-command docutils literal notranslate"><span class="pre">find_package()</span></code></a> or
|
| 273 |
+
<span class="target" id="index-0-command:fetchcontent_makeavailable"></span><a class="reference internal" href="../module/FetchContent.html#command:fetchcontent_makeavailable" title="fetchcontent_makeavailable"><code class="xref cmake cmake-command docutils literal notranslate"><span class="pre">FetchContent_MakeAvailable()</span></code></a>, the call may be forwarded to a
|
| 274 |
+
dependency provider which then has the opportunity to fulfill the request.
|
| 275 |
+
If the request is for one of the <code class="docutils literal notranslate"><span class="pre"><methods></span></code> specified when the provider
|
| 276 |
+
was set, CMake calls the provider's <code class="docutils literal notranslate"><span class="pre"><command></span></code> with a set of
|
| 277 |
+
method-specific arguments. If the provider does not fulfill the request,
|
| 278 |
+
or if the provider doesn't support the request's method, or no provider
|
| 279 |
+
is set, the built-in <span class="target" id="index-1-command:find_package"></span><a class="reference internal" href="find_package.html#command:find_package" title="find_package"><code class="xref cmake cmake-command docutils literal notranslate"><span class="pre">find_package()</span></code></a> or
|
| 280 |
+
<span class="target" id="index-1-command:fetchcontent_makeavailable"></span><a class="reference internal" href="../module/FetchContent.html#command:fetchcontent_makeavailable" title="fetchcontent_makeavailable"><code class="xref cmake cmake-command docutils literal notranslate"><span class="pre">FetchContent_MakeAvailable()</span></code></a> implementation is used to fulfill
|
| 281 |
+
the request in the usual way.</p>
|
| 282 |
+
<p>One or more of the following values can be specified for the <code class="docutils literal notranslate"><span class="pre"><methods></span></code>
|
| 283 |
+
when setting the provider:</p>
|
| 284 |
+
<dl class="simple">
|
| 285 |
+
<dt><code class="docutils literal notranslate"><span class="pre">FIND_PACKAGE</span></code></dt><dd><p>The provider command accepts <span class="target" id="index-2-command:find_package"></span><a class="reference internal" href="find_package.html#command:find_package" title="find_package"><code class="xref cmake cmake-command docutils literal notranslate"><span class="pre">find_package()</span></code></a> requests.</p>
|
| 286 |
+
</dd>
|
| 287 |
+
<dt><code class="docutils literal notranslate"><span class="pre">FETCHCONTENT_MAKEAVAILABLE_SERIAL</span></code></dt><dd><p>The provider command accepts <span class="target" id="index-2-command:fetchcontent_makeavailable"></span><a class="reference internal" href="../module/FetchContent.html#command:fetchcontent_makeavailable" title="fetchcontent_makeavailable"><code class="xref cmake cmake-command docutils literal notranslate"><span class="pre">FetchContent_MakeAvailable()</span></code></a>
|
| 288 |
+
requests. It expects each dependency to be fed to the provider command
|
| 289 |
+
one at a time, not the whole list in one go.</p>
|
| 290 |
+
</dd>
|
| 291 |
+
</dl>
|
| 292 |
+
<p>Only one provider can be set at any point in time. If a provider is already
|
| 293 |
+
set when <code class="docutils literal notranslate"><span class="pre">cmake_language(SET_DEPENDENCY_PROVIDER)</span></code> is called, the new
|
| 294 |
+
provider replaces the previously set one. The specified <code class="docutils literal notranslate"><span class="pre"><command></span></code> must
|
| 295 |
+
already exist when <code class="docutils literal notranslate"><span class="pre">cmake_language(SET_DEPENDENCY_PROVIDER)</span></code> is called.
|
| 296 |
+
As a special case, providing an empty string for the <code class="docutils literal notranslate"><span class="pre"><command></span></code> and no
|
| 297 |
+
<code class="docutils literal notranslate"><span class="pre"><methods></span></code> will discard any previously set provider.</p>
|
| 298 |
+
<p>The dependency provider can only be set while processing one of the files
|
| 299 |
+
specified by the <span class="target" id="index-0-variable:CMAKE_PROJECT_TOP_LEVEL_INCLUDES"></span><a class="reference internal" href="../variable/CMAKE_PROJECT_TOP_LEVEL_INCLUDES.html#variable:CMAKE_PROJECT_TOP_LEVEL_INCLUDES" title="CMAKE_PROJECT_TOP_LEVEL_INCLUDES"><code class="xref cmake cmake-variable docutils literal notranslate"><span class="pre">CMAKE_PROJECT_TOP_LEVEL_INCLUDES</span></code></a> variable.
|
| 300 |
+
Thus, dependency providers can only be set as part of the first call to
|
| 301 |
+
<span class="target" id="index-0-command:project"></span><a class="reference internal" href="project.html#command:project" title="project"><code class="xref cmake cmake-command docutils literal notranslate"><span class="pre">project()</span></code></a>. Calling <code class="docutils literal notranslate"><span class="pre">cmake_language(SET_DEPENDENCY_PROVIDER)</span></code>
|
| 302 |
+
outside of that context will result in an error.</p>
|
| 303 |
+
<div class="admonition note">
|
| 304 |
+
<p class="admonition-title">Note</p>
|
| 305 |
+
<p>The choice of dependency provider should always be under the user's control.
|
| 306 |
+
As a convenience, a project may choose to provide a file that users can
|
| 307 |
+
list in their <span class="target" id="index-1-variable:CMAKE_PROJECT_TOP_LEVEL_INCLUDES"></span><a class="reference internal" href="../variable/CMAKE_PROJECT_TOP_LEVEL_INCLUDES.html#variable:CMAKE_PROJECT_TOP_LEVEL_INCLUDES" title="CMAKE_PROJECT_TOP_LEVEL_INCLUDES"><code class="xref cmake cmake-variable docutils literal notranslate"><span class="pre">CMAKE_PROJECT_TOP_LEVEL_INCLUDES</span></code></a> variable, but
|
| 308 |
+
the use of such a file should always be the user's choice.</p>
|
| 309 |
+
</div>
|
| 310 |
+
</dd></dl>
|
| 311 |
+
|
| 312 |
+
<section id="provider-commands">
|
| 313 |
+
<h3>Provider commands<a class="headerlink" href="#provider-commands" title="Permalink to this heading">¶</a></h3>
|
| 314 |
+
<p>Providers define a single <code class="docutils literal notranslate"><span class="pre"><command></span></code> to accept requests. The name of
|
| 315 |
+
the command should be specific to that provider, not something overly
|
| 316 |
+
generic that another provider might also use. This enables users to compose
|
| 317 |
+
different providers in their own custom provider. The recommended form is
|
| 318 |
+
<code class="docutils literal notranslate"><span class="pre">xxx_provide_dependency()</span></code>, where <code class="docutils literal notranslate"><span class="pre">xxx</span></code> is the provider-specific part
|
| 319 |
+
(e.g. <code class="docutils literal notranslate"><span class="pre">vcpkg_provide_dependency()</span></code>, <code class="docutils literal notranslate"><span class="pre">conan_provide_dependency()</span></code>,
|
| 320 |
+
<code class="docutils literal notranslate"><span class="pre">ourcompany_provide_dependency()</span></code>, and so on).</p>
|
| 321 |
+
<div class="highlight-cmake notranslate"><div class="highlight"><pre><span></span><span class="nf">xxx_provide_dependency(</span><span class="nv"><method></span><span class="w"> </span><span class="p">[</span><span class="nv"><method-specific-args>...</span><span class="p">]</span><span class="nf">)</span>
|
| 322 |
+
</pre></div>
|
| 323 |
+
</div>
|
| 324 |
+
<p>Because some methods expect certain variables to be set in the calling scope,
|
| 325 |
+
the provider command should typically be implemented as a macro rather than a
|
| 326 |
+
function. This ensures it does not introduce a new variable scope.</p>
|
| 327 |
+
<p>The arguments CMake passes to the dependency provider depend on the type of
|
| 328 |
+
request. The first argument is always the method, and it will only ever
|
| 329 |
+
be one of the <code class="docutils literal notranslate"><span class="pre"><methods></span></code> that was specified when setting the provider.</p>
|
| 330 |
+
<dl>
|
| 331 |
+
<dt><code class="docutils literal notranslate"><span class="pre">FIND_PACKAGE</span></code></dt><dd><p>The <code class="docutils literal notranslate"><span class="pre"><method-specific-args></span></code> will be everything passed to the
|
| 332 |
+
<span class="target" id="index-3-command:find_package"></span><a class="reference internal" href="find_package.html#command:find_package" title="find_package"><code class="xref cmake cmake-command docutils literal notranslate"><span class="pre">find_package()</span></code></a> call that requested the dependency. The first of
|
| 333 |
+
these <code class="docutils literal notranslate"><span class="pre"><method-specific-args></span></code> will therefore always be the name of the
|
| 334 |
+
dependency. Dependency names are case-sensitive for this method because
|
| 335 |
+
<span class="target" id="index-4-command:find_package"></span><a class="reference internal" href="find_package.html#command:find_package" title="find_package"><code class="xref cmake cmake-command docutils literal notranslate"><span class="pre">find_package()</span></code></a> treats them case-sensitively too.</p>
|
| 336 |
+
<p>If the provider command fulfills the request, it must set the same variable
|
| 337 |
+
that <span class="target" id="index-5-command:find_package"></span><a class="reference internal" href="find_package.html#command:find_package" title="find_package"><code class="xref cmake cmake-command docutils literal notranslate"><span class="pre">find_package()</span></code></a> expects to be set. For a dependency named
|
| 338 |
+
<code class="docutils literal notranslate"><span class="pre">depName</span></code>, the provider must set <code class="docutils literal notranslate"><span class="pre">depName_FOUND</span></code> to true if it fulfilled
|
| 339 |
+
the request. If the provider returns without setting this variable, CMake
|
| 340 |
+
will assume the request was not fulfilled and will fall back to the
|
| 341 |
+
built-in implementation.</p>
|
| 342 |
+
<p>If the provider needs to call the built-in <span class="target" id="index-6-command:find_package"></span><a class="reference internal" href="find_package.html#command:find_package" title="find_package"><code class="xref cmake cmake-command docutils literal notranslate"><span class="pre">find_package()</span></code></a>
|
| 343 |
+
implementation as part of its processing, it can do so by including the
|
| 344 |
+
<code class="docutils literal notranslate"><span class="pre">BYPASS_PROVIDER</span></code> keyword as one of the arguments.</p>
|
| 345 |
+
</dd>
|
| 346 |
+
<dt><code class="docutils literal notranslate"><span class="pre">FETCHCONTENT_MAKEAVAILABE_SERIAL</span></code></dt><dd><p>The <code class="docutils literal notranslate"><span class="pre"><method-specific-args></span></code> will be everything passed to the
|
| 347 |
+
<span class="target" id="index-0-command:fetchcontent_declare"></span><a class="reference internal" href="../module/FetchContent.html#command:fetchcontent_declare" title="fetchcontent_declare"><code class="xref cmake cmake-command docutils literal notranslate"><span class="pre">FetchContent_Declare()</span></code></a> call that corresponds to the requested
|
| 348 |
+
dependency, with the following exceptions:</p>
|
| 349 |
+
<ul class="simple">
|
| 350 |
+
<li><p>If <code class="docutils literal notranslate"><span class="pre">SOURCE_DIR</span></code> or <code class="docutils literal notranslate"><span class="pre">BINARY_DIR</span></code> were not part of the original
|
| 351 |
+
declared arguments, they will be added with their default values.</p></li>
|
| 352 |
+
<li><p>If <span class="target" id="index-0-variable:FETCHCONTENT_TRY_FIND_PACKAGE_MODE"></span><a class="reference internal" href="../module/FetchContent.html#variable:FETCHCONTENT_TRY_FIND_PACKAGE_MODE" title="FETCHCONTENT_TRY_FIND_PACKAGE_MODE"><code class="xref cmake cmake-variable docutils literal notranslate"><span class="pre">FETCHCONTENT_TRY_FIND_PACKAGE_MODE</span></code></a> is set to <code class="docutils literal notranslate"><span class="pre">NEVER</span></code>,
|
| 353 |
+
any <code class="docutils literal notranslate"><span class="pre">FIND_PACKAGE_ARGS</span></code> will be omitted.</p></li>
|
| 354 |
+
<li><p>The <code class="docutils literal notranslate"><span class="pre">OVERRIDE_FIND_PACKAGE</span></code> keyword is always omitted.</p></li>
|
| 355 |
+
</ul>
|
| 356 |
+
<p>The first of the <code class="docutils literal notranslate"><span class="pre"><method-specific-args></span></code> will always be the name of the
|
| 357 |
+
dependency. Dependency names are case-insensitive for this method because
|
| 358 |
+
<span class="target" id="index-0-module:FetchContent"></span><a class="reference internal" href="../module/FetchContent.html#module:FetchContent" title="FetchContent"><code class="xref cmake cmake-module docutils literal notranslate"><span class="pre">FetchContent</span></code></a> also treats them case-insensitively.</p>
|
| 359 |
+
<p>If the provider fulfills the request, it should call
|
| 360 |
+
<span class="target" id="index-0-command:fetchcontent_setpopulated"></span><a class="reference internal" href="../module/FetchContent.html#command:fetchcontent_setpopulated" title="fetchcontent_setpopulated"><code class="xref cmake cmake-command docutils literal notranslate"><span class="pre">FetchContent_SetPopulated()</span></code></a>, passing the name of the dependency as
|
| 361 |
+
the first argument. The <code class="docutils literal notranslate"><span class="pre">SOURCE_DIR</span></code> and <code class="docutils literal notranslate"><span class="pre">BINARY_DIR</span></code> arguments to that
|
| 362 |
+
command should only be given if the provider makes the dependency's source
|
| 363 |
+
and build directories available in exactly the same way as the built-in
|
| 364 |
+
<span class="target" id="index-3-command:fetchcontent_makeavailable"></span><a class="reference internal" href="../module/FetchContent.html#command:fetchcontent_makeavailable" title="fetchcontent_makeavailable"><code class="xref cmake cmake-command docutils literal notranslate"><span class="pre">FetchContent_MakeAvailable()</span></code></a> command.</p>
|
| 365 |
+
<p>If the provider returns without calling <span class="target" id="index-1-command:fetchcontent_setpopulated"></span><a class="reference internal" href="../module/FetchContent.html#command:fetchcontent_setpopulated" title="fetchcontent_setpopulated"><code class="xref cmake cmake-command docutils literal notranslate"><span class="pre">FetchContent_SetPopulated()</span></code></a>
|
| 366 |
+
for the named dependency, CMake will assume the request was not fulfilled
|
| 367 |
+
and will fall back to the built-in implementation.</p>
|
| 368 |
+
<p>Note that empty arguments may be significant for this method (e.g. an empty
|
| 369 |
+
string following a <code class="docutils literal notranslate"><span class="pre">GIT_SUBMODULES</span></code> keyword). Therefore, if forwarding
|
| 370 |
+
these arguments on to another command, extra care must be taken to avoid such
|
| 371 |
+
arguments being silently dropped.</p>
|
| 372 |
+
<p>If <code class="docutils literal notranslate"><span class="pre">FETCHCONTENT_SOURCE_DIR_<uppercaseDepName></span></code> is set, then the
|
| 373 |
+
dependency provider will never see requests for the <code class="docutils literal notranslate"><span class="pre"><depName></span></code> dependency
|
| 374 |
+
for this method. When the user sets such a variable, they are explicitly
|
| 375 |
+
overriding where to get that dependency from and are taking on the
|
| 376 |
+
responsibility that their overriding version meets any requirements for that
|
| 377 |
+
dependency and is compatible with whatever else in the project uses it.
|
| 378 |
+
Depending on the value of <span class="target" id="index-1-variable:FETCHCONTENT_TRY_FIND_PACKAGE_MODE"></span><a class="reference internal" href="../module/FetchContent.html#variable:FETCHCONTENT_TRY_FIND_PACKAGE_MODE" title="FETCHCONTENT_TRY_FIND_PACKAGE_MODE"><code class="xref cmake cmake-variable docutils literal notranslate"><span class="pre">FETCHCONTENT_TRY_FIND_PACKAGE_MODE</span></code></a>
|
| 379 |
+
and whether the <code class="docutils literal notranslate"><span class="pre">OVERRIDE_FIND_PACKAGE</span></code> option was given to
|
| 380 |
+
<span class="target" id="index-1-command:fetchcontent_declare"></span><a class="reference internal" href="../module/FetchContent.html#command:fetchcontent_declare" title="fetchcontent_declare"><code class="xref cmake cmake-command docutils literal notranslate"><span class="pre">FetchContent_Declare()</span></code></a>, having
|
| 381 |
+
<code class="docutils literal notranslate"><span class="pre">FETCHCONTENT_SOURCE_DIR_<uppercaseDepName></span></code> set may also prevent the
|
| 382 |
+
dependency provider from seeing requests for a <code class="docutils literal notranslate"><span class="pre">find_package(depName)</span></code>
|
| 383 |
+
call too.</p>
|
| 384 |
+
</dd>
|
| 385 |
+
</dl>
|
| 386 |
+
</section>
|
| 387 |
+
<section id="provider-examples">
|
| 388 |
+
<h3>Provider Examples<a class="headerlink" href="#provider-examples" title="Permalink to this heading">¶</a></h3>
|
| 389 |
+
<p>This first example only intercepts <span class="target" id="index-7-command:find_package"></span><a class="reference internal" href="find_package.html#command:find_package" title="find_package"><code class="xref cmake cmake-command docutils literal notranslate"><span class="pre">find_package()</span></code></a> calls. The
|
| 390 |
+
provider command runs an external tool which copies the relevant artifacts
|
| 391 |
+
into a provider-specific directory, if that tool knows about the dependency.
|
| 392 |
+
It then relies on the built-in implementation to then find those artifacts.
|
| 393 |
+
<span class="target" id="index-4-command:fetchcontent_makeavailable"></span><a class="reference internal" href="../module/FetchContent.html#command:fetchcontent_makeavailable" title="fetchcontent_makeavailable"><code class="xref cmake cmake-command docutils literal notranslate"><span class="pre">FetchContent_MakeAvailable()</span></code></a> calls would not go through the provider.</p>
|
| 394 |
+
<div class="literal-block-wrapper docutils container" id="id2">
|
| 395 |
+
<div class="code-block-caption"><span class="caption-text">mycomp_provider.cmake</span><a class="headerlink" href="#id2" title="Permalink to this code">¶</a></div>
|
| 396 |
+
<div class="highlight-cmake notranslate"><div class="highlight"><pre><span></span><span class="c"># Always ensure we have the policy settings this provider expects</span>
|
| 397 |
+
<span class="nf">cmake_minimum_required(</span><span class="no">VERSION</span><span class="w"> </span><span class="m">3.24</span><span class="nf">)</span>
|
| 398 |
+
|
| 399 |
+
<span class="nf">set(</span><span class="no">MYCOMP_PROVIDER_INSTALL_DIR</span><span class="w"> </span><span class="o">${</span><span class="nt">CMAKE_BINARY_DIR</span><span class="o">}</span><span class="na">/mycomp_packages</span>
|
| 400 |
+
<span class="w"> </span><span class="no">CACHE</span><span class="w"> </span><span class="no">PATH</span><span class="w"> </span><span class="s">"The directory this provider installs packages to"</span>
|
| 401 |
+
<span class="nf">)</span>
|
| 402 |
+
<span class="c"># Tell the built-in implementation to look in our area first, unless</span>
|
| 403 |
+
<span class="c"># the find_package() call uses NO_..._PATH options to exclude it</span>
|
| 404 |
+
<span class="nf">list(</span><span class="no">APPEND</span><span class="w"> </span><span class="no">CMAKE_MODULE_PATH</span><span class="w"> </span><span class="o">${</span><span class="nt">MYCOMP_PROVIDER_INSTALL_DIR</span><span class="o">}</span><span class="na">/cmake</span><span class="nf">)</span>
|
| 405 |
+
<span class="nf">list(</span><span class="no">APPEND</span><span class="w"> </span><span class="no">CMAKE_PREFIX_PATH</span><span class="w"> </span><span class="o">${</span><span class="nt">MYCOMP_PROVIDER_INSTALL_DIR</span><span class="o">}</span><span class="nf">)</span>
|
| 406 |
+
|
| 407 |
+
<span class="nf">macro(</span><span class="nb">mycomp_provide_dependency</span><span class="w"> </span><span class="nb">method</span><span class="w"> </span><span class="nb">package_name</span><span class="nf">)</span>
|
| 408 |
+
<span class="w"> </span><span class="nf">execute_process(</span>
|
| 409 |
+
<span class="w"> </span><span class="no">COMMAND</span><span class="w"> </span><span class="nb">some_tool</span><span class="w"> </span><span class="o">${</span><span class="nt">package_name</span><span class="o">}</span><span class="w"> </span><span class="p">--</span><span class="nb">installdir</span><span class="w"> </span><span class="o">${</span><span class="nt">MYCOMP_PROVIDER_INSTALL_DIR</span><span class="o">}</span>
|
| 410 |
+
<span class="w"> </span><span class="no">COMMAND_ERROR_IS_FATAL</span><span class="w"> </span><span class="no">ANY</span>
|
| 411 |
+
<span class="w"> </span><span class="nf">)</span>
|
| 412 |
+
<span class="nf">endmacro()</span>
|
| 413 |
+
|
| 414 |
+
<span class="nf">cmake_language(</span>
|
| 415 |
+
<span class="w"> </span><span class="no">SET_DEPENDENCY_PROVIDER</span><span class="w"> </span><span class="nb">mycomp_provide_dependency</span>
|
| 416 |
+
<span class="w"> </span><span class="no">SUPPORTED_METHODS</span><span class="w"> </span><span class="no">FIND_PACKAGE</span>
|
| 417 |
+
<span class="nf">)</span>
|
| 418 |
+
</pre></div>
|
| 419 |
+
</div>
|
| 420 |
+
</div>
|
| 421 |
+
<p>The user would then typically use the above file like so:</p>
|
| 422 |
+
<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>cmake -DCMAKE_PROJECT_TOP_LEVEL_INCLUDES=/path/to/mycomp_provider.cmake ...
|
| 423 |
+
</pre></div>
|
| 424 |
+
</div>
|
| 425 |
+
<p>The next example demonstrates a provider that accepts both methods, but
|
| 426 |
+
only handles one specific dependency. It enforces providing Google Test
|
| 427 |
+
using <span class="target" id="index-1-module:FetchContent"></span><a class="reference internal" href="../module/FetchContent.html#module:FetchContent" title="FetchContent"><code class="xref cmake cmake-module docutils literal notranslate"><span class="pre">FetchContent</span></code></a>, but leaves all other dependencies to be
|
| 428 |
+
fulfilled by CMake's built-in implementation. It accepts a few different
|
| 429 |
+
names, which demonstrates one way of working around projects that hard-code
|
| 430 |
+
an unusual or undesirable way of adding this particular dependency to the
|
| 431 |
+
build. The example also demonstrates how to use the <span class="target" id="index-0-command:list"></span><a class="reference internal" href="list.html#command:list" title="list"><code class="xref cmake cmake-command docutils literal notranslate"><span class="pre">list()</span></code></a> command
|
| 432 |
+
to preserve variables that may be overwritten by a call to
|
| 433 |
+
<span class="target" id="index-5-command:fetchcontent_makeavailable"></span><a class="reference internal" href="../module/FetchContent.html#command:fetchcontent_makeavailable" title="fetchcontent_makeavailable"><code class="xref cmake cmake-command docutils literal notranslate"><span class="pre">FetchContent_MakeAvailable()</span></code></a>.</p>
|
| 434 |
+
<div class="literal-block-wrapper docutils container" id="id3">
|
| 435 |
+
<div class="code-block-caption"><span class="caption-text">mycomp_provider.cmake</span><a class="headerlink" href="#id3" title="Permalink to this code">¶</a></div>
|
| 436 |
+
<div class="highlight-cmake notranslate"><div class="highlight"><pre><span></span><span class="nf">cmake_minimum_required(</span><span class="no">VERSION</span><span class="w"> </span><span class="m">3.24</span><span class="nf">)</span>
|
| 437 |
+
|
| 438 |
+
<span class="c"># Because we declare this very early, it will take precedence over any</span>
|
| 439 |
+
<span class="c"># details the project might declare later for the same thing</span>
|
| 440 |
+
<span class="nf">include(</span><span class="nb">FetchContent</span><span class="nf">)</span>
|
| 441 |
+
<span class="nf">FetchContent_Declare(</span>
|
| 442 |
+
<span class="w"> </span><span class="nb">googletest</span>
|
| 443 |
+
<span class="w"> </span><span class="no">GIT_REPOSITORY</span><span class="w"> </span><span class="na">https://github.com/google/googletest.git</span>
|
| 444 |
+
<span class="w"> </span><span class="no">GIT_TAG</span><span class="w"> </span><span class="nb">e2239ee6043f73722e7aa812a459f54a28552929</span><span class="w"> </span><span class="c"># release-1.11.0</span>
|
| 445 |
+
<span class="nf">)</span>
|
| 446 |
+
|
| 447 |
+
<span class="c"># Both FIND_PACKAGE and FETCHCONTENT_MAKEAVAILABLE_SERIAL methods provide</span>
|
| 448 |
+
<span class="c"># the package or dependency name as the first method-specific argument.</span>
|
| 449 |
+
<span class="nf">macro(</span><span class="nb">mycomp_provide_dependency</span><span class="w"> </span><span class="nb">method</span><span class="w"> </span><span class="nb">dep_name</span><span class="nf">)</span>
|
| 450 |
+
<span class="w"> </span><span class="nf">if(</span><span class="s">"${dep_name}"</span><span class="w"> </span><span class="no">MATCHES</span><span class="w"> </span><span class="s">"^(gtest|googletest)$"</span><span class="nf">)</span>
|
| 451 |
+
<span class="w"> </span><span class="c"># Save our current command arguments in case we are called recursively</span>
|
| 452 |
+
<span class="w"> </span><span class="nf">list(</span><span class="no">APPEND</span><span class="w"> </span><span class="nb">mycomp_provider_args</span><span class="w"> </span><span class="o">${</span><span class="nt">method</span><span class="o">}</span><span class="w"> </span><span class="o">${</span><span class="nt">dep_name</span><span class="o">}</span><span class="nf">)</span>
|
| 453 |
+
|
| 454 |
+
<span class="w"> </span><span class="c"># This will forward to the built-in FetchContent implementation,</span>
|
| 455 |
+
<span class="w"> </span><span class="c"># which detects a recursive call for the same thing and avoids calling</span>
|
| 456 |
+
<span class="w"> </span><span class="c"># the provider again if dep_name is the same as the current call.</span>
|
| 457 |
+
<span class="w"> </span><span class="nf">FetchContent_MakeAvailable(</span><span class="nb">googletest</span><span class="nf">)</span>
|
| 458 |
+
|
| 459 |
+
<span class="w"> </span><span class="c"># Restore our command arguments</span>
|
| 460 |
+
<span class="w"> </span><span class="nf">list(</span><span class="no">POP_BACK</span><span class="w"> </span><span class="nb">mycomp_provider_args</span><span class="w"> </span><span class="nb">dep_name</span><span class="w"> </span><span class="nb">method</span><span class="nf">)</span>
|
| 461 |
+
|
| 462 |
+
<span class="w"> </span><span class="c"># Tell the caller we fulfilled the request</span>
|
| 463 |
+
<span class="w"> </span><span class="nf">if(</span><span class="s">"${method}"</span><span class="w"> </span><span class="no">STREQUAL</span><span class="w"> </span><span class="s">"FIND_PACKAGE"</span><span class="nf">)</span>
|
| 464 |
+
<span class="w"> </span><span class="c"># We need to set this if we got here from a find_package() call</span>
|
| 465 |
+
<span class="w"> </span><span class="c"># since we used a different method to fulfill the request.</span>
|
| 466 |
+
<span class="w"> </span><span class="c"># This example assumes projects only use the gtest targets,</span>
|
| 467 |
+
<span class="w"> </span><span class="c"># not any of the variables the FindGTest module may define.</span>
|
| 468 |
+
<span class="w"> </span><span class="nf">set(</span><span class="o">${</span><span class="nt">dep_name</span><span class="o">}</span><span class="nb">_FOUND</span><span class="w"> </span><span class="no">TRUE</span><span class="nf">)</span>
|
| 469 |
+
<span class="w"> </span><span class="nf">elseif(</span><span class="no">NOT</span><span class="w"> </span><span class="s">"${dep_name}"</span><span class="w"> </span><span class="no">STREQUAL</span><span class="w"> </span><span class="s">"googletest"</span><span class="nf">)</span>
|
| 470 |
+
<span class="w"> </span><span class="c"># We used the same method, but were given a different name to the</span>
|
| 471 |
+
<span class="w"> </span><span class="c"># one we populated with. Tell the caller about the name it used.</span>
|
| 472 |
+
<span class="w"> </span><span class="nf">FetchContent_SetPopulated(</span><span class="o">${</span><span class="nt">dep_name</span><span class="o">}</span>
|
| 473 |
+
<span class="w"> </span><span class="no">SOURCE_DIR</span><span class="w"> </span><span class="s">"${googletest_SOURCE_DIR}"</span>
|
| 474 |
+
<span class="w"> </span><span class="no">BINARY_DIR</span><span class="w"> </span><span class="s">"${googletest_BINARY_DIR}"</span>
|
| 475 |
+
<span class="w"> </span><span class="nf">)</span>
|
| 476 |
+
<span class="w"> </span><span class="nf">endif()</span>
|
| 477 |
+
<span class="w"> </span><span class="nf">endif()</span>
|
| 478 |
+
<span class="nf">endmacro()</span>
|
| 479 |
+
|
| 480 |
+
<span class="nf">cmake_language(</span>
|
| 481 |
+
<span class="w"> </span><span class="no">SET_DEPENDENCY_PROVIDER</span><span class="w"> </span><span class="nb">mycomp_provide_dependency</span>
|
| 482 |
+
<span class="w"> </span><span class="no">SUPPORTED_METHODS</span>
|
| 483 |
+
<span class="w"> </span><span class="no">FIND_PACKAGE</span>
|
| 484 |
+
<span class="w"> </span><span class="no">FETCHCONTENT_MAKEAVAILABLE_SERIAL</span>
|
| 485 |
+
<span class="nf">)</span>
|
| 486 |
+
</pre></div>
|
| 487 |
+
</div>
|
| 488 |
+
</div>
|
| 489 |
+
<p>The final example demonstrates how to modify arguments to a
|
| 490 |
+
<span class="target" id="index-8-command:find_package"></span><a class="reference internal" href="find_package.html#command:find_package" title="find_package"><code class="xref cmake cmake-command docutils literal notranslate"><span class="pre">find_package()</span></code></a> call. It forces all such calls to have the
|
| 491 |
+
<code class="docutils literal notranslate"><span class="pre">QUIET</span></code> keyword. It uses the <code class="docutils literal notranslate"><span class="pre">BYPASS_PROVIDER</span></code> keyword to prevent
|
| 492 |
+
calling the provider command recursively for the same dependency.</p>
|
| 493 |
+
<div class="literal-block-wrapper docutils container" id="id4">
|
| 494 |
+
<div class="code-block-caption"><span class="caption-text">mycomp_provider.cmake</span><a class="headerlink" href="#id4" title="Permalink to this code">¶</a></div>
|
| 495 |
+
<div class="highlight-cmake notranslate"><div class="highlight"><pre><span></span><span class="nf">cmake_minimum_required(</span><span class="no">VERSION</span><span class="w"> </span><span class="m">3.24</span><span class="nf">)</span>
|
| 496 |
+
|
| 497 |
+
<span class="nf">macro(</span><span class="nb">mycomp_provide_dependency</span><span class="w"> </span><span class="nb">method</span><span class="nf">)</span>
|
| 498 |
+
<span class="w"> </span><span class="nf">find_package(</span><span class="o">${</span><span class="nt">ARGN</span><span class="o">}</span><span class="w"> </span><span class="no">BYPASS_PROVIDER</span><span class="w"> </span><span class="no">QUIET</span><span class="nf">)</span>
|
| 499 |
+
<span class="nf">endmacro()</span>
|
| 500 |
+
|
| 501 |
+
<span class="nf">cmake_language(</span>
|
| 502 |
+
<span class="w"> </span><span class="no">SET_DEPENDENCY_PROVIDER</span><span class="w"> </span><span class="nb">mycomp_provide_dependency</span>
|
| 503 |
+
<span class="w"> </span><span class="no">SUPPORTED_METHODS</span><span class="w"> </span><span class="no">FIND_PACKAGE</span>
|
| 504 |
+
<span class="nf">)</span>
|
| 505 |
+
</pre></div>
|
| 506 |
+
</div>
|
| 507 |
+
</div>
|
| 508 |
+
</section>
|
| 509 |
+
</section>
|
| 510 |
+
<section id="getting-current-message-log-level">
|
| 511 |
+
<h2>Getting current message log level<a class="headerlink" href="#getting-current-message-log-level" title="Permalink to this heading">¶</a></h2>
|
| 512 |
+
<div class="versionadded">
|
| 513 |
+
<p><span class="versionmodified added">New in version 3.25.</span></p>
|
| 514 |
+
</div>
|
| 515 |
+
<span class="target" id="query-message-log-level"></span><dl class="cmake signature">
|
| 516 |
+
<dt class="sig sig-object cmake" id="get-message-log-level">
|
| 517 |
+
<span class="code cmake highlight sig-name descname"><span class="nf"><span class="pre">cmake_language(</span></span><span class="no"><span class="pre">GET_MESSAGE_LOG_LEVEL</span></span><span class="w"> </span><span class="nv"><span class="pre"><output_variable></span></span><span class="nf"><span class="pre">)</span></span></span><a class="headerlink" href="#get-message-log-level" title="Permalink to this definition">¶</a></dt>
|
| 518 |
+
<dd><p>Writes the current <span class="target" id="index-0-command:message"></span><a class="reference internal" href="message.html#command:message" title="message"><code class="xref cmake cmake-command docutils literal notranslate"><span class="pre">message()</span></code></a> logging level
|
| 519 |
+
into the given <code class="docutils literal notranslate"><span class="pre"><output_variable></span></code>.</p>
|
| 520 |
+
<p>See <span class="target" id="index-1-command:message"></span><a class="reference internal" href="message.html#command:message" title="message"><code class="xref cmake cmake-command docutils literal notranslate"><span class="pre">message()</span></code></a> for the possible logging levels.</p>
|
| 521 |
+
<p>The current message logging level can be set either using the
|
| 522 |
+
<a class="reference internal" href="../manual/cmake.1.html#cmdoption-cmake-log-level"><code class="xref std std-option docutils literal notranslate"><span class="pre">--log-level</span></code></a>
|
| 523 |
+
command line option of the <span class="target" id="index-0-manual:cmake(1)"></span><a class="reference internal" href="../manual/cmake.1.html#manual:cmake(1)" title="cmake(1)"><code class="xref cmake cmake-manual docutils literal notranslate"><span class="pre">cmake(1)</span></code></a> program or using
|
| 524 |
+
the <span class="target" id="index-0-variable:CMAKE_MESSAGE_LOG_LEVEL"></span><a class="reference internal" href="../variable/CMAKE_MESSAGE_LOG_LEVEL.html#variable:CMAKE_MESSAGE_LOG_LEVEL" title="CMAKE_MESSAGE_LOG_LEVEL"><code class="xref cmake cmake-variable docutils literal notranslate"><span class="pre">CMAKE_MESSAGE_LOG_LEVEL</span></code></a> variable.</p>
|
| 525 |
+
<p>If both the command line option and the variable are set, the command line
|
| 526 |
+
option takes precedence. If neither are set, the default logging level
|
| 527 |
+
is returned.</p>
|
| 528 |
+
</dd></dl>
|
| 529 |
+
|
| 530 |
+
</section>
|
| 531 |
+
</section>
|
| 532 |
+
|
| 533 |
+
|
| 534 |
+
<div class="clearer"></div>
|
| 535 |
+
</div>
|
| 536 |
+
</div>
|
| 537 |
+
</div>
|
| 538 |
+
<div class="sphinxsidebar" role="navigation" aria-label="main navigation">
|
| 539 |
+
<div class="sphinxsidebarwrapper">
|
| 540 |
+
<div>
|
| 541 |
+
<h3><a href="../index.html">Table of Contents</a></h3>
|
| 542 |
+
<ul>
|
| 543 |
+
<li><a class="reference internal" href="#">cmake_language</a><ul>
|
| 544 |
+
<li><a class="reference internal" href="#synopsis">Synopsis</a></li>
|
| 545 |
+
<li><a class="reference internal" href="#introduction">Introduction</a></li>
|
| 546 |
+
<li><a class="reference internal" href="#calling-commands">Calling Commands</a></li>
|
| 547 |
+
<li><a class="reference internal" href="#evaluating-code">Evaluating Code</a></li>
|
| 548 |
+
<li><a class="reference internal" href="#deferring-calls">Deferring Calls</a><ul>
|
| 549 |
+
<li><a class="reference internal" href="#deferred-call-examples">Deferred Call Examples</a></li>
|
| 550 |
+
</ul>
|
| 551 |
+
</li>
|
| 552 |
+
<li><a class="reference internal" href="#dependency-providers">Dependency Providers</a><ul>
|
| 553 |
+
<li><a class="reference internal" href="#provider-commands">Provider commands</a></li>
|
| 554 |
+
<li><a class="reference internal" href="#provider-examples">Provider Examples</a></li>
|
| 555 |
+
</ul>
|
| 556 |
+
</li>
|
| 557 |
+
<li><a class="reference internal" href="#getting-current-message-log-level">Getting current message log level</a></li>
|
| 558 |
+
</ul>
|
| 559 |
+
</li>
|
| 560 |
+
</ul>
|
| 561 |
+
|
| 562 |
+
</div>
|
| 563 |
+
<div>
|
| 564 |
+
<h4>Previous topic</h4>
|
| 565 |
+
<p class="topless"><a href="cmake_host_system_information.html"
|
| 566 |
+
title="previous chapter">cmake_host_system_information</a></p>
|
| 567 |
+
</div>
|
| 568 |
+
<div>
|
| 569 |
+
<h4>Next topic</h4>
|
| 570 |
+
<p class="topless"><a href="cmake_minimum_required.html"
|
| 571 |
+
title="next chapter">cmake_minimum_required</a></p>
|
| 572 |
+
</div>
|
| 573 |
+
<div role="note" aria-label="source link">
|
| 574 |
+
<h3>This Page</h3>
|
| 575 |
+
<ul class="this-page-menu">
|
| 576 |
+
<li><a href="../_sources/command/cmake_language.rst.txt"
|
| 577 |
+
rel="nofollow">Show Source</a></li>
|
| 578 |
+
</ul>
|
| 579 |
+
</div>
|
| 580 |
+
<div id="searchbox" style="display: none" role="search">
|
| 581 |
+
<h3 id="searchlabel">Quick search</h3>
|
| 582 |
+
<div class="searchformwrapper">
|
| 583 |
+
<form class="search" action="../search.html" method="get">
|
| 584 |
+
<input type="text" name="q" aria-labelledby="searchlabel" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/>
|
| 585 |
+
<input type="submit" value="Go" />
|
| 586 |
+
</form>
|
| 587 |
+
</div>
|
| 588 |
+
</div>
|
| 589 |
+
<script>document.getElementById('searchbox').style.display = "block"</script>
|
| 590 |
+
</div>
|
| 591 |
+
</div>
|
| 592 |
+
<div class="clearer"></div>
|
| 593 |
+
</div>
|
| 594 |
+
<div class="related" role="navigation" aria-label="related navigation">
|
| 595 |
+
<h3>Navigation</h3>
|
| 596 |
+
<ul>
|
| 597 |
+
<li class="right" style="margin-right: 10px">
|
| 598 |
+
<a href="../genindex.html" title="General Index"
|
| 599 |
+
>index</a></li>
|
| 600 |
+
<li class="right" >
|
| 601 |
+
<a href="cmake_minimum_required.html" title="cmake_minimum_required"
|
| 602 |
+
>next</a> |</li>
|
| 603 |
+
<li class="right" >
|
| 604 |
+
<a href="cmake_host_system_information.html" title="cmake_host_system_information"
|
| 605 |
+
>previous</a> |</li>
|
| 606 |
+
<li>
|
| 607 |
+
<img src="../_static/cmake-logo-16.png" alt=""
|
| 608 |
+
style="vertical-align: middle; margin-top: -2px" />
|
| 609 |
+
</li>
|
| 610 |
+
<li>
|
| 611 |
+
<a href="https://cmake.org/">CMake</a> »
|
| 612 |
+
</li>
|
| 613 |
+
<li>
|
| 614 |
+
<a href="../index.html">3.27.9 Documentation</a> »
|
| 615 |
+
</li>
|
| 616 |
+
|
| 617 |
+
<li class="nav-item nav-item-1"><a href="../manual/cmake-commands.7.html" >cmake-commands(7)</a> »</li>
|
| 618 |
+
<li class="nav-item nav-item-this"><a href="">cmake_language</a></li>
|
| 619 |
+
</ul>
|
| 620 |
+
</div>
|
| 621 |
+
|
| 622 |
+
<div class="footer" role="contentinfo">
|
| 623 |
+
© Copyright 2000-2023 Kitware, Inc. and Contributors.
|
| 624 |
+
Created using <a href="https://www.sphinx-doc.org/">Sphinx</a> 5.3.0.
|
| 625 |
+
</div>
|
| 626 |
+
</body>
|
| 627 |
+
</html>
|
toolchain/cmake-3.27.9-linux-x86_64/doc/cmake/html/command/cmake_minimum_required.html
ADDED
|
@@ -0,0 +1,233 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
|
| 2 |
+
<!DOCTYPE html>
|
| 3 |
+
|
| 4 |
+
<html lang="en">
|
| 5 |
+
<head>
|
| 6 |
+
<meta charset="utf-8" />
|
| 7 |
+
<meta name="viewport" content="width=device-width, initial-scale=1.0" /><meta name="generator" content="Docutils 0.19: https://docutils.sourceforge.io/" />
|
| 8 |
+
|
| 9 |
+
<title>cmake_minimum_required — CMake 3.27.9 Documentation</title>
|
| 10 |
+
|
| 11 |
+
<link rel="stylesheet" type="text/css" href="../_static/pygments.css" />
|
| 12 |
+
<link rel="stylesheet" type="text/css" href="../_static/cmake.css" />
|
| 13 |
+
|
| 14 |
+
<script data-url_root="../" id="documentation_options" src="../_static/documentation_options.js"></script>
|
| 15 |
+
<script src="../_static/jquery.js"></script>
|
| 16 |
+
<script src="../_static/underscore.js"></script>
|
| 17 |
+
<script src="../_static/_sphinx_javascript_frameworks_compat.js"></script>
|
| 18 |
+
<script src="../_static/doctools.js"></script>
|
| 19 |
+
<script src="../_static/sphinx_highlight.js"></script>
|
| 20 |
+
|
| 21 |
+
<link rel="shortcut icon" href="../_static/cmake-favicon.ico"/>
|
| 22 |
+
<link rel="index" title="Index" href="../genindex.html" />
|
| 23 |
+
<link rel="search" title="Search" href="../search.html" />
|
| 24 |
+
<link rel="next" title="cmake_parse_arguments" href="cmake_parse_arguments.html" />
|
| 25 |
+
<link rel="prev" title="cmake_language" href="cmake_language.html" />
|
| 26 |
+
|
| 27 |
+
|
| 28 |
+
</head><body>
|
| 29 |
+
|
| 30 |
+
<div class="related" role="navigation" aria-label="related navigation">
|
| 31 |
+
<h3>Navigation</h3>
|
| 32 |
+
<ul>
|
| 33 |
+
<li class="right" style="margin-right: 10px">
|
| 34 |
+
<a href="../genindex.html" title="General Index"
|
| 35 |
+
accesskey="I">index</a></li>
|
| 36 |
+
<li class="right" >
|
| 37 |
+
<a href="cmake_parse_arguments.html" title="cmake_parse_arguments"
|
| 38 |
+
accesskey="N">next</a> |</li>
|
| 39 |
+
<li class="right" >
|
| 40 |
+
<a href="cmake_language.html" title="cmake_language"
|
| 41 |
+
accesskey="P">previous</a> |</li>
|
| 42 |
+
<li>
|
| 43 |
+
<img src="../_static/cmake-logo-16.png" alt=""
|
| 44 |
+
style="vertical-align: middle; margin-top: -2px" />
|
| 45 |
+
</li>
|
| 46 |
+
<li>
|
| 47 |
+
<a href="https://cmake.org/">CMake</a> »
|
| 48 |
+
</li>
|
| 49 |
+
<li>
|
| 50 |
+
<a href="../index.html">3.27.9 Documentation</a> »
|
| 51 |
+
</li>
|
| 52 |
+
|
| 53 |
+
<li class="nav-item nav-item-1"><a href="../manual/cmake-commands.7.html" accesskey="U">cmake-commands(7)</a> »</li>
|
| 54 |
+
<li class="nav-item nav-item-this"><a href="">cmake_minimum_required</a></li>
|
| 55 |
+
</ul>
|
| 56 |
+
</div>
|
| 57 |
+
|
| 58 |
+
<div class="document">
|
| 59 |
+
<div class="documentwrapper">
|
| 60 |
+
<div class="bodywrapper">
|
| 61 |
+
<div class="body" role="main">
|
| 62 |
+
|
| 63 |
+
<section id="cmake-minimum-required">
|
| 64 |
+
<span id="command:cmake_minimum_required"></span><h1>cmake_minimum_required<a class="headerlink" href="#cmake-minimum-required" title="Permalink to this heading">¶</a></h1>
|
| 65 |
+
<p>Require a minimum version of cmake.</p>
|
| 66 |
+
<div class="highlight-cmake notranslate"><div class="highlight"><pre><span></span><span class="nf">cmake_minimum_required(</span><span class="no">VERSION</span><span class="w"> </span><span class="nv"><min></span><span class="p">[...</span><span class="nv"><policy_max></span><span class="p">]</span><span class="w"> </span><span class="p">[</span><span class="no">FATAL_ERROR</span><span class="p">]</span><span class="nf">)</span>
|
| 67 |
+
</pre></div>
|
| 68 |
+
</div>
|
| 69 |
+
<div class="versionadded">
|
| 70 |
+
<p><span class="versionmodified added">New in version 3.12: </span>The optional <code class="docutils literal notranslate"><span class="pre"><policy_max></span></code> version.</p>
|
| 71 |
+
</div>
|
| 72 |
+
<p>Sets the minimum required version of cmake for a project.
|
| 73 |
+
Also updates the policy settings as explained below.</p>
|
| 74 |
+
<p><code class="docutils literal notranslate"><span class="pre"><min></span></code> and the optional <code class="docutils literal notranslate"><span class="pre"><policy_max></span></code> are each CMake versions of the
|
| 75 |
+
form <code class="docutils literal notranslate"><span class="pre">major.minor[.patch[.tweak]]</span></code>, and the <code class="docutils literal notranslate"><span class="pre">...</span></code> is literal.</p>
|
| 76 |
+
<p>If the running version of CMake is lower than the <code class="docutils literal notranslate"><span class="pre"><min></span></code> required
|
| 77 |
+
version it will stop processing the project and report an error.
|
| 78 |
+
The optional <code class="docutils literal notranslate"><span class="pre"><policy_max></span></code> version, if specified, must be at least the
|
| 79 |
+
<code class="docutils literal notranslate"><span class="pre"><min></span></code> version and affects policy settings as described in <a class="reference internal" href="#policy-settings">Policy Settings</a>.
|
| 80 |
+
If the running version of CMake is older than 3.12, the extra <code class="docutils literal notranslate"><span class="pre">...</span></code>
|
| 81 |
+
dots will be seen as version component separators, resulting in the
|
| 82 |
+
<code class="docutils literal notranslate"><span class="pre">...<max></span></code> part being ignored and preserving the pre-3.12 behavior
|
| 83 |
+
of basing policies on <code class="docutils literal notranslate"><span class="pre"><min></span></code>.</p>
|
| 84 |
+
<p>This command will set the value of the
|
| 85 |
+
<span class="target" id="index-0-variable:CMAKE_MINIMUM_REQUIRED_VERSION"></span><a class="reference internal" href="../variable/CMAKE_MINIMUM_REQUIRED_VERSION.html#variable:CMAKE_MINIMUM_REQUIRED_VERSION" title="CMAKE_MINIMUM_REQUIRED_VERSION"><code class="xref cmake cmake-variable docutils literal notranslate"><span class="pre">CMAKE_MINIMUM_REQUIRED_VERSION</span></code></a> variable to <code class="docutils literal notranslate"><span class="pre"><min></span></code>.</p>
|
| 86 |
+
<p>The <code class="docutils literal notranslate"><span class="pre">FATAL_ERROR</span></code> option is accepted but ignored by CMake 2.6 and
|
| 87 |
+
higher. It should be specified so CMake versions 2.4 and lower fail
|
| 88 |
+
with an error instead of just a warning.</p>
|
| 89 |
+
<div class="admonition note">
|
| 90 |
+
<p class="admonition-title">Note</p>
|
| 91 |
+
<p>Call the <code class="docutils literal notranslate"><span class="pre">cmake_minimum_required()</span></code> command at the beginning of
|
| 92 |
+
the top-level <code class="docutils literal notranslate"><span class="pre">CMakeLists.txt</span></code> file even before calling the
|
| 93 |
+
<span class="target" id="index-0-command:project"></span><a class="reference internal" href="project.html#command:project" title="project"><code class="xref cmake cmake-command docutils literal notranslate"><span class="pre">project()</span></code></a> command. It is important to establish version
|
| 94 |
+
and policy settings before invoking other commands whose behavior
|
| 95 |
+
they may affect. See also policy <span class="target" id="index-0-policy:CMP0000"></span><a class="reference internal" href="../policy/CMP0000.html#policy:CMP0000" title="CMP0000"><code class="xref cmake cmake-policy docutils literal notranslate"><span class="pre">CMP0000</span></code></a>.</p>
|
| 96 |
+
<p>Calling <code class="docutils literal notranslate"><span class="pre">cmake_minimum_required()</span></code> inside a <span class="target" id="index-0-command:function"></span><a class="reference internal" href="function.html#command:function" title="function"><code class="xref cmake cmake-command docutils literal notranslate"><span class="pre">function()</span></code></a>
|
| 97 |
+
limits some effects to the function scope when invoked. For example,
|
| 98 |
+
the <span class="target" id="index-1-variable:CMAKE_MINIMUM_REQUIRED_VERSION"></span><a class="reference internal" href="../variable/CMAKE_MINIMUM_REQUIRED_VERSION.html#variable:CMAKE_MINIMUM_REQUIRED_VERSION" title="CMAKE_MINIMUM_REQUIRED_VERSION"><code class="xref cmake cmake-variable docutils literal notranslate"><span class="pre">CMAKE_MINIMUM_REQUIRED_VERSION</span></code></a> variable won't be set
|
| 99 |
+
in the calling scope. Functions do not introduce their own policy
|
| 100 |
+
scope though, so policy settings of the caller <em>will</em> be affected
|
| 101 |
+
(see below). Due to this mix of things that do and do not affect the
|
| 102 |
+
calling scope, calling <code class="docutils literal notranslate"><span class="pre">cmake_minimum_required()</span></code> inside a function
|
| 103 |
+
is generally discouraged.</p>
|
| 104 |
+
</div>
|
| 105 |
+
<section id="policy-settings">
|
| 106 |
+
<span id="id1"></span><h2>Policy Settings<a class="headerlink" href="#policy-settings" title="Permalink to this heading">¶</a></h2>
|
| 107 |
+
<p>The <code class="docutils literal notranslate"><span class="pre">cmake_minimum_required(VERSION)</span></code> command implicitly invokes the
|
| 108 |
+
<span class="target" id="index-0-command:cmake_policy"></span><a class="reference internal" href="cmake_policy.html#command:cmake_policy" title="cmake_policy(version)"><code class="xref cmake cmake-command docutils literal notranslate"><span class="pre">cmake_policy(VERSION)</span></code></a> command to specify that the current
|
| 109 |
+
project code is written for the given range of CMake versions.
|
| 110 |
+
All policies known to the running version of CMake and introduced
|
| 111 |
+
in the <code class="docutils literal notranslate"><span class="pre"><min></span></code> (or <code class="docutils literal notranslate"><span class="pre"><max></span></code>, if specified) version or earlier will
|
| 112 |
+
be set to use <code class="docutils literal notranslate"><span class="pre">NEW</span></code> behavior. All policies introduced in later
|
| 113 |
+
versions will be unset. This effectively requests behavior preferred
|
| 114 |
+
as of a given CMake version and tells newer CMake versions to warn
|
| 115 |
+
about their new policies.</p>
|
| 116 |
+
<p>When a <code class="docutils literal notranslate"><span class="pre"><min></span></code> version higher than 2.4 is specified the command
|
| 117 |
+
implicitly invokes</p>
|
| 118 |
+
<div class="highlight-cmake notranslate"><div class="highlight"><pre><span></span><span class="nf">cmake_policy(</span><span class="no">VERSION</span><span class="w"> </span><span class="nv"><min></span><span class="p">[...</span><span class="nv"><max></span><span class="p">]</span><span class="nf">)</span>
|
| 119 |
+
</pre></div>
|
| 120 |
+
</div>
|
| 121 |
+
<p>which sets CMake policies based on the range of versions specified.
|
| 122 |
+
When a <code class="docutils literal notranslate"><span class="pre"><min></span></code> version 2.4 or lower is given the command implicitly
|
| 123 |
+
invokes</p>
|
| 124 |
+
<div class="highlight-cmake notranslate"><div class="highlight"><pre><span></span><span class="nf">cmake_policy(</span><span class="no">VERSION</span><span class="w"> </span><span class="m">2.4</span><span class="p">[...</span><span class="nv"><max></span><span class="p">]</span><span class="nf">)</span>
|
| 125 |
+
</pre></div>
|
| 126 |
+
</div>
|
| 127 |
+
<p>which enables compatibility features for CMake 2.4 and lower.</p>
|
| 128 |
+
<div class="versionchanged">
|
| 129 |
+
<p><span class="versionmodified changed">Changed in version 3.27: </span>Compatibility with versions of CMake older than 3.5 is deprecated.
|
| 130 |
+
Calls to <span class="target" id="index-0-command:cmake_minimum_required"></span><a class="reference internal" href="#command:cmake_minimum_required" title="cmake_minimum_required(version)"><code class="xref cmake cmake-command docutils literal notranslate"><span class="pre">cmake_minimum_required(VERSION)</span></code></a> or
|
| 131 |
+
<span class="target" id="index-1-command:cmake_policy"></span><a class="reference internal" href="cmake_policy.html#command:cmake_policy" title="cmake_policy(version)"><code class="xref cmake cmake-command docutils literal notranslate"><span class="pre">cmake_policy(VERSION)</span></code></a> that do not specify at least
|
| 132 |
+
3.5 as their policy version (optionally via <code class="docutils literal notranslate"><span class="pre">...<max></span></code>)
|
| 133 |
+
will produce a deprecation warning in CMake 3.27 and above.</p>
|
| 134 |
+
</div>
|
| 135 |
+
<div class="versionchanged">
|
| 136 |
+
<p><span class="versionmodified changed">Changed in version 3.19: </span>Compatibility with versions of CMake older than 2.8.12 is deprecated.
|
| 137 |
+
Calls to <span class="target" id="index-1-command:cmake_minimum_required"></span><a class="reference internal" href="#command:cmake_minimum_required" title="cmake_minimum_required(version)"><code class="xref cmake cmake-command docutils literal notranslate"><span class="pre">cmake_minimum_required(VERSION)</span></code></a> or
|
| 138 |
+
<span class="target" id="index-2-command:cmake_policy"></span><a class="reference internal" href="cmake_policy.html#command:cmake_policy" title="cmake_policy(version)"><code class="xref cmake cmake-command docutils literal notranslate"><span class="pre">cmake_policy(VERSION)</span></code></a> that do not specify at least
|
| 139 |
+
2.8.12 as their policy version (optionally via <code class="docutils literal notranslate"><span class="pre">...<max></span></code>)
|
| 140 |
+
will produce a deprecation warning in CMake 3.19 and above.</p>
|
| 141 |
+
</div>
|
| 142 |
+
</section>
|
| 143 |
+
<section id="see-also">
|
| 144 |
+
<h2>See Also<a class="headerlink" href="#see-also" title="Permalink to this heading">¶</a></h2>
|
| 145 |
+
<ul class="simple">
|
| 146 |
+
<li><p><span class="target" id="index-3-command:cmake_policy"></span><a class="reference internal" href="cmake_policy.html#command:cmake_policy" title="cmake_policy"><code class="xref cmake cmake-command docutils literal notranslate"><span class="pre">cmake_policy()</span></code></a></p></li>
|
| 147 |
+
</ul>
|
| 148 |
+
</section>
|
| 149 |
+
</section>
|
| 150 |
+
|
| 151 |
+
|
| 152 |
+
<div class="clearer"></div>
|
| 153 |
+
</div>
|
| 154 |
+
</div>
|
| 155 |
+
</div>
|
| 156 |
+
<div class="sphinxsidebar" role="navigation" aria-label="main navigation">
|
| 157 |
+
<div class="sphinxsidebarwrapper">
|
| 158 |
+
<div>
|
| 159 |
+
<h3><a href="../index.html">Table of Contents</a></h3>
|
| 160 |
+
<ul>
|
| 161 |
+
<li><a class="reference internal" href="#">cmake_minimum_required</a><ul>
|
| 162 |
+
<li><a class="reference internal" href="#policy-settings">Policy Settings</a></li>
|
| 163 |
+
<li><a class="reference internal" href="#see-also">See Also</a></li>
|
| 164 |
+
</ul>
|
| 165 |
+
</li>
|
| 166 |
+
</ul>
|
| 167 |
+
|
| 168 |
+
</div>
|
| 169 |
+
<div>
|
| 170 |
+
<h4>Previous topic</h4>
|
| 171 |
+
<p class="topless"><a href="cmake_language.html"
|
| 172 |
+
title="previous chapter">cmake_language</a></p>
|
| 173 |
+
</div>
|
| 174 |
+
<div>
|
| 175 |
+
<h4>Next topic</h4>
|
| 176 |
+
<p class="topless"><a href="cmake_parse_arguments.html"
|
| 177 |
+
title="next chapter">cmake_parse_arguments</a></p>
|
| 178 |
+
</div>
|
| 179 |
+
<div role="note" aria-label="source link">
|
| 180 |
+
<h3>This Page</h3>
|
| 181 |
+
<ul class="this-page-menu">
|
| 182 |
+
<li><a href="../_sources/command/cmake_minimum_required.rst.txt"
|
| 183 |
+
rel="nofollow">Show Source</a></li>
|
| 184 |
+
</ul>
|
| 185 |
+
</div>
|
| 186 |
+
<div id="searchbox" style="display: none" role="search">
|
| 187 |
+
<h3 id="searchlabel">Quick search</h3>
|
| 188 |
+
<div class="searchformwrapper">
|
| 189 |
+
<form class="search" action="../search.html" method="get">
|
| 190 |
+
<input type="text" name="q" aria-labelledby="searchlabel" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/>
|
| 191 |
+
<input type="submit" value="Go" />
|
| 192 |
+
</form>
|
| 193 |
+
</div>
|
| 194 |
+
</div>
|
| 195 |
+
<script>document.getElementById('searchbox').style.display = "block"</script>
|
| 196 |
+
</div>
|
| 197 |
+
</div>
|
| 198 |
+
<div class="clearer"></div>
|
| 199 |
+
</div>
|
| 200 |
+
<div class="related" role="navigation" aria-label="related navigation">
|
| 201 |
+
<h3>Navigation</h3>
|
| 202 |
+
<ul>
|
| 203 |
+
<li class="right" style="margin-right: 10px">
|
| 204 |
+
<a href="../genindex.html" title="General Index"
|
| 205 |
+
>index</a></li>
|
| 206 |
+
<li class="right" >
|
| 207 |
+
<a href="cmake_parse_arguments.html" title="cmake_parse_arguments"
|
| 208 |
+
>next</a> |</li>
|
| 209 |
+
<li class="right" >
|
| 210 |
+
<a href="cmake_language.html" title="cmake_language"
|
| 211 |
+
>previous</a> |</li>
|
| 212 |
+
<li>
|
| 213 |
+
<img src="../_static/cmake-logo-16.png" alt=""
|
| 214 |
+
style="vertical-align: middle; margin-top: -2px" />
|
| 215 |
+
</li>
|
| 216 |
+
<li>
|
| 217 |
+
<a href="https://cmake.org/">CMake</a> »
|
| 218 |
+
</li>
|
| 219 |
+
<li>
|
| 220 |
+
<a href="../index.html">3.27.9 Documentation</a> »
|
| 221 |
+
</li>
|
| 222 |
+
|
| 223 |
+
<li class="nav-item nav-item-1"><a href="../manual/cmake-commands.7.html" >cmake-commands(7)</a> »</li>
|
| 224 |
+
<li class="nav-item nav-item-this"><a href="">cmake_minimum_required</a></li>
|
| 225 |
+
</ul>
|
| 226 |
+
</div>
|
| 227 |
+
|
| 228 |
+
<div class="footer" role="contentinfo">
|
| 229 |
+
© Copyright 2000-2023 Kitware, Inc. and Contributors.
|
| 230 |
+
Created using <a href="https://www.sphinx-doc.org/">Sphinx</a> 5.3.0.
|
| 231 |
+
</div>
|
| 232 |
+
</body>
|
| 233 |
+
</html>
|
toolchain/cmake-3.27.9-linux-x86_64/doc/cmake/html/command/cmake_parse_arguments.html
ADDED
|
@@ -0,0 +1,253 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
|
| 2 |
+
<!DOCTYPE html>
|
| 3 |
+
|
| 4 |
+
<html lang="en">
|
| 5 |
+
<head>
|
| 6 |
+
<meta charset="utf-8" />
|
| 7 |
+
<meta name="viewport" content="width=device-width, initial-scale=1.0" /><meta name="generator" content="Docutils 0.19: https://docutils.sourceforge.io/" />
|
| 8 |
+
|
| 9 |
+
<title>cmake_parse_arguments — CMake 3.27.9 Documentation</title>
|
| 10 |
+
|
| 11 |
+
<link rel="stylesheet" type="text/css" href="../_static/pygments.css" />
|
| 12 |
+
<link rel="stylesheet" type="text/css" href="../_static/cmake.css" />
|
| 13 |
+
|
| 14 |
+
<script data-url_root="../" id="documentation_options" src="../_static/documentation_options.js"></script>
|
| 15 |
+
<script src="../_static/jquery.js"></script>
|
| 16 |
+
<script src="../_static/underscore.js"></script>
|
| 17 |
+
<script src="../_static/_sphinx_javascript_frameworks_compat.js"></script>
|
| 18 |
+
<script src="../_static/doctools.js"></script>
|
| 19 |
+
<script src="../_static/sphinx_highlight.js"></script>
|
| 20 |
+
|
| 21 |
+
<link rel="shortcut icon" href="../_static/cmake-favicon.ico"/>
|
| 22 |
+
<link rel="index" title="Index" href="../genindex.html" />
|
| 23 |
+
<link rel="search" title="Search" href="../search.html" />
|
| 24 |
+
<link rel="next" title="cmake_path" href="cmake_path.html" />
|
| 25 |
+
<link rel="prev" title="cmake_minimum_required" href="cmake_minimum_required.html" />
|
| 26 |
+
|
| 27 |
+
|
| 28 |
+
</head><body>
|
| 29 |
+
|
| 30 |
+
<div class="related" role="navigation" aria-label="related navigation">
|
| 31 |
+
<h3>Navigation</h3>
|
| 32 |
+
<ul>
|
| 33 |
+
<li class="right" style="margin-right: 10px">
|
| 34 |
+
<a href="../genindex.html" title="General Index"
|
| 35 |
+
accesskey="I">index</a></li>
|
| 36 |
+
<li class="right" >
|
| 37 |
+
<a href="cmake_path.html" title="cmake_path"
|
| 38 |
+
accesskey="N">next</a> |</li>
|
| 39 |
+
<li class="right" >
|
| 40 |
+
<a href="cmake_minimum_required.html" title="cmake_minimum_required"
|
| 41 |
+
accesskey="P">previous</a> |</li>
|
| 42 |
+
<li>
|
| 43 |
+
<img src="../_static/cmake-logo-16.png" alt=""
|
| 44 |
+
style="vertical-align: middle; margin-top: -2px" />
|
| 45 |
+
</li>
|
| 46 |
+
<li>
|
| 47 |
+
<a href="https://cmake.org/">CMake</a> »
|
| 48 |
+
</li>
|
| 49 |
+
<li>
|
| 50 |
+
<a href="../index.html">3.27.9 Documentation</a> »
|
| 51 |
+
</li>
|
| 52 |
+
|
| 53 |
+
<li class="nav-item nav-item-1"><a href="../manual/cmake-commands.7.html" accesskey="U">cmake-commands(7)</a> »</li>
|
| 54 |
+
<li class="nav-item nav-item-this"><a href="">cmake_parse_arguments</a></li>
|
| 55 |
+
</ul>
|
| 56 |
+
</div>
|
| 57 |
+
|
| 58 |
+
<div class="document">
|
| 59 |
+
<div class="documentwrapper">
|
| 60 |
+
<div class="bodywrapper">
|
| 61 |
+
<div class="body" role="main">
|
| 62 |
+
|
| 63 |
+
<section id="cmake-parse-arguments">
|
| 64 |
+
<span id="command:cmake_parse_arguments"></span><h1>cmake_parse_arguments<a class="headerlink" href="#cmake-parse-arguments" title="Permalink to this heading">¶</a></h1>
|
| 65 |
+
<p>Parse function or macro arguments.</p>
|
| 66 |
+
<div class="highlight-cmake notranslate"><div class="highlight"><pre><span></span><span class="nf">cmake_parse_arguments(</span><span class="nv"><prefix></span><span class="w"> </span><span class="nv"><options></span><span class="w"> </span><span class="nv"><one_value_keywords></span>
|
| 67 |
+
<span class="w"> </span><span class="nv"><multi_value_keywords></span><span class="w"> </span><span class="nv"><args>...</span><span class="nf">)</span>
|
| 68 |
+
|
| 69 |
+
<span class="nf">cmake_parse_arguments(</span><span class="no">PARSE_ARGV</span><span class="w"> </span><span class="nv"><N></span><span class="w"> </span><span class="nv"><prefix></span><span class="w"> </span><span class="nv"><options></span>
|
| 70 |
+
<span class="w"> </span><span class="nv"><one_value_keywords></span><span class="w"> </span><span class="nv"><multi_value_keywords></span><span class="nf">)</span>
|
| 71 |
+
</pre></div>
|
| 72 |
+
</div>
|
| 73 |
+
<div class="versionadded">
|
| 74 |
+
<p><span class="versionmodified added">New in version 3.5: </span>This command is implemented natively. Previously, it has been defined in the
|
| 75 |
+
module <span class="target" id="index-0-module:CMakeParseArguments"></span><a class="reference internal" href="../module/CMakeParseArguments.html#module:CMakeParseArguments" title="CMakeParseArguments"><code class="xref cmake cmake-module docutils literal notranslate"><span class="pre">CMakeParseArguments</span></code></a>.</p>
|
| 76 |
+
</div>
|
| 77 |
+
<p>This command is for use in macros or functions.
|
| 78 |
+
It processes the arguments given to that macro or function,
|
| 79 |
+
and defines a set of variables which hold the values of the
|
| 80 |
+
respective options.</p>
|
| 81 |
+
<p>The first signature reads processes arguments passed in the <code class="docutils literal notranslate"><span class="pre"><args>...</span></code>.
|
| 82 |
+
This may be used in either a <span class="target" id="index-0-command:macro"></span><a class="reference internal" href="macro.html#command:macro" title="macro"><code class="xref cmake cmake-command docutils literal notranslate"><span class="pre">macro()</span></code></a> or a <span class="target" id="index-0-command:function"></span><a class="reference internal" href="function.html#command:function" title="function"><code class="xref cmake cmake-command docutils literal notranslate"><span class="pre">function()</span></code></a>.</p>
|
| 83 |
+
<div class="versionadded">
|
| 84 |
+
<p><span class="versionmodified added">New in version 3.7: </span>The <code class="docutils literal notranslate"><span class="pre">PARSE_ARGV</span></code> signature is only for use in a <span class="target" id="index-1-command:function"></span><a class="reference internal" href="function.html#command:function" title="function"><code class="xref cmake cmake-command docutils literal notranslate"><span class="pre">function()</span></code></a>
|
| 85 |
+
body. In this case the arguments that are parsed come from the
|
| 86 |
+
<code class="docutils literal notranslate"><span class="pre">ARGV#</span></code> variables of the calling function. The parsing starts with
|
| 87 |
+
the <code class="docutils literal notranslate"><span class="pre"><N></span></code>-th argument, where <code class="docutils literal notranslate"><span class="pre"><N></span></code> is an unsigned integer.
|
| 88 |
+
This allows for the values to have special characters like <code class="docutils literal notranslate"><span class="pre">;</span></code> in them.</p>
|
| 89 |
+
</div>
|
| 90 |
+
<p>The <code class="docutils literal notranslate"><span class="pre"><options></span></code> argument contains all options for the respective macro,
|
| 91 |
+
i.e. keywords which can be used when calling the macro without any value
|
| 92 |
+
following, like e.g. the <code class="docutils literal notranslate"><span class="pre">OPTIONAL</span></code> keyword of the <span class="target" id="index-0-command:install"></span><a class="reference internal" href="install.html#command:install" title="install"><code class="xref cmake cmake-command docutils literal notranslate"><span class="pre">install()</span></code></a>
|
| 93 |
+
command.</p>
|
| 94 |
+
<p>The <code class="docutils literal notranslate"><span class="pre"><one_value_keywords></span></code> argument contains all keywords for this macro
|
| 95 |
+
which are followed by one value, like e.g. <code class="docutils literal notranslate"><span class="pre">DESTINATION</span></code> keyword of the
|
| 96 |
+
<span class="target" id="index-1-command:install"></span><a class="reference internal" href="install.html#command:install" title="install"><code class="xref cmake cmake-command docutils literal notranslate"><span class="pre">install()</span></code></a> command.</p>
|
| 97 |
+
<p>The <code class="docutils literal notranslate"><span class="pre"><multi_value_keywords></span></code> argument contains all keywords for this
|
| 98 |
+
macro which can be followed by more than one value, like e.g. the
|
| 99 |
+
<code class="docutils literal notranslate"><span class="pre">TARGETS</span></code> or <code class="docutils literal notranslate"><span class="pre">FILES</span></code> keywords of the <span class="target" id="index-2-command:install"></span><a class="reference internal" href="install.html#command:install" title="install"><code class="xref cmake cmake-command docutils literal notranslate"><span class="pre">install()</span></code></a> command.</p>
|
| 100 |
+
<div class="versionchanged">
|
| 101 |
+
<p><span class="versionmodified changed">Changed in version 3.5: </span>All keywords shall be unique. I.e. every keyword shall only be specified
|
| 102 |
+
once in either <code class="docutils literal notranslate"><span class="pre"><options></span></code>, <code class="docutils literal notranslate"><span class="pre"><one_value_keywords></span></code> or
|
| 103 |
+
<code class="docutils literal notranslate"><span class="pre"><multi_value_keywords></span></code>. A warning will be emitted if uniqueness is
|
| 104 |
+
violated.</p>
|
| 105 |
+
</div>
|
| 106 |
+
<p>When done, <code class="docutils literal notranslate"><span class="pre">cmake_parse_arguments</span></code> will consider for each of the
|
| 107 |
+
keywords listed in <code class="docutils literal notranslate"><span class="pre"><options></span></code>, <code class="docutils literal notranslate"><span class="pre"><one_value_keywords></span></code> and
|
| 108 |
+
<code class="docutils literal notranslate"><span class="pre"><multi_value_keywords></span></code> a variable composed of the given <code class="docutils literal notranslate"><span class="pre"><prefix></span></code>
|
| 109 |
+
followed by <code class="docutils literal notranslate"><span class="pre">"_"</span></code> and the name of the respective keyword. These
|
| 110 |
+
variables will then hold the respective value from the argument list
|
| 111 |
+
or be undefined if the associated option could not be found.
|
| 112 |
+
For the <code class="docutils literal notranslate"><span class="pre"><options></span></code> keywords, these will always be defined,
|
| 113 |
+
to <code class="docutils literal notranslate"><span class="pre">TRUE</span></code> or <code class="docutils literal notranslate"><span class="pre">FALSE</span></code>, whether the option is in the argument list or not.</p>
|
| 114 |
+
<p>All remaining arguments are collected in a variable
|
| 115 |
+
<code class="docutils literal notranslate"><span class="pre"><prefix>_UNPARSED_ARGUMENTS</span></code> that will be undefined if all arguments
|
| 116 |
+
were recognized. This can be checked afterwards to see
|
| 117 |
+
whether your macro was called with unrecognized parameters.</p>
|
| 118 |
+
<div class="versionadded">
|
| 119 |
+
<p><span class="versionmodified added">New in version 3.15: </span><code class="docutils literal notranslate"><span class="pre"><one_value_keywords></span></code> and <code class="docutils literal notranslate"><span class="pre"><multi_value_keywords></span></code> that were given no
|
| 120 |
+
values at all are collected in a variable
|
| 121 |
+
<code class="docutils literal notranslate"><span class="pre"><prefix>_KEYWORDS_MISSING_VALUES</span></code> that will be undefined if all keywords
|
| 122 |
+
received values. This can be checked to see if there were keywords without
|
| 123 |
+
any values given.</p>
|
| 124 |
+
</div>
|
| 125 |
+
<p>Consider the following example macro, <code class="docutils literal notranslate"><span class="pre">my_install()</span></code>, which takes similar
|
| 126 |
+
arguments to the real <span class="target" id="index-3-command:install"></span><a class="reference internal" href="install.html#command:install" title="install"><code class="xref cmake cmake-command docutils literal notranslate"><span class="pre">install()</span></code></a> command:</p>
|
| 127 |
+
<div class="highlight-cmake notranslate"><div class="highlight"><pre><span></span><span class="nf">macro(</span><span class="nb">my_install</span><span class="nf">)</span>
|
| 128 |
+
<span class="w"> </span><span class="nf">set(</span><span class="nb">options</span><span class="w"> </span><span class="no">OPTIONAL</span><span class="w"> </span><span class="no">FAST</span><span class="nf">)</span>
|
| 129 |
+
<span class="w"> </span><span class="nf">set(</span><span class="nb">oneValueArgs</span><span class="w"> </span><span class="no">DESTINATION</span><span class="w"> </span><span class="no">RENAME</span><span class="nf">)</span>
|
| 130 |
+
<span class="w"> </span><span class="nf">set(</span><span class="nb">multiValueArgs</span><span class="w"> </span><span class="no">TARGETS</span><span class="w"> </span><span class="no">CONFIGURATIONS</span><span class="nf">)</span>
|
| 131 |
+
<span class="w"> </span><span class="nf">cmake_parse_arguments(</span><span class="no">MY_INSTALL</span><span class="w"> </span><span class="s">"${options}"</span><span class="w"> </span><span class="s">"${oneValueArgs}"</span>
|
| 132 |
+
<span class="w"> </span><span class="s">"${multiValueArgs}"</span><span class="w"> </span><span class="o">${</span><span class="nt">ARGN</span><span class="o">}</span><span class="w"> </span><span class="nf">)</span>
|
| 133 |
+
|
| 134 |
+
<span class="w"> </span><span class="c"># ...</span>
|
| 135 |
+
</pre></div>
|
| 136 |
+
</div>
|
| 137 |
+
<p>Assume <code class="docutils literal notranslate"><span class="pre">my_install()</span></code> has been called like this:</p>
|
| 138 |
+
<div class="highlight-cmake notranslate"><div class="highlight"><pre><span></span><span class="nf">my_install(</span><span class="no">TARGETS</span><span class="w"> </span><span class="nb">foo</span><span class="w"> </span><span class="nb">bar</span><span class="w"> </span><span class="no">DESTINATION</span><span class="w"> </span><span class="nb">bin</span><span class="w"> </span><span class="no">OPTIONAL</span><span class="w"> </span><span class="nb">blub</span><span class="w"> </span><span class="no">CONFIGURATIONS</span><span class="nf">)</span>
|
| 139 |
+
</pre></div>
|
| 140 |
+
</div>
|
| 141 |
+
<p>After the <code class="docutils literal notranslate"><span class="pre">cmake_parse_arguments</span></code> call the macro will have set or undefined
|
| 142 |
+
the following variables:</p>
|
| 143 |
+
<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>MY_INSTALL_OPTIONAL = TRUE
|
| 144 |
+
MY_INSTALL_FAST = FALSE # was not used in call to my_install
|
| 145 |
+
MY_INSTALL_DESTINATION = "bin"
|
| 146 |
+
MY_INSTALL_RENAME <UNDEFINED> # was not used
|
| 147 |
+
MY_INSTALL_TARGETS = "foo;bar"
|
| 148 |
+
MY_INSTALL_CONFIGURATIONS <UNDEFINED> # was not used
|
| 149 |
+
MY_INSTALL_UNPARSED_ARGUMENTS = "blub" # nothing expected after "OPTIONAL"
|
| 150 |
+
MY_INSTALL_KEYWORDS_MISSING_VALUES = "CONFIGURATIONS"
|
| 151 |
+
# No value for "CONFIGURATIONS" given
|
| 152 |
+
</pre></div>
|
| 153 |
+
</div>
|
| 154 |
+
<p>You can then continue and process these variables.</p>
|
| 155 |
+
<p>Keywords terminate lists of values, e.g. if directly after a
|
| 156 |
+
<code class="docutils literal notranslate"><span class="pre">one_value_keyword</span></code> another recognized keyword follows, this is
|
| 157 |
+
interpreted as the beginning of the new option. E.g.
|
| 158 |
+
<code class="docutils literal notranslate"><span class="pre">my_install(TARGETS</span> <span class="pre">foo</span> <span class="pre">DESTINATION</span> <span class="pre">OPTIONAL)</span></code> would result in
|
| 159 |
+
<code class="docutils literal notranslate"><span class="pre">MY_INSTALL_DESTINATION</span></code> set to <code class="docutils literal notranslate"><span class="pre">"OPTIONAL"</span></code>, but as <code class="docutils literal notranslate"><span class="pre">OPTIONAL</span></code>
|
| 160 |
+
is a keyword itself <code class="docutils literal notranslate"><span class="pre">MY_INSTALL_DESTINATION</span></code> will be empty (but added
|
| 161 |
+
to <code class="docutils literal notranslate"><span class="pre">MY_INSTALL_KEYWORDS_MISSING_VALUES</span></code>) and <code class="docutils literal notranslate"><span class="pre">MY_INSTALL_OPTIONAL</span></code> will
|
| 162 |
+
therefore be set to <code class="docutils literal notranslate"><span class="pre">TRUE</span></code>.</p>
|
| 163 |
+
<section id="see-also">
|
| 164 |
+
<h2>See Also<a class="headerlink" href="#see-also" title="Permalink to this heading">¶</a></h2>
|
| 165 |
+
<ul class="simple">
|
| 166 |
+
<li><p><span class="target" id="index-2-command:function"></span><a class="reference internal" href="function.html#command:function" title="function"><code class="xref cmake cmake-command docutils literal notranslate"><span class="pre">function()</span></code></a></p></li>
|
| 167 |
+
<li><p><span class="target" id="index-1-command:macro"></span><a class="reference internal" href="macro.html#command:macro" title="macro"><code class="xref cmake cmake-command docutils literal notranslate"><span class="pre">macro()</span></code></a></p></li>
|
| 168 |
+
</ul>
|
| 169 |
+
</section>
|
| 170 |
+
</section>
|
| 171 |
+
|
| 172 |
+
|
| 173 |
+
<div class="clearer"></div>
|
| 174 |
+
</div>
|
| 175 |
+
</div>
|
| 176 |
+
</div>
|
| 177 |
+
<div class="sphinxsidebar" role="navigation" aria-label="main navigation">
|
| 178 |
+
<div class="sphinxsidebarwrapper">
|
| 179 |
+
<div>
|
| 180 |
+
<h3><a href="../index.html">Table of Contents</a></h3>
|
| 181 |
+
<ul>
|
| 182 |
+
<li><a class="reference internal" href="#">cmake_parse_arguments</a><ul>
|
| 183 |
+
<li><a class="reference internal" href="#see-also">See Also</a></li>
|
| 184 |
+
</ul>
|
| 185 |
+
</li>
|
| 186 |
+
</ul>
|
| 187 |
+
|
| 188 |
+
</div>
|
| 189 |
+
<div>
|
| 190 |
+
<h4>Previous topic</h4>
|
| 191 |
+
<p class="topless"><a href="cmake_minimum_required.html"
|
| 192 |
+
title="previous chapter">cmake_minimum_required</a></p>
|
| 193 |
+
</div>
|
| 194 |
+
<div>
|
| 195 |
+
<h4>Next topic</h4>
|
| 196 |
+
<p class="topless"><a href="cmake_path.html"
|
| 197 |
+
title="next chapter">cmake_path</a></p>
|
| 198 |
+
</div>
|
| 199 |
+
<div role="note" aria-label="source link">
|
| 200 |
+
<h3>This Page</h3>
|
| 201 |
+
<ul class="this-page-menu">
|
| 202 |
+
<li><a href="../_sources/command/cmake_parse_arguments.rst.txt"
|
| 203 |
+
rel="nofollow">Show Source</a></li>
|
| 204 |
+
</ul>
|
| 205 |
+
</div>
|
| 206 |
+
<div id="searchbox" style="display: none" role="search">
|
| 207 |
+
<h3 id="searchlabel">Quick search</h3>
|
| 208 |
+
<div class="searchformwrapper">
|
| 209 |
+
<form class="search" action="../search.html" method="get">
|
| 210 |
+
<input type="text" name="q" aria-labelledby="searchlabel" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/>
|
| 211 |
+
<input type="submit" value="Go" />
|
| 212 |
+
</form>
|
| 213 |
+
</div>
|
| 214 |
+
</div>
|
| 215 |
+
<script>document.getElementById('searchbox').style.display = "block"</script>
|
| 216 |
+
</div>
|
| 217 |
+
</div>
|
| 218 |
+
<div class="clearer"></div>
|
| 219 |
+
</div>
|
| 220 |
+
<div class="related" role="navigation" aria-label="related navigation">
|
| 221 |
+
<h3>Navigation</h3>
|
| 222 |
+
<ul>
|
| 223 |
+
<li class="right" style="margin-right: 10px">
|
| 224 |
+
<a href="../genindex.html" title="General Index"
|
| 225 |
+
>index</a></li>
|
| 226 |
+
<li class="right" >
|
| 227 |
+
<a href="cmake_path.html" title="cmake_path"
|
| 228 |
+
>next</a> |</li>
|
| 229 |
+
<li class="right" >
|
| 230 |
+
<a href="cmake_minimum_required.html" title="cmake_minimum_required"
|
| 231 |
+
>previous</a> |</li>
|
| 232 |
+
<li>
|
| 233 |
+
<img src="../_static/cmake-logo-16.png" alt=""
|
| 234 |
+
style="vertical-align: middle; margin-top: -2px" />
|
| 235 |
+
</li>
|
| 236 |
+
<li>
|
| 237 |
+
<a href="https://cmake.org/">CMake</a> »
|
| 238 |
+
</li>
|
| 239 |
+
<li>
|
| 240 |
+
<a href="../index.html">3.27.9 Documentation</a> »
|
| 241 |
+
</li>
|
| 242 |
+
|
| 243 |
+
<li class="nav-item nav-item-1"><a href="../manual/cmake-commands.7.html" >cmake-commands(7)</a> »</li>
|
| 244 |
+
<li class="nav-item nav-item-this"><a href="">cmake_parse_arguments</a></li>
|
| 245 |
+
</ul>
|
| 246 |
+
</div>
|
| 247 |
+
|
| 248 |
+
<div class="footer" role="contentinfo">
|
| 249 |
+
© Copyright 2000-2023 Kitware, Inc. and Contributors.
|
| 250 |
+
Created using <a href="https://www.sphinx-doc.org/">Sphinx</a> 5.3.0.
|
| 251 |
+
</div>
|
| 252 |
+
</body>
|
| 253 |
+
</html>
|
toolchain/cmake-3.27.9-linux-x86_64/doc/cmake/html/command/cmake_path.html
ADDED
|
@@ -0,0 +1,788 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
|
| 2 |
+
<!DOCTYPE html>
|
| 3 |
+
|
| 4 |
+
<html lang="en">
|
| 5 |
+
<head>
|
| 6 |
+
<meta charset="utf-8" />
|
| 7 |
+
<meta name="viewport" content="width=device-width, initial-scale=1.0" /><meta name="generator" content="Docutils 0.19: https://docutils.sourceforge.io/" />
|
| 8 |
+
|
| 9 |
+
<title>cmake_path — CMake 3.27.9 Documentation</title>
|
| 10 |
+
|
| 11 |
+
<link rel="stylesheet" type="text/css" href="../_static/pygments.css" />
|
| 12 |
+
<link rel="stylesheet" type="text/css" href="../_static/cmake.css" />
|
| 13 |
+
|
| 14 |
+
<script data-url_root="../" id="documentation_options" src="../_static/documentation_options.js"></script>
|
| 15 |
+
<script src="../_static/jquery.js"></script>
|
| 16 |
+
<script src="../_static/underscore.js"></script>
|
| 17 |
+
<script src="../_static/_sphinx_javascript_frameworks_compat.js"></script>
|
| 18 |
+
<script src="../_static/doctools.js"></script>
|
| 19 |
+
<script src="../_static/sphinx_highlight.js"></script>
|
| 20 |
+
|
| 21 |
+
<link rel="shortcut icon" href="../_static/cmake-favicon.ico"/>
|
| 22 |
+
<link rel="index" title="Index" href="../genindex.html" />
|
| 23 |
+
<link rel="search" title="Search" href="../search.html" />
|
| 24 |
+
<link rel="next" title="cmake_policy" href="cmake_policy.html" />
|
| 25 |
+
<link rel="prev" title="cmake_parse_arguments" href="cmake_parse_arguments.html" />
|
| 26 |
+
|
| 27 |
+
|
| 28 |
+
</head><body>
|
| 29 |
+
|
| 30 |
+
<div class="related" role="navigation" aria-label="related navigation">
|
| 31 |
+
<h3>Navigation</h3>
|
| 32 |
+
<ul>
|
| 33 |
+
<li class="right" style="margin-right: 10px">
|
| 34 |
+
<a href="../genindex.html" title="General Index"
|
| 35 |
+
accesskey="I">index</a></li>
|
| 36 |
+
<li class="right" >
|
| 37 |
+
<a href="cmake_policy.html" title="cmake_policy"
|
| 38 |
+
accesskey="N">next</a> |</li>
|
| 39 |
+
<li class="right" >
|
| 40 |
+
<a href="cmake_parse_arguments.html" title="cmake_parse_arguments"
|
| 41 |
+
accesskey="P">previous</a> |</li>
|
| 42 |
+
<li>
|
| 43 |
+
<img src="../_static/cmake-logo-16.png" alt=""
|
| 44 |
+
style="vertical-align: middle; margin-top: -2px" />
|
| 45 |
+
</li>
|
| 46 |
+
<li>
|
| 47 |
+
<a href="https://cmake.org/">CMake</a> »
|
| 48 |
+
</li>
|
| 49 |
+
<li>
|
| 50 |
+
<a href="../index.html">3.27.9 Documentation</a> »
|
| 51 |
+
</li>
|
| 52 |
+
|
| 53 |
+
<li class="nav-item nav-item-1"><a href="../manual/cmake-commands.7.html" accesskey="U">cmake-commands(7)</a> »</li>
|
| 54 |
+
<li class="nav-item nav-item-this"><a href="">cmake_path</a></li>
|
| 55 |
+
</ul>
|
| 56 |
+
</div>
|
| 57 |
+
|
| 58 |
+
<div class="document">
|
| 59 |
+
<div class="documentwrapper">
|
| 60 |
+
<div class="bodywrapper">
|
| 61 |
+
<div class="body" role="main">
|
| 62 |
+
|
| 63 |
+
<section id="cmake-path">
|
| 64 |
+
<span id="command:cmake_path"></span><h1>cmake_path<a class="headerlink" href="#cmake-path" title="Permalink to this heading">¶</a></h1>
|
| 65 |
+
<div class="versionadded">
|
| 66 |
+
<p><span class="versionmodified added">New in version 3.20.</span></p>
|
| 67 |
+
</div>
|
| 68 |
+
<p>This command is for the manipulation of paths. Only syntactic aspects of
|
| 69 |
+
paths are handled, there is no interaction of any kind with any underlying
|
| 70 |
+
file system. The path may represent a non-existing path or even one that
|
| 71 |
+
is not allowed to exist on the current file system or platform.
|
| 72 |
+
For operations that do interact with the filesystem, see the <span class="target" id="index-0-command:file"></span><a class="reference internal" href="file.html#command:file" title="file"><code class="xref cmake cmake-command docutils literal notranslate"><span class="pre">file()</span></code></a>
|
| 73 |
+
command.</p>
|
| 74 |
+
<div class="admonition note">
|
| 75 |
+
<p class="admonition-title">Note</p>
|
| 76 |
+
<p>The <code class="docutils literal notranslate"><span class="pre">cmake_path</span></code> command handles paths in the format of the build system
|
| 77 |
+
(i.e. the host platform), not the target system. When cross-compiling,
|
| 78 |
+
if the path contains elements that are not representable on the host
|
| 79 |
+
platform (e.g. a drive letter when the host is not Windows), the results
|
| 80 |
+
will be unpredictable.</p>
|
| 81 |
+
</div>
|
| 82 |
+
<section id="synopsis">
|
| 83 |
+
<h2>Synopsis<a class="headerlink" href="#synopsis" title="Permalink to this heading">¶</a></h2>
|
| 84 |
+
<pre class="literal-block"><a class="reference internal" href="#conventions">Conventions</a>
|
| 85 |
+
|
| 86 |
+
<a class="reference internal" href="#path-structure-and-terminology">Path Structure And Terminology</a>
|
| 87 |
+
|
| 88 |
+
<a class="reference internal" href="#normalization">Normalization</a>
|
| 89 |
+
|
| 90 |
+
<a class="reference internal" href="#decomposition">Decomposition</a>
|
| 91 |
+
cmake_path(<a class="reference internal" href="#get">GET</a> <path-var> <a class="reference internal" href="#get-root-name"><span class="std std-ref">ROOT_NAME</span></a> <out-var>)
|
| 92 |
+
cmake_path(<a class="reference internal" href="#get">GET</a> <path-var> <a class="reference internal" href="#get-root-directory"><span class="std std-ref">ROOT_DIRECTORY</span></a> <out-var>)
|
| 93 |
+
cmake_path(<a class="reference internal" href="#get">GET</a> <path-var> <a class="reference internal" href="#get-root-path"><span class="std std-ref">ROOT_PATH</span></a> <out-var>)
|
| 94 |
+
cmake_path(<a class="reference internal" href="#get">GET</a> <path-var> <a class="reference internal" href="#get-filename"><span class="std std-ref">FILENAME</span></a> <out-var>)
|
| 95 |
+
cmake_path(<a class="reference internal" href="#get">GET</a> <path-var> <a class="reference internal" href="#get-extension"><span class="std std-ref">EXTENSION</span></a> [LAST_ONLY] <out-var>)
|
| 96 |
+
cmake_path(<a class="reference internal" href="#get">GET</a> <path-var> <a class="reference internal" href="#get-stem"><span class="std std-ref">STEM</span></a> [LAST_ONLY] <out-var>)
|
| 97 |
+
cmake_path(<a class="reference internal" href="#get">GET</a> <path-var> <a class="reference internal" href="#get-relative-part"><span class="std std-ref">RELATIVE_PART</span></a> <out-var>)
|
| 98 |
+
cmake_path(<a class="reference internal" href="#get">GET</a> <path-var> <a class="reference internal" href="#get-parent-path"><span class="std std-ref">PARENT_PATH</span></a> <out-var>)
|
| 99 |
+
|
| 100 |
+
<a class="reference internal" href="#query">Query</a>
|
| 101 |
+
cmake_path(<a class="reference internal" href="#has-root-name">HAS_ROOT_NAME</a> <path-var> <out-var>)
|
| 102 |
+
cmake_path(<a class="reference internal" href="#has-root-directory">HAS_ROOT_DIRECTORY</a> <path-var> <out-var>)
|
| 103 |
+
cmake_path(<a class="reference internal" href="#has-root-path">HAS_ROOT_PATH</a> <path-var> <out-var>)
|
| 104 |
+
cmake_path(<a class="reference internal" href="#has-filename">HAS_FILENAME</a> <path-var> <out-var>)
|
| 105 |
+
cmake_path(<a class="reference internal" href="#has-extension">HAS_EXTENSION</a> <path-var> <out-var>)
|
| 106 |
+
cmake_path(<a class="reference internal" href="#has-stem">HAS_STEM</a> <path-var> <out-var>)
|
| 107 |
+
cmake_path(<a class="reference internal" href="#has-relative-part">HAS_RELATIVE_PART</a> <path-var> <out-var>)
|
| 108 |
+
cmake_path(<a class="reference internal" href="#has-parent-path">HAS_PARENT_PATH</a> <path-var> <out-var>)
|
| 109 |
+
cmake_path(<a class="reference internal" href="#is-absolute">IS_ABSOLUTE</a> <path-var> <out-var>)
|
| 110 |
+
cmake_path(<a class="reference internal" href="#is-relative">IS_RELATIVE</a> <path-var> <out-var>)
|
| 111 |
+
cmake_path(<a class="reference internal" href="#is-prefix">IS_PREFIX</a> <path-var> <input> [NORMALIZE] <out-var>)
|
| 112 |
+
cmake_path(<a class="reference internal" href="#compare">COMPARE</a> <input1> <OP> <input2> <out-var>)
|
| 113 |
+
|
| 114 |
+
<a class="reference internal" href="#modification">Modification</a>
|
| 115 |
+
cmake_path(<a class="reference internal" href="#cmake-path-set"><span class="std std-ref">SET</span></a> <path-var> [NORMALIZE] <input>)
|
| 116 |
+
cmake_path(<a class="reference internal" href="#append">APPEND</a> <path-var> [<input>...] [OUTPUT_VARIABLE <out-var>])
|
| 117 |
+
cmake_path(<a class="reference internal" href="#append-string">APPEND_STRING</a> <path-var> [<input>...] [OUTPUT_VARIABLE <out-var>])
|
| 118 |
+
cmake_path(<a class="reference internal" href="#remove-filename">REMOVE_FILENAME</a> <path-var> [OUTPUT_VARIABLE <out-var>])
|
| 119 |
+
cmake_path(<a class="reference internal" href="#replace-filename">REPLACE_FILENAME</a> <path-var> <input> [OUTPUT_VARIABLE <out-var>])
|
| 120 |
+
cmake_path(<a class="reference internal" href="#remove-extension">REMOVE_EXTENSION</a> <path-var> [LAST_ONLY] [OUTPUT_VARIABLE <out-var>])
|
| 121 |
+
cmake_path(<a class="reference internal" href="#replace-extension">REPLACE_EXTENSION</a> <path-var> [LAST_ONLY] <input> [OUTPUT_VARIABLE <out-var>])
|
| 122 |
+
|
| 123 |
+
<a class="reference internal" href="#generation">Generation</a>
|
| 124 |
+
cmake_path(<a class="reference internal" href="#normal-path">NORMAL_PATH</a> <path-var> [OUTPUT_VARIABLE <out-var>])
|
| 125 |
+
cmake_path(<a class="reference internal" href="#relative-path">RELATIVE_PATH</a> <path-var> [BASE_DIRECTORY <input>] [OUTPUT_VARIABLE <out-var>])
|
| 126 |
+
cmake_path(<a class="reference internal" href="#absolute-path">ABSOLUTE_PATH</a> <path-var> [BASE_DIRECTORY <input>] [NORMALIZE] [OUTPUT_VARIABLE <out-var>])
|
| 127 |
+
|
| 128 |
+
<a class="reference internal" href="#native-conversion">Native Conversion</a>
|
| 129 |
+
cmake_path(<a class="reference internal" href="#native-path">NATIVE_PATH</a> <path-var> [NORMALIZE] <out-var>)
|
| 130 |
+
cmake_path(<a class="reference internal" href="#convert">CONVERT</a> <input> <a class="reference internal" href="#to-cmake-path-list">TO_CMAKE_PATH_LIST</a> <out-var> [NORMALIZE])
|
| 131 |
+
cmake_path(<a class="reference internal" href="#convert">CONVERT</a> <input> <a class="reference internal" href="#to-native-path-list">TO_NATIVE_PATH_LIST</a> <out-var> [NORMALIZE])
|
| 132 |
+
|
| 133 |
+
<a class="reference internal" href="#hashing">Hashing</a>
|
| 134 |
+
cmake_path(<a class="reference internal" href="#hash">HASH</a> <path-var> <out-var>)</pre>
|
| 135 |
+
</section>
|
| 136 |
+
<section id="conventions">
|
| 137 |
+
<h2>Conventions<a class="headerlink" href="#conventions" title="Permalink to this heading">¶</a></h2>
|
| 138 |
+
<p>The following conventions are used in this command's documentation:</p>
|
| 139 |
+
<dl class="simple">
|
| 140 |
+
<dt><code class="docutils literal notranslate"><span class="pre"><path-var></span></code></dt><dd><p>Always the name of a variable. For commands that expect a <code class="docutils literal notranslate"><span class="pre"><path-var></span></code>
|
| 141 |
+
as input, the variable must exist and it is expected to hold a single path.</p>
|
| 142 |
+
</dd>
|
| 143 |
+
<dt><code class="docutils literal notranslate"><span class="pre"><input></span></code></dt><dd><p>A string literal which may contain a path, path fragment, or multiple paths
|
| 144 |
+
with a special separator depending on the command. See the description of
|
| 145 |
+
each command to see how this is interpreted.</p>
|
| 146 |
+
</dd>
|
| 147 |
+
<dt><code class="docutils literal notranslate"><span class="pre"><input>...</span></code></dt><dd><p>Zero or more string literal arguments.</p>
|
| 148 |
+
</dd>
|
| 149 |
+
<dt><code class="docutils literal notranslate"><span class="pre"><out-var></span></code></dt><dd><p>The name of a variable into which the result of a command will be written.</p>
|
| 150 |
+
</dd>
|
| 151 |
+
</dl>
|
| 152 |
+
</section>
|
| 153 |
+
<section id="path-structure-and-terminology">
|
| 154 |
+
<span id="id1"></span><h2>Path Structure And Terminology<a class="headerlink" href="#path-structure-and-terminology" title="Permalink to this heading">¶</a></h2>
|
| 155 |
+
<p>A path has the following structure (all components are optional, with some
|
| 156 |
+
constraints):</p>
|
| 157 |
+
<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>root-name root-directory-separator (item-name directory-separator)* filename
|
| 158 |
+
</pre></div>
|
| 159 |
+
</div>
|
| 160 |
+
<dl>
|
| 161 |
+
<dt><code class="docutils literal notranslate"><span class="pre">root-name</span></code></dt><dd><p>Identifies the root on a filesystem with multiple roots (such as <code class="docutils literal notranslate"><span class="pre">"C:"</span></code>
|
| 162 |
+
or <code class="docutils literal notranslate"><span class="pre">"//myserver"</span></code>). It is optional.</p>
|
| 163 |
+
</dd>
|
| 164 |
+
<dt><code class="docutils literal notranslate"><span class="pre">root-directory-separator</span></code></dt><dd><p>A directory separator that, if present, indicates that this path is
|
| 165 |
+
absolute. If it is missing and the first element other than the
|
| 166 |
+
<code class="docutils literal notranslate"><span class="pre">root-name</span></code> is an <code class="docutils literal notranslate"><span class="pre">item-name</span></code>, then the path is relative.</p>
|
| 167 |
+
</dd>
|
| 168 |
+
<dt><code class="docutils literal notranslate"><span class="pre">item-name</span></code></dt><dd><p>A sequence of characters that aren't directory separators. This name may
|
| 169 |
+
identify a file, a hard link, a symbolic link, or a directory. Two special
|
| 170 |
+
cases are recognized:</p>
|
| 171 |
+
<blockquote>
|
| 172 |
+
<div><ul class="simple">
|
| 173 |
+
<li><p>The item name consisting of a single dot character <code class="docutils literal notranslate"><span class="pre">.</span></code> is a
|
| 174 |
+
directory name that refers to the current directory.</p></li>
|
| 175 |
+
<li><p>The item name consisting of two dot characters <code class="docutils literal notranslate"><span class="pre">..</span></code> is a
|
| 176 |
+
directory name that refers to the parent directory.</p></li>
|
| 177 |
+
</ul>
|
| 178 |
+
</div></blockquote>
|
| 179 |
+
<p>The <code class="docutils literal notranslate"><span class="pre">(...)*</span></code> pattern shown above is to indicate that there can be zero
|
| 180 |
+
or more item names, with multiple items separated by a
|
| 181 |
+
<code class="docutils literal notranslate"><span class="pre">directory-separator</span></code>. The <code class="docutils literal notranslate"><span class="pre">()*</span></code> characters are not part of the path.</p>
|
| 182 |
+
</dd>
|
| 183 |
+
<dt><code class="docutils literal notranslate"><span class="pre">directory-separator</span></code></dt><dd><p>The only recognized directory separator is a forward slash character <code class="docutils literal notranslate"><span class="pre">/</span></code>.
|
| 184 |
+
If this character is repeated, it is treated as a single directory
|
| 185 |
+
separator. In other words, <code class="docutils literal notranslate"><span class="pre">/usr///////lib</span></code> is the same as <code class="docutils literal notranslate"><span class="pre">/usr/lib</span></code>.</p>
|
| 186 |
+
</dd>
|
| 187 |
+
</dl>
|
| 188 |
+
<span id="extension-def"></span><span id="filename-def"></span><dl id="stem-def">
|
| 189 |
+
<dt><code class="docutils literal notranslate"><span class="pre">filename</span></code></dt><dd><p>A path has a <code class="docutils literal notranslate"><span class="pre">filename</span></code> if it does not end with a <code class="docutils literal notranslate"><span class="pre">directory-separator</span></code>.
|
| 190 |
+
The <code class="docutils literal notranslate"><span class="pre">filename</span></code> is effectively the last <code class="docutils literal notranslate"><span class="pre">item-name</span></code> of the path, so it
|
| 191 |
+
can also be a hard link, symbolic link or a directory.</p>
|
| 192 |
+
<p>A <code class="docutils literal notranslate"><span class="pre">filename</span></code> can have an <em>extension</em>. By default, the extension is
|
| 193 |
+
defined as the sub-string beginning at the left-most period (including
|
| 194 |
+
the period) and until the end of the <code class="docutils literal notranslate"><span class="pre">filename</span></code>. In commands that
|
| 195 |
+
accept a <code class="docutils literal notranslate"><span class="pre">LAST_ONLY</span></code> keyword, <code class="docutils literal notranslate"><span class="pre">LAST_ONLY</span></code> changes the interpretation
|
| 196 |
+
to the sub-string beginning at the right-most period.</p>
|
| 197 |
+
<p>The following exceptions apply to the above interpretation:</p>
|
| 198 |
+
<blockquote>
|
| 199 |
+
<div><ul class="simple">
|
| 200 |
+
<li><p>If the first character in the <code class="docutils literal notranslate"><span class="pre">filename</span></code> is a period, that period is
|
| 201 |
+
ignored (i.e. a <code class="docutils literal notranslate"><span class="pre">filename</span></code> like <code class="docutils literal notranslate"><span class="pre">".profile"</span></code> is treated as having
|
| 202 |
+
no extension).</p></li>
|
| 203 |
+
<li><p>If the <code class="docutils literal notranslate"><span class="pre">filename</span></code> is either <code class="docutils literal notranslate"><span class="pre">.</span></code> or <code class="docutils literal notranslate"><span class="pre">..</span></code>, it has no extension.</p></li>
|
| 204 |
+
</ul>
|
| 205 |
+
</div></blockquote>
|
| 206 |
+
<p>The <em>stem</em> is the part of the <code class="docutils literal notranslate"><span class="pre">filename</span></code> before the extension.</p>
|
| 207 |
+
</dd>
|
| 208 |
+
</dl>
|
| 209 |
+
<p>Some commands refer to a <code class="docutils literal notranslate"><span class="pre">root-path</span></code>. This is the concatenation of
|
| 210 |
+
<code class="docutils literal notranslate"><span class="pre">root-name</span></code> and <code class="docutils literal notranslate"><span class="pre">root-directory-separator</span></code>, either or both of which can
|
| 211 |
+
be empty. A <code class="docutils literal notranslate"><span class="pre">relative-part</span></code> refers to the full path with any <code class="docutils literal notranslate"><span class="pre">root-path</span></code>
|
| 212 |
+
removed.</p>
|
| 213 |
+
</section>
|
| 214 |
+
<section id="creating-a-path-variable">
|
| 215 |
+
<h2>Creating A Path Variable<a class="headerlink" href="#creating-a-path-variable" title="Permalink to this heading">¶</a></h2>
|
| 216 |
+
<p>While a path can be created with care using an ordinary <span class="target" id="index-0-command:set"></span><a class="reference internal" href="set.html#command:set" title="set"><code class="xref cmake cmake-command docutils literal notranslate"><span class="pre">set()</span></code></a>
|
| 217 |
+
command, it is recommended to use <a class="reference internal" href="#cmake-path-set"><span class="std std-ref">cmake_path(SET)</span></a>
|
| 218 |
+
instead, as it automatically converts the path to the required form where
|
| 219 |
+
required. The <a class="reference internal" href="#append"><span class="std std-ref">cmake_path(APPEND)</span></a> subcommand may
|
| 220 |
+
be another suitable alternative where a path needs to be constructed by
|
| 221 |
+
joining fragments. The following example compares the three methods for
|
| 222 |
+
constructing the same path:</p>
|
| 223 |
+
<div class="highlight-cmake notranslate"><div class="highlight"><pre><span></span><span class="nf">set(</span><span class="nb">path1</span><span class="w"> </span><span class="s">"${CMAKE_CURRENT_SOURCE_DIR}/data"</span><span class="nf">)</span>
|
| 224 |
+
|
| 225 |
+
<span class="nf">cmake_path(</span><span class="no">SET</span><span class="w"> </span><span class="nb">path2</span><span class="w"> </span><span class="s">"${CMAKE_CURRENT_SOURCE_DIR}/data"</span><span class="nf">)</span>
|
| 226 |
+
|
| 227 |
+
<span class="nf">cmake_path(</span><span class="no">APPEND</span><span class="w"> </span><span class="nb">path3</span><span class="w"> </span><span class="s">"${CMAKE_CURRENT_SOURCE_DIR}"</span><span class="w"> </span><span class="s">"data"</span><span class="nf">)</span>
|
| 228 |
+
</pre></div>
|
| 229 |
+
</div>
|
| 230 |
+
<p><a class="reference internal" href="#modification">Modification</a> and <a class="reference internal" href="#generation">Generation</a> sub-commands can either store the result
|
| 231 |
+
in-place, or in a separate variable named after an <code class="docutils literal notranslate"><span class="pre">OUTPUT_VARIABLE</span></code>
|
| 232 |
+
keyword. All other sub-commands store the result in a mandatory <code class="docutils literal notranslate"><span class="pre"><out-var></span></code>
|
| 233 |
+
variable.</p>
|
| 234 |
+
</section>
|
| 235 |
+
<section id="normalization">
|
| 236 |
+
<span id="id2"></span><h2>Normalization<a class="headerlink" href="#normalization" title="Permalink to this heading">¶</a></h2>
|
| 237 |
+
<p>Some sub-commands support <em>normalizing</em> a path. The algorithm used to
|
| 238 |
+
normalize a path is as follows:</p>
|
| 239 |
+
<ol class="arabic simple">
|
| 240 |
+
<li><p>If the path is empty, stop (the normalized form of an empty path is
|
| 241 |
+
also an empty path).</p></li>
|
| 242 |
+
<li><p>Replace each <code class="docutils literal notranslate"><span class="pre">directory-separator</span></code>, which may consist of multiple
|
| 243 |
+
separators, with a single <code class="docutils literal notranslate"><span class="pre">/</span></code> (<code class="docutils literal notranslate"><span class="pre">/a///b</span>  <span class="pre">--></span> <span class="pre">/a/b</span></code>).</p></li>
|
| 244 |
+
<li><p>Remove each solitary period (<code class="docutils literal notranslate"><span class="pre">.</span></code>) and any immediately following
|
| 245 |
+
<code class="docutils literal notranslate"><span class="pre">directory-separator</span></code> (<code class="docutils literal notranslate"><span class="pre">/a/./b/.</span> <span class="pre">--></span> <span class="pre">/a/b</span></code>).</p></li>
|
| 246 |
+
<li><p>Remove each <code class="docutils literal notranslate"><span class="pre">item-name</span></code> (other than <code class="docutils literal notranslate"><span class="pre">..</span></code>) that is immediately
|
| 247 |
+
followed by a <code class="docutils literal notranslate"><span class="pre">directory-separator</span></code> and a <code class="docutils literal notranslate"><span class="pre">..</span></code>, along with any
|
| 248 |
+
immediately following <code class="docutils literal notranslate"><span class="pre">directory-separator</span></code> (<code class="docutils literal notranslate"><span class="pre">/a/b/../c</span> <span class="pre">--></span> <span class="pre">a/c</span></code>).</p></li>
|
| 249 |
+
<li><p>If there is a <code class="docutils literal notranslate"><span class="pre">root-directory</span></code>, remove any <code class="docutils literal notranslate"><span class="pre">..</span></code> and any
|
| 250 |
+
<code class="docutils literal notranslate"><span class="pre">directory-separators</span></code> immediately following them. The parent of the
|
| 251 |
+
root directory is treated as still the root directory (<code class="docutils literal notranslate"><span class="pre">/../a</span> <span class="pre">--></span> <span class="pre">/a</span></code>).</p></li>
|
| 252 |
+
<li><p>If the last <code class="docutils literal notranslate"><span class="pre">item-name</span></code> is <code class="docutils literal notranslate"><span class="pre">..</span></code>, remove any trailing
|
| 253 |
+
<code class="docutils literal notranslate"><span class="pre">directory-separator</span></code> (<code class="docutils literal notranslate"><span class="pre">../</span> <span class="pre">--></span> <span class="pre">..</span></code>).</p></li>
|
| 254 |
+
<li><p>If the path is empty by this stage, add a <code class="docutils literal notranslate"><span class="pre">dot</span></code> (normal form of <code class="docutils literal notranslate"><span class="pre">./</span></code>
|
| 255 |
+
is <code class="docutils literal notranslate"><span class="pre">.</span></code>).</p></li>
|
| 256 |
+
</ol>
|
| 257 |
+
</section>
|
| 258 |
+
<section id="decomposition">
|
| 259 |
+
<span id="path-decomposition"></span><h2>Decomposition<a class="headerlink" href="#decomposition" title="Permalink to this heading">¶</a></h2>
|
| 260 |
+
<p id="get-parent-path"><span id="get-relative-part"></span><span id="get-stem"></span><span id="get-extension"></span><span id="get-filename"></span><span id="get-root-path"></span><span id="get-root-directory"></span><span id="get-root-name"></span><span id="get"></span>The following forms of the <code class="docutils literal notranslate"><span class="pre">GET</span></code> subcommand each retrieve a different
|
| 261 |
+
component or group of components from a path. See
|
| 262 |
+
<a class="reference internal" href="#path-structure-and-terminology">Path Structure And Terminology</a> for the meaning of each path component.</p>
|
| 263 |
+
<div class="highlight-cmake notranslate"><div class="highlight"><pre><span></span><span class="nf">cmake_path(</span><span class="no">GET</span><span class="w"> </span><span class="nv"><path-var></span><span class="w"> </span><span class="no">ROOT_NAME</span><span class="w"> </span><span class="nv"><out-var></span><span class="nf">)</span>
|
| 264 |
+
<span class="nf">cmake_path(</span><span class="no">GET</span><span class="w"> </span><span class="nv"><path-var></span><span class="w"> </span><span class="no">ROOT_DIRECTORY</span><span class="w"> </span><span class="nv"><out-var></span><span class="nf">)</span>
|
| 265 |
+
<span class="nf">cmake_path(</span><span class="no">GET</span><span class="w"> </span><span class="nv"><path-var></span><span class="w"> </span><span class="no">ROOT_PATH</span><span class="w"> </span><span class="nv"><out-var></span><span class="nf">)</span>
|
| 266 |
+
<span class="nf">cmake_path(</span><span class="no">GET</span><span class="w"> </span><span class="nv"><path-var></span><span class="w"> </span><span class="no">FILENAME</span><span class="w"> </span><span class="nv"><out-var></span><span class="nf">)</span>
|
| 267 |
+
<span class="nf">cmake_path(</span><span class="no">GET</span><span class="w"> </span><span class="nv"><path-var></span><span class="w"> </span><span class="no">EXTENSION</span><span class="w"> </span><span class="p">[</span><span class="no">LAST_ONLY</span><span class="p">]</span><span class="w"> </span><span class="nv"><out-var></span><span class="nf">)</span>
|
| 268 |
+
<span class="nf">cmake_path(</span><span class="no">GET</span><span class="w"> </span><span class="nv"><path-var></span><span class="w"> </span><span class="no">STEM</span><span class="w"> </span><span class="p">[</span><span class="no">LAST_ONLY</span><span class="p">]</span><span class="w"> </span><span class="nv"><out-var></span><span class="nf">)</span>
|
| 269 |
+
<span class="nf">cmake_path(</span><span class="no">GET</span><span class="w"> </span><span class="nv"><path-var></span><span class="w"> </span><span class="no">RELATIVE_PART</span><span class="w"> </span><span class="nv"><out-var></span><span class="nf">)</span>
|
| 270 |
+
<span class="nf">cmake_path(</span><span class="no">GET</span><span class="w"> </span><span class="nv"><path-var></span><span class="w"> </span><span class="no">PARENT_PATH</span><span class="w"> </span><span class="nv"><out-var></span><span class="nf">)</span>
|
| 271 |
+
</pre></div>
|
| 272 |
+
</div>
|
| 273 |
+
<p>If a requested component is not present in the path, an empty string will be
|
| 274 |
+
stored in <code class="docutils literal notranslate"><span class="pre"><out-var></span></code>. For example, only Windows systems have the concept
|
| 275 |
+
of a <code class="docutils literal notranslate"><span class="pre">root-name</span></code>, so when the host machine is non-Windows, the <code class="docutils literal notranslate"><span class="pre">ROOT_NAME</span></code>
|
| 276 |
+
subcommand will always return an empty string.</p>
|
| 277 |
+
<p>For <code class="docutils literal notranslate"><span class="pre">PARENT_PATH</span></code>, if the <a class="reference internal" href="#has-relative-part">HAS_RELATIVE_PART</a> subcommand returns false,
|
| 278 |
+
the result is a copy of <code class="docutils literal notranslate"><span class="pre"><path-var></span></code>. Note that this implies that a root
|
| 279 |
+
directory is considered to have a parent, with that parent being itself.
|
| 280 |
+
Where <a class="reference internal" href="#has-relative-part">HAS_RELATIVE_PART</a> returns true, the result will essentially be
|
| 281 |
+
<code class="docutils literal notranslate"><span class="pre"><path-var></span></code> with one less element.</p>
|
| 282 |
+
<section id="root-examples">
|
| 283 |
+
<h3>Root examples<a class="headerlink" href="#root-examples" title="Permalink to this heading">¶</a></h3>
|
| 284 |
+
<div class="highlight-cmake notranslate"><div class="highlight"><pre><span></span><span class="nf">set(</span><span class="nb">path</span><span class="w"> </span><span class="s">"c:/a"</span><span class="nf">)</span>
|
| 285 |
+
|
| 286 |
+
<span class="nf">cmake_path(</span><span class="no">GET</span><span class="w"> </span><span class="nb">path</span><span class="w"> </span><span class="no">ROOT_NAME</span><span class="w"> </span><span class="nb">rootName</span><span class="nf">)</span>
|
| 287 |
+
<span class="nf">cmake_path(</span><span class="no">GET</span><span class="w"> </span><span class="nb">path</span><span class="w"> </span><span class="no">ROOT_DIRECTORY</span><span class="w"> </span><span class="nb">rootDir</span><span class="nf">)</span>
|
| 288 |
+
<span class="nf">cmake_path(</span><span class="no">GET</span><span class="w"> </span><span class="nb">path</span><span class="w"> </span><span class="no">ROOT_PATH</span><span class="w"> </span><span class="nb">rootPath</span><span class="nf">)</span>
|
| 289 |
+
|
| 290 |
+
<span class="nf">message(</span><span class="s">"Root name is \"${rootName}\""</span><span class="nf">)</span>
|
| 291 |
+
<span class="nf">message(</span><span class="s">"Root directory is \"${rootDir}\""</span><span class="nf">)</span>
|
| 292 |
+
<span class="nf">message(</span><span class="s">"Root path is \"${rootPath}\""</span><span class="nf">)</span>
|
| 293 |
+
</pre></div>
|
| 294 |
+
</div>
|
| 295 |
+
<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>Root name is "c:"
|
| 296 |
+
Root directory is "/"
|
| 297 |
+
Root path is "c:/"
|
| 298 |
+
</pre></div>
|
| 299 |
+
</div>
|
| 300 |
+
</section>
|
| 301 |
+
<section id="filename-examples">
|
| 302 |
+
<h3>Filename examples<a class="headerlink" href="#filename-examples" title="Permalink to this heading">¶</a></h3>
|
| 303 |
+
<div class="highlight-cmake notranslate"><div class="highlight"><pre><span></span><span class="nf">set(</span><span class="nb">path</span><span class="w"> </span><span class="s">"/a/b"</span><span class="nf">)</span>
|
| 304 |
+
<span class="nf">cmake_path(</span><span class="no">GET</span><span class="w"> </span><span class="nb">path</span><span class="w"> </span><span class="no">FILENAME</span><span class="w"> </span><span class="nb">filename</span><span class="nf">)</span>
|
| 305 |
+
<span class="nf">message(</span><span class="s">"First filename is \"${filename}\""</span><span class="nf">)</span>
|
| 306 |
+
|
| 307 |
+
<span class="c"># Trailing slash means filename is empty</span>
|
| 308 |
+
<span class="nf">set(</span><span class="nb">path</span><span class="w"> </span><span class="s">"/a/b/"</span><span class="nf">)</span>
|
| 309 |
+
<span class="nf">cmake_path(</span><span class="no">GET</span><span class="w"> </span><span class="nb">path</span><span class="w"> </span><span class="no">FILENAME</span><span class="w"> </span><span class="nb">filename</span><span class="nf">)</span>
|
| 310 |
+
<span class="nf">message(</span><span class="s">"Second filename is \"${filename}\""</span><span class="nf">)</span>
|
| 311 |
+
</pre></div>
|
| 312 |
+
</div>
|
| 313 |
+
<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>First filename is "b"
|
| 314 |
+
Second filename is ""
|
| 315 |
+
</pre></div>
|
| 316 |
+
</div>
|
| 317 |
+
</section>
|
| 318 |
+
<section id="extension-and-stem-examples">
|
| 319 |
+
<h3>Extension and stem examples<a class="headerlink" href="#extension-and-stem-examples" title="Permalink to this heading">¶</a></h3>
|
| 320 |
+
<div class="highlight-cmake notranslate"><div class="highlight"><pre><span></span><span class="nf">set(</span><span class="nb">path</span><span class="w"> </span><span class="s">"name.ext1.ext2"</span><span class="nf">)</span>
|
| 321 |
+
|
| 322 |
+
<span class="nf">cmake_path(</span><span class="no">GET</span><span class="w"> </span><span class="nb">path</span><span class="w"> </span><span class="no">EXTENSION</span><span class="w"> </span><span class="nb">fullExt</span><span class="nf">)</span>
|
| 323 |
+
<span class="nf">cmake_path(</span><span class="no">GET</span><span class="w"> </span><span class="nb">path</span><span class="w"> </span><span class="no">STEM</span><span class="w"> </span><span class="nb">fullStem</span><span class="nf">)</span>
|
| 324 |
+
<span class="nf">message(</span><span class="s">"Full extension is \"${fullExt}\""</span><span class="nf">)</span>
|
| 325 |
+
<span class="nf">message(</span><span class="s">"Full stem is \"${fullStem}\""</span><span class="nf">)</span>
|
| 326 |
+
|
| 327 |
+
<span class="c"># Effect of LAST_ONLY</span>
|
| 328 |
+
<span class="nf">cmake_path(</span><span class="no">GET</span><span class="w"> </span><span class="nb">path</span><span class="w"> </span><span class="no">EXTENSION</span><span class="w"> </span><span class="no">LAST_ONLY</span><span class="w"> </span><span class="nb">lastExt</span><span class="nf">)</span>
|
| 329 |
+
<span class="nf">cmake_path(</span><span class="no">GET</span><span class="w"> </span><span class="nb">path</span><span class="w"> </span><span class="no">STEM</span><span class="w"> </span><span class="no">LAST_ONLY</span><span class="w"> </span><span class="nb">lastStem</span><span class="nf">)</span>
|
| 330 |
+
<span class="nf">message(</span><span class="s">"Last extension is \"${lastExt}\""</span><span class="nf">)</span>
|
| 331 |
+
<span class="nf">message(</span><span class="s">"Last stem is \"${lastStem}\""</span><span class="nf">)</span>
|
| 332 |
+
|
| 333 |
+
<span class="c"># Special cases</span>
|
| 334 |
+
<span class="nf">set(</span><span class="nb">dotPath</span><span class="w"> </span><span class="s">"/a/."</span><span class="nf">)</span>
|
| 335 |
+
<span class="nf">set(</span><span class="nb">dotDotPath</span><span class="w"> </span><span class="s">"/a/.."</span><span class="nf">)</span>
|
| 336 |
+
<span class="nf">set(</span><span class="nb">someMorePath</span><span class="w"> </span><span class="s">"/a/.some.more"</span><span class="nf">)</span>
|
| 337 |
+
<span class="nf">cmake_path(</span><span class="no">GET</span><span class="w"> </span><span class="nb">dotPath</span><span class="w"> </span><span class="no">EXTENSION</span><span class="w"> </span><span class="nb">dotExt</span><span class="nf">)</span>
|
| 338 |
+
<span class="nf">cmake_path(</span><span class="no">GET</span><span class="w"> </span><span class="nb">dotPath</span><span class="w"> </span><span class="no">STEM</span><span class="w"> </span><span class="nb">dotStem</span><span class="nf">)</span>
|
| 339 |
+
<span class="nf">cmake_path(</span><span class="no">GET</span><span class="w"> </span><span class="nb">dotDotPath</span><span class="w"> </span><span class="no">EXTENSION</span><span class="w"> </span><span class="nb">dotDotExt</span><span class="nf">)</span>
|
| 340 |
+
<span class="nf">cmake_path(</span><span class="no">GET</span><span class="w"> </span><span class="nb">dotDotPath</span><span class="w"> </span><span class="no">STEM</span><span class="w"> </span><span class="nb">dotDotStem</span><span class="nf">)</span>
|
| 341 |
+
<span class="nf">cmake_path(</span><span class="no">GET</span><span class="w"> </span><span class="nb">dotMorePath</span><span class="w"> </span><span class="no">EXTENSION</span><span class="w"> </span><span class="nb">someMoreExt</span><span class="nf">)</span>
|
| 342 |
+
<span class="nf">cmake_path(</span><span class="no">GET</span><span class="w"> </span><span class="nb">dotMorePath</span><span class="w"> </span><span class="no">STEM</span><span class="w"> </span><span class="nb">someMoreStem</span><span class="nf">)</span>
|
| 343 |
+
<span class="nf">message(</span><span class="s">"Dot extension is \"${dotExt}\""</span><span class="nf">)</span>
|
| 344 |
+
<span class="nf">message(</span><span class="s">"Dot stem is \"${dotStem}\""</span><span class="nf">)</span>
|
| 345 |
+
<span class="nf">message(</span><span class="s">"Dot-dot extension is \"${dotDotExt}\""</span><span class="nf">)</span>
|
| 346 |
+
<span class="nf">message(</span><span class="s">"Dot-dot stem is \"${dotDotStem}\""</span><span class="nf">)</span>
|
| 347 |
+
<span class="nf">message(</span><span class="s">".some.more extension is \"${someMoreExt}\""</span><span class="nf">)</span>
|
| 348 |
+
<span class="nf">message(</span><span class="s">".some.more stem is \"${someMoreStem}\""</span><span class="nf">)</span>
|
| 349 |
+
</pre></div>
|
| 350 |
+
</div>
|
| 351 |
+
<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>Full extension is ".ext1.ext2"
|
| 352 |
+
Full stem is "name"
|
| 353 |
+
Last extension is ".ext2"
|
| 354 |
+
Last stem is "name.ext1"
|
| 355 |
+
Dot extension is ""
|
| 356 |
+
Dot stem is "."
|
| 357 |
+
Dot-dot extension is ""
|
| 358 |
+
Dot-dot stem is ".."
|
| 359 |
+
.some.more extension is ".more"
|
| 360 |
+
.some.more stem is ".some"
|
| 361 |
+
</pre></div>
|
| 362 |
+
</div>
|
| 363 |
+
</section>
|
| 364 |
+
<section id="relative-part-examples">
|
| 365 |
+
<h3>Relative part examples<a class="headerlink" href="#relative-part-examples" title="Permalink to this heading">¶</a></h3>
|
| 366 |
+
<div class="highlight-cmake notranslate"><div class="highlight"><pre><span></span><span class="nf">set(</span><span class="nb">path</span><span class="w"> </span><span class="s">"c:/a/b"</span><span class="nf">)</span>
|
| 367 |
+
<span class="nf">cmake_path(</span><span class="no">GET</span><span class="w"> </span><span class="nb">path</span><span class="w"> </span><span class="no">RELATIVE_PART</span><span class="w"> </span><span class="nb">result</span><span class="nf">)</span>
|
| 368 |
+
<span class="nf">message(</span><span class="s">"Relative part is \"${result}\""</span><span class="nf">)</span>
|
| 369 |
+
|
| 370 |
+
<span class="nf">set(</span><span class="nb">path</span><span class="w"> </span><span class="s">"c/d"</span><span class="nf">)</span>
|
| 371 |
+
<span class="nf">cmake_path(</span><span class="no">GET</span><span class="w"> </span><span class="nb">path</span><span class="w"> </span><span class="no">RELATIVE_PART</span><span class="w"> </span><span class="nb">result</span><span class="nf">)</span>
|
| 372 |
+
<span class="nf">message(</span><span class="s">"Relative part is \"${result}\""</span><span class="nf">)</span>
|
| 373 |
+
|
| 374 |
+
<span class="nf">set(</span><span class="nb">path</span><span class="w"> </span><span class="s">"/"</span><span class="nf">)</span>
|
| 375 |
+
<span class="nf">cmake_path(</span><span class="no">GET</span><span class="w"> </span><span class="nb">path</span><span class="w"> </span><span class="no">RELATIVE_PART</span><span class="w"> </span><span class="nb">result</span><span class="nf">)</span>
|
| 376 |
+
<span class="nf">message(</span><span class="s">"Relative part is \"${result}\""</span><span class="nf">)</span>
|
| 377 |
+
</pre></div>
|
| 378 |
+
</div>
|
| 379 |
+
<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>Relative part is "a/b"
|
| 380 |
+
Relative part is "c/d"
|
| 381 |
+
Relative part is ""
|
| 382 |
+
</pre></div>
|
| 383 |
+
</div>
|
| 384 |
+
</section>
|
| 385 |
+
<section id="path-traversal-examples">
|
| 386 |
+
<h3>Path traversal examples<a class="headerlink" href="#path-traversal-examples" title="Permalink to this heading">¶</a></h3>
|
| 387 |
+
<div class="highlight-cmake notranslate"><div class="highlight"><pre><span></span><span class="nf">set(</span><span class="nb">path</span><span class="w"> </span><span class="s">"c:/a/b"</span><span class="nf">)</span>
|
| 388 |
+
<span class="nf">cmake_path(</span><span class="no">GET</span><span class="w"> </span><span class="nb">path</span><span class="w"> </span><span class="no">PARENT_PATH</span><span class="w"> </span><span class="nb">result</span><span class="nf">)</span>
|
| 389 |
+
<span class="nf">message(</span><span class="s">"Parent path is \"${result}\""</span><span class="nf">)</span>
|
| 390 |
+
|
| 391 |
+
<span class="nf">set(</span><span class="nb">path</span><span class="w"> </span><span class="s">"c:/"</span><span class="nf">)</span>
|
| 392 |
+
<span class="nf">cmake_path(</span><span class="no">GET</span><span class="w"> </span><span class="nb">path</span><span class="w"> </span><span class="no">PARENT_PATH</span><span class="w"> </span><span class="nb">result</span><span class="nf">)</span>
|
| 393 |
+
<span class="nf">message(</span><span class="s">"Parent path is \"${result}\""</span><span class="nf">)</span>
|
| 394 |
+
</pre></div>
|
| 395 |
+
</div>
|
| 396 |
+
<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>Parent path is "c:/a"
|
| 397 |
+
Parent path is "c:/"
|
| 398 |
+
</pre></div>
|
| 399 |
+
</div>
|
| 400 |
+
</section>
|
| 401 |
+
</section>
|
| 402 |
+
<section id="query">
|
| 403 |
+
<span id="path-query"></span><h2>Query<a class="headerlink" href="#query" title="Permalink to this heading">¶</a></h2>
|
| 404 |
+
<p>Each of the <code class="docutils literal notranslate"><span class="pre">GET</span></code> subcommands has a corresponding <code class="docutils literal notranslate"><span class="pre">HAS_...</span></code>
|
| 405 |
+
subcommand which can be used to discover whether a particular path
|
| 406 |
+
component is present. See <a class="reference internal" href="#path-structure-and-terminology">Path Structure And Terminology</a> for the
|
| 407 |
+
meaning of each path component.</p>
|
| 408 |
+
<div class="highlight-cmake notranslate" id="has-parent-path"><span id="has-relative-part"></span><span id="has-stem"></span><span id="has-extension"></span><span id="has-filename"></span><span id="has-root-path"></span><span id="has-root-directory"></span><span id="has-root-name"></span><div class="highlight"><pre><span></span><span class="nf">cmake_path(</span><span class="no">HAS_ROOT_NAME</span><span class="w"> </span><span class="nv"><path-var></span><span class="w"> </span><span class="nv"><out-var></span><span class="nf">)</span>
|
| 409 |
+
<span class="nf">cmake_path(</span><span class="no">HAS_ROOT_DIRECTORY</span><span class="w"> </span><span class="nv"><path-var></span><span class="w"> </span><span class="nv"><out-var></span><span class="nf">)</span>
|
| 410 |
+
<span class="nf">cmake_path(</span><span class="no">HAS_ROOT_PATH</span><span class="w"> </span><span class="nv"><path-var></span><span class="w"> </span><span class="nv"><out-var></span><span class="nf">)</span>
|
| 411 |
+
<span class="nf">cmake_path(</span><span class="no">HAS_FILENAME</span><span class="w"> </span><span class="nv"><path-var></span><span class="w"> </span><span class="nv"><out-var></span><span class="nf">)</span>
|
| 412 |
+
<span class="nf">cmake_path(</span><span class="no">HAS_EXTENSION</span><span class="w"> </span><span class="nv"><path-var></span><span class="w"> </span><span class="nv"><out-var></span><span class="nf">)</span>
|
| 413 |
+
<span class="nf">cmake_path(</span><span class="no">HAS_STEM</span><span class="w"> </span><span class="nv"><path-var></span><span class="w"> </span><span class="nv"><out-var></span><span class="nf">)</span>
|
| 414 |
+
<span class="nf">cmake_path(</span><span class="no">HAS_RELATIVE_PART</span><span class="w"> </span><span class="nv"><path-var></span><span class="w"> </span><span class="nv"><out-var></span><span class="nf">)</span>
|
| 415 |
+
<span class="nf">cmake_path(</span><span class="no">HAS_PARENT_PATH</span><span class="w"> </span><span class="nv"><path-var></span><span class="w"> </span><span class="nv"><out-var></span><span class="nf">)</span>
|
| 416 |
+
</pre></div>
|
| 417 |
+
</div>
|
| 418 |
+
<p>Each of the above follows the predictable pattern of setting <code class="docutils literal notranslate"><span class="pre"><out-var></span></code>
|
| 419 |
+
to true if the path has the associated component, or false otherwise.
|
| 420 |
+
Note the following special cases:</p>
|
| 421 |
+
<ul class="simple">
|
| 422 |
+
<li><p>For <code class="docutils literal notranslate"><span class="pre">HAS_ROOT_PATH</span></code>, a true result will only be returned if at least one
|
| 423 |
+
of <code class="docutils literal notranslate"><span class="pre">root-name</span></code> or <code class="docutils literal notranslate"><span class="pre">root-directory</span></code> is non-empty.</p></li>
|
| 424 |
+
<li><p>For <code class="docutils literal notranslate"><span class="pre">HAS_PARENT_PATH</span></code>, the root directory is also considered to have a
|
| 425 |
+
parent, which will be itself. The result is true except if the path
|
| 426 |
+
consists of just a <a class="reference internal" href="#filename-def"><span class="std std-ref">filename</span></a>.</p></li>
|
| 427 |
+
</ul>
|
| 428 |
+
<div class="highlight-cmake notranslate" id="is-absolute"><div class="highlight"><pre><span></span><span class="nf">cmake_path(</span><span class="no">IS_ABSOLUTE</span><span class="w"> </span><span class="nv"><path-var></span><span class="w"> </span><span class="nv"><out-var></span><span class="nf">)</span>
|
| 429 |
+
</pre></div>
|
| 430 |
+
</div>
|
| 431 |
+
<p>Sets <code class="docutils literal notranslate"><span class="pre"><out-var></span></code> to true if <code class="docutils literal notranslate"><span class="pre"><path-var></span></code> is absolute. An absolute path
|
| 432 |
+
is a path that unambiguously identifies the location of a file without
|
| 433 |
+
reference to an additional starting location. On Windows, this means the
|
| 434 |
+
path must have both a <code class="docutils literal notranslate"><span class="pre">root-name</span></code> and a <code class="docutils literal notranslate"><span class="pre">root-directory-separator</span></code> to be
|
| 435 |
+
considered absolute. On other platforms, just a <code class="docutils literal notranslate"><span class="pre">root-directory-separator</span></code>
|
| 436 |
+
is sufficient. Note that this means on Windows, <code class="docutils literal notranslate"><span class="pre">IS_ABSOLUTE</span></code> can be
|
| 437 |
+
false while <code class="docutils literal notranslate"><span class="pre">HAS_ROOT_DIRECTORY</span></code> can be true.</p>
|
| 438 |
+
<div class="highlight-cmake notranslate" id="is-relative"><div class="highlight"><pre><span></span><span class="nf">cmake_path(</span><span class="no">IS_RELATIVE</span><span class="w"> </span><span class="nv"><path-var></span><span class="w"> </span><span class="nv"><out-var></span><span class="nf">)</span>
|
| 439 |
+
</pre></div>
|
| 440 |
+
</div>
|
| 441 |
+
<p>This will store the opposite of <code class="docutils literal notranslate"><span class="pre">IS_ABSOLUTE</span></code> in <code class="docutils literal notranslate"><span class="pre"><out-var></span></code>.</p>
|
| 442 |
+
<div class="highlight-cmake notranslate" id="is-prefix"><div class="highlight"><pre><span></span><span class="nf">cmake_path(</span><span class="no">IS_PREFIX</span><span class="w"> </span><span class="nv"><path-var></span><span class="w"> </span><span class="nv"><input></span><span class="w"> </span><span class="p">[</span><span class="no">NORMALIZE</span><span class="p">]</span><span class="w"> </span><span class="nv"><out-var></span><span class="nf">)</span>
|
| 443 |
+
</pre></div>
|
| 444 |
+
</div>
|
| 445 |
+
<p>Checks if <code class="docutils literal notranslate"><span class="pre"><path-var></span></code> is the prefix of <code class="docutils literal notranslate"><span class="pre"><input></span></code>.</p>
|
| 446 |
+
<p>When the <code class="docutils literal notranslate"><span class="pre">NORMALIZE</span></code> option is specified, <code class="docutils literal notranslate"><span class="pre"><path-var></span></code> and <code class="docutils literal notranslate"><span class="pre"><input></span></code>
|
| 447 |
+
are <a class="reference internal" href="#normalization"><span class="std std-ref">normalized</span></a> before the check.</p>
|
| 448 |
+
<div class="highlight-cmake notranslate"><div class="highlight"><pre><span></span><span class="nf">set(</span><span class="nb">path</span><span class="w"> </span><span class="s">"/a/b/c"</span><span class="nf">)</span>
|
| 449 |
+
<span class="nf">cmake_path(</span><span class="no">IS_PREFIX</span><span class="w"> </span><span class="nb">path</span><span class="w"> </span><span class="s">"/a/b/c/d"</span><span class="w"> </span><span class="nb">result</span><span class="nf">)</span><span class="w"> </span><span class="c"># result = true</span>
|
| 450 |
+
<span class="nf">cmake_path(</span><span class="no">IS_PREFIX</span><span class="w"> </span><span class="nb">path</span><span class="w"> </span><span class="s">"/a/b"</span><span class="w"> </span><span class="nb">result</span><span class="nf">)</span><span class="w"> </span><span class="c"># result = false</span>
|
| 451 |
+
<span class="nf">cmake_path(</span><span class="no">IS_PREFIX</span><span class="w"> </span><span class="nb">path</span><span class="w"> </span><span class="s">"/x/y/z"</span><span class="w"> </span><span class="nb">result</span><span class="nf">)</span><span class="w"> </span><span class="c"># result = false</span>
|
| 452 |
+
|
| 453 |
+
<span class="nf">set(</span><span class="nb">path</span><span class="w"> </span><span class="s">"/a/b"</span><span class="nf">)</span>
|
| 454 |
+
<span class="nf">cmake_path(</span><span class="no">IS_PREFIX</span><span class="w"> </span><span class="nb">path</span><span class="w"> </span><span class="s">"/a/c/../b"</span><span class="w"> </span><span class="no">NORMALIZE</span><span class="w"> </span><span class="nb">result</span><span class="nf">)</span><span class="w"> </span><span class="c"># result = true</span>
|
| 455 |
+
</pre></div>
|
| 456 |
+
</div>
|
| 457 |
+
<div class="highlight-cmake notranslate" id="compare"><span id="path-compare"></span><div class="highlight"><pre><span></span><span class="nf">cmake_path(</span><span class="no">COMPARE</span><span class="w"> </span><span class="nv"><input1></span><span class="w"> </span><span class="no">EQUAL</span><span class="w"> </span><span class="nv"><input2></span><span class="w"> </span><span class="nv"><out-var></span><span class="nf">)</span>
|
| 458 |
+
<span class="nf">cmake_path(</span><span class="no">COMPARE</span><span class="w"> </span><span class="nv"><input1></span><span class="w"> </span><span class="no">NOT_EQUAL</span><span class="w"> </span><span class="nv"><input2></span><span class="w"> </span><span class="nv"><out-var></span><span class="nf">)</span>
|
| 459 |
+
</pre></div>
|
| 460 |
+
</div>
|
| 461 |
+
<p>Compares the lexical representations of two paths provided as string literals.
|
| 462 |
+
No normalization is performed on either path, except multiple consecutive
|
| 463 |
+
directory separators are effectively collapsed into a single separator.
|
| 464 |
+
Equality is determined according to the following pseudo-code logic:</p>
|
| 465 |
+
<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>if(NOT <input1>.root_name() STREQUAL <input2>.root_name())
|
| 466 |
+
return FALSE
|
| 467 |
+
|
| 468 |
+
if(<input1>.has_root_directory() XOR <input2>.has_root_directory())
|
| 469 |
+
return FALSE
|
| 470 |
+
|
| 471 |
+
Return FALSE if a relative portion of <input1> is not lexicographically
|
| 472 |
+
equal to the relative portion of <input2>. This comparison is performed path
|
| 473 |
+
component-wise. If all of the components compare equal, then return TRUE.
|
| 474 |
+
</pre></div>
|
| 475 |
+
</div>
|
| 476 |
+
<div class="admonition note">
|
| 477 |
+
<p class="admonition-title">Note</p>
|
| 478 |
+
<p>Unlike most other <code class="docutils literal notranslate"><span class="pre">cmake_path()</span></code> subcommands, the <code class="docutils literal notranslate"><span class="pre">COMPARE</span></code> subcommand
|
| 479 |
+
takes literal strings as input, not the names of variables.</p>
|
| 480 |
+
</div>
|
| 481 |
+
</section>
|
| 482 |
+
<section id="modification">
|
| 483 |
+
<span id="path-modification"></span><h2>Modification<a class="headerlink" href="#modification" title="Permalink to this heading">¶</a></h2>
|
| 484 |
+
<div class="highlight-cmake notranslate" id="cmake-path-set"><div class="highlight"><pre><span></span><span class="nf">cmake_path(</span><span class="no">SET</span><span class="w"> </span><span class="nv"><path-var></span><span class="w"> </span><span class="p">[</span><span class="no">NORMALIZE</span><span class="p">]</span><span class="w"> </span><span class="nv"><input></span><span class="nf">)</span>
|
| 485 |
+
</pre></div>
|
| 486 |
+
</div>
|
| 487 |
+
<p>Assign the <code class="docutils literal notranslate"><span class="pre"><input></span></code> path to <code class="docutils literal notranslate"><span class="pre"><path-var></span></code>. If <code class="docutils literal notranslate"><span class="pre"><input></span></code> is a native
|
| 488 |
+
path, it is converted into a cmake-style path with forward-slashes
|
| 489 |
+
(<code class="docutils literal notranslate"><span class="pre">/</span></code>). On Windows, the long filename marker is taken into account.</p>
|
| 490 |
+
<p>When the <code class="docutils literal notranslate"><span class="pre">NORMALIZE</span></code> option is specified, the path is <a class="reference internal" href="#normalization"><span class="std std-ref">normalized</span></a> after the conversion.</p>
|
| 491 |
+
<p>For example:</p>
|
| 492 |
+
<div class="highlight-cmake notranslate"><div class="highlight"><pre><span></span><span class="nf">set(</span><span class="nb">native_path</span><span class="w"> </span><span class="s">"c:\\a\\b/..\\c"</span><span class="nf">)</span>
|
| 493 |
+
<span class="nf">cmake_path(</span><span class="no">SET</span><span class="w"> </span><span class="nb">path</span><span class="w"> </span><span class="s">"${native_path}"</span><span class="nf">)</span>
|
| 494 |
+
<span class="nf">message(</span><span class="s">"CMake path is \"${path}\""</span><span class="nf">)</span>
|
| 495 |
+
|
| 496 |
+
<span class="nf">cmake_path(</span><span class="no">SET</span><span class="w"> </span><span class="nb">path</span><span class="w"> </span><span class="no">NORMALIZE</span><span class="w"> </span><span class="s">"${native_path}"</span><span class="nf">)</span>
|
| 497 |
+
<span class="nf">message(</span><span class="s">"Normalized CMake path is \"${path}\""</span><span class="nf">)</span>
|
| 498 |
+
</pre></div>
|
| 499 |
+
</div>
|
| 500 |
+
<p>Output:</p>
|
| 501 |
+
<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>CMake path is "c:/a/b/../c"
|
| 502 |
+
Normalized CMake path is "c:/a/c"
|
| 503 |
+
</pre></div>
|
| 504 |
+
</div>
|
| 505 |
+
<div class="highlight-cmake notranslate" id="append"><div class="highlight"><pre><span></span><span class="nf">cmake_path(</span><span class="no">APPEND</span><span class="w"> </span><span class="nv"><path-var></span><span class="w"> </span><span class="p">[</span><span class="nv"><input>...</span><span class="p">]</span><span class="w"> </span><span class="p">[</span><span class="no">OUTPUT_VARIABLE</span><span class="w"> </span><span class="nv"><out-var></span><span class="p">]</span><span class="nf">)</span>
|
| 506 |
+
</pre></div>
|
| 507 |
+
</div>
|
| 508 |
+
<p>Append all the <code class="docutils literal notranslate"><span class="pre"><input></span></code> arguments to the <code class="docutils literal notranslate"><span class="pre"><path-var></span></code> using <code class="docutils literal notranslate"><span class="pre">/</span></code> as
|
| 509 |
+
the <code class="docutils literal notranslate"><span class="pre">directory-separator</span></code>. Depending on the <code class="docutils literal notranslate"><span class="pre"><input></span></code>, the previous
|
| 510 |
+
contents of <code class="docutils literal notranslate"><span class="pre"><path-var></span></code> may be discarded. For each <code class="docutils literal notranslate"><span class="pre"><input></span></code> argument,
|
| 511 |
+
the following algorithm (pseudo-code) applies:</p>
|
| 512 |
+
<div class="highlight-none notranslate"><div class="highlight"><pre><span></span># <path> is the contents of <path-var>
|
| 513 |
+
|
| 514 |
+
if(<input>.is_absolute() OR
|
| 515 |
+
(<input>.has_root_name() AND
|
| 516 |
+
NOT <input>.root_name() STREQUAL <path>.root_name()))
|
| 517 |
+
replace <path> with <input>
|
| 518 |
+
return()
|
| 519 |
+
endif()
|
| 520 |
+
|
| 521 |
+
if(<input>.has_root_directory())
|
| 522 |
+
remove any root-directory and the entire relative path from <path>
|
| 523 |
+
elseif(<path>.has_filename() OR
|
| 524 |
+
(NOT <path-var>.has_root_directory() OR <path>.is_absolute()))
|
| 525 |
+
append directory-separator to <path>
|
| 526 |
+
endif()
|
| 527 |
+
|
| 528 |
+
append <input> omitting any root-name to <path>
|
| 529 |
+
</pre></div>
|
| 530 |
+
</div>
|
| 531 |
+
<div class="highlight-cmake notranslate" id="append-string"><div class="highlight"><pre><span></span><span class="nf">cmake_path(</span><span class="no">APPEND_STRING</span><span class="w"> </span><span class="nv"><path-var></span><span class="w"> </span><span class="p">[</span><span class="nv"><input>...</span><span class="p">]</span><span class="w"> </span><span class="p">[</span><span class="no">OUTPUT_VARIABLE</span><span class="w"> </span><span class="nv"><out-var></span><span class="p">]</span><span class="nf">)</span>
|
| 532 |
+
</pre></div>
|
| 533 |
+
</div>
|
| 534 |
+
<p>Append all the <code class="docutils literal notranslate"><span class="pre"><input></span></code> arguments to the <code class="docutils literal notranslate"><span class="pre"><path-var></span></code> without adding any
|
| 535 |
+
<code class="docutils literal notranslate"><span class="pre">directory-separator</span></code>.</p>
|
| 536 |
+
<div class="highlight-cmake notranslate" id="remove-filename"><div class="highlight"><pre><span></span><span class="nf">cmake_path(</span><span class="no">REMOVE_FILENAME</span><span class="w"> </span><span class="nv"><path-var></span><span class="w"> </span><span class="p">[</span><span class="no">OUTPUT_VARIABLE</span><span class="w"> </span><span class="nv"><out-var></span><span class="p">]</span><span class="nf">)</span>
|
| 537 |
+
</pre></div>
|
| 538 |
+
</div>
|
| 539 |
+
<p>Removes the <a class="reference internal" href="#filename-def"><span class="std std-ref">filename</span></a> component (as returned by
|
| 540 |
+
<a class="reference internal" href="#get-filename"><span class="std std-ref">GET ... FILENAME</span></a>) from <code class="docutils literal notranslate"><span class="pre"><path-var></span></code>. After removal,
|
| 541 |
+
any trailing <code class="docutils literal notranslate"><span class="pre">directory-separator</span></code> is left alone, if present.</p>
|
| 542 |
+
<p>If <code class="docutils literal notranslate"><span class="pre">OUTPUT_VARIABLE</span></code> is not given, then after this function returns,
|
| 543 |
+
<a class="reference internal" href="#has-filename">HAS_FILENAME</a> returns false for <code class="docutils literal notranslate"><span class="pre"><path-var></span></code>.</p>
|
| 544 |
+
<p>For example:</p>
|
| 545 |
+
<div class="highlight-cmake notranslate"><div class="highlight"><pre><span></span><span class="nf">set(</span><span class="nb">path</span><span class="w"> </span><span class="s">"/a/b"</span><span class="nf">)</span>
|
| 546 |
+
<span class="nf">cmake_path(</span><span class="no">REMOVE_FILENAME</span><span class="w"> </span><span class="nb">path</span><span class="nf">)</span>
|
| 547 |
+
<span class="nf">message(</span><span class="s">"First path is \"${path}\""</span><span class="nf">)</span>
|
| 548 |
+
|
| 549 |
+
<span class="c"># filename is now already empty, the following removes nothing</span>
|
| 550 |
+
<span class="nf">cmake_path(</span><span class="no">REMOVE_FILENAME</span><span class="w"> </span><span class="nb">path</span><span class="nf">)</span>
|
| 551 |
+
<span class="nf">message(</span><span class="s">"Second path is \"${result}\""</span><span class="nf">)</span>
|
| 552 |
+
</pre></div>
|
| 553 |
+
</div>
|
| 554 |
+
<p>Output:</p>
|
| 555 |
+
<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>First path is "/a/"
|
| 556 |
+
Second path is "/a/"
|
| 557 |
+
</pre></div>
|
| 558 |
+
</div>
|
| 559 |
+
<div class="highlight-cmake notranslate" id="replace-filename"><div class="highlight"><pre><span></span><span class="nf">cmake_path(</span><span class="no">REPLACE_FILENAME</span><span class="w"> </span><span class="nv"><path-var></span><span class="w"> </span><span class="nv"><input></span><span class="w"> </span><span class="p">[</span><span class="no">OUTPUT_VARIABLE</span><span class="w"> </span><span class="nv"><out-var></span><span class="p">]</span><span class="nf">)</span>
|
| 560 |
+
</pre></div>
|
| 561 |
+
</div>
|
| 562 |
+
<p>Replaces the <a class="reference internal" href="#filename-def"><span class="std std-ref">filename</span></a> component from <code class="docutils literal notranslate"><span class="pre"><path-var></span></code>
|
| 563 |
+
with <code class="docutils literal notranslate"><span class="pre"><input></span></code>. If <code class="docutils literal notranslate"><span class="pre"><path-var></span></code> has no filename component (i.e.
|
| 564 |
+
<a class="reference internal" href="#has-filename">HAS_FILENAME</a> returns false), the path is unchanged. The operation is
|
| 565 |
+
equivalent to the following:</p>
|
| 566 |
+
<div class="highlight-cmake notranslate"><div class="highlight"><pre><span></span><span class="nf">cmake_path(</span><span class="no">HAS_FILENAME</span><span class="w"> </span><span class="nb">path</span><span class="w"> </span><span class="nb">has_filename</span><span class="nf">)</span>
|
| 567 |
+
<span class="nf">if(</span><span class="nb">has_filename</span><span class="nf">)</span>
|
| 568 |
+
<span class="w"> </span><span class="nf">cmake_path(</span><span class="no">REMOVE_FILENAME</span><span class="w"> </span><span class="nb">path</span><span class="nf">)</span>
|
| 569 |
+
<span class="w"> </span><span class="nf">cmake_path(</span><span class="no">APPEND</span><span class="w"> </span><span class="nb">path</span><span class="w"> </span><span class="nb">input</span><span class="nf">)</span><span class="p">;</span>
|
| 570 |
+
<span class="nf">endif()</span>
|
| 571 |
+
</pre></div>
|
| 572 |
+
</div>
|
| 573 |
+
<div class="highlight-cmake notranslate" id="remove-extension"><div class="highlight"><pre><span></span><span class="nf">cmake_path(</span><span class="no">REMOVE_EXTENSION</span><span class="w"> </span><span class="nv"><path-var></span><span class="w"> </span><span class="p">[</span><span class="no">LAST_ONLY</span><span class="p">]</span>
|
| 574 |
+
<span class="w"> </span><span class="p">[</span><span class="no">OUTPUT_VARIABLE</span><span class="w"> </span><span class="nv"><out-var></span><span class="p">]</span><span class="nf">)</span>
|
| 575 |
+
</pre></div>
|
| 576 |
+
</div>
|
| 577 |
+
<p>Removes the <a class="reference internal" href="#extension-def"><span class="std std-ref">extension</span></a>, if any, from <code class="docutils literal notranslate"><span class="pre"><path-var></span></code>.</p>
|
| 578 |
+
<div class="highlight-cmake notranslate" id="replace-extension"><div class="highlight"><pre><span></span><span class="nf">cmake_path(</span><span class="no">REPLACE_EXTENSION</span><span class="w"> </span><span class="nv"><path-var></span><span class="w"> </span><span class="p">[</span><span class="no">LAST_ONLY</span><span class="p">]</span><span class="w"> </span><span class="nv"><input></span>
|
| 579 |
+
<span class="w"> </span><span class="p">[</span><span class="no">OUTPUT_VARIABLE</span><span class="w"> </span><span class="nv"><out-var></span><span class="p">]</span><span class="nf">)</span>
|
| 580 |
+
</pre></div>
|
| 581 |
+
</div>
|
| 582 |
+
<p>Replaces the <a class="reference internal" href="#extension-def"><span class="std std-ref">extension</span></a> with <code class="docutils literal notranslate"><span class="pre"><input></span></code>. Its effect
|
| 583 |
+
is equivalent to the following:</p>
|
| 584 |
+
<div class="highlight-cmake notranslate"><div class="highlight"><pre><span></span><span class="nf">cmake_path(</span><span class="no">REMOVE_EXTENSION</span><span class="w"> </span><span class="nb">path</span><span class="nf">)</span>
|
| 585 |
+
<span class="nf">if(</span><span class="no">NOT</span><span class="w"> </span><span class="s">"input"</span><span class="w"> </span><span class="no">MATCHES</span><span class="w"> </span><span class="s">"^\\."</span><span class="nf">)</span>
|
| 586 |
+
<span class="w"> </span><span class="nf">cmake_path(</span><span class="no">APPEND_STRING</span><span class="w"> </span><span class="nb">path</span><span class="w"> </span><span class="s">"."</span><span class="nf">)</span>
|
| 587 |
+
<span class="nf">endif()</span>
|
| 588 |
+
<span class="nf">cmake_path(</span><span class="no">APPEND_STRING</span><span class="w"> </span><span class="nb">path</span><span class="w"> </span><span class="s">"input"</span><span class="nf">)</span>
|
| 589 |
+
</pre></div>
|
| 590 |
+
</div>
|
| 591 |
+
</section>
|
| 592 |
+
<section id="generation">
|
| 593 |
+
<span id="path-generation"></span><h2>Generation<a class="headerlink" href="#generation" title="Permalink to this heading">¶</a></h2>
|
| 594 |
+
<div class="highlight-cmake notranslate" id="normal-path"><div class="highlight"><pre><span></span><span class="nf">cmake_path(</span><span class="no">NORMAL_PATH</span><span class="w"> </span><span class="nv"><path-var></span><span class="w"> </span><span class="p">[</span><span class="no">OUTPUT_VARIABLE</span><span class="w"> </span><span class="nv"><out-var></span><span class="p">]</span><span class="nf">)</span>
|
| 595 |
+
</pre></div>
|
| 596 |
+
</div>
|
| 597 |
+
<p>Normalize <code class="docutils literal notranslate"><span class="pre"><path-var></span></code> according the steps described in <a class="reference internal" href="#normalization"><span class="std std-ref">Normalization</span></a>.</p>
|
| 598 |
+
<div class="highlight-cmake notranslate" id="relative-path"><span id="cmake-path-relative-path"></span><div class="highlight"><pre><span></span><span class="nf">cmake_path(</span><span class="no">RELATIVE_PATH</span><span class="w"> </span><span class="nv"><path-var></span><span class="w"> </span><span class="p">[</span><span class="no">BASE_DIRECTORY</span><span class="w"> </span><span class="nv"><input></span><span class="p">]</span>
|
| 599 |
+
<span class="w"> </span><span class="p">[</span><span class="no">OUTPUT_VARIABLE</span><span class="w"> </span><span class="nv"><out-var></span><span class="p">]</span><span class="nf">)</span>
|
| 600 |
+
</pre></div>
|
| 601 |
+
</div>
|
| 602 |
+
<p>Modifies <code class="docutils literal notranslate"><span class="pre"><path-var></span></code> to make it relative to the <code class="docutils literal notranslate"><span class="pre">BASE_DIRECTORY</span></code> argument.
|
| 603 |
+
If <code class="docutils literal notranslate"><span class="pre">BASE_DIRECTORY</span></code> is not specified, the default base directory will be
|
| 604 |
+
<span class="target" id="index-0-variable:CMAKE_CURRENT_SOURCE_DIR"></span><a class="reference internal" href="../variable/CMAKE_CURRENT_SOURCE_DIR.html#variable:CMAKE_CURRENT_SOURCE_DIR" title="CMAKE_CURRENT_SOURCE_DIR"><code class="xref cmake cmake-variable docutils literal notranslate"><span class="pre">CMAKE_CURRENT_SOURCE_DIR</span></code></a>.</p>
|
| 605 |
+
<p>For reference, the algorithm used to compute the relative path is the same
|
| 606 |
+
as that used by C++
|
| 607 |
+
<a class="reference external" href="https://en.cppreference.com/w/cpp/filesystem/path/lexically_normal">std::filesystem::path::lexically_relative</a>.</p>
|
| 608 |
+
<div class="highlight-cmake notranslate" id="absolute-path"><div class="highlight"><pre><span></span><span class="nf">cmake_path(</span><span class="no">ABSOLUTE_PATH</span><span class="w"> </span><span class="nv"><path-var></span><span class="w"> </span><span class="p">[</span><span class="no">BASE_DIRECTORY</span><span class="w"> </span><span class="nv"><input></span><span class="p">]</span><span class="w"> </span><span class="p">[</span><span class="no">NORMALIZE</span><span class="p">]</span>
|
| 609 |
+
<span class="w"> </span><span class="p">[</span><span class="no">OUTPUT_VARIABLE</span><span class="w"> </span><span class="nv"><out-var></span><span class="p">]</span><span class="nf">)</span>
|
| 610 |
+
</pre></div>
|
| 611 |
+
</div>
|
| 612 |
+
<p>If <code class="docutils literal notranslate"><span class="pre"><path-var></span></code> is a relative path (<a class="reference internal" href="#is-relative">IS_RELATIVE</a> is true), it is evaluated
|
| 613 |
+
relative to the given base directory specified by <code class="docutils literal notranslate"><span class="pre">BASE_DIRECTORY</span></code> option.
|
| 614 |
+
If <code class="docutils literal notranslate"><span class="pre">BASE_DIRECTORY</span></code> is not specified, the default base directory will be
|
| 615 |
+
<span class="target" id="index-1-variable:CMAKE_CURRENT_SOURCE_DIR"></span><a class="reference internal" href="../variable/CMAKE_CURRENT_SOURCE_DIR.html#variable:CMAKE_CURRENT_SOURCE_DIR" title="CMAKE_CURRENT_SOURCE_DIR"><code class="xref cmake cmake-variable docutils literal notranslate"><span class="pre">CMAKE_CURRENT_SOURCE_DIR</span></code></a>.</p>
|
| 616 |
+
<p>When the <code class="docutils literal notranslate"><span class="pre">NORMALIZE</span></code> option is specified, the path is <a class="reference internal" href="#normalization"><span class="std std-ref">normalized</span></a> after the path computation.</p>
|
| 617 |
+
<p>Because <code class="docutils literal notranslate"><span class="pre">cmake_path()</span></code> does not access the filesystem, symbolic links are
|
| 618 |
+
not resolved and any leading tilde is not expanded. To compute a real path
|
| 619 |
+
with symbolic links resolved and leading tildes expanded, use the
|
| 620 |
+
<span class="target" id="index-1-command:file"></span><a class="reference internal" href="file.html#real-path" title="file(real_path)"><code class="xref cmake cmake-command docutils literal notranslate"><span class="pre">file(REAL_PATH)</span></code></a> command instead.</p>
|
| 621 |
+
</section>
|
| 622 |
+
<section id="native-conversion">
|
| 623 |
+
<h2>Native Conversion<a class="headerlink" href="#native-conversion" title="Permalink to this heading">¶</a></h2>
|
| 624 |
+
<p>For commands in this section, <em>native</em> refers to the host platform, not the
|
| 625 |
+
target platform when cross-compiling.</p>
|
| 626 |
+
<div class="highlight-cmake notranslate" id="native-path"><span id="cmake-path-native-path"></span><div class="highlight"><pre><span></span><span class="nf">cmake_path(</span><span class="no">NATIVE_PATH</span><span class="w"> </span><span class="nv"><path-var></span><span class="w"> </span><span class="p">[</span><span class="no">NORMALIZE</span><span class="p">]</span><span class="w"> </span><span class="nv"><out-var></span><span class="nf">)</span>
|
| 627 |
+
</pre></div>
|
| 628 |
+
</div>
|
| 629 |
+
<p>Converts a cmake-style <code class="docutils literal notranslate"><span class="pre"><path-var></span></code> into a native path with
|
| 630 |
+
platform-specific slashes (<code class="docutils literal notranslate"><span class="pre">\</span></code> on Windows hosts and <code class="docutils literal notranslate"><span class="pre">/</span></code> elsewhere).</p>
|
| 631 |
+
<p>When the <code class="docutils literal notranslate"><span class="pre">NORMALIZE</span></code> option is specified, the path is <a class="reference internal" href="#normalization"><span class="std std-ref">normalized</span></a> before the conversion.</p>
|
| 632 |
+
<div class="highlight-cmake notranslate" id="to-cmake-path-list"><span id="cmake-path-to-cmake-path-list"></span><span id="convert"></span><div class="highlight"><pre><span></span><span class="nf">cmake_path(</span><span class="no">CONVERT</span><span class="w"> </span><span class="nv"><input></span><span class="w"> </span><span class="no">TO_CMAKE_PATH_LIST</span><span class="w"> </span><span class="nv"><out-var></span><span class="w"> </span><span class="p">[</span><span class="no">NORMALIZE</span><span class="p">]</span><span class="nf">)</span>
|
| 633 |
+
</pre></div>
|
| 634 |
+
</div>
|
| 635 |
+
<p>Converts a native <code class="docutils literal notranslate"><span class="pre"><input></span></code> path into a cmake-style path with forward
|
| 636 |
+
slashes (<code class="docutils literal notranslate"><span class="pre">/</span></code>). On Windows hosts, the long filename marker is taken into
|
| 637 |
+
account. The input can be a single path or a system search path like
|
| 638 |
+
<code class="docutils literal notranslate"><span class="pre">$ENV{PATH}</span></code>. A search path will be converted to a cmake-style list
|
| 639 |
+
separated by <code class="docutils literal notranslate"><span class="pre">;</span></code> characters (on non-Windows platforms, this essentially
|
| 640 |
+
means <code class="docutils literal notranslate"><span class="pre">:</span></code> separators are replaced with <code class="docutils literal notranslate"><span class="pre">;</span></code>). The result of the
|
| 641 |
+
conversion is stored in the <code class="docutils literal notranslate"><span class="pre"><out-var></span></code> variable.</p>
|
| 642 |
+
<p>When the <code class="docutils literal notranslate"><span class="pre">NORMALIZE</span></code> option is specified, the path is <a class="reference internal" href="#normalization"><span class="std std-ref">normalized</span></a> before the conversion.</p>
|
| 643 |
+
<div class="admonition note">
|
| 644 |
+
<p class="admonition-title">Note</p>
|
| 645 |
+
<p>Unlike most other <code class="docutils literal notranslate"><span class="pre">cmake_path()</span></code> subcommands, the <code class="docutils literal notranslate"><span class="pre">CONVERT</span></code> subcommand
|
| 646 |
+
takes a literal string as input, not the name of a variable.</p>
|
| 647 |
+
</div>
|
| 648 |
+
<div class="highlight-cmake notranslate" id="to-native-path-list"><span id="cmake-path-to-native-path-list"></span><div class="highlight"><pre><span></span><span class="nf">cmake_path(</span><span class="no">CONVERT</span><span class="w"> </span><span class="nv"><input></span><span class="w"> </span><span class="no">TO_NATIVE_PATH_LIST</span><span class="w"> </span><span class="nv"><out-var></span><span class="w"> </span><span class="p">[</span><span class="no">NORMALIZE</span><span class="p">]</span><span class="nf">)</span>
|
| 649 |
+
</pre></div>
|
| 650 |
+
</div>
|
| 651 |
+
<p>Converts a cmake-style <code class="docutils literal notranslate"><span class="pre"><input></span></code> path into a native path with
|
| 652 |
+
platform-specific slashes (<code class="docutils literal notranslate"><span class="pre">\</span></code> on Windows hosts and <code class="docutils literal notranslate"><span class="pre">/</span></code> elsewhere).
|
| 653 |
+
The input can be a single path or a cmake-style list. A list will be
|
| 654 |
+
converted into a native search path (<code class="docutils literal notranslate"><span class="pre">;</span></code>-separated on Windows,
|
| 655 |
+
<code class="docutils literal notranslate"><span class="pre">:</span></code>-separated on other platforms). The result of the conversion is
|
| 656 |
+
stored in the <code class="docutils literal notranslate"><span class="pre"><out-var></span></code> variable.</p>
|
| 657 |
+
<p>When the <code class="docutils literal notranslate"><span class="pre">NORMALIZE</span></code> option is specified, the path is <a class="reference internal" href="#normalization"><span class="std std-ref">normalized</span></a> before the conversion.</p>
|
| 658 |
+
<div class="admonition note">
|
| 659 |
+
<p class="admonition-title">Note</p>
|
| 660 |
+
<p>Unlike most other <code class="docutils literal notranslate"><span class="pre">cmake_path()</span></code> subcommands, the <code class="docutils literal notranslate"><span class="pre">CONVERT</span></code> subcommand
|
| 661 |
+
takes a literal string as input, not the name of a variable.</p>
|
| 662 |
+
</div>
|
| 663 |
+
<p>For example:</p>
|
| 664 |
+
<div class="highlight-cmake notranslate"><div class="highlight"><pre><span></span><span class="nf">set(</span><span class="nb">paths</span><span class="w"> </span><span class="s">"/a/b/c"</span><span class="w"> </span><span class="s">"/x/y/z"</span><span class="nf">)</span>
|
| 665 |
+
<span class="nf">cmake_path(</span><span class="no">CONVERT</span><span class="w"> </span><span class="s">"${paths}"</span><span class="w"> </span><span class="no">TO_NATIVE_PATH_LIST</span><span class="w"> </span><span class="nb">native_paths</span><span class="nf">)</span>
|
| 666 |
+
<span class="nf">message(</span><span class="s">"Native path list is \"${native_paths}\""</span><span class="nf">)</span>
|
| 667 |
+
</pre></div>
|
| 668 |
+
</div>
|
| 669 |
+
<p>Output on Windows:</p>
|
| 670 |
+
<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>Native path list is "\a\b\c;\x\y\z"
|
| 671 |
+
</pre></div>
|
| 672 |
+
</div>
|
| 673 |
+
<p>Output on all other platforms:</p>
|
| 674 |
+
<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>Native path list is "/a/b/c:/x/y/z"
|
| 675 |
+
</pre></div>
|
| 676 |
+
</div>
|
| 677 |
+
</section>
|
| 678 |
+
<section id="hashing">
|
| 679 |
+
<h2>Hashing<a class="headerlink" href="#hashing" title="Permalink to this heading">¶</a></h2>
|
| 680 |
+
<div class="highlight-cmake notranslate" id="hash"><div class="highlight"><pre><span></span><span class="nf">cmake_path(</span><span class="no">HASH</span><span class="w"> </span><span class="nv"><path-var></span><span class="w"> </span><span class="nv"><out-var></span><span class="nf">)</span>
|
| 681 |
+
</pre></div>
|
| 682 |
+
</div>
|
| 683 |
+
<p>Compute a hash value of <code class="docutils literal notranslate"><span class="pre"><path-var></span></code> such that for two paths <code class="docutils literal notranslate"><span class="pre">p1</span></code> and
|
| 684 |
+
<code class="docutils literal notranslate"><span class="pre">p2</span></code> that compare equal (<a class="reference internal" href="string.html#compare"><span class="std std-ref">COMPARE ... EQUAL</span></a>), the hash
|
| 685 |
+
value of <code class="docutils literal notranslate"><span class="pre">p1</span></code> is equal to the hash value of <code class="docutils literal notranslate"><span class="pre">p2</span></code>. The path is always
|
| 686 |
+
<a class="reference internal" href="#normalization"><span class="std std-ref">normalized</span></a> before the hash is computed.</p>
|
| 687 |
+
</section>
|
| 688 |
+
</section>
|
| 689 |
+
|
| 690 |
+
|
| 691 |
+
<div class="clearer"></div>
|
| 692 |
+
</div>
|
| 693 |
+
</div>
|
| 694 |
+
</div>
|
| 695 |
+
<div class="sphinxsidebar" role="navigation" aria-label="main navigation">
|
| 696 |
+
<div class="sphinxsidebarwrapper">
|
| 697 |
+
<div>
|
| 698 |
+
<h3><a href="../index.html">Table of Contents</a></h3>
|
| 699 |
+
<ul>
|
| 700 |
+
<li><a class="reference internal" href="#">cmake_path</a><ul>
|
| 701 |
+
<li><a class="reference internal" href="#synopsis">Synopsis</a></li>
|
| 702 |
+
<li><a class="reference internal" href="#conventions">Conventions</a></li>
|
| 703 |
+
<li><a class="reference internal" href="#path-structure-and-terminology">Path Structure And Terminology</a></li>
|
| 704 |
+
<li><a class="reference internal" href="#creating-a-path-variable">Creating A Path Variable</a></li>
|
| 705 |
+
<li><a class="reference internal" href="#normalization">Normalization</a></li>
|
| 706 |
+
<li><a class="reference internal" href="#decomposition">Decomposition</a><ul>
|
| 707 |
+
<li><a class="reference internal" href="#root-examples">Root examples</a></li>
|
| 708 |
+
<li><a class="reference internal" href="#filename-examples">Filename examples</a></li>
|
| 709 |
+
<li><a class="reference internal" href="#extension-and-stem-examples">Extension and stem examples</a></li>
|
| 710 |
+
<li><a class="reference internal" href="#relative-part-examples">Relative part examples</a></li>
|
| 711 |
+
<li><a class="reference internal" href="#path-traversal-examples">Path traversal examples</a></li>
|
| 712 |
+
</ul>
|
| 713 |
+
</li>
|
| 714 |
+
<li><a class="reference internal" href="#query">Query</a></li>
|
| 715 |
+
<li><a class="reference internal" href="#modification">Modification</a></li>
|
| 716 |
+
<li><a class="reference internal" href="#generation">Generation</a></li>
|
| 717 |
+
<li><a class="reference internal" href="#native-conversion">Native Conversion</a></li>
|
| 718 |
+
<li><a class="reference internal" href="#hashing">Hashing</a></li>
|
| 719 |
+
</ul>
|
| 720 |
+
</li>
|
| 721 |
+
</ul>
|
| 722 |
+
|
| 723 |
+
</div>
|
| 724 |
+
<div>
|
| 725 |
+
<h4>Previous topic</h4>
|
| 726 |
+
<p class="topless"><a href="cmake_parse_arguments.html"
|
| 727 |
+
title="previous chapter">cmake_parse_arguments</a></p>
|
| 728 |
+
</div>
|
| 729 |
+
<div>
|
| 730 |
+
<h4>Next topic</h4>
|
| 731 |
+
<p class="topless"><a href="cmake_policy.html"
|
| 732 |
+
title="next chapter">cmake_policy</a></p>
|
| 733 |
+
</div>
|
| 734 |
+
<div role="note" aria-label="source link">
|
| 735 |
+
<h3>This Page</h3>
|
| 736 |
+
<ul class="this-page-menu">
|
| 737 |
+
<li><a href="../_sources/command/cmake_path.rst.txt"
|
| 738 |
+
rel="nofollow">Show Source</a></li>
|
| 739 |
+
</ul>
|
| 740 |
+
</div>
|
| 741 |
+
<div id="searchbox" style="display: none" role="search">
|
| 742 |
+
<h3 id="searchlabel">Quick search</h3>
|
| 743 |
+
<div class="searchformwrapper">
|
| 744 |
+
<form class="search" action="../search.html" method="get">
|
| 745 |
+
<input type="text" name="q" aria-labelledby="searchlabel" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/>
|
| 746 |
+
<input type="submit" value="Go" />
|
| 747 |
+
</form>
|
| 748 |
+
</div>
|
| 749 |
+
</div>
|
| 750 |
+
<script>document.getElementById('searchbox').style.display = "block"</script>
|
| 751 |
+
</div>
|
| 752 |
+
</div>
|
| 753 |
+
<div class="clearer"></div>
|
| 754 |
+
</div>
|
| 755 |
+
<div class="related" role="navigation" aria-label="related navigation">
|
| 756 |
+
<h3>Navigation</h3>
|
| 757 |
+
<ul>
|
| 758 |
+
<li class="right" style="margin-right: 10px">
|
| 759 |
+
<a href="../genindex.html" title="General Index"
|
| 760 |
+
>index</a></li>
|
| 761 |
+
<li class="right" >
|
| 762 |
+
<a href="cmake_policy.html" title="cmake_policy"
|
| 763 |
+
>next</a> |</li>
|
| 764 |
+
<li class="right" >
|
| 765 |
+
<a href="cmake_parse_arguments.html" title="cmake_parse_arguments"
|
| 766 |
+
>previous</a> |</li>
|
| 767 |
+
<li>
|
| 768 |
+
<img src="../_static/cmake-logo-16.png" alt=""
|
| 769 |
+
style="vertical-align: middle; margin-top: -2px" />
|
| 770 |
+
</li>
|
| 771 |
+
<li>
|
| 772 |
+
<a href="https://cmake.org/">CMake</a> »
|
| 773 |
+
</li>
|
| 774 |
+
<li>
|
| 775 |
+
<a href="../index.html">3.27.9 Documentation</a> »
|
| 776 |
+
</li>
|
| 777 |
+
|
| 778 |
+
<li class="nav-item nav-item-1"><a href="../manual/cmake-commands.7.html" >cmake-commands(7)</a> »</li>
|
| 779 |
+
<li class="nav-item nav-item-this"><a href="">cmake_path</a></li>
|
| 780 |
+
</ul>
|
| 781 |
+
</div>
|
| 782 |
+
|
| 783 |
+
<div class="footer" role="contentinfo">
|
| 784 |
+
© Copyright 2000-2023 Kitware, Inc. and Contributors.
|
| 785 |
+
Created using <a href="https://www.sphinx-doc.org/">Sphinx</a> 5.3.0.
|
| 786 |
+
</div>
|
| 787 |
+
</body>
|
| 788 |
+
</html>
|
toolchain/cmake-3.27.9-linux-x86_64/doc/cmake/html/command/cmake_policy.html
ADDED
|
@@ -0,0 +1,310 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
|
| 2 |
+
<!DOCTYPE html>
|
| 3 |
+
|
| 4 |
+
<html lang="en">
|
| 5 |
+
<head>
|
| 6 |
+
<meta charset="utf-8" />
|
| 7 |
+
<meta name="viewport" content="width=device-width, initial-scale=1.0" /><meta name="generator" content="Docutils 0.19: https://docutils.sourceforge.io/" />
|
| 8 |
+
|
| 9 |
+
<title>cmake_policy — CMake 3.27.9 Documentation</title>
|
| 10 |
+
|
| 11 |
+
<link rel="stylesheet" type="text/css" href="../_static/pygments.css" />
|
| 12 |
+
<link rel="stylesheet" type="text/css" href="../_static/cmake.css" />
|
| 13 |
+
|
| 14 |
+
<script data-url_root="../" id="documentation_options" src="../_static/documentation_options.js"></script>
|
| 15 |
+
<script src="../_static/jquery.js"></script>
|
| 16 |
+
<script src="../_static/underscore.js"></script>
|
| 17 |
+
<script src="../_static/_sphinx_javascript_frameworks_compat.js"></script>
|
| 18 |
+
<script src="../_static/doctools.js"></script>
|
| 19 |
+
<script src="../_static/sphinx_highlight.js"></script>
|
| 20 |
+
|
| 21 |
+
<link rel="shortcut icon" href="../_static/cmake-favicon.ico"/>
|
| 22 |
+
<link rel="index" title="Index" href="../genindex.html" />
|
| 23 |
+
<link rel="search" title="Search" href="../search.html" />
|
| 24 |
+
<link rel="next" title="configure_file" href="configure_file.html" />
|
| 25 |
+
<link rel="prev" title="cmake_path" href="cmake_path.html" />
|
| 26 |
+
|
| 27 |
+
|
| 28 |
+
</head><body>
|
| 29 |
+
|
| 30 |
+
<div class="related" role="navigation" aria-label="related navigation">
|
| 31 |
+
<h3>Navigation</h3>
|
| 32 |
+
<ul>
|
| 33 |
+
<li class="right" style="margin-right: 10px">
|
| 34 |
+
<a href="../genindex.html" title="General Index"
|
| 35 |
+
accesskey="I">index</a></li>
|
| 36 |
+
<li class="right" >
|
| 37 |
+
<a href="configure_file.html" title="configure_file"
|
| 38 |
+
accesskey="N">next</a> |</li>
|
| 39 |
+
<li class="right" >
|
| 40 |
+
<a href="cmake_path.html" title="cmake_path"
|
| 41 |
+
accesskey="P">previous</a> |</li>
|
| 42 |
+
<li>
|
| 43 |
+
<img src="../_static/cmake-logo-16.png" alt=""
|
| 44 |
+
style="vertical-align: middle; margin-top: -2px" />
|
| 45 |
+
</li>
|
| 46 |
+
<li>
|
| 47 |
+
<a href="https://cmake.org/">CMake</a> »
|
| 48 |
+
</li>
|
| 49 |
+
<li>
|
| 50 |
+
<a href="../index.html">3.27.9 Documentation</a> »
|
| 51 |
+
</li>
|
| 52 |
+
|
| 53 |
+
<li class="nav-item nav-item-1"><a href="../manual/cmake-commands.7.html" accesskey="U">cmake-commands(7)</a> »</li>
|
| 54 |
+
<li class="nav-item nav-item-this"><a href="">cmake_policy</a></li>
|
| 55 |
+
</ul>
|
| 56 |
+
</div>
|
| 57 |
+
|
| 58 |
+
<div class="document">
|
| 59 |
+
<div class="documentwrapper">
|
| 60 |
+
<div class="bodywrapper">
|
| 61 |
+
<div class="body" role="main">
|
| 62 |
+
|
| 63 |
+
<section id="cmake-policy">
|
| 64 |
+
<span id="command:cmake_policy"></span><h1>cmake_policy<a class="headerlink" href="#cmake-policy" title="Permalink to this heading">¶</a></h1>
|
| 65 |
+
<p>Manage CMake Policy settings. See the <span class="target" id="index-0-manual:cmake-policies(7)"></span><a class="reference internal" href="../manual/cmake-policies.7.html#manual:cmake-policies(7)" title="cmake-policies(7)"><code class="xref cmake cmake-manual docutils literal notranslate"><span class="pre">cmake-policies(7)</span></code></a>
|
| 66 |
+
manual for defined policies.</p>
|
| 67 |
+
<p>As CMake evolves it is sometimes necessary to change existing behavior
|
| 68 |
+
in order to fix bugs or improve implementations of existing features.
|
| 69 |
+
The CMake Policy mechanism is designed to help keep existing projects
|
| 70 |
+
building as new versions of CMake introduce changes in behavior. Each
|
| 71 |
+
new policy (behavioral change) is given an identifier of the form
|
| 72 |
+
<code class="docutils literal notranslate"><span class="pre">CMP<NNNN></span></code> where <code class="docutils literal notranslate"><span class="pre"><NNNN></span></code> is an integer index. Documentation
|
| 73 |
+
associated with each policy describes the <code class="docutils literal notranslate"><span class="pre">OLD</span></code> and <code class="docutils literal notranslate"><span class="pre">NEW</span></code> behavior
|
| 74 |
+
and the reason the policy was introduced. Projects may set each policy
|
| 75 |
+
to select the desired behavior. When CMake needs to know which behavior
|
| 76 |
+
to use it checks for a setting specified by the project. If no
|
| 77 |
+
setting is available the <code class="docutils literal notranslate"><span class="pre">OLD</span></code> behavior is assumed and a warning is
|
| 78 |
+
produced requesting that the policy be set.</p>
|
| 79 |
+
<section id="setting-policies-by-cmake-version">
|
| 80 |
+
<h2>Setting Policies by CMake Version<a class="headerlink" href="#setting-policies-by-cmake-version" title="Permalink to this heading">¶</a></h2>
|
| 81 |
+
<p>The <code class="docutils literal notranslate"><span class="pre">cmake_policy</span></code> command is used to set policies to <code class="docutils literal notranslate"><span class="pre">OLD</span></code> or <code class="docutils literal notranslate"><span class="pre">NEW</span></code>
|
| 82 |
+
behavior. While setting policies individually is supported, we
|
| 83 |
+
encourage projects to set policies based on CMake versions:</p>
|
| 84 |
+
<div class="highlight-cmake notranslate"><div class="highlight"><pre><span></span><span class="nf">cmake_policy(</span><span class="no">VERSION</span><span class="w"> </span><span class="nv"><min></span><span class="p">[...</span><span class="nv"><max></span><span class="p">]</span><span class="nf">)</span>
|
| 85 |
+
</pre></div>
|
| 86 |
+
</div>
|
| 87 |
+
<div class="versionadded">
|
| 88 |
+
<p><span class="versionmodified added">New in version 3.12: </span>The optional <code class="docutils literal notranslate"><span class="pre"><max></span></code> version.</p>
|
| 89 |
+
</div>
|
| 90 |
+
<p><code class="docutils literal notranslate"><span class="pre"><min></span></code> and the optional <code class="docutils literal notranslate"><span class="pre"><max></span></code> are each CMake versions of the form
|
| 91 |
+
<code class="docutils literal notranslate"><span class="pre">major.minor[.patch[.tweak]]</span></code>, and the <code class="docutils literal notranslate"><span class="pre">...</span></code> is literal. The <code class="docutils literal notranslate"><span class="pre"><min></span></code>
|
| 92 |
+
version must be at least <code class="docutils literal notranslate"><span class="pre">2.4</span></code> and at most the running version of CMake.
|
| 93 |
+
The <code class="docutils literal notranslate"><span class="pre"><max></span></code> version, if specified, must be at least the <code class="docutils literal notranslate"><span class="pre"><min></span></code> version
|
| 94 |
+
but may exceed the running version of CMake. If the running version of
|
| 95 |
+
CMake is older than 3.12, the extra <code class="docutils literal notranslate"><span class="pre">...</span></code> dots will be seen as version
|
| 96 |
+
component separators, resulting in the <code class="docutils literal notranslate"><span class="pre">...<max></span></code> part being ignored and
|
| 97 |
+
preserving the pre-3.12 behavior of basing policies on <code class="docutils literal notranslate"><span class="pre"><min></span></code>.</p>
|
| 98 |
+
<p>This specifies that the current CMake code is written for the given
|
| 99 |
+
range of CMake versions. All policies known to the running version of CMake
|
| 100 |
+
and introduced in the <code class="docutils literal notranslate"><span class="pre"><min></span></code> (or <code class="docutils literal notranslate"><span class="pre"><max></span></code>, if specified) version
|
| 101 |
+
or earlier will be set to use <code class="docutils literal notranslate"><span class="pre">NEW</span></code> behavior. All policies
|
| 102 |
+
introduced in later versions will be unset (unless the
|
| 103 |
+
<span class="target" id="index-0-variable:CMAKE_POLICY_DEFAULT_CMP<NNNN>"></span><a class="reference internal" href="../variable/CMAKE_POLICY_DEFAULT_CMPNNNN.html#variable:CMAKE_POLICY_DEFAULT_CMP<NNNN>" title="CMAKE_POLICY_DEFAULT_CMP<NNNN>"><code class="xref cmake cmake-variable docutils literal notranslate"><span class="pre">CMAKE_POLICY_DEFAULT_CMP<NNNN></span></code></a> variable sets a default).
|
| 104 |
+
This effectively requests behavior preferred as of a given CMake
|
| 105 |
+
version and tells newer CMake versions to warn about their new policies.</p>
|
| 106 |
+
<p>Note that the <span class="target" id="index-0-command:cmake_minimum_required"></span><a class="reference internal" href="cmake_minimum_required.html#command:cmake_minimum_required" title="cmake_minimum_required(version)"><code class="xref cmake cmake-command docutils literal notranslate"><span class="pre">cmake_minimum_required(VERSION)</span></code></a>
|
| 107 |
+
command implicitly calls <code class="docutils literal notranslate"><span class="pre">cmake_policy(VERSION)</span></code> too.</p>
|
| 108 |
+
<div class="versionchanged">
|
| 109 |
+
<p><span class="versionmodified changed">Changed in version 3.27: </span>Compatibility with versions of CMake older than 3.5 is deprecated.
|
| 110 |
+
Calls to <span class="target" id="index-1-command:cmake_minimum_required"></span><a class="reference internal" href="cmake_minimum_required.html#command:cmake_minimum_required" title="cmake_minimum_required(version)"><code class="xref cmake cmake-command docutils literal notranslate"><span class="pre">cmake_minimum_required(VERSION)</span></code></a> or
|
| 111 |
+
<span class="target" id="index-0-command:cmake_policy"></span><a class="reference internal" href="#command:cmake_policy" title="cmake_policy(version)"><code class="xref cmake cmake-command docutils literal notranslate"><span class="pre">cmake_policy(VERSION)</span></code></a> that do not specify at least
|
| 112 |
+
3.5 as their policy version (optionally via <code class="docutils literal notranslate"><span class="pre">...<max></span></code>)
|
| 113 |
+
will produce a deprecation warning in CMake 3.27 and above.</p>
|
| 114 |
+
</div>
|
| 115 |
+
<div class="versionchanged">
|
| 116 |
+
<p><span class="versionmodified changed">Changed in version 3.19: </span>Compatibility with versions of CMake older than 2.8.12 is deprecated.
|
| 117 |
+
Calls to <span class="target" id="index-2-command:cmake_minimum_required"></span><a class="reference internal" href="cmake_minimum_required.html#command:cmake_minimum_required" title="cmake_minimum_required(version)"><code class="xref cmake cmake-command docutils literal notranslate"><span class="pre">cmake_minimum_required(VERSION)</span></code></a> or
|
| 118 |
+
<span class="target" id="index-1-command:cmake_policy"></span><a class="reference internal" href="#command:cmake_policy" title="cmake_policy(version)"><code class="xref cmake cmake-command docutils literal notranslate"><span class="pre">cmake_policy(VERSION)</span></code></a> that do not specify at least
|
| 119 |
+
2.8.12 as their policy version (optionally via <code class="docutils literal notranslate"><span class="pre">...<max></span></code>)
|
| 120 |
+
will produce a deprecation warning in CMake 3.19 and above.</p>
|
| 121 |
+
</div>
|
| 122 |
+
</section>
|
| 123 |
+
<section id="setting-policies-explicitly">
|
| 124 |
+
<h2>Setting Policies Explicitly<a class="headerlink" href="#setting-policies-explicitly" title="Permalink to this heading">¶</a></h2>
|
| 125 |
+
<div class="highlight-cmake notranslate"><div class="highlight"><pre><span></span><span class="nf">cmake_policy(</span><span class="no">SET</span><span class="w"> </span><span class="no">CMP</span><span class="nv"><NNNN></span><span class="w"> </span><span class="no">NEW</span><span class="nf">)</span>
|
| 126 |
+
<span class="nf">cmake_policy(</span><span class="no">SET</span><span class="w"> </span><span class="no">CMP</span><span class="nv"><NNNN></span><span class="w"> </span><span class="no">OLD</span><span class="nf">)</span>
|
| 127 |
+
</pre></div>
|
| 128 |
+
</div>
|
| 129 |
+
<p>Tell CMake to use the <code class="docutils literal notranslate"><span class="pre">OLD</span></code> or <code class="docutils literal notranslate"><span class="pre">NEW</span></code> behavior for a given policy.
|
| 130 |
+
Projects depending on the old behavior of a given policy may silence a
|
| 131 |
+
policy warning by setting the policy state to <code class="docutils literal notranslate"><span class="pre">OLD</span></code>. Alternatively
|
| 132 |
+
one may fix the project to work with the new behavior and set the
|
| 133 |
+
policy state to <code class="docutils literal notranslate"><span class="pre">NEW</span></code>.</p>
|
| 134 |
+
<div class="admonition note">
|
| 135 |
+
<p class="admonition-title">Note</p>
|
| 136 |
+
<p>The <code class="docutils literal notranslate"><span class="pre">OLD</span></code> behavior of a policy is
|
| 137 |
+
<span class="target" id="index-1-manual:cmake-policies(7)"></span><a class="reference internal" href="../manual/cmake-policies.7.html#manual:cmake-policies(7)" title="cmake-policies(7)"><code class="xref cmake cmake-manual docutils literal notranslate"><span class="pre">deprecated</span> <span class="pre">by</span> <span class="pre">definition</span></code></a>
|
| 138 |
+
and may be removed in a future version of CMake.</p>
|
| 139 |
+
</div>
|
| 140 |
+
</section>
|
| 141 |
+
<section id="checking-policy-settings">
|
| 142 |
+
<h2>Checking Policy Settings<a class="headerlink" href="#checking-policy-settings" title="Permalink to this heading">¶</a></h2>
|
| 143 |
+
<div class="highlight-cmake notranslate"><div class="highlight"><pre><span></span><span class="nf">cmake_policy(</span><span class="no">GET</span><span class="w"> </span><span class="no">CMP</span><span class="nv"><NNNN></span><span class="w"> </span><span class="nv"><variable></span><span class="nf">)</span>
|
| 144 |
+
</pre></div>
|
| 145 |
+
</div>
|
| 146 |
+
<p>Check whether a given policy is set to <code class="docutils literal notranslate"><span class="pre">OLD</span></code> or <code class="docutils literal notranslate"><span class="pre">NEW</span></code> behavior.
|
| 147 |
+
The output <code class="docutils literal notranslate"><span class="pre"><variable></span></code> value will be <code class="docutils literal notranslate"><span class="pre">OLD</span></code> or <code class="docutils literal notranslate"><span class="pre">NEW</span></code> if the
|
| 148 |
+
policy is set, and empty otherwise.</p>
|
| 149 |
+
</section>
|
| 150 |
+
<section id="cmake-policy-stack">
|
| 151 |
+
<h2>CMake Policy Stack<a class="headerlink" href="#cmake-policy-stack" title="Permalink to this heading">¶</a></h2>
|
| 152 |
+
<p>CMake keeps policy settings on a stack, so changes made by the
|
| 153 |
+
<code class="docutils literal notranslate"><span class="pre">cmake_policy</span></code> command affect only the top of the stack. A new entry on
|
| 154 |
+
the policy stack is managed automatically for each subdirectory to
|
| 155 |
+
protect its parents and siblings. CMake also manages a new entry for
|
| 156 |
+
scripts loaded by <span class="target" id="index-0-command:include"></span><a class="reference internal" href="include.html#command:include" title="include"><code class="xref cmake cmake-command docutils literal notranslate"><span class="pre">include()</span></code></a> and <span class="target" id="index-0-command:find_package"></span><a class="reference internal" href="find_package.html#command:find_package" title="find_package"><code class="xref cmake cmake-command docutils literal notranslate"><span class="pre">find_package()</span></code></a> commands
|
| 157 |
+
except when invoked with the <code class="docutils literal notranslate"><span class="pre">NO_POLICY_SCOPE</span></code> option
|
| 158 |
+
(see also policy <span class="target" id="index-0-policy:CMP0011"></span><a class="reference internal" href="../policy/CMP0011.html#policy:CMP0011" title="CMP0011"><code class="xref cmake cmake-policy docutils literal notranslate"><span class="pre">CMP0011</span></code></a>).
|
| 159 |
+
The <code class="docutils literal notranslate"><span class="pre">cmake_policy</span></code> command provides an interface to manage custom
|
| 160 |
+
entries on the policy stack:</p>
|
| 161 |
+
<div class="highlight-cmake notranslate"><div class="highlight"><pre><span></span><span class="nf">cmake_policy(</span><span class="no">PUSH</span><span class="nf">)</span>
|
| 162 |
+
<span class="nf">cmake_policy(</span><span class="no">POP</span><span class="nf">)</span>
|
| 163 |
+
</pre></div>
|
| 164 |
+
</div>
|
| 165 |
+
<p>Each <code class="docutils literal notranslate"><span class="pre">PUSH</span></code> must have a matching <code class="docutils literal notranslate"><span class="pre">POP</span></code> to erase any changes.
|
| 166 |
+
This is useful to make temporary changes to policy settings.
|
| 167 |
+
Calls to the <span class="target" id="index-3-command:cmake_minimum_required"></span><a class="reference internal" href="cmake_minimum_required.html#command:cmake_minimum_required" title="cmake_minimum_required(version)"><code class="xref cmake cmake-command docutils literal notranslate"><span class="pre">cmake_minimum_required(VERSION)</span></code></a>,
|
| 168 |
+
<code class="docutils literal notranslate"><span class="pre">cmake_policy(VERSION)</span></code>, or <code class="docutils literal notranslate"><span class="pre">cmake_policy(SET)</span></code> commands
|
| 169 |
+
influence only the current top of the policy stack.</p>
|
| 170 |
+
<div class="versionadded">
|
| 171 |
+
<p><span class="versionmodified added">New in version 3.25: </span>The <span class="target" id="index-0-command:block"></span><a class="reference internal" href="block.html#command:block" title="block"><code class="xref cmake cmake-command docutils literal notranslate"><span class="pre">block()</span></code></a> and <span class="target" id="index-0-command:endblock"></span><a class="reference internal" href="endblock.html#command:endblock" title="endblock"><code class="xref cmake cmake-command docutils literal notranslate"><span class="pre">endblock()</span></code></a> commands offer a more flexible
|
| 172 |
+
and more secure way to manage the policy stack. The pop action is done
|
| 173 |
+
automatically when the <span class="target" id="index-1-command:endblock"></span><a class="reference internal" href="endblock.html#command:endblock" title="endblock"><code class="xref cmake cmake-command docutils literal notranslate"><span class="pre">endblock()</span></code></a> command is executed, so it avoid
|
| 174 |
+
to call the <span class="target" id="index-2-command:cmake_policy"></span><a class="reference internal" href="#command:cmake_policy" title="cmake_policy(pop)"><code class="xref cmake cmake-command docutils literal notranslate"><span class="pre">cmake_policy(POP)</span></code></a> command before each
|
| 175 |
+
<span class="target" id="index-0-command:return"></span><a class="reference internal" href="return.html#command:return" title="return"><code class="xref cmake cmake-command docutils literal notranslate"><span class="pre">return()</span></code></a> command.</p>
|
| 176 |
+
<div class="highlight-cmake notranslate"><div class="highlight"><pre><span></span><span class="c"># stack management with cmake_policy()</span>
|
| 177 |
+
<span class="nf">function(</span><span class="nb">my_func</span><span class="nf">)</span>
|
| 178 |
+
<span class="w"> </span><span class="nf">cmake_policy(</span><span class="no">PUSH</span><span class="nf">)</span>
|
| 179 |
+
<span class="w"> </span><span class="nf">cmake_policy(</span><span class="no">SET</span><span class="w"> </span><span class="p">...</span><span class="nf">)</span>
|
| 180 |
+
<span class="w"> </span><span class="nf">if</span> <span class="nf">(</span><span class="nv"><cond1></span><span class="nf">)</span>
|
| 181 |
+
<span class="w"> </span><span class="p">...</span>
|
| 182 |
+
<span class="w"> </span><span class="nf">cmake_policy(</span><span class="no">POP</span><span class="nf">)</span>
|
| 183 |
+
<span class="w"> </span><span class="nf">return()</span>
|
| 184 |
+
<span class="w"> </span><span class="nf">elseif(</span><span class="nv"><cond2></span><span class="nf">)</span>
|
| 185 |
+
<span class="w"> </span><span class="p">...</span>
|
| 186 |
+
<span class="w"> </span><span class="nf">cmake_policy(</span><span class="no">POP</span><span class="nf">)</span>
|
| 187 |
+
<span class="w"> </span><span class="nf">return()</span>
|
| 188 |
+
<span class="w"> </span><span class="nf">endif()</span>
|
| 189 |
+
<span class="w"> </span><span class="p">...</span>
|
| 190 |
+
<span class="w"> </span><span class="nf">cmake_policy(</span><span class="no">POP</span><span class="nf">)</span>
|
| 191 |
+
<span class="nf">endfunction()</span>
|
| 192 |
+
|
| 193 |
+
<span class="c"># stack management with block()/endblock()</span>
|
| 194 |
+
<span class="nf">function(</span><span class="nb">my_func</span><span class="nf">)</span>
|
| 195 |
+
<span class="w"> </span><span class="nf">block(</span><span class="no">SCOPE_FOR</span><span class="w"> </span><span class="no">POLICIES</span><span class="nf">)</span>
|
| 196 |
+
<span class="w"> </span><span class="nf">cmake_policy(</span><span class="no">SET</span><span class="w"> </span><span class="p">...</span><span class="nf">)</span>
|
| 197 |
+
<span class="w"> </span><span class="nf">if</span> <span class="nf">(</span><span class="nv"><cond1></span><span class="nf">)</span>
|
| 198 |
+
<span class="w"> </span><span class="p">...</span>
|
| 199 |
+
<span class="w"> </span><span class="nf">return()</span>
|
| 200 |
+
<span class="w"> </span><span class="nf">elseif(</span><span class="nv"><cond2></span><span class="nf">)</span>
|
| 201 |
+
<span class="w"> </span><span class="p">...</span>
|
| 202 |
+
<span class="w"> </span><span class="nf">return()</span>
|
| 203 |
+
<span class="w"> </span><span class="nf">endif()</span>
|
| 204 |
+
<span class="w"> </span><span class="p">...</span>
|
| 205 |
+
<span class="w"> </span><span class="nf">endblock()</span>
|
| 206 |
+
<span class="nf">endfunction()</span>
|
| 207 |
+
</pre></div>
|
| 208 |
+
</div>
|
| 209 |
+
</div>
|
| 210 |
+
<p>Commands created by the <span class="target" id="index-0-command:function"></span><a class="reference internal" href="function.html#command:function" title="function"><code class="xref cmake cmake-command docutils literal notranslate"><span class="pre">function()</span></code></a> and <span class="target" id="index-0-command:macro"></span><a class="reference internal" href="macro.html#command:macro" title="macro"><code class="xref cmake cmake-command docutils literal notranslate"><span class="pre">macro()</span></code></a>
|
| 211 |
+
commands record policy settings when they are created and
|
| 212 |
+
use the pre-record policies when they are invoked. If the function or
|
| 213 |
+
macro implementation sets policies, the changes automatically
|
| 214 |
+
propagate up through callers until they reach the closest nested
|
| 215 |
+
policy stack entry.</p>
|
| 216 |
+
</section>
|
| 217 |
+
<section id="see-also">
|
| 218 |
+
<h2>See Also<a class="headerlink" href="#see-also" title="Permalink to this heading">¶</a></h2>
|
| 219 |
+
<ul class="simple">
|
| 220 |
+
<li><p><span class="target" id="index-4-command:cmake_minimum_required"></span><a class="reference internal" href="cmake_minimum_required.html#command:cmake_minimum_required" title="cmake_minimum_required"><code class="xref cmake cmake-command docutils literal notranslate"><span class="pre">cmake_minimum_required()</span></code></a></p></li>
|
| 221 |
+
</ul>
|
| 222 |
+
</section>
|
| 223 |
+
</section>
|
| 224 |
+
|
| 225 |
+
|
| 226 |
+
<div class="clearer"></div>
|
| 227 |
+
</div>
|
| 228 |
+
</div>
|
| 229 |
+
</div>
|
| 230 |
+
<div class="sphinxsidebar" role="navigation" aria-label="main navigation">
|
| 231 |
+
<div class="sphinxsidebarwrapper">
|
| 232 |
+
<div>
|
| 233 |
+
<h3><a href="../index.html">Table of Contents</a></h3>
|
| 234 |
+
<ul>
|
| 235 |
+
<li><a class="reference internal" href="#">cmake_policy</a><ul>
|
| 236 |
+
<li><a class="reference internal" href="#setting-policies-by-cmake-version">Setting Policies by CMake Version</a></li>
|
| 237 |
+
<li><a class="reference internal" href="#setting-policies-explicitly">Setting Policies Explicitly</a></li>
|
| 238 |
+
<li><a class="reference internal" href="#checking-policy-settings">Checking Policy Settings</a></li>
|
| 239 |
+
<li><a class="reference internal" href="#cmake-policy-stack">CMake Policy Stack</a></li>
|
| 240 |
+
<li><a class="reference internal" href="#see-also">See Also</a></li>
|
| 241 |
+
</ul>
|
| 242 |
+
</li>
|
| 243 |
+
</ul>
|
| 244 |
+
|
| 245 |
+
</div>
|
| 246 |
+
<div>
|
| 247 |
+
<h4>Previous topic</h4>
|
| 248 |
+
<p class="topless"><a href="cmake_path.html"
|
| 249 |
+
title="previous chapter">cmake_path</a></p>
|
| 250 |
+
</div>
|
| 251 |
+
<div>
|
| 252 |
+
<h4>Next topic</h4>
|
| 253 |
+
<p class="topless"><a href="configure_file.html"
|
| 254 |
+
title="next chapter">configure_file</a></p>
|
| 255 |
+
</div>
|
| 256 |
+
<div role="note" aria-label="source link">
|
| 257 |
+
<h3>This Page</h3>
|
| 258 |
+
<ul class="this-page-menu">
|
| 259 |
+
<li><a href="../_sources/command/cmake_policy.rst.txt"
|
| 260 |
+
rel="nofollow">Show Source</a></li>
|
| 261 |
+
</ul>
|
| 262 |
+
</div>
|
| 263 |
+
<div id="searchbox" style="display: none" role="search">
|
| 264 |
+
<h3 id="searchlabel">Quick search</h3>
|
| 265 |
+
<div class="searchformwrapper">
|
| 266 |
+
<form class="search" action="../search.html" method="get">
|
| 267 |
+
<input type="text" name="q" aria-labelledby="searchlabel" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/>
|
| 268 |
+
<input type="submit" value="Go" />
|
| 269 |
+
</form>
|
| 270 |
+
</div>
|
| 271 |
+
</div>
|
| 272 |
+
<script>document.getElementById('searchbox').style.display = "block"</script>
|
| 273 |
+
</div>
|
| 274 |
+
</div>
|
| 275 |
+
<div class="clearer"></div>
|
| 276 |
+
</div>
|
| 277 |
+
<div class="related" role="navigation" aria-label="related navigation">
|
| 278 |
+
<h3>Navigation</h3>
|
| 279 |
+
<ul>
|
| 280 |
+
<li class="right" style="margin-right: 10px">
|
| 281 |
+
<a href="../genindex.html" title="General Index"
|
| 282 |
+
>index</a></li>
|
| 283 |
+
<li class="right" >
|
| 284 |
+
<a href="configure_file.html" title="configure_file"
|
| 285 |
+
>next</a> |</li>
|
| 286 |
+
<li class="right" >
|
| 287 |
+
<a href="cmake_path.html" title="cmake_path"
|
| 288 |
+
>previous</a> |</li>
|
| 289 |
+
<li>
|
| 290 |
+
<img src="../_static/cmake-logo-16.png" alt=""
|
| 291 |
+
style="vertical-align: middle; margin-top: -2px" />
|
| 292 |
+
</li>
|
| 293 |
+
<li>
|
| 294 |
+
<a href="https://cmake.org/">CMake</a> »
|
| 295 |
+
</li>
|
| 296 |
+
<li>
|
| 297 |
+
<a href="../index.html">3.27.9 Documentation</a> »
|
| 298 |
+
</li>
|
| 299 |
+
|
| 300 |
+
<li class="nav-item nav-item-1"><a href="../manual/cmake-commands.7.html" >cmake-commands(7)</a> »</li>
|
| 301 |
+
<li class="nav-item nav-item-this"><a href="">cmake_policy</a></li>
|
| 302 |
+
</ul>
|
| 303 |
+
</div>
|
| 304 |
+
|
| 305 |
+
<div class="footer" role="contentinfo">
|
| 306 |
+
© Copyright 2000-2023 Kitware, Inc. and Contributors.
|
| 307 |
+
Created using <a href="https://www.sphinx-doc.org/">Sphinx</a> 5.3.0.
|
| 308 |
+
</div>
|
| 309 |
+
</body>
|
| 310 |
+
</html>
|
toolchain/cmake-3.27.9-linux-x86_64/doc/cmake/html/command/configure_file.html
ADDED
|
@@ -0,0 +1,301 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
|
| 2 |
+
<!DOCTYPE html>
|
| 3 |
+
|
| 4 |
+
<html lang="en">
|
| 5 |
+
<head>
|
| 6 |
+
<meta charset="utf-8" />
|
| 7 |
+
<meta name="viewport" content="width=device-width, initial-scale=1.0" /><meta name="generator" content="Docutils 0.19: https://docutils.sourceforge.io/" />
|
| 8 |
+
|
| 9 |
+
<title>configure_file — CMake 3.27.9 Documentation</title>
|
| 10 |
+
|
| 11 |
+
<link rel="stylesheet" type="text/css" href="../_static/pygments.css" />
|
| 12 |
+
<link rel="stylesheet" type="text/css" href="../_static/cmake.css" />
|
| 13 |
+
|
| 14 |
+
<script data-url_root="../" id="documentation_options" src="../_static/documentation_options.js"></script>
|
| 15 |
+
<script src="../_static/jquery.js"></script>
|
| 16 |
+
<script src="../_static/underscore.js"></script>
|
| 17 |
+
<script src="../_static/_sphinx_javascript_frameworks_compat.js"></script>
|
| 18 |
+
<script src="../_static/doctools.js"></script>
|
| 19 |
+
<script src="../_static/sphinx_highlight.js"></script>
|
| 20 |
+
|
| 21 |
+
<link rel="shortcut icon" href="../_static/cmake-favicon.ico"/>
|
| 22 |
+
<link rel="index" title="Index" href="../genindex.html" />
|
| 23 |
+
<link rel="search" title="Search" href="../search.html" />
|
| 24 |
+
<link rel="next" title="continue" href="continue.html" />
|
| 25 |
+
<link rel="prev" title="cmake_policy" href="cmake_policy.html" />
|
| 26 |
+
|
| 27 |
+
|
| 28 |
+
</head><body>
|
| 29 |
+
|
| 30 |
+
<div class="related" role="navigation" aria-label="related navigation">
|
| 31 |
+
<h3>Navigation</h3>
|
| 32 |
+
<ul>
|
| 33 |
+
<li class="right" style="margin-right: 10px">
|
| 34 |
+
<a href="../genindex.html" title="General Index"
|
| 35 |
+
accesskey="I">index</a></li>
|
| 36 |
+
<li class="right" >
|
| 37 |
+
<a href="continue.html" title="continue"
|
| 38 |
+
accesskey="N">next</a> |</li>
|
| 39 |
+
<li class="right" >
|
| 40 |
+
<a href="cmake_policy.html" title="cmake_policy"
|
| 41 |
+
accesskey="P">previous</a> |</li>
|
| 42 |
+
<li>
|
| 43 |
+
<img src="../_static/cmake-logo-16.png" alt=""
|
| 44 |
+
style="vertical-align: middle; margin-top: -2px" />
|
| 45 |
+
</li>
|
| 46 |
+
<li>
|
| 47 |
+
<a href="https://cmake.org/">CMake</a> »
|
| 48 |
+
</li>
|
| 49 |
+
<li>
|
| 50 |
+
<a href="../index.html">3.27.9 Documentation</a> »
|
| 51 |
+
</li>
|
| 52 |
+
|
| 53 |
+
<li class="nav-item nav-item-1"><a href="../manual/cmake-commands.7.html" accesskey="U">cmake-commands(7)</a> »</li>
|
| 54 |
+
<li class="nav-item nav-item-this"><a href="">configure_file</a></li>
|
| 55 |
+
</ul>
|
| 56 |
+
</div>
|
| 57 |
+
|
| 58 |
+
<div class="document">
|
| 59 |
+
<div class="documentwrapper">
|
| 60 |
+
<div class="bodywrapper">
|
| 61 |
+
<div class="body" role="main">
|
| 62 |
+
|
| 63 |
+
<section id="configure-file">
|
| 64 |
+
<span id="command:configure_file"></span><h1>configure_file<a class="headerlink" href="#configure-file" title="Permalink to this heading">¶</a></h1>
|
| 65 |
+
<p>Copy a file to another location and modify its contents.</p>
|
| 66 |
+
<div class="highlight-cmake notranslate"><div class="highlight"><pre><span></span><span class="nf">configure_file(</span><span class="nv"><input></span><span class="w"> </span><span class="nv"><output></span>
|
| 67 |
+
<span class="w"> </span><span class="p">[</span><span class="no">NO_SOURCE_PERMISSIONS</span><span class="w"> </span><span class="p">|</span><span class="w"> </span><span class="no">USE_SOURCE_PERMISSIONS</span><span class="w"> </span><span class="p">|</span>
|
| 68 |
+
<span class="w"> </span><span class="no">FILE_PERMISSIONS</span><span class="w"> </span><span class="nv"><permissions>...</span><span class="p">]</span>
|
| 69 |
+
<span class="w"> </span><span class="p">[</span><span class="no">COPYONLY</span><span class="p">]</span><span class="w"> </span><span class="p">[</span><span class="no">ESCAPE_QUOTES</span><span class="p">]</span><span class="w"> </span><span class="p">[</span><span class="no">@ONLY</span><span class="p">]</span>
|
| 70 |
+
<span class="w"> </span><span class="p">[</span><span class="no">NEWLINE_STYLE</span><span class="w"> </span><span class="p">[</span><span class="no">UNIX</span><span class="p">|</span><span class="no">DOS</span><span class="p">|</span><span class="no">WIN32</span><span class="p">|</span><span class="no">LF</span><span class="p">|</span><span class="no">CRLF</span><span class="p">]</span><span class="w"> </span><span class="p">]</span><span class="nf">)</span>
|
| 71 |
+
</pre></div>
|
| 72 |
+
</div>
|
| 73 |
+
<p>Copies an <code class="docutils literal notranslate"><span class="pre"><input></span></code> file to an <code class="docutils literal notranslate"><span class="pre"><output></span></code> file and substitutes
|
| 74 |
+
variable values referenced as <code class="docutils literal notranslate"><span class="pre">@VAR@</span></code>, <code class="docutils literal notranslate"><span class="pre">${VAR}</span></code>, <code class="docutils literal notranslate"><span class="pre">$CACHE{VAR}</span></code> or
|
| 75 |
+
<code class="docutils literal notranslate"><span class="pre">$ENV{VAR}</span></code> in the input file content. Each variable reference will be
|
| 76 |
+
replaced with the current value of the variable, or the empty string if
|
| 77 |
+
the variable is not defined. Furthermore, input lines of the form</p>
|
| 78 |
+
<div class="highlight-c notranslate"><div class="highlight"><pre><span></span><span class="cp">#cmakedefine VAR ...</span>
|
| 79 |
+
</pre></div>
|
| 80 |
+
</div>
|
| 81 |
+
<p>will be replaced with either</p>
|
| 82 |
+
<div class="highlight-c notranslate"><div class="highlight"><pre><span></span><span class="cp">#define VAR ...</span>
|
| 83 |
+
</pre></div>
|
| 84 |
+
</div>
|
| 85 |
+
<p>or</p>
|
| 86 |
+
<div class="highlight-c notranslate"><div class="highlight"><pre><span></span><span class="cm">/* #undef VAR */</span>
|
| 87 |
+
</pre></div>
|
| 88 |
+
</div>
|
| 89 |
+
<p>depending on whether <code class="docutils literal notranslate"><span class="pre">VAR</span></code> is set in CMake to any value not considered
|
| 90 |
+
a false constant by the <span class="target" id="index-0-command:if"></span><a class="reference internal" href="if.html#command:if" title="if"><code class="xref cmake cmake-command docutils literal notranslate"><span class="pre">if()</span></code></a> command. The "..." content on the
|
| 91 |
+
line after the variable name, if any, is processed as above.</p>
|
| 92 |
+
<p>Unlike lines of the form <code class="docutils literal notranslate"><span class="pre">#cmakedefine</span> <span class="pre">VAR</span> <span class="pre">...</span></code>, in lines of the form
|
| 93 |
+
<code class="docutils literal notranslate"><span class="pre">#cmakedefine01</span> <span class="pre">VAR</span></code>, <code class="docutils literal notranslate"><span class="pre">VAR</span></code> itself will expand to <code class="docutils literal notranslate"><span class="pre">VAR</span> <span class="pre">0</span></code> or <code class="docutils literal notranslate"><span class="pre">VAR</span> <span class="pre">1</span></code>
|
| 94 |
+
rather than being assigned the value <code class="docutils literal notranslate"><span class="pre">...</span></code>. Therefore, input lines of the form</p>
|
| 95 |
+
<div class="highlight-c notranslate"><div class="highlight"><pre><span></span><span class="cp">#cmakedefine01 VAR</span>
|
| 96 |
+
</pre></div>
|
| 97 |
+
</div>
|
| 98 |
+
<p>will be replaced with either</p>
|
| 99 |
+
<div class="highlight-c notranslate"><div class="highlight"><pre><span></span><span class="cp">#define VAR 0</span>
|
| 100 |
+
</pre></div>
|
| 101 |
+
</div>
|
| 102 |
+
<p>or</p>
|
| 103 |
+
<div class="highlight-c notranslate"><div class="highlight"><pre><span></span><span class="cp">#define VAR 1</span>
|
| 104 |
+
</pre></div>
|
| 105 |
+
</div>
|
| 106 |
+
<p>Input lines of the form <code class="docutils literal notranslate"><span class="pre">#cmakedefine01</span> <span class="pre">VAR</span> <span class="pre">...</span></code> will expand
|
| 107 |
+
as <code class="docutils literal notranslate"><span class="pre">#cmakedefine01</span> <span class="pre">VAR</span> <span class="pre">...</span> <span class="pre">0</span></code> or <code class="docutils literal notranslate"><span class="pre">#cmakedefine01</span> <span class="pre">VAR</span> <span class="pre">...</span> <span class="pre">1</span></code>,
|
| 108 |
+
which may lead to undefined behavior.</p>
|
| 109 |
+
<div class="versionadded">
|
| 110 |
+
<p><span class="versionmodified added">New in version 3.10: </span>The result lines (with the exception of the <code class="docutils literal notranslate"><span class="pre">#undef</span></code> comments) can be
|
| 111 |
+
indented using spaces and/or tabs between the <code class="docutils literal notranslate"><span class="pre">#</span></code> character
|
| 112 |
+
and the <code class="docutils literal notranslate"><span class="pre">cmakedefine</span></code> or <code class="docutils literal notranslate"><span class="pre">cmakedefine01</span></code> words. This whitespace
|
| 113 |
+
indentation will be preserved in the output lines:</p>
|
| 114 |
+
<div class="highlight-c notranslate"><div class="highlight"><pre><span></span><span class="cp"># cmakedefine VAR</span>
|
| 115 |
+
<span class="cp"># cmakedefine01 VAR</span>
|
| 116 |
+
</pre></div>
|
| 117 |
+
</div>
|
| 118 |
+
<p>will be replaced, if <code class="docutils literal notranslate"><span class="pre">VAR</span></code> is defined, with</p>
|
| 119 |
+
<div class="highlight-c notranslate"><div class="highlight"><pre><span></span><span class="cp"># define VAR</span>
|
| 120 |
+
<span class="cp"># define VAR 1</span>
|
| 121 |
+
</pre></div>
|
| 122 |
+
</div>
|
| 123 |
+
</div>
|
| 124 |
+
<p>If the input file is modified the build system will re-run CMake to
|
| 125 |
+
re-configure the file and generate the build system again.
|
| 126 |
+
The generated file is modified and its timestamp updated on subsequent
|
| 127 |
+
cmake runs only if its content is changed.</p>
|
| 128 |
+
<p>The arguments are:</p>
|
| 129 |
+
<dl>
|
| 130 |
+
<dt><code class="docutils literal notranslate"><span class="pre"><input></span></code></dt><dd><p>Path to the input file. A relative path is treated with respect to
|
| 131 |
+
the value of <span class="target" id="index-0-variable:CMAKE_CURRENT_SOURCE_DIR"></span><a class="reference internal" href="../variable/CMAKE_CURRENT_SOURCE_DIR.html#variable:CMAKE_CURRENT_SOURCE_DIR" title="CMAKE_CURRENT_SOURCE_DIR"><code class="xref cmake cmake-variable docutils literal notranslate"><span class="pre">CMAKE_CURRENT_SOURCE_DIR</span></code></a>. The input path
|
| 132 |
+
must be a file, not a directory.</p>
|
| 133 |
+
</dd>
|
| 134 |
+
<dt><code class="docutils literal notranslate"><span class="pre"><output></span></code></dt><dd><p>Path to the output file or directory. A relative path is treated
|
| 135 |
+
with respect to the value of <span class="target" id="index-0-variable:CMAKE_CURRENT_BINARY_DIR"></span><a class="reference internal" href="../variable/CMAKE_CURRENT_BINARY_DIR.html#variable:CMAKE_CURRENT_BINARY_DIR" title="CMAKE_CURRENT_BINARY_DIR"><code class="xref cmake cmake-variable docutils literal notranslate"><span class="pre">CMAKE_CURRENT_BINARY_DIR</span></code></a>.
|
| 136 |
+
If the path names an existing directory the output file is placed
|
| 137 |
+
in that directory with the same file name as the input file.
|
| 138 |
+
If the path contains non-existent directories, they are created.</p>
|
| 139 |
+
</dd>
|
| 140 |
+
<dt><code class="docutils literal notranslate"><span class="pre">NO_SOURCE_PERMISSIONS</span></code></dt><dd><div class="versionadded">
|
| 141 |
+
<p><span class="versionmodified added">New in version 3.19.</span></p>
|
| 142 |
+
</div>
|
| 143 |
+
<p>Do not transfer the permissions of the input file to the output file.
|
| 144 |
+
The copied file permissions default to the standard 644 value
|
| 145 |
+
(-rw-r--r--).</p>
|
| 146 |
+
</dd>
|
| 147 |
+
<dt><code class="docutils literal notranslate"><span class="pre">USE_SOURCE_PERMISSIONS</span></code></dt><dd><div class="versionadded">
|
| 148 |
+
<p><span class="versionmodified added">New in version 3.20.</span></p>
|
| 149 |
+
</div>
|
| 150 |
+
<p>Transfer the permissions of the input file to the output file.
|
| 151 |
+
This is already the default behavior if none of the three permissions-related
|
| 152 |
+
keywords are given (<code class="docutils literal notranslate"><span class="pre">NO_SOURCE_PERMISSIONS</span></code>, <code class="docutils literal notranslate"><span class="pre">USE_SOURCE_PERMISSIONS</span></code>
|
| 153 |
+
or <code class="docutils literal notranslate"><span class="pre">FILE_PERMISSIONS</span></code>). The <code class="docutils literal notranslate"><span class="pre">USE_SOURCE_PERMISSIONS</span></code> keyword mostly
|
| 154 |
+
serves as a way of making the intended behavior clearer at the call site.</p>
|
| 155 |
+
</dd>
|
| 156 |
+
<dt><code class="docutils literal notranslate"><span class="pre">FILE_PERMISSIONS</span> <span class="pre"><permissions>...</span></code></dt><dd><div class="versionadded">
|
| 157 |
+
<p><span class="versionmodified added">New in version 3.20.</span></p>
|
| 158 |
+
</div>
|
| 159 |
+
<p>Ignore the input file's permissions and use the specified <code class="docutils literal notranslate"><span class="pre"><permissions></span></code>
|
| 160 |
+
for the output file instead.</p>
|
| 161 |
+
</dd>
|
| 162 |
+
<dt><code class="docutils literal notranslate"><span class="pre">COPYONLY</span></code></dt><dd><p>Copy the file without replacing any variable references or other
|
| 163 |
+
content. This option may not be used with <code class="docutils literal notranslate"><span class="pre">NEWLINE_STYLE</span></code>.</p>
|
| 164 |
+
</dd>
|
| 165 |
+
<dt><code class="docutils literal notranslate"><span class="pre">ESCAPE_QUOTES</span></code></dt><dd><p>Escape any substituted quotes with backslashes (C-style).</p>
|
| 166 |
+
</dd>
|
| 167 |
+
<dt><code class="docutils literal notranslate"><span class="pre">@ONLY</span></code></dt><dd><p>Restrict variable replacement to references of the form <code class="docutils literal notranslate"><span class="pre">@VAR@</span></code>.
|
| 168 |
+
This is useful for configuring scripts that use <code class="docutils literal notranslate"><span class="pre">${VAR}</span></code> syntax.</p>
|
| 169 |
+
</dd>
|
| 170 |
+
<dt><code class="docutils literal notranslate"><span class="pre">NEWLINE_STYLE</span> <span class="pre"><style></span></code></dt><dd><p>Specify the newline style for the output file. Specify
|
| 171 |
+
<code class="docutils literal notranslate"><span class="pre">UNIX</span></code> or <code class="docutils literal notranslate"><span class="pre">LF</span></code> for <code class="docutils literal notranslate"><span class="pre">\n</span></code> newlines, or specify
|
| 172 |
+
<code class="docutils literal notranslate"><span class="pre">DOS</span></code>, <code class="docutils literal notranslate"><span class="pre">WIN32</span></code>, or <code class="docutils literal notranslate"><span class="pre">CRLF</span></code> for <code class="docutils literal notranslate"><span class="pre">\r\n</span></code> newlines.
|
| 173 |
+
This option may not be used with <code class="docutils literal notranslate"><span class="pre">COPYONLY</span></code>.</p>
|
| 174 |
+
</dd>
|
| 175 |
+
</dl>
|
| 176 |
+
<section id="example">
|
| 177 |
+
<h2>Example<a class="headerlink" href="#example" title="Permalink to this heading">¶</a></h2>
|
| 178 |
+
<p>Consider a source tree containing a <code class="docutils literal notranslate"><span class="pre">foo.h.in</span></code> file:</p>
|
| 179 |
+
<div class="highlight-c notranslate"><div class="highlight"><pre><span></span><span class="cp">#cmakedefine FOO_ENABLE</span>
|
| 180 |
+
<span class="cp">#cmakedefine FOO_STRING "@FOO_STRING@"</span>
|
| 181 |
+
</pre></div>
|
| 182 |
+
</div>
|
| 183 |
+
<p>An adjacent <code class="docutils literal notranslate"><span class="pre">CMakeLists.txt</span></code> may use <code class="docutils literal notranslate"><span class="pre">configure_file</span></code> to
|
| 184 |
+
configure the header:</p>
|
| 185 |
+
<div class="highlight-cmake notranslate"><div class="highlight"><pre><span></span><span class="nf">option(</span><span class="no">FOO_ENABLE</span><span class="w"> </span><span class="s">"Enable Foo"</span><span class="w"> </span><span class="no">ON</span><span class="nf">)</span>
|
| 186 |
+
<span class="nf">if(</span><span class="no">FOO_ENABLE</span><span class="nf">)</span>
|
| 187 |
+
<span class="w"> </span><span class="nf">set(</span><span class="no">FOO_STRING</span><span class="w"> </span><span class="s">"foo"</span><span class="nf">)</span>
|
| 188 |
+
<span class="nf">endif()</span>
|
| 189 |
+
<span class="nf">configure_file(</span><span class="nb">foo.h.in</span><span class="w"> </span><span class="nb">foo.h</span><span class="w"> </span><span class="no">@ONLY</span><span class="nf">)</span>
|
| 190 |
+
</pre></div>
|
| 191 |
+
</div>
|
| 192 |
+
<p>This creates a <code class="docutils literal notranslate"><span class="pre">foo.h</span></code> in the build directory corresponding to
|
| 193 |
+
this source directory. If the <code class="docutils literal notranslate"><span class="pre">FOO_ENABLE</span></code> option is on, the
|
| 194 |
+
configured file will contain:</p>
|
| 195 |
+
<div class="highlight-c notranslate"><div class="highlight"><pre><span></span><span class="cp">#define FOO_ENABLE</span>
|
| 196 |
+
<span class="cp">#define FOO_STRING "foo"</span>
|
| 197 |
+
</pre></div>
|
| 198 |
+
</div>
|
| 199 |
+
<p>Otherwise it will contain:</p>
|
| 200 |
+
<div class="highlight-c notranslate"><div class="highlight"><pre><span></span><span class="cm">/* #undef FOO_ENABLE */</span>
|
| 201 |
+
<span class="cm">/* #undef FOO_STRING */</span>
|
| 202 |
+
</pre></div>
|
| 203 |
+
</div>
|
| 204 |
+
<p>One may then use the <span class="target" id="index-0-command:target_include_directories"></span><a class="reference internal" href="target_include_directories.html#command:target_include_directories" title="target_include_directories"><code class="xref cmake cmake-command docutils literal notranslate"><span class="pre">target_include_directories()</span></code></a> command to
|
| 205 |
+
specify the output directory as an include directory:</p>
|
| 206 |
+
<div class="highlight-cmake notranslate"><div class="highlight"><pre><span></span><span class="nf">target_include_directories(</span><span class="nv"><target></span><span class="w"> </span><span class="p">[</span><span class="no">SYSTEM</span><span class="p">]</span><span class="w"> </span><span class="o"><</span><span class="no">INTERFACE</span><span class="p">|</span><span class="no">PUBLIC</span><span class="p">|</span><span class="no">PRIVATE</span><span class="o">></span><span class="w"> </span><span class="s">"${CMAKE_CURRENT_BINARY_DIR}"</span><span class="nf">)</span>
|
| 207 |
+
</pre></div>
|
| 208 |
+
</div>
|
| 209 |
+
<p>so that sources may include the header as <code class="docutils literal notranslate"><span class="pre">#include</span> <span class="pre"><foo.h></span></code>.</p>
|
| 210 |
+
</section>
|
| 211 |
+
<section id="see-also">
|
| 212 |
+
<h2>See Also<a class="headerlink" href="#see-also" title="Permalink to this heading">¶</a></h2>
|
| 213 |
+
<ul class="simple">
|
| 214 |
+
<li><p><span class="target" id="index-0-command:file"></span><a class="reference internal" href="file.html#generate" title="file(generate)"><code class="xref cmake cmake-command docutils literal notranslate"><span class="pre">file(GENERATE)</span></code></a></p></li>
|
| 215 |
+
</ul>
|
| 216 |
+
</section>
|
| 217 |
+
</section>
|
| 218 |
+
|
| 219 |
+
|
| 220 |
+
<div class="clearer"></div>
|
| 221 |
+
</div>
|
| 222 |
+
</div>
|
| 223 |
+
</div>
|
| 224 |
+
<div class="sphinxsidebar" role="navigation" aria-label="main navigation">
|
| 225 |
+
<div class="sphinxsidebarwrapper">
|
| 226 |
+
<div>
|
| 227 |
+
<h3><a href="../index.html">Table of Contents</a></h3>
|
| 228 |
+
<ul>
|
| 229 |
+
<li><a class="reference internal" href="#">configure_file</a><ul>
|
| 230 |
+
<li><a class="reference internal" href="#example">Example</a></li>
|
| 231 |
+
<li><a class="reference internal" href="#see-also">See Also</a></li>
|
| 232 |
+
</ul>
|
| 233 |
+
</li>
|
| 234 |
+
</ul>
|
| 235 |
+
|
| 236 |
+
</div>
|
| 237 |
+
<div>
|
| 238 |
+
<h4>Previous topic</h4>
|
| 239 |
+
<p class="topless"><a href="cmake_policy.html"
|
| 240 |
+
title="previous chapter">cmake_policy</a></p>
|
| 241 |
+
</div>
|
| 242 |
+
<div>
|
| 243 |
+
<h4>Next topic</h4>
|
| 244 |
+
<p class="topless"><a href="continue.html"
|
| 245 |
+
title="next chapter">continue</a></p>
|
| 246 |
+
</div>
|
| 247 |
+
<div role="note" aria-label="source link">
|
| 248 |
+
<h3>This Page</h3>
|
| 249 |
+
<ul class="this-page-menu">
|
| 250 |
+
<li><a href="../_sources/command/configure_file.rst.txt"
|
| 251 |
+
rel="nofollow">Show Source</a></li>
|
| 252 |
+
</ul>
|
| 253 |
+
</div>
|
| 254 |
+
<div id="searchbox" style="display: none" role="search">
|
| 255 |
+
<h3 id="searchlabel">Quick search</h3>
|
| 256 |
+
<div class="searchformwrapper">
|
| 257 |
+
<form class="search" action="../search.html" method="get">
|
| 258 |
+
<input type="text" name="q" aria-labelledby="searchlabel" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/>
|
| 259 |
+
<input type="submit" value="Go" />
|
| 260 |
+
</form>
|
| 261 |
+
</div>
|
| 262 |
+
</div>
|
| 263 |
+
<script>document.getElementById('searchbox').style.display = "block"</script>
|
| 264 |
+
</div>
|
| 265 |
+
</div>
|
| 266 |
+
<div class="clearer"></div>
|
| 267 |
+
</div>
|
| 268 |
+
<div class="related" role="navigation" aria-label="related navigation">
|
| 269 |
+
<h3>Navigation</h3>
|
| 270 |
+
<ul>
|
| 271 |
+
<li class="right" style="margin-right: 10px">
|
| 272 |
+
<a href="../genindex.html" title="General Index"
|
| 273 |
+
>index</a></li>
|
| 274 |
+
<li class="right" >
|
| 275 |
+
<a href="continue.html" title="continue"
|
| 276 |
+
>next</a> |</li>
|
| 277 |
+
<li class="right" >
|
| 278 |
+
<a href="cmake_policy.html" title="cmake_policy"
|
| 279 |
+
>previous</a> |</li>
|
| 280 |
+
<li>
|
| 281 |
+
<img src="../_static/cmake-logo-16.png" alt=""
|
| 282 |
+
style="vertical-align: middle; margin-top: -2px" />
|
| 283 |
+
</li>
|
| 284 |
+
<li>
|
| 285 |
+
<a href="https://cmake.org/">CMake</a> »
|
| 286 |
+
</li>
|
| 287 |
+
<li>
|
| 288 |
+
<a href="../index.html">3.27.9 Documentation</a> »
|
| 289 |
+
</li>
|
| 290 |
+
|
| 291 |
+
<li class="nav-item nav-item-1"><a href="../manual/cmake-commands.7.html" >cmake-commands(7)</a> »</li>
|
| 292 |
+
<li class="nav-item nav-item-this"><a href="">configure_file</a></li>
|
| 293 |
+
</ul>
|
| 294 |
+
</div>
|
| 295 |
+
|
| 296 |
+
<div class="footer" role="contentinfo">
|
| 297 |
+
© Copyright 2000-2023 Kitware, Inc. and Contributors.
|
| 298 |
+
Created using <a href="https://www.sphinx-doc.org/">Sphinx</a> 5.3.0.
|
| 299 |
+
</div>
|
| 300 |
+
</body>
|
| 301 |
+
</html>
|
toolchain/cmake-3.27.9-linux-x86_64/doc/cmake/html/command/continue.html
ADDED
|
@@ -0,0 +1,149 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
|
| 2 |
+
<!DOCTYPE html>
|
| 3 |
+
|
| 4 |
+
<html lang="en">
|
| 5 |
+
<head>
|
| 6 |
+
<meta charset="utf-8" />
|
| 7 |
+
<meta name="viewport" content="width=device-width, initial-scale=1.0" /><meta name="generator" content="Docutils 0.19: https://docutils.sourceforge.io/" />
|
| 8 |
+
|
| 9 |
+
<title>continue — CMake 3.27.9 Documentation</title>
|
| 10 |
+
|
| 11 |
+
<link rel="stylesheet" type="text/css" href="../_static/pygments.css" />
|
| 12 |
+
<link rel="stylesheet" type="text/css" href="../_static/cmake.css" />
|
| 13 |
+
|
| 14 |
+
<script data-url_root="../" id="documentation_options" src="../_static/documentation_options.js"></script>
|
| 15 |
+
<script src="../_static/jquery.js"></script>
|
| 16 |
+
<script src="../_static/underscore.js"></script>
|
| 17 |
+
<script src="../_static/_sphinx_javascript_frameworks_compat.js"></script>
|
| 18 |
+
<script src="../_static/doctools.js"></script>
|
| 19 |
+
<script src="../_static/sphinx_highlight.js"></script>
|
| 20 |
+
|
| 21 |
+
<link rel="shortcut icon" href="../_static/cmake-favicon.ico"/>
|
| 22 |
+
<link rel="index" title="Index" href="../genindex.html" />
|
| 23 |
+
<link rel="search" title="Search" href="../search.html" />
|
| 24 |
+
<link rel="next" title="else" href="else.html" />
|
| 25 |
+
<link rel="prev" title="configure_file" href="configure_file.html" />
|
| 26 |
+
|
| 27 |
+
|
| 28 |
+
</head><body>
|
| 29 |
+
|
| 30 |
+
<div class="related" role="navigation" aria-label="related navigation">
|
| 31 |
+
<h3>Navigation</h3>
|
| 32 |
+
<ul>
|
| 33 |
+
<li class="right" style="margin-right: 10px">
|
| 34 |
+
<a href="../genindex.html" title="General Index"
|
| 35 |
+
accesskey="I">index</a></li>
|
| 36 |
+
<li class="right" >
|
| 37 |
+
<a href="else.html" title="else"
|
| 38 |
+
accesskey="N">next</a> |</li>
|
| 39 |
+
<li class="right" >
|
| 40 |
+
<a href="configure_file.html" title="configure_file"
|
| 41 |
+
accesskey="P">previous</a> |</li>
|
| 42 |
+
<li>
|
| 43 |
+
<img src="../_static/cmake-logo-16.png" alt=""
|
| 44 |
+
style="vertical-align: middle; margin-top: -2px" />
|
| 45 |
+
</li>
|
| 46 |
+
<li>
|
| 47 |
+
<a href="https://cmake.org/">CMake</a> »
|
| 48 |
+
</li>
|
| 49 |
+
<li>
|
| 50 |
+
<a href="../index.html">3.27.9 Documentation</a> »
|
| 51 |
+
</li>
|
| 52 |
+
|
| 53 |
+
<li class="nav-item nav-item-1"><a href="../manual/cmake-commands.7.html" accesskey="U">cmake-commands(7)</a> »</li>
|
| 54 |
+
<li class="nav-item nav-item-this"><a href="">continue</a></li>
|
| 55 |
+
</ul>
|
| 56 |
+
</div>
|
| 57 |
+
|
| 58 |
+
<div class="document">
|
| 59 |
+
<div class="documentwrapper">
|
| 60 |
+
<div class="bodywrapper">
|
| 61 |
+
<div class="body" role="main">
|
| 62 |
+
|
| 63 |
+
<section id="continue">
|
| 64 |
+
<span id="command:continue"></span><h1>continue<a class="headerlink" href="#continue" title="Permalink to this heading">¶</a></h1>
|
| 65 |
+
<div class="versionadded">
|
| 66 |
+
<p><span class="versionmodified added">New in version 3.2.</span></p>
|
| 67 |
+
</div>
|
| 68 |
+
<p>Continue to the top of enclosing foreach or while loop.</p>
|
| 69 |
+
<div class="highlight-cmake notranslate"><div class="highlight"><pre><span></span><span class="nf">continue()</span>
|
| 70 |
+
</pre></div>
|
| 71 |
+
</div>
|
| 72 |
+
<p>The <code class="docutils literal notranslate"><span class="pre">continue()</span></code> command allows a cmake script to abort the rest of the
|
| 73 |
+
current iteration of a <span class="target" id="index-0-command:foreach"></span><a class="reference internal" href="foreach.html#command:foreach" title="foreach"><code class="xref cmake cmake-command docutils literal notranslate"><span class="pre">foreach()</span></code></a> or <span class="target" id="index-0-command:while"></span><a class="reference internal" href="while.html#command:while" title="while"><code class="xref cmake cmake-command docutils literal notranslate"><span class="pre">while()</span></code></a> loop, and start
|
| 74 |
+
at the top of the next iteration.</p>
|
| 75 |
+
<p>See also the <span class="target" id="index-0-command:break"></span><a class="reference internal" href="break.html#command:break" title="break"><code class="xref cmake cmake-command docutils literal notranslate"><span class="pre">break()</span></code></a> command.</p>
|
| 76 |
+
</section>
|
| 77 |
+
|
| 78 |
+
|
| 79 |
+
<div class="clearer"></div>
|
| 80 |
+
</div>
|
| 81 |
+
</div>
|
| 82 |
+
</div>
|
| 83 |
+
<div class="sphinxsidebar" role="navigation" aria-label="main navigation">
|
| 84 |
+
<div class="sphinxsidebarwrapper">
|
| 85 |
+
<div>
|
| 86 |
+
<h4>Previous topic</h4>
|
| 87 |
+
<p class="topless"><a href="configure_file.html"
|
| 88 |
+
title="previous chapter">configure_file</a></p>
|
| 89 |
+
</div>
|
| 90 |
+
<div>
|
| 91 |
+
<h4>Next topic</h4>
|
| 92 |
+
<p class="topless"><a href="else.html"
|
| 93 |
+
title="next chapter">else</a></p>
|
| 94 |
+
</div>
|
| 95 |
+
<div role="note" aria-label="source link">
|
| 96 |
+
<h3>This Page</h3>
|
| 97 |
+
<ul class="this-page-menu">
|
| 98 |
+
<li><a href="../_sources/command/continue.rst.txt"
|
| 99 |
+
rel="nofollow">Show Source</a></li>
|
| 100 |
+
</ul>
|
| 101 |
+
</div>
|
| 102 |
+
<div id="searchbox" style="display: none" role="search">
|
| 103 |
+
<h3 id="searchlabel">Quick search</h3>
|
| 104 |
+
<div class="searchformwrapper">
|
| 105 |
+
<form class="search" action="../search.html" method="get">
|
| 106 |
+
<input type="text" name="q" aria-labelledby="searchlabel" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/>
|
| 107 |
+
<input type="submit" value="Go" />
|
| 108 |
+
</form>
|
| 109 |
+
</div>
|
| 110 |
+
</div>
|
| 111 |
+
<script>document.getElementById('searchbox').style.display = "block"</script>
|
| 112 |
+
</div>
|
| 113 |
+
</div>
|
| 114 |
+
<div class="clearer"></div>
|
| 115 |
+
</div>
|
| 116 |
+
<div class="related" role="navigation" aria-label="related navigation">
|
| 117 |
+
<h3>Navigation</h3>
|
| 118 |
+
<ul>
|
| 119 |
+
<li class="right" style="margin-right: 10px">
|
| 120 |
+
<a href="../genindex.html" title="General Index"
|
| 121 |
+
>index</a></li>
|
| 122 |
+
<li class="right" >
|
| 123 |
+
<a href="else.html" title="else"
|
| 124 |
+
>next</a> |</li>
|
| 125 |
+
<li class="right" >
|
| 126 |
+
<a href="configure_file.html" title="configure_file"
|
| 127 |
+
>previous</a> |</li>
|
| 128 |
+
<li>
|
| 129 |
+
<img src="../_static/cmake-logo-16.png" alt=""
|
| 130 |
+
style="vertical-align: middle; margin-top: -2px" />
|
| 131 |
+
</li>
|
| 132 |
+
<li>
|
| 133 |
+
<a href="https://cmake.org/">CMake</a> »
|
| 134 |
+
</li>
|
| 135 |
+
<li>
|
| 136 |
+
<a href="../index.html">3.27.9 Documentation</a> »
|
| 137 |
+
</li>
|
| 138 |
+
|
| 139 |
+
<li class="nav-item nav-item-1"><a href="../manual/cmake-commands.7.html" >cmake-commands(7)</a> »</li>
|
| 140 |
+
<li class="nav-item nav-item-this"><a href="">continue</a></li>
|
| 141 |
+
</ul>
|
| 142 |
+
</div>
|
| 143 |
+
|
| 144 |
+
<div class="footer" role="contentinfo">
|
| 145 |
+
© Copyright 2000-2023 Kitware, Inc. and Contributors.
|
| 146 |
+
Created using <a href="https://www.sphinx-doc.org/">Sphinx</a> 5.3.0.
|
| 147 |
+
</div>
|
| 148 |
+
</body>
|
| 149 |
+
</html>
|
toolchain/cmake-3.27.9-linux-x86_64/doc/cmake/html/command/create_test_sourcelist.html
ADDED
|
@@ -0,0 +1,163 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
|
| 2 |
+
<!DOCTYPE html>
|
| 3 |
+
|
| 4 |
+
<html lang="en">
|
| 5 |
+
<head>
|
| 6 |
+
<meta charset="utf-8" />
|
| 7 |
+
<meta name="viewport" content="width=device-width, initial-scale=1.0" /><meta name="generator" content="Docutils 0.19: https://docutils.sourceforge.io/" />
|
| 8 |
+
|
| 9 |
+
<title>create_test_sourcelist — CMake 3.27.9 Documentation</title>
|
| 10 |
+
|
| 11 |
+
<link rel="stylesheet" type="text/css" href="../_static/pygments.css" />
|
| 12 |
+
<link rel="stylesheet" type="text/css" href="../_static/cmake.css" />
|
| 13 |
+
|
| 14 |
+
<script data-url_root="../" id="documentation_options" src="../_static/documentation_options.js"></script>
|
| 15 |
+
<script src="../_static/jquery.js"></script>
|
| 16 |
+
<script src="../_static/underscore.js"></script>
|
| 17 |
+
<script src="../_static/_sphinx_javascript_frameworks_compat.js"></script>
|
| 18 |
+
<script src="../_static/doctools.js"></script>
|
| 19 |
+
<script src="../_static/sphinx_highlight.js"></script>
|
| 20 |
+
|
| 21 |
+
<link rel="shortcut icon" href="../_static/cmake-favicon.ico"/>
|
| 22 |
+
<link rel="index" title="Index" href="../genindex.html" />
|
| 23 |
+
<link rel="search" title="Search" href="../search.html" />
|
| 24 |
+
<link rel="next" title="define_property" href="define_property.html" />
|
| 25 |
+
<link rel="prev" title="cmake_file_api" href="cmake_file_api.html" />
|
| 26 |
+
|
| 27 |
+
|
| 28 |
+
</head><body>
|
| 29 |
+
|
| 30 |
+
<div class="related" role="navigation" aria-label="related navigation">
|
| 31 |
+
<h3>Navigation</h3>
|
| 32 |
+
<ul>
|
| 33 |
+
<li class="right" style="margin-right: 10px">
|
| 34 |
+
<a href="../genindex.html" title="General Index"
|
| 35 |
+
accesskey="I">index</a></li>
|
| 36 |
+
<li class="right" >
|
| 37 |
+
<a href="define_property.html" title="define_property"
|
| 38 |
+
accesskey="N">next</a> |</li>
|
| 39 |
+
<li class="right" >
|
| 40 |
+
<a href="cmake_file_api.html" title="cmake_file_api"
|
| 41 |
+
accesskey="P">previous</a> |</li>
|
| 42 |
+
<li>
|
| 43 |
+
<img src="../_static/cmake-logo-16.png" alt=""
|
| 44 |
+
style="vertical-align: middle; margin-top: -2px" />
|
| 45 |
+
</li>
|
| 46 |
+
<li>
|
| 47 |
+
<a href="https://cmake.org/">CMake</a> »
|
| 48 |
+
</li>
|
| 49 |
+
<li>
|
| 50 |
+
<a href="../index.html">3.27.9 Documentation</a> »
|
| 51 |
+
</li>
|
| 52 |
+
|
| 53 |
+
<li class="nav-item nav-item-1"><a href="../manual/cmake-commands.7.html" accesskey="U">cmake-commands(7)</a> »</li>
|
| 54 |
+
<li class="nav-item nav-item-this"><a href="">create_test_sourcelist</a></li>
|
| 55 |
+
</ul>
|
| 56 |
+
</div>
|
| 57 |
+
|
| 58 |
+
<div class="document">
|
| 59 |
+
<div class="documentwrapper">
|
| 60 |
+
<div class="bodywrapper">
|
| 61 |
+
<div class="body" role="main">
|
| 62 |
+
|
| 63 |
+
<section id="create-test-sourcelist">
|
| 64 |
+
<span id="command:create_test_sourcelist"></span><h1>create_test_sourcelist<a class="headerlink" href="#create-test-sourcelist" title="Permalink to this heading">¶</a></h1>
|
| 65 |
+
<p>Create a test driver and source list for building test programs.</p>
|
| 66 |
+
<div class="highlight-cmake notranslate"><div class="highlight"><pre><span></span><span class="nf">create_test_sourcelist(</span><span class="nb">sourceListName</span><span class="w"> </span><span class="nb">driverName</span>
|
| 67 |
+
<span class="w"> </span><span class="nb">test1</span><span class="w"> </span><span class="nb">test2</span><span class="w"> </span><span class="nb">test3</span>
|
| 68 |
+
<span class="w"> </span><span class="no">EXTRA_INCLUDE</span><span class="w"> </span><span class="nb">include.h</span>
|
| 69 |
+
<span class="w"> </span><span class="no">FUNCTION</span><span class="w"> </span><span class="nb">function</span><span class="nf">)</span>
|
| 70 |
+
</pre></div>
|
| 71 |
+
</div>
|
| 72 |
+
<p>A test driver is a program that links together many small tests into a
|
| 73 |
+
single executable. This is useful when building static executables
|
| 74 |
+
with large libraries to shrink the total required size. The list of
|
| 75 |
+
source files needed to build the test driver will be in
|
| 76 |
+
<code class="docutils literal notranslate"><span class="pre">sourceListName</span></code>. <code class="docutils literal notranslate"><span class="pre">driverName</span></code> is the name of the test driver program.
|
| 77 |
+
The rest of the arguments consist of a list of test source files, can
|
| 78 |
+
be semicolon separated. Each test source file should have a function
|
| 79 |
+
in it that is the same name as the file with no extension (foo.cxx
|
| 80 |
+
should have int foo(int, char*[]);) <code class="docutils literal notranslate"><span class="pre">driverName</span></code> will be able to call
|
| 81 |
+
each of the tests by name on the command line. If <code class="docutils literal notranslate"><span class="pre">EXTRA_INCLUDE</span></code> is
|
| 82 |
+
specified, then the next argument is included into the generated file.
|
| 83 |
+
If <code class="docutils literal notranslate"><span class="pre">FUNCTION</span></code> is specified, then the next argument is taken as a
|
| 84 |
+
function name that is passed a pointer to ac and av. This can be used
|
| 85 |
+
to add extra command line processing to each test. The
|
| 86 |
+
<code class="docutils literal notranslate"><span class="pre">CMAKE_TESTDRIVER_BEFORE_TESTMAIN</span></code> cmake variable can be set to
|
| 87 |
+
have code that will be placed directly before calling the test main function.
|
| 88 |
+
<code class="docutils literal notranslate"><span class="pre">CMAKE_TESTDRIVER_AFTER_TESTMAIN</span></code> can be set to have code that
|
| 89 |
+
will be placed directly after the call to the test main function.</p>
|
| 90 |
+
</section>
|
| 91 |
+
|
| 92 |
+
|
| 93 |
+
<div class="clearer"></div>
|
| 94 |
+
</div>
|
| 95 |
+
</div>
|
| 96 |
+
</div>
|
| 97 |
+
<div class="sphinxsidebar" role="navigation" aria-label="main navigation">
|
| 98 |
+
<div class="sphinxsidebarwrapper">
|
| 99 |
+
<div>
|
| 100 |
+
<h4>Previous topic</h4>
|
| 101 |
+
<p class="topless"><a href="cmake_file_api.html"
|
| 102 |
+
title="previous chapter">cmake_file_api</a></p>
|
| 103 |
+
</div>
|
| 104 |
+
<div>
|
| 105 |
+
<h4>Next topic</h4>
|
| 106 |
+
<p class="topless"><a href="define_property.html"
|
| 107 |
+
title="next chapter">define_property</a></p>
|
| 108 |
+
</div>
|
| 109 |
+
<div role="note" aria-label="source link">
|
| 110 |
+
<h3>This Page</h3>
|
| 111 |
+
<ul class="this-page-menu">
|
| 112 |
+
<li><a href="../_sources/command/create_test_sourcelist.rst.txt"
|
| 113 |
+
rel="nofollow">Show Source</a></li>
|
| 114 |
+
</ul>
|
| 115 |
+
</div>
|
| 116 |
+
<div id="searchbox" style="display: none" role="search">
|
| 117 |
+
<h3 id="searchlabel">Quick search</h3>
|
| 118 |
+
<div class="searchformwrapper">
|
| 119 |
+
<form class="search" action="../search.html" method="get">
|
| 120 |
+
<input type="text" name="q" aria-labelledby="searchlabel" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/>
|
| 121 |
+
<input type="submit" value="Go" />
|
| 122 |
+
</form>
|
| 123 |
+
</div>
|
| 124 |
+
</div>
|
| 125 |
+
<script>document.getElementById('searchbox').style.display = "block"</script>
|
| 126 |
+
</div>
|
| 127 |
+
</div>
|
| 128 |
+
<div class="clearer"></div>
|
| 129 |
+
</div>
|
| 130 |
+
<div class="related" role="navigation" aria-label="related navigation">
|
| 131 |
+
<h3>Navigation</h3>
|
| 132 |
+
<ul>
|
| 133 |
+
<li class="right" style="margin-right: 10px">
|
| 134 |
+
<a href="../genindex.html" title="General Index"
|
| 135 |
+
>index</a></li>
|
| 136 |
+
<li class="right" >
|
| 137 |
+
<a href="define_property.html" title="define_property"
|
| 138 |
+
>next</a> |</li>
|
| 139 |
+
<li class="right" >
|
| 140 |
+
<a href="cmake_file_api.html" title="cmake_file_api"
|
| 141 |
+
>previous</a> |</li>
|
| 142 |
+
<li>
|
| 143 |
+
<img src="../_static/cmake-logo-16.png" alt=""
|
| 144 |
+
style="vertical-align: middle; margin-top: -2px" />
|
| 145 |
+
</li>
|
| 146 |
+
<li>
|
| 147 |
+
<a href="https://cmake.org/">CMake</a> »
|
| 148 |
+
</li>
|
| 149 |
+
<li>
|
| 150 |
+
<a href="../index.html">3.27.9 Documentation</a> »
|
| 151 |
+
</li>
|
| 152 |
+
|
| 153 |
+
<li class="nav-item nav-item-1"><a href="../manual/cmake-commands.7.html" >cmake-commands(7)</a> »</li>
|
| 154 |
+
<li class="nav-item nav-item-this"><a href="">create_test_sourcelist</a></li>
|
| 155 |
+
</ul>
|
| 156 |
+
</div>
|
| 157 |
+
|
| 158 |
+
<div class="footer" role="contentinfo">
|
| 159 |
+
© Copyright 2000-2023 Kitware, Inc. and Contributors.
|
| 160 |
+
Created using <a href="https://www.sphinx-doc.org/">Sphinx</a> 5.3.0.
|
| 161 |
+
</div>
|
| 162 |
+
</body>
|
| 163 |
+
</html>
|
toolchain/cmake-3.27.9-linux-x86_64/doc/cmake/html/command/ctest_build.html
ADDED
|
@@ -0,0 +1,217 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
|
| 2 |
+
<!DOCTYPE html>
|
| 3 |
+
|
| 4 |
+
<html lang="en">
|
| 5 |
+
<head>
|
| 6 |
+
<meta charset="utf-8" />
|
| 7 |
+
<meta name="viewport" content="width=device-width, initial-scale=1.0" /><meta name="generator" content="Docutils 0.19: https://docutils.sourceforge.io/" />
|
| 8 |
+
|
| 9 |
+
<title>ctest_build — CMake 3.27.9 Documentation</title>
|
| 10 |
+
|
| 11 |
+
<link rel="stylesheet" type="text/css" href="../_static/pygments.css" />
|
| 12 |
+
<link rel="stylesheet" type="text/css" href="../_static/cmake.css" />
|
| 13 |
+
|
| 14 |
+
<script data-url_root="../" id="documentation_options" src="../_static/documentation_options.js"></script>
|
| 15 |
+
<script src="../_static/jquery.js"></script>
|
| 16 |
+
<script src="../_static/underscore.js"></script>
|
| 17 |
+
<script src="../_static/_sphinx_javascript_frameworks_compat.js"></script>
|
| 18 |
+
<script src="../_static/doctools.js"></script>
|
| 19 |
+
<script src="../_static/sphinx_highlight.js"></script>
|
| 20 |
+
|
| 21 |
+
<link rel="shortcut icon" href="../_static/cmake-favicon.ico"/>
|
| 22 |
+
<link rel="index" title="Index" href="../genindex.html" />
|
| 23 |
+
<link rel="search" title="Search" href="../search.html" />
|
| 24 |
+
<link rel="next" title="ctest_configure" href="ctest_configure.html" />
|
| 25 |
+
<link rel="prev" title="try_run" href="try_run.html" />
|
| 26 |
+
|
| 27 |
+
|
| 28 |
+
</head><body>
|
| 29 |
+
|
| 30 |
+
<div class="related" role="navigation" aria-label="related navigation">
|
| 31 |
+
<h3>Navigation</h3>
|
| 32 |
+
<ul>
|
| 33 |
+
<li class="right" style="margin-right: 10px">
|
| 34 |
+
<a href="../genindex.html" title="General Index"
|
| 35 |
+
accesskey="I">index</a></li>
|
| 36 |
+
<li class="right" >
|
| 37 |
+
<a href="ctest_configure.html" title="ctest_configure"
|
| 38 |
+
accesskey="N">next</a> |</li>
|
| 39 |
+
<li class="right" >
|
| 40 |
+
<a href="try_run.html" title="try_run"
|
| 41 |
+
accesskey="P">previous</a> |</li>
|
| 42 |
+
<li>
|
| 43 |
+
<img src="../_static/cmake-logo-16.png" alt=""
|
| 44 |
+
style="vertical-align: middle; margin-top: -2px" />
|
| 45 |
+
</li>
|
| 46 |
+
<li>
|
| 47 |
+
<a href="https://cmake.org/">CMake</a> »
|
| 48 |
+
</li>
|
| 49 |
+
<li>
|
| 50 |
+
<a href="../index.html">3.27.9 Documentation</a> »
|
| 51 |
+
</li>
|
| 52 |
+
|
| 53 |
+
<li class="nav-item nav-item-1"><a href="../manual/cmake-commands.7.html" accesskey="U">cmake-commands(7)</a> »</li>
|
| 54 |
+
<li class="nav-item nav-item-this"><a href="">ctest_build</a></li>
|
| 55 |
+
</ul>
|
| 56 |
+
</div>
|
| 57 |
+
|
| 58 |
+
<div class="document">
|
| 59 |
+
<div class="documentwrapper">
|
| 60 |
+
<div class="bodywrapper">
|
| 61 |
+
<div class="body" role="main">
|
| 62 |
+
|
| 63 |
+
<section id="ctest-build">
|
| 64 |
+
<span id="command:ctest_build"></span><h1>ctest_build<a class="headerlink" href="#ctest-build" title="Permalink to this heading">¶</a></h1>
|
| 65 |
+
<p>Perform the <a class="reference internal" href="../manual/ctest.1.html#ctest-build-step"><span class="std std-ref">CTest Build Step</span></a> as a <a class="reference internal" href="../manual/ctest.1.html#dashboard-client"><span class="std std-ref">Dashboard Client</span></a>.</p>
|
| 66 |
+
<div class="highlight-cmake notranslate"><div class="highlight"><pre><span></span><span class="nf">ctest_build(</span><span class="p">[</span><span class="no">BUILD</span><span class="w"> </span><span class="nv"><build-dir></span><span class="p">]</span><span class="w"> </span><span class="p">[</span><span class="no">APPEND</span><span class="p">]</span>
|
| 67 |
+
<span class="w"> </span><span class="p">[</span><span class="no">CONFIGURATION</span><span class="w"> </span><span class="nv"><config></span><span class="p">]</span>
|
| 68 |
+
<span class="w"> </span><span class="p">[</span><span class="no">PARALLEL_LEVEL</span><span class="w"> </span><span class="nv"><parallel></span><span class="p">]</span>
|
| 69 |
+
<span class="w"> </span><span class="p">[</span><span class="no">FLAGS</span><span class="w"> </span><span class="nv"><flags></span><span class="p">]</span>
|
| 70 |
+
<span class="w"> </span><span class="p">[</span><span class="no">PROJECT_NAME</span><span class="w"> </span><span class="nv"><project-name></span><span class="p">]</span>
|
| 71 |
+
<span class="w"> </span><span class="p">[</span><span class="no">TARGET</span><span class="w"> </span><span class="nv"><target-name></span><span class="p">]</span>
|
| 72 |
+
<span class="w"> </span><span class="p">[</span><span class="no">NUMBER_ERRORS</span><span class="w"> </span><span class="nv"><num-err-var></span><span class="p">]</span>
|
| 73 |
+
<span class="w"> </span><span class="p">[</span><span class="no">NUMBER_WARNINGS</span><span class="w"> </span><span class="nv"><num-warn-var></span><span class="p">]</span>
|
| 74 |
+
<span class="w"> </span><span class="p">[</span><span class="no">RETURN_VALUE</span><span class="w"> </span><span class="nv"><result-var></span><span class="p">]</span>
|
| 75 |
+
<span class="w"> </span><span class="p">[</span><span class="no">CAPTURE_CMAKE_ERROR</span><span class="w"> </span><span class="nv"><result-var></span><span class="p">]</span>
|
| 76 |
+
<span class="w"> </span><span class="nf">)</span>
|
| 77 |
+
</pre></div>
|
| 78 |
+
</div>
|
| 79 |
+
<p>Build the project and store results in <code class="docutils literal notranslate"><span class="pre">Build.xml</span></code>
|
| 80 |
+
for submission with the <span class="target" id="index-0-command:ctest_submit"></span><a class="reference internal" href="ctest_submit.html#command:ctest_submit" title="ctest_submit"><code class="xref cmake cmake-command docutils literal notranslate"><span class="pre">ctest_submit()</span></code></a> command.</p>
|
| 81 |
+
<p>The <span class="target" id="index-0-variable:CTEST_BUILD_COMMAND"></span><a class="reference internal" href="../variable/CTEST_BUILD_COMMAND.html#variable:CTEST_BUILD_COMMAND" title="CTEST_BUILD_COMMAND"><code class="xref cmake cmake-variable docutils literal notranslate"><span class="pre">CTEST_BUILD_COMMAND</span></code></a> variable may be set to explicitly
|
| 82 |
+
specify the build command line. Otherwise the build command line is
|
| 83 |
+
computed automatically based on the options given.</p>
|
| 84 |
+
<p>The options are:</p>
|
| 85 |
+
<dl>
|
| 86 |
+
<dt><code class="docutils literal notranslate"><span class="pre">BUILD</span> <span class="pre"><build-dir></span></code></dt><dd><p>Specify the top-level build directory. If not given, the
|
| 87 |
+
<span class="target" id="index-0-variable:CTEST_BINARY_DIRECTORY"></span><a class="reference internal" href="../variable/CTEST_BINARY_DIRECTORY.html#variable:CTEST_BINARY_DIRECTORY" title="CTEST_BINARY_DIRECTORY"><code class="xref cmake cmake-variable docutils literal notranslate"><span class="pre">CTEST_BINARY_DIRECTORY</span></code></a> variable is used.</p>
|
| 88 |
+
</dd>
|
| 89 |
+
<dt><code class="docutils literal notranslate"><span class="pre">APPEND</span></code></dt><dd><p>Mark <code class="docutils literal notranslate"><span class="pre">Build.xml</span></code> for append to results previously submitted to a
|
| 90 |
+
dashboard server since the last <span class="target" id="index-0-command:ctest_start"></span><a class="reference internal" href="ctest_start.html#command:ctest_start" title="ctest_start"><code class="xref cmake cmake-command docutils literal notranslate"><span class="pre">ctest_start()</span></code></a> call.
|
| 91 |
+
Append semantics are defined by the dashboard server in use.
|
| 92 |
+
This does <em>not</em> cause results to be appended to a <code class="docutils literal notranslate"><span class="pre">.xml</span></code> file
|
| 93 |
+
produced by a previous call to this command.</p>
|
| 94 |
+
</dd>
|
| 95 |
+
<dt><code class="docutils literal notranslate"><span class="pre">CONFIGURATION</span> <span class="pre"><config></span></code></dt><dd><p>Specify the build configuration (e.g. <code class="docutils literal notranslate"><span class="pre">Debug</span></code>). If not
|
| 96 |
+
specified the <code class="docutils literal notranslate"><span class="pre">CTEST_BUILD_CONFIGURATION</span></code> variable will be checked.
|
| 97 |
+
Otherwise the <a class="reference internal" href="../manual/ctest.1.html#cmdoption-ctest-C"><code class="xref std std-option docutils literal notranslate"><span class="pre">-C</span> <span class="pre"><cfg></span></code></a> option given to the
|
| 98 |
+
<span class="target" id="index-0-manual:ctest(1)"></span><a class="reference internal" href="../manual/ctest.1.html#manual:ctest(1)" title="ctest(1)"><code class="xref cmake cmake-manual docutils literal notranslate"><span class="pre">ctest(1)</span></code></a> command will be used, if any.</p>
|
| 99 |
+
</dd>
|
| 100 |
+
<dt><code class="docutils literal notranslate"><span class="pre">PARALLEL_LEVEL</span> <span class="pre"><parallel></span></code></dt><dd><div class="versionadded">
|
| 101 |
+
<p><span class="versionmodified added">New in version 3.21.</span></p>
|
| 102 |
+
</div>
|
| 103 |
+
<p>Specify the parallel level of the underlying build system. If not
|
| 104 |
+
specified, the <span class="target" id="index-0-envvar:CMAKE_BUILD_PARALLEL_LEVEL"></span><a class="reference internal" href="../envvar/CMAKE_BUILD_PARALLEL_LEVEL.html#envvar:CMAKE_BUILD_PARALLEL_LEVEL" title="CMAKE_BUILD_PARALLEL_LEVEL"><code class="xref cmake cmake-envvar docutils literal notranslate"><span class="pre">CMAKE_BUILD_PARALLEL_LEVEL</span></code></a> environment
|
| 105 |
+
variable will be checked.</p>
|
| 106 |
+
</dd>
|
| 107 |
+
<dt><code class="docutils literal notranslate"><span class="pre">FLAGS</span> <span class="pre"><flags></span></code></dt><dd><p>Pass additional arguments to the underlying build command.
|
| 108 |
+
If not specified the <code class="docutils literal notranslate"><span class="pre">CTEST_BUILD_FLAGS</span></code> variable will be checked.
|
| 109 |
+
This can, e.g., be used to trigger a parallel build using the
|
| 110 |
+
<code class="docutils literal notranslate"><span class="pre">-j</span></code> option of <code class="docutils literal notranslate"><span class="pre">make</span></code>. See the <span class="target" id="index-0-module:ProcessorCount"></span><a class="reference internal" href="../module/ProcessorCount.html#module:ProcessorCount" title="ProcessorCount"><code class="xref cmake cmake-module docutils literal notranslate"><span class="pre">ProcessorCount</span></code></a> module
|
| 111 |
+
for an example.</p>
|
| 112 |
+
</dd>
|
| 113 |
+
<dt><code class="docutils literal notranslate"><span class="pre">PROJECT_NAME</span> <span class="pre"><project-name></span></code></dt><dd><p>Ignored since CMake 3.0.</p>
|
| 114 |
+
<div class="versionchanged">
|
| 115 |
+
<p><span class="versionmodified changed">Changed in version 3.14: </span>This value is no longer required.</p>
|
| 116 |
+
</div>
|
| 117 |
+
</dd>
|
| 118 |
+
<dt><code class="docutils literal notranslate"><span class="pre">TARGET</span> <span class="pre"><target-name></span></code></dt><dd><p>Specify the name of a target to build. If not specified the
|
| 119 |
+
<code class="docutils literal notranslate"><span class="pre">CTEST_BUILD_TARGET</span></code> variable will be checked. Otherwise the
|
| 120 |
+
default target will be built. This is the "all" target
|
| 121 |
+
(called <code class="docutils literal notranslate"><span class="pre">ALL_BUILD</span></code> in <a class="reference internal" href="../manual/cmake-generators.7.html#visual-studio-generators"><span class="std std-ref">Visual Studio Generators</span></a>).</p>
|
| 122 |
+
</dd>
|
| 123 |
+
<dt><code class="docutils literal notranslate"><span class="pre">NUMBER_ERRORS</span> <span class="pre"><num-err-var></span></code></dt><dd><p>Store the number of build errors detected in the given variable.</p>
|
| 124 |
+
</dd>
|
| 125 |
+
<dt><code class="docutils literal notranslate"><span class="pre">NUMBER_WARNINGS</span> <span class="pre"><num-warn-var></span></code></dt><dd><p>Store the number of build warnings detected in the given variable.</p>
|
| 126 |
+
</dd>
|
| 127 |
+
<dt><code class="docutils literal notranslate"><span class="pre">RETURN_VALUE</span> <span class="pre"><result-var></span></code></dt><dd><p>Store the return value of the native build tool in the given variable.</p>
|
| 128 |
+
</dd>
|
| 129 |
+
<dt><code class="docutils literal notranslate"><span class="pre">CAPTURE_CMAKE_ERROR</span> <span class="pre"><result-var></span></code></dt><dd><div class="versionadded">
|
| 130 |
+
<p><span class="versionmodified added">New in version 3.7.</span></p>
|
| 131 |
+
</div>
|
| 132 |
+
<p>Store in the <code class="docutils literal notranslate"><span class="pre"><result-var></span></code> variable -1 if there are any errors running
|
| 133 |
+
the command and prevent ctest from returning non-zero if an error occurs.</p>
|
| 134 |
+
</dd>
|
| 135 |
+
<dt><code class="docutils literal notranslate"><span class="pre">QUIET</span></code></dt><dd><div class="versionadded">
|
| 136 |
+
<p><span class="versionmodified added">New in version 3.3.</span></p>
|
| 137 |
+
</div>
|
| 138 |
+
<p>Suppress any CTest-specific non-error output that would have been
|
| 139 |
+
printed to the console otherwise. The summary of warnings / errors,
|
| 140 |
+
as well as the output from the native build tool is unaffected by
|
| 141 |
+
this option.</p>
|
| 142 |
+
</dd>
|
| 143 |
+
</dl>
|
| 144 |
+
</section>
|
| 145 |
+
|
| 146 |
+
|
| 147 |
+
<div class="clearer"></div>
|
| 148 |
+
</div>
|
| 149 |
+
</div>
|
| 150 |
+
</div>
|
| 151 |
+
<div class="sphinxsidebar" role="navigation" aria-label="main navigation">
|
| 152 |
+
<div class="sphinxsidebarwrapper">
|
| 153 |
+
<div>
|
| 154 |
+
<h4>Previous topic</h4>
|
| 155 |
+
<p class="topless"><a href="try_run.html"
|
| 156 |
+
title="previous chapter">try_run</a></p>
|
| 157 |
+
</div>
|
| 158 |
+
<div>
|
| 159 |
+
<h4>Next topic</h4>
|
| 160 |
+
<p class="topless"><a href="ctest_configure.html"
|
| 161 |
+
title="next chapter">ctest_configure</a></p>
|
| 162 |
+
</div>
|
| 163 |
+
<div role="note" aria-label="source link">
|
| 164 |
+
<h3>This Page</h3>
|
| 165 |
+
<ul class="this-page-menu">
|
| 166 |
+
<li><a href="../_sources/command/ctest_build.rst.txt"
|
| 167 |
+
rel="nofollow">Show Source</a></li>
|
| 168 |
+
</ul>
|
| 169 |
+
</div>
|
| 170 |
+
<div id="searchbox" style="display: none" role="search">
|
| 171 |
+
<h3 id="searchlabel">Quick search</h3>
|
| 172 |
+
<div class="searchformwrapper">
|
| 173 |
+
<form class="search" action="../search.html" method="get">
|
| 174 |
+
<input type="text" name="q" aria-labelledby="searchlabel" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/>
|
| 175 |
+
<input type="submit" value="Go" />
|
| 176 |
+
</form>
|
| 177 |
+
</div>
|
| 178 |
+
</div>
|
| 179 |
+
<script>document.getElementById('searchbox').style.display = "block"</script>
|
| 180 |
+
</div>
|
| 181 |
+
</div>
|
| 182 |
+
<div class="clearer"></div>
|
| 183 |
+
</div>
|
| 184 |
+
<div class="related" role="navigation" aria-label="related navigation">
|
| 185 |
+
<h3>Navigation</h3>
|
| 186 |
+
<ul>
|
| 187 |
+
<li class="right" style="margin-right: 10px">
|
| 188 |
+
<a href="../genindex.html" title="General Index"
|
| 189 |
+
>index</a></li>
|
| 190 |
+
<li class="right" >
|
| 191 |
+
<a href="ctest_configure.html" title="ctest_configure"
|
| 192 |
+
>next</a> |</li>
|
| 193 |
+
<li class="right" >
|
| 194 |
+
<a href="try_run.html" title="try_run"
|
| 195 |
+
>previous</a> |</li>
|
| 196 |
+
<li>
|
| 197 |
+
<img src="../_static/cmake-logo-16.png" alt=""
|
| 198 |
+
style="vertical-align: middle; margin-top: -2px" />
|
| 199 |
+
</li>
|
| 200 |
+
<li>
|
| 201 |
+
<a href="https://cmake.org/">CMake</a> »
|
| 202 |
+
</li>
|
| 203 |
+
<li>
|
| 204 |
+
<a href="../index.html">3.27.9 Documentation</a> »
|
| 205 |
+
</li>
|
| 206 |
+
|
| 207 |
+
<li class="nav-item nav-item-1"><a href="../manual/cmake-commands.7.html" >cmake-commands(7)</a> »</li>
|
| 208 |
+
<li class="nav-item nav-item-this"><a href="">ctest_build</a></li>
|
| 209 |
+
</ul>
|
| 210 |
+
</div>
|
| 211 |
+
|
| 212 |
+
<div class="footer" role="contentinfo">
|
| 213 |
+
© Copyright 2000-2023 Kitware, Inc. and Contributors.
|
| 214 |
+
Created using <a href="https://www.sphinx-doc.org/">Sphinx</a> 5.3.0.
|
| 215 |
+
</div>
|
| 216 |
+
</body>
|
| 217 |
+
</html>
|
toolchain/cmake-3.27.9-linux-x86_64/doc/cmake/html/command/ctest_configure.html
ADDED
|
@@ -0,0 +1,179 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
|
| 2 |
+
<!DOCTYPE html>
|
| 3 |
+
|
| 4 |
+
<html lang="en">
|
| 5 |
+
<head>
|
| 6 |
+
<meta charset="utf-8" />
|
| 7 |
+
<meta name="viewport" content="width=device-width, initial-scale=1.0" /><meta name="generator" content="Docutils 0.19: https://docutils.sourceforge.io/" />
|
| 8 |
+
|
| 9 |
+
<title>ctest_configure — CMake 3.27.9 Documentation</title>
|
| 10 |
+
|
| 11 |
+
<link rel="stylesheet" type="text/css" href="../_static/pygments.css" />
|
| 12 |
+
<link rel="stylesheet" type="text/css" href="../_static/cmake.css" />
|
| 13 |
+
|
| 14 |
+
<script data-url_root="../" id="documentation_options" src="../_static/documentation_options.js"></script>
|
| 15 |
+
<script src="../_static/jquery.js"></script>
|
| 16 |
+
<script src="../_static/underscore.js"></script>
|
| 17 |
+
<script src="../_static/_sphinx_javascript_frameworks_compat.js"></script>
|
| 18 |
+
<script src="../_static/doctools.js"></script>
|
| 19 |
+
<script src="../_static/sphinx_highlight.js"></script>
|
| 20 |
+
|
| 21 |
+
<link rel="shortcut icon" href="../_static/cmake-favicon.ico"/>
|
| 22 |
+
<link rel="index" title="Index" href="../genindex.html" />
|
| 23 |
+
<link rel="search" title="Search" href="../search.html" />
|
| 24 |
+
<link rel="next" title="ctest_coverage" href="ctest_coverage.html" />
|
| 25 |
+
<link rel="prev" title="ctest_build" href="ctest_build.html" />
|
| 26 |
+
|
| 27 |
+
|
| 28 |
+
</head><body>
|
| 29 |
+
|
| 30 |
+
<div class="related" role="navigation" aria-label="related navigation">
|
| 31 |
+
<h3>Navigation</h3>
|
| 32 |
+
<ul>
|
| 33 |
+
<li class="right" style="margin-right: 10px">
|
| 34 |
+
<a href="../genindex.html" title="General Index"
|
| 35 |
+
accesskey="I">index</a></li>
|
| 36 |
+
<li class="right" >
|
| 37 |
+
<a href="ctest_coverage.html" title="ctest_coverage"
|
| 38 |
+
accesskey="N">next</a> |</li>
|
| 39 |
+
<li class="right" >
|
| 40 |
+
<a href="ctest_build.html" title="ctest_build"
|
| 41 |
+
accesskey="P">previous</a> |</li>
|
| 42 |
+
<li>
|
| 43 |
+
<img src="../_static/cmake-logo-16.png" alt=""
|
| 44 |
+
style="vertical-align: middle; margin-top: -2px" />
|
| 45 |
+
</li>
|
| 46 |
+
<li>
|
| 47 |
+
<a href="https://cmake.org/">CMake</a> »
|
| 48 |
+
</li>
|
| 49 |
+
<li>
|
| 50 |
+
<a href="../index.html">3.27.9 Documentation</a> »
|
| 51 |
+
</li>
|
| 52 |
+
|
| 53 |
+
<li class="nav-item nav-item-1"><a href="../manual/cmake-commands.7.html" accesskey="U">cmake-commands(7)</a> »</li>
|
| 54 |
+
<li class="nav-item nav-item-this"><a href="">ctest_configure</a></li>
|
| 55 |
+
</ul>
|
| 56 |
+
</div>
|
| 57 |
+
|
| 58 |
+
<div class="document">
|
| 59 |
+
<div class="documentwrapper">
|
| 60 |
+
<div class="bodywrapper">
|
| 61 |
+
<div class="body" role="main">
|
| 62 |
+
|
| 63 |
+
<section id="ctest-configure">
|
| 64 |
+
<span id="command:ctest_configure"></span><h1>ctest_configure<a class="headerlink" href="#ctest-configure" title="Permalink to this heading">¶</a></h1>
|
| 65 |
+
<p>Perform the <a class="reference internal" href="../manual/ctest.1.html#ctest-configure-step"><span class="std std-ref">CTest Configure Step</span></a> as a <a class="reference internal" href="../manual/ctest.1.html#dashboard-client"><span class="std std-ref">Dashboard Client</span></a>.</p>
|
| 66 |
+
<div class="highlight-cmake notranslate"><div class="highlight"><pre><span></span><span class="nf">ctest_configure(</span><span class="p">[</span><span class="no">BUILD</span><span class="w"> </span><span class="nv"><build-dir></span><span class="p">]</span><span class="w"> </span><span class="p">[</span><span class="no">SOURCE</span><span class="w"> </span><span class="nv"><source-dir></span><span class="p">]</span><span class="w"> </span><span class="p">[</span><span class="no">APPEND</span><span class="p">]</span>
|
| 67 |
+
<span class="w"> </span><span class="p">[</span><span class="no">OPTIONS</span><span class="w"> </span><span class="nv"><options></span><span class="p">]</span><span class="w"> </span><span class="p">[</span><span class="no">RETURN_VALUE</span><span class="w"> </span><span class="nv"><result-var></span><span class="p">]</span><span class="w"> </span><span class="p">[</span><span class="no">QUIET</span><span class="p">]</span>
|
| 68 |
+
<span class="w"> </span><span class="p">[</span><span class="no">CAPTURE_CMAKE_ERROR</span><span class="w"> </span><span class="nv"><result-var></span><span class="p">]</span><span class="nf">)</span>
|
| 69 |
+
</pre></div>
|
| 70 |
+
</div>
|
| 71 |
+
<p>Configure the project build tree and record results in <code class="docutils literal notranslate"><span class="pre">Configure.xml</span></code>
|
| 72 |
+
for submission with the <span class="target" id="index-0-command:ctest_submit"></span><a class="reference internal" href="ctest_submit.html#command:ctest_submit" title="ctest_submit"><code class="xref cmake cmake-command docutils literal notranslate"><span class="pre">ctest_submit()</span></code></a> command.</p>
|
| 73 |
+
<p>The options are:</p>
|
| 74 |
+
<dl>
|
| 75 |
+
<dt><code class="docutils literal notranslate"><span class="pre">BUILD</span> <span class="pre"><build-dir></span></code></dt><dd><p>Specify the top-level build directory. If not given, the
|
| 76 |
+
<span class="target" id="index-0-variable:CTEST_BINARY_DIRECTORY"></span><a class="reference internal" href="../variable/CTEST_BINARY_DIRECTORY.html#variable:CTEST_BINARY_DIRECTORY" title="CTEST_BINARY_DIRECTORY"><code class="xref cmake cmake-variable docutils literal notranslate"><span class="pre">CTEST_BINARY_DIRECTORY</span></code></a> variable is used.</p>
|
| 77 |
+
</dd>
|
| 78 |
+
<dt><code class="docutils literal notranslate"><span class="pre">SOURCE</span> <span class="pre"><source-dir></span></code></dt><dd><p>Specify the source directory. If not given, the
|
| 79 |
+
<span class="target" id="index-0-variable:CTEST_SOURCE_DIRECTORY"></span><a class="reference internal" href="../variable/CTEST_SOURCE_DIRECTORY.html#variable:CTEST_SOURCE_DIRECTORY" title="CTEST_SOURCE_DIRECTORY"><code class="xref cmake cmake-variable docutils literal notranslate"><span class="pre">CTEST_SOURCE_DIRECTORY</span></code></a> variable is used.</p>
|
| 80 |
+
</dd>
|
| 81 |
+
<dt><code class="docutils literal notranslate"><span class="pre">APPEND</span></code></dt><dd><p>Mark <code class="docutils literal notranslate"><span class="pre">Configure.xml</span></code> for append to results previously submitted to a
|
| 82 |
+
dashboard server since the last <span class="target" id="index-0-command:ctest_start"></span><a class="reference internal" href="ctest_start.html#command:ctest_start" title="ctest_start"><code class="xref cmake cmake-command docutils literal notranslate"><span class="pre">ctest_start()</span></code></a> call.
|
| 83 |
+
Append semantics are defined by the dashboard server in use.
|
| 84 |
+
This does <em>not</em> cause results to be appended to a <code class="docutils literal notranslate"><span class="pre">.xml</span></code> file
|
| 85 |
+
produced by a previous call to this command.</p>
|
| 86 |
+
</dd>
|
| 87 |
+
<dt><code class="docutils literal notranslate"><span class="pre">OPTIONS</span> <span class="pre"><options></span></code></dt><dd><p>Specify command-line arguments to pass to the configuration tool.</p>
|
| 88 |
+
</dd>
|
| 89 |
+
<dt><code class="docutils literal notranslate"><span class="pre">RETURN_VALUE</span> <span class="pre"><result-var></span></code></dt><dd><p>Store in the <code class="docutils literal notranslate"><span class="pre"><result-var></span></code> variable the return value of the native
|
| 90 |
+
configuration tool.</p>
|
| 91 |
+
</dd>
|
| 92 |
+
<dt><code class="docutils literal notranslate"><span class="pre">CAPTURE_CMAKE_ERROR</span> <span class="pre"><result-var></span></code></dt><dd><div class="versionadded">
|
| 93 |
+
<p><span class="versionmodified added">New in version 3.7.</span></p>
|
| 94 |
+
</div>
|
| 95 |
+
<p>Store in the <code class="docutils literal notranslate"><span class="pre"><result-var></span></code> variable -1 if there are any errors running
|
| 96 |
+
the command and prevent ctest from returning non-zero if an error occurs.</p>
|
| 97 |
+
</dd>
|
| 98 |
+
<dt><code class="docutils literal notranslate"><span class="pre">QUIET</span></code></dt><dd><div class="versionadded">
|
| 99 |
+
<p><span class="versionmodified added">New in version 3.3.</span></p>
|
| 100 |
+
</div>
|
| 101 |
+
<p>Suppress any CTest-specific non-error messages that would have
|
| 102 |
+
otherwise been printed to the console. Output from the underlying
|
| 103 |
+
configure command is not affected.</p>
|
| 104 |
+
</dd>
|
| 105 |
+
</dl>
|
| 106 |
+
</section>
|
| 107 |
+
|
| 108 |
+
|
| 109 |
+
<div class="clearer"></div>
|
| 110 |
+
</div>
|
| 111 |
+
</div>
|
| 112 |
+
</div>
|
| 113 |
+
<div class="sphinxsidebar" role="navigation" aria-label="main navigation">
|
| 114 |
+
<div class="sphinxsidebarwrapper">
|
| 115 |
+
<div>
|
| 116 |
+
<h4>Previous topic</h4>
|
| 117 |
+
<p class="topless"><a href="ctest_build.html"
|
| 118 |
+
title="previous chapter">ctest_build</a></p>
|
| 119 |
+
</div>
|
| 120 |
+
<div>
|
| 121 |
+
<h4>Next topic</h4>
|
| 122 |
+
<p class="topless"><a href="ctest_coverage.html"
|
| 123 |
+
title="next chapter">ctest_coverage</a></p>
|
| 124 |
+
</div>
|
| 125 |
+
<div role="note" aria-label="source link">
|
| 126 |
+
<h3>This Page</h3>
|
| 127 |
+
<ul class="this-page-menu">
|
| 128 |
+
<li><a href="../_sources/command/ctest_configure.rst.txt"
|
| 129 |
+
rel="nofollow">Show Source</a></li>
|
| 130 |
+
</ul>
|
| 131 |
+
</div>
|
| 132 |
+
<div id="searchbox" style="display: none" role="search">
|
| 133 |
+
<h3 id="searchlabel">Quick search</h3>
|
| 134 |
+
<div class="searchformwrapper">
|
| 135 |
+
<form class="search" action="../search.html" method="get">
|
| 136 |
+
<input type="text" name="q" aria-labelledby="searchlabel" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/>
|
| 137 |
+
<input type="submit" value="Go" />
|
| 138 |
+
</form>
|
| 139 |
+
</div>
|
| 140 |
+
</div>
|
| 141 |
+
<script>document.getElementById('searchbox').style.display = "block"</script>
|
| 142 |
+
</div>
|
| 143 |
+
</div>
|
| 144 |
+
<div class="clearer"></div>
|
| 145 |
+
</div>
|
| 146 |
+
<div class="related" role="navigation" aria-label="related navigation">
|
| 147 |
+
<h3>Navigation</h3>
|
| 148 |
+
<ul>
|
| 149 |
+
<li class="right" style="margin-right: 10px">
|
| 150 |
+
<a href="../genindex.html" title="General Index"
|
| 151 |
+
>index</a></li>
|
| 152 |
+
<li class="right" >
|
| 153 |
+
<a href="ctest_coverage.html" title="ctest_coverage"
|
| 154 |
+
>next</a> |</li>
|
| 155 |
+
<li class="right" >
|
| 156 |
+
<a href="ctest_build.html" title="ctest_build"
|
| 157 |
+
>previous</a> |</li>
|
| 158 |
+
<li>
|
| 159 |
+
<img src="../_static/cmake-logo-16.png" alt=""
|
| 160 |
+
style="vertical-align: middle; margin-top: -2px" />
|
| 161 |
+
</li>
|
| 162 |
+
<li>
|
| 163 |
+
<a href="https://cmake.org/">CMake</a> »
|
| 164 |
+
</li>
|
| 165 |
+
<li>
|
| 166 |
+
<a href="../index.html">3.27.9 Documentation</a> »
|
| 167 |
+
</li>
|
| 168 |
+
|
| 169 |
+
<li class="nav-item nav-item-1"><a href="../manual/cmake-commands.7.html" >cmake-commands(7)</a> »</li>
|
| 170 |
+
<li class="nav-item nav-item-this"><a href="">ctest_configure</a></li>
|
| 171 |
+
</ul>
|
| 172 |
+
</div>
|
| 173 |
+
|
| 174 |
+
<div class="footer" role="contentinfo">
|
| 175 |
+
© Copyright 2000-2023 Kitware, Inc. and Contributors.
|
| 176 |
+
Created using <a href="https://www.sphinx-doc.org/">Sphinx</a> 5.3.0.
|
| 177 |
+
</div>
|
| 178 |
+
</body>
|
| 179 |
+
</html>
|
toolchain/cmake-3.27.9-linux-x86_64/doc/cmake/html/command/ctest_coverage.html
ADDED
|
@@ -0,0 +1,180 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
|
| 2 |
+
<!DOCTYPE html>
|
| 3 |
+
|
| 4 |
+
<html lang="en">
|
| 5 |
+
<head>
|
| 6 |
+
<meta charset="utf-8" />
|
| 7 |
+
<meta name="viewport" content="width=device-width, initial-scale=1.0" /><meta name="generator" content="Docutils 0.19: https://docutils.sourceforge.io/" />
|
| 8 |
+
|
| 9 |
+
<title>ctest_coverage — CMake 3.27.9 Documentation</title>
|
| 10 |
+
|
| 11 |
+
<link rel="stylesheet" type="text/css" href="../_static/pygments.css" />
|
| 12 |
+
<link rel="stylesheet" type="text/css" href="../_static/cmake.css" />
|
| 13 |
+
|
| 14 |
+
<script data-url_root="../" id="documentation_options" src="../_static/documentation_options.js"></script>
|
| 15 |
+
<script src="../_static/jquery.js"></script>
|
| 16 |
+
<script src="../_static/underscore.js"></script>
|
| 17 |
+
<script src="../_static/_sphinx_javascript_frameworks_compat.js"></script>
|
| 18 |
+
<script src="../_static/doctools.js"></script>
|
| 19 |
+
<script src="../_static/sphinx_highlight.js"></script>
|
| 20 |
+
|
| 21 |
+
<link rel="shortcut icon" href="../_static/cmake-favicon.ico"/>
|
| 22 |
+
<link rel="index" title="Index" href="../genindex.html" />
|
| 23 |
+
<link rel="search" title="Search" href="../search.html" />
|
| 24 |
+
<link rel="next" title="ctest_empty_binary_directory" href="ctest_empty_binary_directory.html" />
|
| 25 |
+
<link rel="prev" title="ctest_configure" href="ctest_configure.html" />
|
| 26 |
+
|
| 27 |
+
|
| 28 |
+
</head><body>
|
| 29 |
+
|
| 30 |
+
<div class="related" role="navigation" aria-label="related navigation">
|
| 31 |
+
<h3>Navigation</h3>
|
| 32 |
+
<ul>
|
| 33 |
+
<li class="right" style="margin-right: 10px">
|
| 34 |
+
<a href="../genindex.html" title="General Index"
|
| 35 |
+
accesskey="I">index</a></li>
|
| 36 |
+
<li class="right" >
|
| 37 |
+
<a href="ctest_empty_binary_directory.html" title="ctest_empty_binary_directory"
|
| 38 |
+
accesskey="N">next</a> |</li>
|
| 39 |
+
<li class="right" >
|
| 40 |
+
<a href="ctest_configure.html" title="ctest_configure"
|
| 41 |
+
accesskey="P">previous</a> |</li>
|
| 42 |
+
<li>
|
| 43 |
+
<img src="../_static/cmake-logo-16.png" alt=""
|
| 44 |
+
style="vertical-align: middle; margin-top: -2px" />
|
| 45 |
+
</li>
|
| 46 |
+
<li>
|
| 47 |
+
<a href="https://cmake.org/">CMake</a> »
|
| 48 |
+
</li>
|
| 49 |
+
<li>
|
| 50 |
+
<a href="../index.html">3.27.9 Documentation</a> »
|
| 51 |
+
</li>
|
| 52 |
+
|
| 53 |
+
<li class="nav-item nav-item-1"><a href="../manual/cmake-commands.7.html" accesskey="U">cmake-commands(7)</a> »</li>
|
| 54 |
+
<li class="nav-item nav-item-this"><a href="">ctest_coverage</a></li>
|
| 55 |
+
</ul>
|
| 56 |
+
</div>
|
| 57 |
+
|
| 58 |
+
<div class="document">
|
| 59 |
+
<div class="documentwrapper">
|
| 60 |
+
<div class="bodywrapper">
|
| 61 |
+
<div class="body" role="main">
|
| 62 |
+
|
| 63 |
+
<section id="ctest-coverage">
|
| 64 |
+
<span id="command:ctest_coverage"></span><h1>ctest_coverage<a class="headerlink" href="#ctest-coverage" title="Permalink to this heading">¶</a></h1>
|
| 65 |
+
<p>Perform the <a class="reference internal" href="../manual/ctest.1.html#ctest-coverage-step"><span class="std std-ref">CTest Coverage Step</span></a> as a <a class="reference internal" href="../manual/ctest.1.html#dashboard-client"><span class="std std-ref">Dashboard Client</span></a>.</p>
|
| 66 |
+
<div class="highlight-cmake notranslate"><div class="highlight"><pre><span></span><span class="nf">ctest_coverage(</span><span class="p">[</span><span class="no">BUILD</span><span class="w"> </span><span class="nv"><build-dir></span><span class="p">]</span><span class="w"> </span><span class="p">[</span><span class="no">APPEND</span><span class="p">]</span>
|
| 67 |
+
<span class="w"> </span><span class="p">[</span><span class="no">LABELS</span><span class="w"> </span><span class="nv"><label>...</span><span class="p">]</span>
|
| 68 |
+
<span class="w"> </span><span class="p">[</span><span class="no">RETURN_VALUE</span><span class="w"> </span><span class="nv"><result-var></span><span class="p">]</span>
|
| 69 |
+
<span class="w"> </span><span class="p">[</span><span class="no">CAPTURE_CMAKE_ERROR</span><span class="w"> </span><span class="nv"><result-var></span><span class="p">]</span>
|
| 70 |
+
<span class="w"> </span><span class="p">[</span><span class="no">QUIET</span><span class="p">]</span>
|
| 71 |
+
<span class="w"> </span><span class="nf">)</span>
|
| 72 |
+
</pre></div>
|
| 73 |
+
</div>
|
| 74 |
+
<p>Collect coverage tool results and stores them in <code class="docutils literal notranslate"><span class="pre">Coverage.xml</span></code>
|
| 75 |
+
for submission with the <span class="target" id="index-0-command:ctest_submit"></span><a class="reference internal" href="ctest_submit.html#command:ctest_submit" title="ctest_submit"><code class="xref cmake cmake-command docutils literal notranslate"><span class="pre">ctest_submit()</span></code></a> command.</p>
|
| 76 |
+
<p>The options are:</p>
|
| 77 |
+
<dl>
|
| 78 |
+
<dt><code class="docutils literal notranslate"><span class="pre">BUILD</span> <span class="pre"><build-dir></span></code></dt><dd><p>Specify the top-level build directory. If not given, the
|
| 79 |
+
<span class="target" id="index-0-variable:CTEST_BINARY_DIRECTORY"></span><a class="reference internal" href="../variable/CTEST_BINARY_DIRECTORY.html#variable:CTEST_BINARY_DIRECTORY" title="CTEST_BINARY_DIRECTORY"><code class="xref cmake cmake-variable docutils literal notranslate"><span class="pre">CTEST_BINARY_DIRECTORY</span></code></a> variable is used.</p>
|
| 80 |
+
</dd>
|
| 81 |
+
<dt><code class="docutils literal notranslate"><span class="pre">APPEND</span></code></dt><dd><p>Mark <code class="docutils literal notranslate"><span class="pre">Coverage.xml</span></code> for append to results previously submitted to a
|
| 82 |
+
dashboard server since the last <span class="target" id="index-0-command:ctest_start"></span><a class="reference internal" href="ctest_start.html#command:ctest_start" title="ctest_start"><code class="xref cmake cmake-command docutils literal notranslate"><span class="pre">ctest_start()</span></code></a> call.
|
| 83 |
+
Append semantics are defined by the dashboard server in use.
|
| 84 |
+
This does <em>not</em> cause results to be appended to a <code class="docutils literal notranslate"><span class="pre">.xml</span></code> file
|
| 85 |
+
produced by a previous call to this command.</p>
|
| 86 |
+
</dd>
|
| 87 |
+
<dt><code class="docutils literal notranslate"><span class="pre">LABELS</span></code></dt><dd><p>Filter the coverage report to include only source files labeled
|
| 88 |
+
with at least one of the labels specified.</p>
|
| 89 |
+
</dd>
|
| 90 |
+
<dt><code class="docutils literal notranslate"><span class="pre">RETURN_VALUE</span> <span class="pre"><result-var></span></code></dt><dd><p>Store in the <code class="docutils literal notranslate"><span class="pre"><result-var></span></code> variable <code class="docutils literal notranslate"><span class="pre">0</span></code> if coverage tools
|
| 91 |
+
ran without error and non-zero otherwise.</p>
|
| 92 |
+
</dd>
|
| 93 |
+
<dt><code class="docutils literal notranslate"><span class="pre">CAPTURE_CMAKE_ERROR</span> <span class="pre"><result-var></span></code></dt><dd><div class="versionadded">
|
| 94 |
+
<p><span class="versionmodified added">New in version 3.7.</span></p>
|
| 95 |
+
</div>
|
| 96 |
+
<p>Store in the <code class="docutils literal notranslate"><span class="pre"><result-var></span></code> variable -1 if there are any errors running
|
| 97 |
+
the command and prevent ctest from returning non-zero if an error occurs.</p>
|
| 98 |
+
</dd>
|
| 99 |
+
<dt><code class="docutils literal notranslate"><span class="pre">QUIET</span></code></dt><dd><div class="versionadded">
|
| 100 |
+
<p><span class="versionmodified added">New in version 3.3.</span></p>
|
| 101 |
+
</div>
|
| 102 |
+
<p>Suppress any CTest-specific non-error output that would have been
|
| 103 |
+
printed to the console otherwise. The summary indicating how many
|
| 104 |
+
lines of code were covered is unaffected by this option.</p>
|
| 105 |
+
</dd>
|
| 106 |
+
</dl>
|
| 107 |
+
</section>
|
| 108 |
+
|
| 109 |
+
|
| 110 |
+
<div class="clearer"></div>
|
| 111 |
+
</div>
|
| 112 |
+
</div>
|
| 113 |
+
</div>
|
| 114 |
+
<div class="sphinxsidebar" role="navigation" aria-label="main navigation">
|
| 115 |
+
<div class="sphinxsidebarwrapper">
|
| 116 |
+
<div>
|
| 117 |
+
<h4>Previous topic</h4>
|
| 118 |
+
<p class="topless"><a href="ctest_configure.html"
|
| 119 |
+
title="previous chapter">ctest_configure</a></p>
|
| 120 |
+
</div>
|
| 121 |
+
<div>
|
| 122 |
+
<h4>Next topic</h4>
|
| 123 |
+
<p class="topless"><a href="ctest_empty_binary_directory.html"
|
| 124 |
+
title="next chapter">ctest_empty_binary_directory</a></p>
|
| 125 |
+
</div>
|
| 126 |
+
<div role="note" aria-label="source link">
|
| 127 |
+
<h3>This Page</h3>
|
| 128 |
+
<ul class="this-page-menu">
|
| 129 |
+
<li><a href="../_sources/command/ctest_coverage.rst.txt"
|
| 130 |
+
rel="nofollow">Show Source</a></li>
|
| 131 |
+
</ul>
|
| 132 |
+
</div>
|
| 133 |
+
<div id="searchbox" style="display: none" role="search">
|
| 134 |
+
<h3 id="searchlabel">Quick search</h3>
|
| 135 |
+
<div class="searchformwrapper">
|
| 136 |
+
<form class="search" action="../search.html" method="get">
|
| 137 |
+
<input type="text" name="q" aria-labelledby="searchlabel" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/>
|
| 138 |
+
<input type="submit" value="Go" />
|
| 139 |
+
</form>
|
| 140 |
+
</div>
|
| 141 |
+
</div>
|
| 142 |
+
<script>document.getElementById('searchbox').style.display = "block"</script>
|
| 143 |
+
</div>
|
| 144 |
+
</div>
|
| 145 |
+
<div class="clearer"></div>
|
| 146 |
+
</div>
|
| 147 |
+
<div class="related" role="navigation" aria-label="related navigation">
|
| 148 |
+
<h3>Navigation</h3>
|
| 149 |
+
<ul>
|
| 150 |
+
<li class="right" style="margin-right: 10px">
|
| 151 |
+
<a href="../genindex.html" title="General Index"
|
| 152 |
+
>index</a></li>
|
| 153 |
+
<li class="right" >
|
| 154 |
+
<a href="ctest_empty_binary_directory.html" title="ctest_empty_binary_directory"
|
| 155 |
+
>next</a> |</li>
|
| 156 |
+
<li class="right" >
|
| 157 |
+
<a href="ctest_configure.html" title="ctest_configure"
|
| 158 |
+
>previous</a> |</li>
|
| 159 |
+
<li>
|
| 160 |
+
<img src="../_static/cmake-logo-16.png" alt=""
|
| 161 |
+
style="vertical-align: middle; margin-top: -2px" />
|
| 162 |
+
</li>
|
| 163 |
+
<li>
|
| 164 |
+
<a href="https://cmake.org/">CMake</a> »
|
| 165 |
+
</li>
|
| 166 |
+
<li>
|
| 167 |
+
<a href="../index.html">3.27.9 Documentation</a> »
|
| 168 |
+
</li>
|
| 169 |
+
|
| 170 |
+
<li class="nav-item nav-item-1"><a href="../manual/cmake-commands.7.html" >cmake-commands(7)</a> »</li>
|
| 171 |
+
<li class="nav-item nav-item-this"><a href="">ctest_coverage</a></li>
|
| 172 |
+
</ul>
|
| 173 |
+
</div>
|
| 174 |
+
|
| 175 |
+
<div class="footer" role="contentinfo">
|
| 176 |
+
© Copyright 2000-2023 Kitware, Inc. and Contributors.
|
| 177 |
+
Created using <a href="https://www.sphinx-doc.org/">Sphinx</a> 5.3.0.
|
| 178 |
+
</div>
|
| 179 |
+
</body>
|
| 180 |
+
</html>
|
toolchain/cmake-3.27.9-linux-x86_64/doc/cmake/html/command/ctest_empty_binary_directory.html
ADDED
|
@@ -0,0 +1,145 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
|
| 2 |
+
<!DOCTYPE html>
|
| 3 |
+
|
| 4 |
+
<html lang="en">
|
| 5 |
+
<head>
|
| 6 |
+
<meta charset="utf-8" />
|
| 7 |
+
<meta name="viewport" content="width=device-width, initial-scale=1.0" /><meta name="generator" content="Docutils 0.19: https://docutils.sourceforge.io/" />
|
| 8 |
+
|
| 9 |
+
<title>ctest_empty_binary_directory — CMake 3.27.9 Documentation</title>
|
| 10 |
+
|
| 11 |
+
<link rel="stylesheet" type="text/css" href="../_static/pygments.css" />
|
| 12 |
+
<link rel="stylesheet" type="text/css" href="../_static/cmake.css" />
|
| 13 |
+
|
| 14 |
+
<script data-url_root="../" id="documentation_options" src="../_static/documentation_options.js"></script>
|
| 15 |
+
<script src="../_static/jquery.js"></script>
|
| 16 |
+
<script src="../_static/underscore.js"></script>
|
| 17 |
+
<script src="../_static/_sphinx_javascript_frameworks_compat.js"></script>
|
| 18 |
+
<script src="../_static/doctools.js"></script>
|
| 19 |
+
<script src="../_static/sphinx_highlight.js"></script>
|
| 20 |
+
|
| 21 |
+
<link rel="shortcut icon" href="../_static/cmake-favicon.ico"/>
|
| 22 |
+
<link rel="index" title="Index" href="../genindex.html" />
|
| 23 |
+
<link rel="search" title="Search" href="../search.html" />
|
| 24 |
+
<link rel="next" title="ctest_memcheck" href="ctest_memcheck.html" />
|
| 25 |
+
<link rel="prev" title="ctest_coverage" href="ctest_coverage.html" />
|
| 26 |
+
|
| 27 |
+
|
| 28 |
+
</head><body>
|
| 29 |
+
|
| 30 |
+
<div class="related" role="navigation" aria-label="related navigation">
|
| 31 |
+
<h3>Navigation</h3>
|
| 32 |
+
<ul>
|
| 33 |
+
<li class="right" style="margin-right: 10px">
|
| 34 |
+
<a href="../genindex.html" title="General Index"
|
| 35 |
+
accesskey="I">index</a></li>
|
| 36 |
+
<li class="right" >
|
| 37 |
+
<a href="ctest_memcheck.html" title="ctest_memcheck"
|
| 38 |
+
accesskey="N">next</a> |</li>
|
| 39 |
+
<li class="right" >
|
| 40 |
+
<a href="ctest_coverage.html" title="ctest_coverage"
|
| 41 |
+
accesskey="P">previous</a> |</li>
|
| 42 |
+
<li>
|
| 43 |
+
<img src="../_static/cmake-logo-16.png" alt=""
|
| 44 |
+
style="vertical-align: middle; margin-top: -2px" />
|
| 45 |
+
</li>
|
| 46 |
+
<li>
|
| 47 |
+
<a href="https://cmake.org/">CMake</a> »
|
| 48 |
+
</li>
|
| 49 |
+
<li>
|
| 50 |
+
<a href="../index.html">3.27.9 Documentation</a> »
|
| 51 |
+
</li>
|
| 52 |
+
|
| 53 |
+
<li class="nav-item nav-item-1"><a href="../manual/cmake-commands.7.html" accesskey="U">cmake-commands(7)</a> »</li>
|
| 54 |
+
<li class="nav-item nav-item-this"><a href="">ctest_empty_binary_directory</a></li>
|
| 55 |
+
</ul>
|
| 56 |
+
</div>
|
| 57 |
+
|
| 58 |
+
<div class="document">
|
| 59 |
+
<div class="documentwrapper">
|
| 60 |
+
<div class="bodywrapper">
|
| 61 |
+
<div class="body" role="main">
|
| 62 |
+
|
| 63 |
+
<section id="ctest-empty-binary-directory">
|
| 64 |
+
<span id="command:ctest_empty_binary_directory"></span><h1>ctest_empty_binary_directory<a class="headerlink" href="#ctest-empty-binary-directory" title="Permalink to this heading">¶</a></h1>
|
| 65 |
+
<p>empties the binary directory</p>
|
| 66 |
+
<div class="highlight-cmake notranslate"><div class="highlight"><pre><span></span><span class="nf">ctest_empty_binary_directory(</span><span class="nv"><directory></span><span class="nf">)</span>
|
| 67 |
+
</pre></div>
|
| 68 |
+
</div>
|
| 69 |
+
<p>Removes a binary directory. This command will perform some checks
|
| 70 |
+
prior to deleting the directory in an attempt to avoid malicious or
|
| 71 |
+
accidental directory deletion.</p>
|
| 72 |
+
</section>
|
| 73 |
+
|
| 74 |
+
|
| 75 |
+
<div class="clearer"></div>
|
| 76 |
+
</div>
|
| 77 |
+
</div>
|
| 78 |
+
</div>
|
| 79 |
+
<div class="sphinxsidebar" role="navigation" aria-label="main navigation">
|
| 80 |
+
<div class="sphinxsidebarwrapper">
|
| 81 |
+
<div>
|
| 82 |
+
<h4>Previous topic</h4>
|
| 83 |
+
<p class="topless"><a href="ctest_coverage.html"
|
| 84 |
+
title="previous chapter">ctest_coverage</a></p>
|
| 85 |
+
</div>
|
| 86 |
+
<div>
|
| 87 |
+
<h4>Next topic</h4>
|
| 88 |
+
<p class="topless"><a href="ctest_memcheck.html"
|
| 89 |
+
title="next chapter">ctest_memcheck</a></p>
|
| 90 |
+
</div>
|
| 91 |
+
<div role="note" aria-label="source link">
|
| 92 |
+
<h3>This Page</h3>
|
| 93 |
+
<ul class="this-page-menu">
|
| 94 |
+
<li><a href="../_sources/command/ctest_empty_binary_directory.rst.txt"
|
| 95 |
+
rel="nofollow">Show Source</a></li>
|
| 96 |
+
</ul>
|
| 97 |
+
</div>
|
| 98 |
+
<div id="searchbox" style="display: none" role="search">
|
| 99 |
+
<h3 id="searchlabel">Quick search</h3>
|
| 100 |
+
<div class="searchformwrapper">
|
| 101 |
+
<form class="search" action="../search.html" method="get">
|
| 102 |
+
<input type="text" name="q" aria-labelledby="searchlabel" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/>
|
| 103 |
+
<input type="submit" value="Go" />
|
| 104 |
+
</form>
|
| 105 |
+
</div>
|
| 106 |
+
</div>
|
| 107 |
+
<script>document.getElementById('searchbox').style.display = "block"</script>
|
| 108 |
+
</div>
|
| 109 |
+
</div>
|
| 110 |
+
<div class="clearer"></div>
|
| 111 |
+
</div>
|
| 112 |
+
<div class="related" role="navigation" aria-label="related navigation">
|
| 113 |
+
<h3>Navigation</h3>
|
| 114 |
+
<ul>
|
| 115 |
+
<li class="right" style="margin-right: 10px">
|
| 116 |
+
<a href="../genindex.html" title="General Index"
|
| 117 |
+
>index</a></li>
|
| 118 |
+
<li class="right" >
|
| 119 |
+
<a href="ctest_memcheck.html" title="ctest_memcheck"
|
| 120 |
+
>next</a> |</li>
|
| 121 |
+
<li class="right" >
|
| 122 |
+
<a href="ctest_coverage.html" title="ctest_coverage"
|
| 123 |
+
>previous</a> |</li>
|
| 124 |
+
<li>
|
| 125 |
+
<img src="../_static/cmake-logo-16.png" alt=""
|
| 126 |
+
style="vertical-align: middle; margin-top: -2px" />
|
| 127 |
+
</li>
|
| 128 |
+
<li>
|
| 129 |
+
<a href="https://cmake.org/">CMake</a> »
|
| 130 |
+
</li>
|
| 131 |
+
<li>
|
| 132 |
+
<a href="../index.html">3.27.9 Documentation</a> »
|
| 133 |
+
</li>
|
| 134 |
+
|
| 135 |
+
<li class="nav-item nav-item-1"><a href="../manual/cmake-commands.7.html" >cmake-commands(7)</a> »</li>
|
| 136 |
+
<li class="nav-item nav-item-this"><a href="">ctest_empty_binary_directory</a></li>
|
| 137 |
+
</ul>
|
| 138 |
+
</div>
|
| 139 |
+
|
| 140 |
+
<div class="footer" role="contentinfo">
|
| 141 |
+
© Copyright 2000-2023 Kitware, Inc. and Contributors.
|
| 142 |
+
Created using <a href="https://www.sphinx-doc.org/">Sphinx</a> 5.3.0.
|
| 143 |
+
</div>
|
| 144 |
+
</body>
|
| 145 |
+
</html>
|
toolchain/cmake-3.27.9-linux-x86_64/doc/cmake/html/command/ctest_memcheck.html
ADDED
|
@@ -0,0 +1,177 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
|
| 2 |
+
<!DOCTYPE html>
|
| 3 |
+
|
| 4 |
+
<html lang="en">
|
| 5 |
+
<head>
|
| 6 |
+
<meta charset="utf-8" />
|
| 7 |
+
<meta name="viewport" content="width=device-width, initial-scale=1.0" /><meta name="generator" content="Docutils 0.19: https://docutils.sourceforge.io/" />
|
| 8 |
+
|
| 9 |
+
<title>ctest_memcheck — CMake 3.27.9 Documentation</title>
|
| 10 |
+
|
| 11 |
+
<link rel="stylesheet" type="text/css" href="../_static/pygments.css" />
|
| 12 |
+
<link rel="stylesheet" type="text/css" href="../_static/cmake.css" />
|
| 13 |
+
|
| 14 |
+
<script data-url_root="../" id="documentation_options" src="../_static/documentation_options.js"></script>
|
| 15 |
+
<script src="../_static/jquery.js"></script>
|
| 16 |
+
<script src="../_static/underscore.js"></script>
|
| 17 |
+
<script src="../_static/_sphinx_javascript_frameworks_compat.js"></script>
|
| 18 |
+
<script src="../_static/doctools.js"></script>
|
| 19 |
+
<script src="../_static/sphinx_highlight.js"></script>
|
| 20 |
+
|
| 21 |
+
<link rel="shortcut icon" href="../_static/cmake-favicon.ico"/>
|
| 22 |
+
<link rel="index" title="Index" href="../genindex.html" />
|
| 23 |
+
<link rel="search" title="Search" href="../search.html" />
|
| 24 |
+
<link rel="next" title="ctest_read_custom_files" href="ctest_read_custom_files.html" />
|
| 25 |
+
<link rel="prev" title="ctest_empty_binary_directory" href="ctest_empty_binary_directory.html" />
|
| 26 |
+
|
| 27 |
+
|
| 28 |
+
</head><body>
|
| 29 |
+
|
| 30 |
+
<div class="related" role="navigation" aria-label="related navigation">
|
| 31 |
+
<h3>Navigation</h3>
|
| 32 |
+
<ul>
|
| 33 |
+
<li class="right" style="margin-right: 10px">
|
| 34 |
+
<a href="../genindex.html" title="General Index"
|
| 35 |
+
accesskey="I">index</a></li>
|
| 36 |
+
<li class="right" >
|
| 37 |
+
<a href="ctest_read_custom_files.html" title="ctest_read_custom_files"
|
| 38 |
+
accesskey="N">next</a> |</li>
|
| 39 |
+
<li class="right" >
|
| 40 |
+
<a href="ctest_empty_binary_directory.html" title="ctest_empty_binary_directory"
|
| 41 |
+
accesskey="P">previous</a> |</li>
|
| 42 |
+
<li>
|
| 43 |
+
<img src="../_static/cmake-logo-16.png" alt=""
|
| 44 |
+
style="vertical-align: middle; margin-top: -2px" />
|
| 45 |
+
</li>
|
| 46 |
+
<li>
|
| 47 |
+
<a href="https://cmake.org/">CMake</a> »
|
| 48 |
+
</li>
|
| 49 |
+
<li>
|
| 50 |
+
<a href="../index.html">3.27.9 Documentation</a> »
|
| 51 |
+
</li>
|
| 52 |
+
|
| 53 |
+
<li class="nav-item nav-item-1"><a href="../manual/cmake-commands.7.html" accesskey="U">cmake-commands(7)</a> »</li>
|
| 54 |
+
<li class="nav-item nav-item-this"><a href="">ctest_memcheck</a></li>
|
| 55 |
+
</ul>
|
| 56 |
+
</div>
|
| 57 |
+
|
| 58 |
+
<div class="document">
|
| 59 |
+
<div class="documentwrapper">
|
| 60 |
+
<div class="bodywrapper">
|
| 61 |
+
<div class="body" role="main">
|
| 62 |
+
|
| 63 |
+
<section id="ctest-memcheck">
|
| 64 |
+
<span id="command:ctest_memcheck"></span><h1>ctest_memcheck<a class="headerlink" href="#ctest-memcheck" title="Permalink to this heading">¶</a></h1>
|
| 65 |
+
<p>Perform the <a class="reference internal" href="../manual/ctest.1.html#ctest-memcheck-step"><span class="std std-ref">CTest MemCheck Step</span></a> as a <a class="reference internal" href="../manual/ctest.1.html#dashboard-client"><span class="std std-ref">Dashboard Client</span></a>.</p>
|
| 66 |
+
<div class="highlight-cmake notranslate"><div class="highlight"><pre><span></span><span class="nf">ctest_memcheck(</span><span class="p">[</span><span class="no">BUILD</span><span class="w"> </span><span class="nv"><build-dir></span><span class="p">]</span><span class="w"> </span><span class="p">[</span><span class="no">APPEND</span><span class="p">]</span>
|
| 67 |
+
<span class="w"> </span><span class="p">[</span><span class="no">START</span><span class="w"> </span><span class="nv"><start-number></span><span class="p">]</span>
|
| 68 |
+
<span class="w"> </span><span class="p">[</span><span class="no">END</span><span class="w"> </span><span class="nv"><end-number></span><span class="p">]</span>
|
| 69 |
+
<span class="w"> </span><span class="p">[</span><span class="no">STRIDE</span><span class="w"> </span><span class="nv"><stride-number></span><span class="p">]</span>
|
| 70 |
+
<span class="w"> </span><span class="p">[</span><span class="no">EXCLUDE</span><span class="w"> </span><span class="nv"><exclude-regex></span><span class="p">]</span>
|
| 71 |
+
<span class="w"> </span><span class="p">[</span><span class="no">INCLUDE</span><span class="w"> </span><span class="nv"><include-regex></span><span class="p">]</span>
|
| 72 |
+
<span class="w"> </span><span class="p">[</span><span class="no">EXCLUDE_LABEL</span><span class="w"> </span><span class="nv"><label-exclude-regex></span><span class="p">]</span>
|
| 73 |
+
<span class="w"> </span><span class="p">[</span><span class="no">INCLUDE_LABEL</span><span class="w"> </span><span class="nv"><label-include-regex></span><span class="p">]</span>
|
| 74 |
+
<span class="w"> </span><span class="p">[</span><span class="no">EXCLUDE_FIXTURE</span><span class="w"> </span><span class="nv"><regex></span><span class="p">]</span>
|
| 75 |
+
<span class="w"> </span><span class="p">[</span><span class="no">EXCLUDE_FIXTURE_SETUP</span><span class="w"> </span><span class="nv"><regex></span><span class="p">]</span>
|
| 76 |
+
<span class="w"> </span><span class="p">[</span><span class="no">EXCLUDE_FIXTURE_CLEANUP</span><span class="w"> </span><span class="nv"><regex></span><span class="p">]</span>
|
| 77 |
+
<span class="w"> </span><span class="p">[</span><span class="no">PARALLEL_LEVEL</span><span class="w"> </span><span class="nv"><level></span><span class="p">]</span>
|
| 78 |
+
<span class="w"> </span><span class="p">[</span><span class="no">RESOURCE_SPEC_FILE</span><span class="w"> </span><span class="nv"><file></span><span class="p">]</span>
|
| 79 |
+
<span class="w"> </span><span class="p">[</span><span class="no">TEST_LOAD</span><span class="w"> </span><span class="nv"><threshold></span><span class="p">]</span>
|
| 80 |
+
<span class="w"> </span><span class="p">[</span><span class="no">SCHEDULE_RANDOM</span><span class="w"> </span><span class="o"><</span><span class="no">ON</span><span class="p">|</span><span class="no">OFF</span><span class="o">></span><span class="p">]</span>
|
| 81 |
+
<span class="w"> </span><span class="p">[</span><span class="no">STOP_ON_FAILURE</span><span class="p">]</span>
|
| 82 |
+
<span class="w"> </span><span class="p">[</span><span class="no">STOP_TIME</span><span class="w"> </span><span class="nv"><time-of-day></span><span class="p">]</span>
|
| 83 |
+
<span class="w"> </span><span class="p">[</span><span class="no">RETURN_VALUE</span><span class="w"> </span><span class="nv"><result-var></span><span class="p">]</span>
|
| 84 |
+
<span class="w"> </span><span class="p">[</span><span class="no">CAPTURE_CMAKE_ERROR</span><span class="w"> </span><span class="nv"><result-var></span><span class="p">]</span>
|
| 85 |
+
<span class="w"> </span><span class="p">[</span><span class="no">REPEAT</span><span class="w"> </span><span class="nv"><mode></span><span class="o">:</span><span class="nv"><n></span><span class="p">]</span>
|
| 86 |
+
<span class="w"> </span><span class="p">[</span><span class="no">OUTPUT_JUNIT</span><span class="w"> </span><span class="nv"><file></span><span class="p">]</span>
|
| 87 |
+
<span class="w"> </span><span class="p">[</span><span class="no">DEFECT_COUNT</span><span class="w"> </span><span class="nv"><defect-count-var></span><span class="p">]</span>
|
| 88 |
+
<span class="w"> </span><span class="p">[</span><span class="no">QUIET</span><span class="p">]</span>
|
| 89 |
+
<span class="w"> </span><span class="nf">)</span>
|
| 90 |
+
</pre></div>
|
| 91 |
+
</div>
|
| 92 |
+
<p>Run tests with a dynamic analysis tool and store results in
|
| 93 |
+
<code class="docutils literal notranslate"><span class="pre">MemCheck.xml</span></code> for submission with the <span class="target" id="index-0-command:ctest_submit"></span><a class="reference internal" href="ctest_submit.html#command:ctest_submit" title="ctest_submit"><code class="xref cmake cmake-command docutils literal notranslate"><span class="pre">ctest_submit()</span></code></a>
|
| 94 |
+
command.</p>
|
| 95 |
+
<p>Most options are the same as those for the <span class="target" id="index-0-command:ctest_test"></span><a class="reference internal" href="ctest_test.html#command:ctest_test" title="ctest_test"><code class="xref cmake cmake-command docutils literal notranslate"><span class="pre">ctest_test()</span></code></a> command.</p>
|
| 96 |
+
<p>The options unique to this command are:</p>
|
| 97 |
+
<dl>
|
| 98 |
+
<dt><code class="docutils literal notranslate"><span class="pre">DEFECT_COUNT</span> <span class="pre"><defect-count-var></span></code></dt><dd><div class="versionadded">
|
| 99 |
+
<p><span class="versionmodified added">New in version 3.8.</span></p>
|
| 100 |
+
</div>
|
| 101 |
+
<p>Store in the <code class="docutils literal notranslate"><span class="pre"><defect-count-var></span></code> the number of defects found.</p>
|
| 102 |
+
</dd>
|
| 103 |
+
</dl>
|
| 104 |
+
</section>
|
| 105 |
+
|
| 106 |
+
|
| 107 |
+
<div class="clearer"></div>
|
| 108 |
+
</div>
|
| 109 |
+
</div>
|
| 110 |
+
</div>
|
| 111 |
+
<div class="sphinxsidebar" role="navigation" aria-label="main navigation">
|
| 112 |
+
<div class="sphinxsidebarwrapper">
|
| 113 |
+
<div>
|
| 114 |
+
<h4>Previous topic</h4>
|
| 115 |
+
<p class="topless"><a href="ctest_empty_binary_directory.html"
|
| 116 |
+
title="previous chapter">ctest_empty_binary_directory</a></p>
|
| 117 |
+
</div>
|
| 118 |
+
<div>
|
| 119 |
+
<h4>Next topic</h4>
|
| 120 |
+
<p class="topless"><a href="ctest_read_custom_files.html"
|
| 121 |
+
title="next chapter">ctest_read_custom_files</a></p>
|
| 122 |
+
</div>
|
| 123 |
+
<div role="note" aria-label="source link">
|
| 124 |
+
<h3>This Page</h3>
|
| 125 |
+
<ul class="this-page-menu">
|
| 126 |
+
<li><a href="../_sources/command/ctest_memcheck.rst.txt"
|
| 127 |
+
rel="nofollow">Show Source</a></li>
|
| 128 |
+
</ul>
|
| 129 |
+
</div>
|
| 130 |
+
<div id="searchbox" style="display: none" role="search">
|
| 131 |
+
<h3 id="searchlabel">Quick search</h3>
|
| 132 |
+
<div class="searchformwrapper">
|
| 133 |
+
<form class="search" action="../search.html" method="get">
|
| 134 |
+
<input type="text" name="q" aria-labelledby="searchlabel" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/>
|
| 135 |
+
<input type="submit" value="Go" />
|
| 136 |
+
</form>
|
| 137 |
+
</div>
|
| 138 |
+
</div>
|
| 139 |
+
<script>document.getElementById('searchbox').style.display = "block"</script>
|
| 140 |
+
</div>
|
| 141 |
+
</div>
|
| 142 |
+
<div class="clearer"></div>
|
| 143 |
+
</div>
|
| 144 |
+
<div class="related" role="navigation" aria-label="related navigation">
|
| 145 |
+
<h3>Navigation</h3>
|
| 146 |
+
<ul>
|
| 147 |
+
<li class="right" style="margin-right: 10px">
|
| 148 |
+
<a href="../genindex.html" title="General Index"
|
| 149 |
+
>index</a></li>
|
| 150 |
+
<li class="right" >
|
| 151 |
+
<a href="ctest_read_custom_files.html" title="ctest_read_custom_files"
|
| 152 |
+
>next</a> |</li>
|
| 153 |
+
<li class="right" >
|
| 154 |
+
<a href="ctest_empty_binary_directory.html" title="ctest_empty_binary_directory"
|
| 155 |
+
>previous</a> |</li>
|
| 156 |
+
<li>
|
| 157 |
+
<img src="../_static/cmake-logo-16.png" alt=""
|
| 158 |
+
style="vertical-align: middle; margin-top: -2px" />
|
| 159 |
+
</li>
|
| 160 |
+
<li>
|
| 161 |
+
<a href="https://cmake.org/">CMake</a> »
|
| 162 |
+
</li>
|
| 163 |
+
<li>
|
| 164 |
+
<a href="../index.html">3.27.9 Documentation</a> »
|
| 165 |
+
</li>
|
| 166 |
+
|
| 167 |
+
<li class="nav-item nav-item-1"><a href="../manual/cmake-commands.7.html" >cmake-commands(7)</a> »</li>
|
| 168 |
+
<li class="nav-item nav-item-this"><a href="">ctest_memcheck</a></li>
|
| 169 |
+
</ul>
|
| 170 |
+
</div>
|
| 171 |
+
|
| 172 |
+
<div class="footer" role="contentinfo">
|
| 173 |
+
© Copyright 2000-2023 Kitware, Inc. and Contributors.
|
| 174 |
+
Created using <a href="https://www.sphinx-doc.org/">Sphinx</a> 5.3.0.
|
| 175 |
+
</div>
|
| 176 |
+
</body>
|
| 177 |
+
</html>
|
toolchain/cmake-3.27.9-linux-x86_64/doc/cmake/html/command/ctest_read_custom_files.html
ADDED
|
@@ -0,0 +1,146 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
|
| 2 |
+
<!DOCTYPE html>
|
| 3 |
+
|
| 4 |
+
<html lang="en">
|
| 5 |
+
<head>
|
| 6 |
+
<meta charset="utf-8" />
|
| 7 |
+
<meta name="viewport" content="width=device-width, initial-scale=1.0" /><meta name="generator" content="Docutils 0.19: https://docutils.sourceforge.io/" />
|
| 8 |
+
|
| 9 |
+
<title>ctest_read_custom_files — CMake 3.27.9 Documentation</title>
|
| 10 |
+
|
| 11 |
+
<link rel="stylesheet" type="text/css" href="../_static/pygments.css" />
|
| 12 |
+
<link rel="stylesheet" type="text/css" href="../_static/cmake.css" />
|
| 13 |
+
|
| 14 |
+
<script data-url_root="../" id="documentation_options" src="../_static/documentation_options.js"></script>
|
| 15 |
+
<script src="../_static/jquery.js"></script>
|
| 16 |
+
<script src="../_static/underscore.js"></script>
|
| 17 |
+
<script src="../_static/_sphinx_javascript_frameworks_compat.js"></script>
|
| 18 |
+
<script src="../_static/doctools.js"></script>
|
| 19 |
+
<script src="../_static/sphinx_highlight.js"></script>
|
| 20 |
+
|
| 21 |
+
<link rel="shortcut icon" href="../_static/cmake-favicon.ico"/>
|
| 22 |
+
<link rel="index" title="Index" href="../genindex.html" />
|
| 23 |
+
<link rel="search" title="Search" href="../search.html" />
|
| 24 |
+
<link rel="next" title="ctest_run_script" href="ctest_run_script.html" />
|
| 25 |
+
<link rel="prev" title="ctest_memcheck" href="ctest_memcheck.html" />
|
| 26 |
+
|
| 27 |
+
|
| 28 |
+
</head><body>
|
| 29 |
+
|
| 30 |
+
<div class="related" role="navigation" aria-label="related navigation">
|
| 31 |
+
<h3>Navigation</h3>
|
| 32 |
+
<ul>
|
| 33 |
+
<li class="right" style="margin-right: 10px">
|
| 34 |
+
<a href="../genindex.html" title="General Index"
|
| 35 |
+
accesskey="I">index</a></li>
|
| 36 |
+
<li class="right" >
|
| 37 |
+
<a href="ctest_run_script.html" title="ctest_run_script"
|
| 38 |
+
accesskey="N">next</a> |</li>
|
| 39 |
+
<li class="right" >
|
| 40 |
+
<a href="ctest_memcheck.html" title="ctest_memcheck"
|
| 41 |
+
accesskey="P">previous</a> |</li>
|
| 42 |
+
<li>
|
| 43 |
+
<img src="../_static/cmake-logo-16.png" alt=""
|
| 44 |
+
style="vertical-align: middle; margin-top: -2px" />
|
| 45 |
+
</li>
|
| 46 |
+
<li>
|
| 47 |
+
<a href="https://cmake.org/">CMake</a> »
|
| 48 |
+
</li>
|
| 49 |
+
<li>
|
| 50 |
+
<a href="../index.html">3.27.9 Documentation</a> »
|
| 51 |
+
</li>
|
| 52 |
+
|
| 53 |
+
<li class="nav-item nav-item-1"><a href="../manual/cmake-commands.7.html" accesskey="U">cmake-commands(7)</a> »</li>
|
| 54 |
+
<li class="nav-item nav-item-this"><a href="">ctest_read_custom_files</a></li>
|
| 55 |
+
</ul>
|
| 56 |
+
</div>
|
| 57 |
+
|
| 58 |
+
<div class="document">
|
| 59 |
+
<div class="documentwrapper">
|
| 60 |
+
<div class="bodywrapper">
|
| 61 |
+
<div class="body" role="main">
|
| 62 |
+
|
| 63 |
+
<section id="ctest-read-custom-files">
|
| 64 |
+
<span id="command:ctest_read_custom_files"></span><h1>ctest_read_custom_files<a class="headerlink" href="#ctest-read-custom-files" title="Permalink to this heading">¶</a></h1>
|
| 65 |
+
<p>read CTestCustom files.</p>
|
| 66 |
+
<div class="highlight-cmake notranslate"><div class="highlight"><pre><span></span><span class="nf">ctest_read_custom_files(</span><span class="nv"><directory>...</span><span class="nf">)</span>
|
| 67 |
+
</pre></div>
|
| 68 |
+
</div>
|
| 69 |
+
<p>Read all the CTestCustom.ctest or CTestCustom.cmake files from the
|
| 70 |
+
given directory.</p>
|
| 71 |
+
<p>By default, invoking <span class="target" id="index-0-manual:ctest(1)"></span><a class="reference internal" href="../manual/ctest.1.html#manual:ctest(1)" title="ctest(1)"><code class="xref cmake cmake-manual docutils literal notranslate"><span class="pre">ctest(1)</span></code></a> without a script will read custom
|
| 72 |
+
files from the binary directory.</p>
|
| 73 |
+
</section>
|
| 74 |
+
|
| 75 |
+
|
| 76 |
+
<div class="clearer"></div>
|
| 77 |
+
</div>
|
| 78 |
+
</div>
|
| 79 |
+
</div>
|
| 80 |
+
<div class="sphinxsidebar" role="navigation" aria-label="main navigation">
|
| 81 |
+
<div class="sphinxsidebarwrapper">
|
| 82 |
+
<div>
|
| 83 |
+
<h4>Previous topic</h4>
|
| 84 |
+
<p class="topless"><a href="ctest_memcheck.html"
|
| 85 |
+
title="previous chapter">ctest_memcheck</a></p>
|
| 86 |
+
</div>
|
| 87 |
+
<div>
|
| 88 |
+
<h4>Next topic</h4>
|
| 89 |
+
<p class="topless"><a href="ctest_run_script.html"
|
| 90 |
+
title="next chapter">ctest_run_script</a></p>
|
| 91 |
+
</div>
|
| 92 |
+
<div role="note" aria-label="source link">
|
| 93 |
+
<h3>This Page</h3>
|
| 94 |
+
<ul class="this-page-menu">
|
| 95 |
+
<li><a href="../_sources/command/ctest_read_custom_files.rst.txt"
|
| 96 |
+
rel="nofollow">Show Source</a></li>
|
| 97 |
+
</ul>
|
| 98 |
+
</div>
|
| 99 |
+
<div id="searchbox" style="display: none" role="search">
|
| 100 |
+
<h3 id="searchlabel">Quick search</h3>
|
| 101 |
+
<div class="searchformwrapper">
|
| 102 |
+
<form class="search" action="../search.html" method="get">
|
| 103 |
+
<input type="text" name="q" aria-labelledby="searchlabel" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/>
|
| 104 |
+
<input type="submit" value="Go" />
|
| 105 |
+
</form>
|
| 106 |
+
</div>
|
| 107 |
+
</div>
|
| 108 |
+
<script>document.getElementById('searchbox').style.display = "block"</script>
|
| 109 |
+
</div>
|
| 110 |
+
</div>
|
| 111 |
+
<div class="clearer"></div>
|
| 112 |
+
</div>
|
| 113 |
+
<div class="related" role="navigation" aria-label="related navigation">
|
| 114 |
+
<h3>Navigation</h3>
|
| 115 |
+
<ul>
|
| 116 |
+
<li class="right" style="margin-right: 10px">
|
| 117 |
+
<a href="../genindex.html" title="General Index"
|
| 118 |
+
>index</a></li>
|
| 119 |
+
<li class="right" >
|
| 120 |
+
<a href="ctest_run_script.html" title="ctest_run_script"
|
| 121 |
+
>next</a> |</li>
|
| 122 |
+
<li class="right" >
|
| 123 |
+
<a href="ctest_memcheck.html" title="ctest_memcheck"
|
| 124 |
+
>previous</a> |</li>
|
| 125 |
+
<li>
|
| 126 |
+
<img src="../_static/cmake-logo-16.png" alt=""
|
| 127 |
+
style="vertical-align: middle; margin-top: -2px" />
|
| 128 |
+
</li>
|
| 129 |
+
<li>
|
| 130 |
+
<a href="https://cmake.org/">CMake</a> »
|
| 131 |
+
</li>
|
| 132 |
+
<li>
|
| 133 |
+
<a href="../index.html">3.27.9 Documentation</a> »
|
| 134 |
+
</li>
|
| 135 |
+
|
| 136 |
+
<li class="nav-item nav-item-1"><a href="../manual/cmake-commands.7.html" >cmake-commands(7)</a> »</li>
|
| 137 |
+
<li class="nav-item nav-item-this"><a href="">ctest_read_custom_files</a></li>
|
| 138 |
+
</ul>
|
| 139 |
+
</div>
|
| 140 |
+
|
| 141 |
+
<div class="footer" role="contentinfo">
|
| 142 |
+
© Copyright 2000-2023 Kitware, Inc. and Contributors.
|
| 143 |
+
Created using <a href="https://www.sphinx-doc.org/">Sphinx</a> 5.3.0.
|
| 144 |
+
</div>
|
| 145 |
+
</body>
|
| 146 |
+
</html>
|
toolchain/cmake-3.27.9-linux-x86_64/doc/cmake/html/command/ctest_run_script.html
ADDED
|
@@ -0,0 +1,148 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
|
| 2 |
+
<!DOCTYPE html>
|
| 3 |
+
|
| 4 |
+
<html lang="en">
|
| 5 |
+
<head>
|
| 6 |
+
<meta charset="utf-8" />
|
| 7 |
+
<meta name="viewport" content="width=device-width, initial-scale=1.0" /><meta name="generator" content="Docutils 0.19: https://docutils.sourceforge.io/" />
|
| 8 |
+
|
| 9 |
+
<title>ctest_run_script — CMake 3.27.9 Documentation</title>
|
| 10 |
+
|
| 11 |
+
<link rel="stylesheet" type="text/css" href="../_static/pygments.css" />
|
| 12 |
+
<link rel="stylesheet" type="text/css" href="../_static/cmake.css" />
|
| 13 |
+
|
| 14 |
+
<script data-url_root="../" id="documentation_options" src="../_static/documentation_options.js"></script>
|
| 15 |
+
<script src="../_static/jquery.js"></script>
|
| 16 |
+
<script src="../_static/underscore.js"></script>
|
| 17 |
+
<script src="../_static/_sphinx_javascript_frameworks_compat.js"></script>
|
| 18 |
+
<script src="../_static/doctools.js"></script>
|
| 19 |
+
<script src="../_static/sphinx_highlight.js"></script>
|
| 20 |
+
|
| 21 |
+
<link rel="shortcut icon" href="../_static/cmake-favicon.ico"/>
|
| 22 |
+
<link rel="index" title="Index" href="../genindex.html" />
|
| 23 |
+
<link rel="search" title="Search" href="../search.html" />
|
| 24 |
+
<link rel="next" title="ctest_sleep" href="ctest_sleep.html" />
|
| 25 |
+
<link rel="prev" title="ctest_read_custom_files" href="ctest_read_custom_files.html" />
|
| 26 |
+
|
| 27 |
+
|
| 28 |
+
</head><body>
|
| 29 |
+
|
| 30 |
+
<div class="related" role="navigation" aria-label="related navigation">
|
| 31 |
+
<h3>Navigation</h3>
|
| 32 |
+
<ul>
|
| 33 |
+
<li class="right" style="margin-right: 10px">
|
| 34 |
+
<a href="../genindex.html" title="General Index"
|
| 35 |
+
accesskey="I">index</a></li>
|
| 36 |
+
<li class="right" >
|
| 37 |
+
<a href="ctest_sleep.html" title="ctest_sleep"
|
| 38 |
+
accesskey="N">next</a> |</li>
|
| 39 |
+
<li class="right" >
|
| 40 |
+
<a href="ctest_read_custom_files.html" title="ctest_read_custom_files"
|
| 41 |
+
accesskey="P">previous</a> |</li>
|
| 42 |
+
<li>
|
| 43 |
+
<img src="../_static/cmake-logo-16.png" alt=""
|
| 44 |
+
style="vertical-align: middle; margin-top: -2px" />
|
| 45 |
+
</li>
|
| 46 |
+
<li>
|
| 47 |
+
<a href="https://cmake.org/">CMake</a> »
|
| 48 |
+
</li>
|
| 49 |
+
<li>
|
| 50 |
+
<a href="../index.html">3.27.9 Documentation</a> »
|
| 51 |
+
</li>
|
| 52 |
+
|
| 53 |
+
<li class="nav-item nav-item-1"><a href="../manual/cmake-commands.7.html" accesskey="U">cmake-commands(7)</a> »</li>
|
| 54 |
+
<li class="nav-item nav-item-this"><a href="">ctest_run_script</a></li>
|
| 55 |
+
</ul>
|
| 56 |
+
</div>
|
| 57 |
+
|
| 58 |
+
<div class="document">
|
| 59 |
+
<div class="documentwrapper">
|
| 60 |
+
<div class="bodywrapper">
|
| 61 |
+
<div class="body" role="main">
|
| 62 |
+
|
| 63 |
+
<section id="ctest-run-script">
|
| 64 |
+
<span id="command:ctest_run_script"></span><h1>ctest_run_script<a class="headerlink" href="#ctest-run-script" title="Permalink to this heading">¶</a></h1>
|
| 65 |
+
<p>runs a <a class="reference internal" href="../manual/ctest.1.html#cmdoption-ctest-S"><code class="xref std std-option docutils literal notranslate"><span class="pre">ctest</span> <span class="pre">-S</span></code></a> script</p>
|
| 66 |
+
<div class="highlight-cmake notranslate"><div class="highlight"><pre><span></span><span class="nf">ctest_run_script(</span><span class="p">[</span><span class="no">NEW_PROCESS</span><span class="p">]</span><span class="w"> </span><span class="nb">script_file_name</span><span class="w"> </span><span class="nb">script_file_name1</span>
|
| 67 |
+
<span class="w"> </span><span class="nb">script_file_name2</span><span class="w"> </span><span class="p">...</span><span class="w"> </span><span class="p">[</span><span class="no">RETURN_VALUE</span><span class="w"> </span><span class="nb">var</span><span class="p">]</span><span class="nf">)</span>
|
| 68 |
+
</pre></div>
|
| 69 |
+
</div>
|
| 70 |
+
<p>Runs a script or scripts much like if it was run from <a class="reference internal" href="../manual/ctest.1.html#cmdoption-ctest-S"><code class="xref std std-option docutils literal notranslate"><span class="pre">ctest</span> <span class="pre">-S</span></code></a>.
|
| 71 |
+
If no argument is provided then the current script is run using the current
|
| 72 |
+
settings of the variables. If <code class="docutils literal notranslate"><span class="pre">NEW_PROCESS</span></code> is specified then each
|
| 73 |
+
script will be run in a separate process.If <code class="docutils literal notranslate"><span class="pre">RETURN_VALUE</span></code> is specified
|
| 74 |
+
the return value of the last script run will be put into <code class="docutils literal notranslate"><span class="pre">var</span></code>.</p>
|
| 75 |
+
</section>
|
| 76 |
+
|
| 77 |
+
|
| 78 |
+
<div class="clearer"></div>
|
| 79 |
+
</div>
|
| 80 |
+
</div>
|
| 81 |
+
</div>
|
| 82 |
+
<div class="sphinxsidebar" role="navigation" aria-label="main navigation">
|
| 83 |
+
<div class="sphinxsidebarwrapper">
|
| 84 |
+
<div>
|
| 85 |
+
<h4>Previous topic</h4>
|
| 86 |
+
<p class="topless"><a href="ctest_read_custom_files.html"
|
| 87 |
+
title="previous chapter">ctest_read_custom_files</a></p>
|
| 88 |
+
</div>
|
| 89 |
+
<div>
|
| 90 |
+
<h4>Next topic</h4>
|
| 91 |
+
<p class="topless"><a href="ctest_sleep.html"
|
| 92 |
+
title="next chapter">ctest_sleep</a></p>
|
| 93 |
+
</div>
|
| 94 |
+
<div role="note" aria-label="source link">
|
| 95 |
+
<h3>This Page</h3>
|
| 96 |
+
<ul class="this-page-menu">
|
| 97 |
+
<li><a href="../_sources/command/ctest_run_script.rst.txt"
|
| 98 |
+
rel="nofollow">Show Source</a></li>
|
| 99 |
+
</ul>
|
| 100 |
+
</div>
|
| 101 |
+
<div id="searchbox" style="display: none" role="search">
|
| 102 |
+
<h3 id="searchlabel">Quick search</h3>
|
| 103 |
+
<div class="searchformwrapper">
|
| 104 |
+
<form class="search" action="../search.html" method="get">
|
| 105 |
+
<input type="text" name="q" aria-labelledby="searchlabel" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/>
|
| 106 |
+
<input type="submit" value="Go" />
|
| 107 |
+
</form>
|
| 108 |
+
</div>
|
| 109 |
+
</div>
|
| 110 |
+
<script>document.getElementById('searchbox').style.display = "block"</script>
|
| 111 |
+
</div>
|
| 112 |
+
</div>
|
| 113 |
+
<div class="clearer"></div>
|
| 114 |
+
</div>
|
| 115 |
+
<div class="related" role="navigation" aria-label="related navigation">
|
| 116 |
+
<h3>Navigation</h3>
|
| 117 |
+
<ul>
|
| 118 |
+
<li class="right" style="margin-right: 10px">
|
| 119 |
+
<a href="../genindex.html" title="General Index"
|
| 120 |
+
>index</a></li>
|
| 121 |
+
<li class="right" >
|
| 122 |
+
<a href="ctest_sleep.html" title="ctest_sleep"
|
| 123 |
+
>next</a> |</li>
|
| 124 |
+
<li class="right" >
|
| 125 |
+
<a href="ctest_read_custom_files.html" title="ctest_read_custom_files"
|
| 126 |
+
>previous</a> |</li>
|
| 127 |
+
<li>
|
| 128 |
+
<img src="../_static/cmake-logo-16.png" alt=""
|
| 129 |
+
style="vertical-align: middle; margin-top: -2px" />
|
| 130 |
+
</li>
|
| 131 |
+
<li>
|
| 132 |
+
<a href="https://cmake.org/">CMake</a> »
|
| 133 |
+
</li>
|
| 134 |
+
<li>
|
| 135 |
+
<a href="../index.html">3.27.9 Documentation</a> »
|
| 136 |
+
</li>
|
| 137 |
+
|
| 138 |
+
<li class="nav-item nav-item-1"><a href="../manual/cmake-commands.7.html" >cmake-commands(7)</a> »</li>
|
| 139 |
+
<li class="nav-item nav-item-this"><a href="">ctest_run_script</a></li>
|
| 140 |
+
</ul>
|
| 141 |
+
</div>
|
| 142 |
+
|
| 143 |
+
<div class="footer" role="contentinfo">
|
| 144 |
+
© Copyright 2000-2023 Kitware, Inc. and Contributors.
|
| 145 |
+
Created using <a href="https://www.sphinx-doc.org/">Sphinx</a> 5.3.0.
|
| 146 |
+
</div>
|
| 147 |
+
</body>
|
| 148 |
+
</html>
|