-
-
-
-
-
-
-
-
vcpkg telemetry and privacy
+vcpkg Telemetry and Privacy
vcpkg collects telemetry data to understand usage issues, such as failing packages, and to guide tool improvements. The collected data is anonymous. For more information about how Microsoft protects your privacy, see https://privacy.microsoft.com/en-US/privacystatement#mainenterprisedeveloperproductsmodule
Scope
@@ -231,7 +232,7 @@Disclosure
Read more about vcpkg telemetry at docs/about/privacy.mdData Collected
The telemetry feature doesn't collect personal data, such as usernames or email addresses. It doesn't scan your code and doesn't extract project-level data, such as name, repository, or author. The data is sent securely to Microsoft servers and held under restricted access.
-Protecting your privacy is important to us. If you suspect the telemetry is collecting sensitive data or the data is being insecurely or inappropriately handled, file an issue in the Microsoft/vcpkg repository or send an email to vcpkg@microsoft.com for investigation.
+Protecting your privacy is important to us. If you suspect the telemetry is collecting sensitive data or the data is being insecurely or inappropriately handled, file an issue in the Microsoft/vcpkg repository or send an email to vcpkg@microsoft.com for investigation.
We collect various telemetry events such as the command line used, the time of invocation, and how long execution took. Some commands also add additional calculated information (such as the full set of libraries to install). We generate a completely random UUID on first use and attach it to each event.
You can see the telemetry events any command by appending --printmetrics
after the vcpkg command line.
In the source code (included at https://github.com/microsoft/vcpkg-tool/ ), you can search for calls to the functions track_property()
, track_feature()
, track_metric()
, and track_buildtime()
diff --git a/en/docs/examples/installing-and-using-packages.html b/en/docs/examples/installing-and-using-packages.html
index 89aad8411..24ceedccf 100644
--- a/en/docs/examples/installing-and-using-packages.html
+++ b/en/docs/examples/installing-and-using-packages.html
@@ -71,28 +71,28 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Packaging Zipfiles Example: zlib
+Packaging .zip
Files Example: zlib
Bootstrap with create
First, locate a globally accessible archive of the library's sources. Zip, gzip, and bzip are all supported. Strongly prefer official sources or mirrors over unofficial mirrors.
Looking at zlib's website, the URL http://zlib.net/zlib-1.2.11.tar.gz looks appropriate.
diff --git a/en/docs/examples/patching.html b/en/docs/examples/patching.html index 80dfd653c..9e45af759 100644 --- a/en/docs/examples/patching.html +++ b/en/docs/examples/patching.html @@ -71,28 +71,28 @@-
-
-
-
-
-
-
-
-
-
-
-
The Guidelines
Always check forARGN
or arg_UNPARSED_ARGUMENTS
.
FATAL_ERROR
when possible, WARNING
if necessary for backwards compatibility.
cmake_parse_arguments
must use PARSE_ARGV
.foreach
loops must use IN LISTS
and IN ITEMS
.foreach
loops must use IN LISTS
, IN ITEMS
, or RANGE
.${ARGV}
and ${ARGN}
are unreferenced,
except in helpful messages to the user.- (i.e.,
message(FATAL_ERROR "blah was passed extra arguments: ${ARGN}")
)
The Guidelines
vcpkg.cmake
's find_package
.-
-
- Example violation:
vcpkg_acquire_msys()
has hard-coded packages and versions that need updating over time due to the MSYS project dropping old packages.
- - Example exception:
vcpkg_from_sourceforge()
has a list of mirrors which needs maintenance but does not have an observable behavior impact on the callers.
""
,
-except those which are intended to be passed as multiple arguments.-
-
- Example:
set(working_directory "")
- if(DEFINED arg_WORKING_DIRECTORY)
- set(working_directory "WORKING_DIRECTORY" "${arg_WORKING_DIRECTORY}")
- endif()
- # calls do_the_thing() if NOT DEFINED arg_WORKING_DIRECTORY,
- # else calls do_the_thing(WORKING_DIRECTORY "${arg_WORKING_DIRECTORY}")
- do_the_thing(${working_directory})
--
+
- Example violation:
vcpkg_acquire_msys()
has hard-coded packages and versions +that need updating over time due to the MSYS project dropping old packages.
+ - Example exception:
vcpkg_from_sourceforge()
has a list of mirrors which +needs maintenance, but does not have an observable behavior impact on the callers.
foo(BAR)
), quoted (foo("BAR")
), and bracketed (foo([[BAR]])
).
+Follow these rules to quote correctly:-
+
- If an argument contains a variable expansion
${...}
, +it must be quoted.
+ - Exception: a "splat" variable expansion, when one variable will be
+passed to a function as multiple arguments. In this case, the argument
+should simply be
${foo}
: +cmake +vcpkg_list(SET working_directory) +if(DEFINED "arg_WORKING_DIRECTORY") +vcpkg_list(SET working_directory WORKING_DIRECTORY "${arg_WORKING_DIRECTORY}") +endif() +# calls do_the_thing() if NOT DEFINED arg_WORKING_DIRECTORY, +# else calls do_the_thing(WORKING_DIRECTORY "${arg_WORKING_DIRECTORY}") +do_the_thing(${working_directory}) +
+ - Otherwise, if the argument contains any escape sequences that are not
+
\\
,\"
, or\$
, that argument must be a quoted argument.
+ - For example:
"foo\nbar"
must be quoted.
+ - Otherwise, if the argument contains a
\
, a"
, or a$
, +that argument should be bracketed.
+ - Example:
+
cmake +set(x [[foo\bar]]) +set(y [=[foo([[bar\baz]])]=]) +
+ - Otherwise, if the argument contains characters that are
+not alphanumeric or
_
, that argument should be quoted.
+ - Otherwise, the argument should be unquoted. +
- Exception: arguments to
if()
of type<variable|string>
should always be quoted:
+ - Both arguments to the comparison operators -
+
EQUAL
,STREQUAL
,VERSION_LESS
, etc.
+ - The first argument to
MATCHES
andIN_LIST
+ - Example:
+
cmake +if("${FOO}" STREQUAL "BAR") # ... +if("${BAZ}" EQUAL "0") # ... +if("FOO" IN_LIST list_variable) # ... +if("${bar}" MATCHES [[a[bcd]+\.[bcd]+]]) # ... +
+ - For single expressions and for other types of predicates that do not
+take
<variable|string>
, use the normal rules.
set(foo "")
.set(foo "")
if it is a string variable,
+and vcpkg_list(SET foo)
if it is a list variable.
+set(var)
should not be used. Use unset(var)
to unset a variable,
+set(var "")
to set it to the empty string,
+and vcpkg_list(SET var)
to set it to the empty list.
+Note: the empty string and the empty list are the same value;
+this is a notational difference rather than a difference in resultPARENT_SCOPE
and are never read.
See also the helper z_vcpkg_forward_output_variable()
to forward out parameters through a function scope.CACHE
variables are used only for global variables which are shared internally among strongly coupled
@@ -288,16 +330,14 @@ The Guidelines
and<start>
must always be less than or equal to <stop>
.- This must be checked by something like:
if(start LESS_EQUAL end)
- foreach(RANGE start end)
+ if("${start}" LESS_EQUAL "${end}")
+ foreach(RANGE "${start}" "${end}")
...
endforeach()
endif()
- All port-based scripts must use
include_guard(GLOBAL)
to avoid being included multiple times.
-set(var)
should not be used. Use unset(var)
to unset a variable,
-and set(var "")
to set it to the empty value. Note: this works for use as a list and as a string
CMake Versions to Require
diff --git a/en/docs/maintainers/control-files.html b/en/docs/maintainers/control-files.html
index 7f63f363a..0789c073c 100644
--- a/en/docs/maintainers/control-files.html
+++ b/en/docs/maintainers/control-files.html
@@ -71,28 +71,28 @@
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
+
+
+
+
-
-
-
-
+
+
+
+
-
-
-
+
+
+
+
Table of Contents
diff --git a/en/docs/maintainers/execute_process.html b/en/docs/maintainers/execute_process.html
index b7b9a0f3e..a5590ead4 100644
--- a/en/docs/maintainers/execute_process.html
+++ b/en/docs/maintainers/execute_process.html
@@ -71,28 +71,28 @@
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
+
+
+
+
-
-
-
-
+
+
+
+
-
-
-
+
+
+
README
+Quick Start
Table of Contents
diff --git a/en/docs/maintainers/internal/vcpkg_internal_get_cmake_vars.html b/en/docs/maintainers/internal/vcpkg_internal_get_cmake_vars.html
index fdf7c3151..deee4d19c 100644
--- a/en/docs/maintainers/internal/vcpkg_internal_get_cmake_vars.html
+++ b/en/docs/maintainers/internal/vcpkg_internal_get_cmake_vars.html
@@ -71,18 +71,18 @@
-Cmake Guidelines
-Control Files
+CMake Guidelines
+CONTROL files
execute_process
-Maintainer Guide
-Manifest Files
+Maintainer Guidelines and Policies
+Manifest files - vcpkg.json
Portfile Functions
Pr Review Checklist
-registries
+Creating Registries
vcpkg_acquire_msys
vcpkg_add_to_path
vcpkg_apply_patches
@@ -178,34 +178,34 @@
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
+
+
+
+
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
README
+Quick Start
Table of Contents
diff --git a/en/docs/maintainers/internal/z_vcpkg_apply_patches.html b/en/docs/maintainers/internal/z_vcpkg_apply_patches.html
index 7a7124e17..a16edbaaf 100644
--- a/en/docs/maintainers/internal/z_vcpkg_apply_patches.html
+++ b/en/docs/maintainers/internal/z_vcpkg_apply_patches.html
@@ -71,28 +71,28 @@
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
+
+
+
+
-
-
-
-
+
+
+
+
-
-
-
+
+
+
README
+Quick Start
Table of Contents
diff --git a/en/docs/maintainers/internal/z_vcpkg_forward_output_variable.html b/en/docs/maintainers/internal/z_vcpkg_forward_output_variable.html
index df40be938..808d50fe4 100644
--- a/en/docs/maintainers/internal/z_vcpkg_forward_output_variable.html
+++ b/en/docs/maintainers/internal/z_vcpkg_forward_output_variable.html
@@ -71,28 +71,28 @@
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
+
+
+
+
-
-
-
-
+
+
+
+
-
-
-
+
+
+
README
+Quick Start
Table of Contents
diff --git a/en/docs/maintainers/internal/z_vcpkg_function_arguments.html b/en/docs/maintainers/internal/z_vcpkg_function_arguments.html
index bd49d1b9a..25c5e38a0 100644
--- a/en/docs/maintainers/internal/z_vcpkg_function_arguments.html
+++ b/en/docs/maintainers/internal/z_vcpkg_function_arguments.html
@@ -71,28 +71,28 @@
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
+
+
+
+
-
-
-
-
+
+
+
+
-
-
-
+
+
+
README
+Quick Start
Table of Contents
diff --git a/en/docs/maintainers/internal/z_vcpkg_get_cmake_vars.html b/en/docs/maintainers/internal/z_vcpkg_get_cmake_vars.html
new file mode 100644
index 000000000..3252e5a4c
--- /dev/null
+++ b/en/docs/maintainers/internal/z_vcpkg_get_cmake_vars.html
@@ -0,0 +1,236 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Table of Contents
+z_vcpkg_get_cmake_vars
+The latest version of this document lives in the vcpkg repo.
+Only for internal use in vcpkg helpers. Behavior and arguments will change without notice.
+Runs a cmake configure with a dummy project to extract certain cmake variables
+Usage
+z_vcpkg_get_cmake_vars(<out-var>)
+z_vcpkg_get_cmake_vars(cmake_vars_file)
sets <out-var>
to
+a path to a generated CMake file, with the detected CMAKE_*
variables
+re-exported as VCPKG_DETECTED_*
.
+Notes
+Avoid usage in portfiles.
+All calls to z_vcpkg_get_cmake_vars
will result in the same output file;
+the output file is not generated multiple times.
+Examples
+
+Basic Usage
+z_vcpkg_get_cmake_vars(cmake_vars_file)
+include("${cmake_vars_file}")
+message(STATUS "detected CXX flags: ${VCPKG_DETECTED_CXX_FLAGS}")
+Source
+
+