Skip to content

Commit

Permalink
[vcpkg-cmake] Fix docs and usage of option MAYBE_UNUSED_VARIABLES (#1…
Browse files Browse the repository at this point in the history
…9245)

* Remove unused cmake options and MAYBE_UNUSED_VARIABLES values

* Update MAYBE_UNUSED_VARIABLES docs

* update version

* version stuff

* version stuff

* update docs
  • Loading branch information
JackBoosY committed Aug 3, 2021
1 parent a863c84 commit b7f99c3
Show file tree
Hide file tree
Showing 52 changed files with 160 additions and 86 deletions.
14 changes: 12 additions & 2 deletions docs/maintainers/ports/vcpkg-cmake/vcpkg_cmake_configure.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ vcpkg_cmake_configure(
[OPTIONS_DEBUG
<configure-setting>...]
[MAYBE_UNUSED_VARIABLES
<variable-name>...]
<option-name>...]
)
```

Expand Down Expand Up @@ -61,7 +61,17 @@ If the library sets its own code page, pass the `NO_CHARSET_FLAG` option.
This function makes certain that all options passed in are used by the
underlying CMake build system. If there are options that might be unused,
perhaps on certain platforms, pass those variable names to
`MAYBE_UNUSED_VARIABLES`.
`MAYBE_UNUSED_VARIABLES`. For example:
```cmake
vcpkg_cmake_configure(
...
OPTIONS
-DBUILD_EXAMPLE=OFF
...
MAYBE_UNUSED_VARIABLES
BUILD_EXAMPLE
)
```

`LOGFILE_BASE` is used to set the base of the logfile names;
by default, this is `config`, and thus the logfiles end up being something like
Expand Down
13 changes: 12 additions & 1 deletion docs/maintainers/vcpkg_configure_cmake.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ vcpkg_configure_cmake(
[OPTIONS <-DUSE_THIS_IN_ALL_BUILDS=1>...]
[OPTIONS_RELEASE <-DOPTIMIZE=1>...]
[OPTIONS_DEBUG <-DDEBUGGABLE=1>...]
[MAYBE_UNUSED_VARIABLES <option-name>...]
[MAYBE_UNUSED_VARIABLES <OPTION_NAME>...]
)
```

Expand Down Expand Up @@ -58,6 +58,17 @@ Additional options passed to CMake during the Debug configuration. These are in

### MAYBE_UNUSED_VARIABLES
Any CMake variables which are explicitly passed in, but which may not be used on all platforms.
For example:
```cmake
vcpkg_cmake_configure(
...
OPTIONS
-DBUILD_EXAMPLE=OFF
...
MAYBE_UNUSED_VARIABLES
BUILD_EXAMPLE
)
```

### LOGNAME
Name of the log to write the output of the configure call to.
Expand Down
4 changes: 0 additions & 4 deletions ports/kf5auth/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,6 @@ vcpkg_cmake_configure(
-DBUILD_TESTING=OFF
-DKDE_INSTALL_PLUGINDIR=plugins
-DKDE_INSTALL_DATAROOTDIR=data
MAYBE_UNUSED_VARIABLES
-DBUILD_HTML_DOCS=OFF
-DBUILD_MAN_DOCS=OFF
-DBUILD_QTHELP_DOCS=OFF

)

Expand Down
1 change: 1 addition & 0 deletions ports/kf5auth/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"name": "kf5auth",
"version": "5.84.0",
"port-version": 1,
"description": "Execute actions as privileged user",
"homepage": "https://api.kde.org/frameworks/kauth/html/index.html",
"dependencies": [
Expand Down
4 changes: 0 additions & 4 deletions ports/kf5codecs/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,6 @@ vcpkg_cmake_configure(
SOURCE_PATH ${SOURCE_PATH}
OPTIONS
-DBUILD_TESTING=OFF
MAYBE_UNUSED_VARIABLES
-DBUILD_HTML_DOCS=OFF
-DBUILD_MAN_DOCS=OFF
-DBUILD_QTHELP_DOCS=OFF
)

vcpkg_cmake_install()
Expand Down
1 change: 1 addition & 0 deletions ports/kf5codecs/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"name": "kf5codecs",
"version": "5.84.0",
"port-version": 1,
"description": "String encoding library",
"homepage": "https://api.kde.org/frameworks/kcodecs/html/index.html",
"dependencies": [
Expand Down
4 changes: 0 additions & 4 deletions ports/kf5completion/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,6 @@ vcpkg_configure_cmake(
OPTIONS
-DBUILD_TESTING=OFF
-DBUILD_DESIGNERPLUGIN=OFF
MAYBE_UNUSED_VARIABLES
-DBUILD_HTML_DOCS=OFF
-DBUILD_MAN_DOCS=OFF
-DBUILD_QTHELP_DOCS=OFF
)

vcpkg_install_cmake()
Expand Down
1 change: 1 addition & 0 deletions ports/kf5completion/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"name": "kf5completion",
"version": "5.84.0",
"port-version": 1,
"description": "Text completion helpers and widgets",
"homepage": "https://api.kde.org/frameworks/kcompletion/html/index.html",
"dependencies": [
Expand Down
4 changes: 0 additions & 4 deletions ports/kf5config/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,6 @@ vcpkg_configure_cmake(
DISABLE_PARALLEL_CONFIGURE
OPTIONS
-DBUILD_TESTING=OFF
MAYBE_UNUSED_VARIABLES
-DBUILD_HTML_DOCS=OFF
-DBUILD_MAN_DOCS=OFF
-DBUILD_QTHELP_DOCS=OFF
)

vcpkg_install_cmake()
Expand Down
1 change: 1 addition & 0 deletions ports/kf5config/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"name": "kf5config",
"version": "5.84.0",
"port-version": 1,
"description": "Configuration system",
"homepage": "https://api.kde.org/frameworks/kconfig/html/index.html",
"dependencies": [
Expand Down
4 changes: 0 additions & 4 deletions ports/kf5dbusaddons/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,6 @@ vcpkg_cmake_configure(
SOURCE_PATH ${SOURCE_PATH}
OPTIONS
-DBUILD_TESTING=OFF
MAYBE_UNUSED_VARIABLES
-DBUILD_HTML_DOCS=OFF
-DBUILD_MAN_DOCS=OFF
-DBUILD_QTHELP_DOCS=OFF
)

vcpkg_cmake_install()
Expand Down
1 change: 1 addition & 0 deletions ports/kf5dbusaddons/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"name": "kf5dbusaddons",
"version": "5.84.0",
"port-version": 1,
"description": "Convenience classes for D-Bus",
"homepage": "https://api.kde.org/frameworks/kdbusaddons/html/index.html",
"dependencies": [
Expand Down
4 changes: 0 additions & 4 deletions ports/kf5guiaddons/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,6 @@ vcpkg_configure_cmake(
-DBUILD_TESTING=OFF
-DQtWaylandScanner_EXECUTABLE=${CURRENT_INSTALLED_DIR}/tools/qt5-wayland/bin/qtwaylandscanner
${FEATURE_OPTIONS}
MAYBE_UNUSED_VARIABLES
-DBUILD_HTML_DOCS=OFF
-DBUILD_MAN_DOCS=OFF
-DBUILD_QTHELP_DOCS=OFF
)

vcpkg_install_cmake()
Expand Down
1 change: 1 addition & 0 deletions ports/kf5guiaddons/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"name": "kf5guiaddons",
"version": "5.84.0",
"port-version": 1,
"description": "Addons to QtGui",
"homepage": "https://api.kde.org/frameworks/kguiaddons/html/index.html",
"dependencies": [
Expand Down
4 changes: 0 additions & 4 deletions ports/kf5holidays/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,6 @@ vcpkg_configure_cmake(
DISABLE_PARALLEL_CONFIGURE
OPTIONS
-DBUILD_TESTING=OFF
MAYBE_UNUSED_VARIABLES
-DBUILD_HTML_DOCS=OFF
-DBUILD_MAN_DOCS=OFF
-DBUILD_QTHELP_DOCS=OFF
)

vcpkg_install_cmake()
Expand Down
1 change: 1 addition & 0 deletions ports/kf5holidays/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"name": "kf5holidays",
"version": "5.84.0",
"port-version": 1,
"description": "Holiday calculation library",
"dependencies": [
"ecm",
Expand Down
4 changes: 0 additions & 4 deletions ports/kf5i18n/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,6 @@ vcpkg_configure_cmake(
-DBUILD_TESTING=OFF
-DKDE_INSTALL_PLUGINDIR=plugins
-DPYTHON_EXECUTABLE=${PYTHON3}
MAYBE_UNUSED_VARIABLES
-DBUILD_HTML_DOCS=OFF
-DBUILD_MAN_DOCS=OFF
-DBUILD_QTHELP_DOCS=OFF
)

vcpkg_install_cmake()
Expand Down
1 change: 1 addition & 0 deletions ports/kf5i18n/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"name": "kf5i18n",
"version": "5.84.0",
"port-version": 1,
"description": "Advanced internationalization framework",
"homepage": "https://api.kde.org/frameworks/ki18n/html/index.html",
"dependencies": [
Expand Down
4 changes: 0 additions & 4 deletions ports/kf5itemmodels/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,6 @@ vcpkg_configure_cmake(
OPTIONS
-DBUILD_TESTING=OFF
-DKDE_INSTALL_QMLDIR=qml
MAYBE_UNUSED_VARIABLES
-DBUILD_HTML_DOCS=OFF
-DBUILD_MAN_DOCS=OFF
-DBUILD_QTHELP_DOCS=OFF
)

vcpkg_install_cmake()
Expand Down
1 change: 1 addition & 0 deletions ports/kf5itemmodels/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"name": "kf5itemmodels",
"version": "5.84.0",
"port-version": 1,
"description": "Models for Qt Model/View system",
"homepage": "https://api.kde.org/frameworks/kitemmodels/html/index.html",
"dependencies": [
Expand Down
4 changes: 0 additions & 4 deletions ports/kf5itemviews/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,6 @@ vcpkg_configure_cmake(
OPTIONS
-DBUILD_TESTING=OFF
-DBUILD_DESIGNERPLUGIN=OFF
MAYBE_UNUSED_VARIABLES
-DBUILD_HTML_DOCS=OFF
-DBUILD_MAN_DOCS=OFF
-DBUILD_QTHELP_DOCS=OFF
)

vcpkg_install_cmake()
Expand Down
1 change: 1 addition & 0 deletions ports/kf5itemviews/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"name": "kf5itemviews",
"version": "5.84.0",
"port-version": 1,
"description": "Widget addons for Qt Model/View",
"homepage": "https://api.kde.org/frameworks/kitemviews/html/index.html",
"dependencies": [
Expand Down
4 changes: 0 additions & 4 deletions ports/kf5plotting/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,6 @@ vcpkg_configure_cmake(
PREFER_NINJA
OPTIONS
-DBUILD_TESTING=OFF
MAYBE_UNUSED_VARIABLES
-DBUILD_HTML_DOCS=OFF
-DBUILD_MAN_DOCS=OFF
-DBUILD_QTHELP_DOCS=OFF
)

vcpkg_install_cmake()
Expand Down
1 change: 1 addition & 0 deletions ports/kf5plotting/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"name": "kf5plotting",
"version": "5.84.0",
"port-version": 1,
"description": "Lightweight plotting framework",
"homepage": "https://api.kde.org/frameworks/kplotting/html/index.html",
"dependencies": [
Expand Down
7 changes: 0 additions & 7 deletions ports/kf5sonnet/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,6 @@ vcpkg_cmake_configure(
-DKDE_INSTALL_PLUGINDIR=plugins
-DKDE_INSTALL_DATAROOTDIR=data
-DKDE_INSTALL_QTPLUGINDIR=plugins
-DBUILD_HTML_DOCS=OFF
-DBUILD_MAN_DOCS=OFF
-DBUILD_QTHELP_DOCS=OFF
MAYBE_UNUSED_VARIABLES
BUILD_HTML_DOCS
BUILD_MAN_DOCS
BUILD_QTHELP_DOCS
)

vcpkg_add_to_path(PREPEND "${CURRENT_INSTALLED_DIR}/bin")
Expand Down
1 change: 1 addition & 0 deletions ports/kf5sonnet/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"name": "kf5sonnet",
"version-semver": "5.84.0",
"port-version": 1,
"description": "Multi-language spell checker",
"homepage": "https://api.kde.org/frameworks/sonnet/html/index.html",
"dependencies": [
Expand Down
4 changes: 0 additions & 4 deletions ports/kf5syntaxhighlighting/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,6 @@ vcpkg_configure_cmake(
PREFER_NINJA
OPTIONS
-DBUILD_TESTING=OFF
MAYBE_UNUSED_VARIABLES
-DBUILD_HTML_DOCS=OFF
-DBUILD_MAN_DOCS=OFF
-DBUILD_QTHELP_DOCS=OFF
)

vcpkg_install_cmake(ADD_BIN_TO_PATH)
Expand Down
1 change: 1 addition & 0 deletions ports/kf5syntaxhighlighting/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"name": "kf5syntaxhighlighting",
"version": "5.84.0",
"port-version": 1,
"description": "Syntax highlighting engine for Kate syntax definitions",
"homepage": "https://github.com/KDE/syntax-highlighting",
"dependencies": [
Expand Down
4 changes: 0 additions & 4 deletions ports/kf5widgetsaddons/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,6 @@ vcpkg_configure_cmake(
OPTIONS
-DBUILD_TESTING=OFF
-DBUILD_DESIGNERPLUGIN=OFF
MAYBE_UNUSED_VARIABLES
-DBUILD_HTML_DOCS=OFF
-DBUILD_MAN_DOCS=OFF
-DBUILD_QTHELP_DOCS=OFF
)

vcpkg_install_cmake()
Expand Down
1 change: 1 addition & 0 deletions ports/kf5widgetsaddons/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"name": "kf5widgetsaddons",
"version": "5.84.0",
"port-version": 1,
"description": "Addons to QtWidgets",
"homepage": "https://api.kde.org/frameworks/kwidgetsaddons/html/index.html",
"dependencies": [
Expand Down
4 changes: 0 additions & 4 deletions ports/kf5windowsystem/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,6 @@ vcpkg_configure_cmake(
OPTIONS
-DBUILD_TESTING=OFF
-DKDE_INSTALL_PLUGINDIR=plugins
MAYBE_UNUSED_VARIABLES
-DBUILD_HTML_DOCS=OFF
-DBUILD_MAN_DOCS=OFF
-DBUILD_QTHELP_DOCS=OFF
)

vcpkg_install_cmake()
Expand Down
1 change: 1 addition & 0 deletions ports/kf5windowsystem/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"name": "kf5windowsystem",
"version": "5.84.0",
"port-version": 1,
"description": "Access to the windowing system",
"homepage": "https://api.kde.org/frameworks/kwindowsystem/html/",
"dependencies": [
Expand Down
2 changes: 1 addition & 1 deletion ports/vcpkg-cmake/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"name": "vcpkg-cmake",
"version-date": "2021-07-26"
"version-date": "2021-07-30"
}
14 changes: 12 additions & 2 deletions ports/vcpkg-cmake/vcpkg_cmake_configure.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ vcpkg_cmake_configure(
[OPTIONS_DEBUG
<configure-setting>...]
[MAYBE_UNUSED_VARIABLES
<variable-name>...]
<option-name>...]
)
```

Expand Down Expand Up @@ -60,7 +60,17 @@ If the library sets its own code page, pass the `NO_CHARSET_FLAG` option.
This function makes certain that all options passed in are used by the
underlying CMake build system. If there are options that might be unused,
perhaps on certain platforms, pass those variable names to
`MAYBE_UNUSED_VARIABLES`.
`MAYBE_UNUSED_VARIABLES`. For example:
```cmake
vcpkg_cmake_configure(
...
OPTIONS
-DBUILD_EXAMPLE=OFF
...
MAYBE_UNUSED_VARIABLES
BUILD_EXAMPLE
)
```

`LOGFILE_BASE` is used to set the base of the logfile names;
by default, this is `config`, and thus the logfiles end up being something like
Expand Down
Loading

0 comments on commit b7f99c3

Please sign in to comment.