summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Help/command/add_custom_command.rst8
-rw-r--r--Help/command/add_custom_target.rst4
-rw-r--r--Help/cpack_gen/nsis.rst2
-rw-r--r--Help/manual/cmake-generator-expressions.7.rst2
-rw-r--r--Source/CMakeVersion.cmake2
-rw-r--r--Source/CPack/cmCPackNSISGenerator.cxx13
6 files changed, 24 insertions, 7 deletions
diff --git a/Help/command/add_custom_command.rst b/Help/command/add_custom_command.rst
index 183bb72..c0b9593 100644
--- a/Help/command/add_custom_command.rst
+++ b/Help/command/add_custom_command.rst
@@ -80,8 +80,10 @@ The options are:
:prop_sf:`GENERATED` files during ``make clean``.
.. versionadded:: 3.20
- Arguments to ``BYPRODUCTS`` may use
+ Arguments to ``BYPRODUCTS`` may use a restricted set of
:manual:`generator expressions <cmake-generator-expressions(7)>`.
+ :ref:`Target-dependent expressions <Target-Dependent Queries>` are not
+ permitted.
``COMMAND``
Specify the command-line(s) to execute at build time.
@@ -235,8 +237,10 @@ The options are:
source file property.
.. versionadded:: 3.20
- Arguments to ``OUTPUT`` may use
+ Arguments to ``OUTPUT`` may use a restricted set of
:manual:`generator expressions <cmake-generator-expressions(7)>`.
+ :ref:`Target-dependent expressions <Target-Dependent Queries>` are not
+ permitted.
``USES_TERMINAL``
.. versionadded:: 3.2
diff --git a/Help/command/add_custom_target.rst b/Help/command/add_custom_target.rst
index 22d3f29..def23fa 100644
--- a/Help/command/add_custom_target.rst
+++ b/Help/command/add_custom_target.rst
@@ -55,8 +55,10 @@ The options are:
:prop_sf:`GENERATED` files during ``make clean``.
.. versionadded:: 3.20
- Arguments to ``BYPRODUCTS`` may use
+ Arguments to ``BYPRODUCTS`` may use a restricted set of
:manual:`generator expressions <cmake-generator-expressions(7)>`.
+ :ref:`Target-dependent expressions <Target-Dependent Queries>` are not
+ permitted.
``COMMAND``
Specify the command-line(s) to execute at build time.
diff --git a/Help/cpack_gen/nsis.rst b/Help/cpack_gen/nsis.rst
index 964f629..02e33ba 100644
--- a/Help/cpack_gen/nsis.rst
+++ b/Help/cpack_gen/nsis.rst
@@ -193,6 +193,8 @@ on Windows Nullsoft Scriptable Install System.
.. versionadded:: 3.20
If set, trim down the size of the control to the size of the branding text string.
+ Allowed values for this variable are ``LEFT``, ``CENTER`` or ``RIGHT``.
+ If not specified, the default behavior is ``LEFT``.
.. variable:: CPACK_NSIS_EXECUTABLE
diff --git a/Help/manual/cmake-generator-expressions.7.rst b/Help/manual/cmake-generator-expressions.7.rst
index e782816..775067a 100644
--- a/Help/manual/cmake-generator-expressions.7.rst
+++ b/Help/manual/cmake-generator-expressions.7.rst
@@ -709,6 +709,8 @@ Variable Queries
properties to avoid side-effects due to the double evaluation of
these properties.
+.. _`Target-Dependent Queries`:
+
Target-Dependent Queries
------------------------
diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake
index d86d725..dd9f4cb 100644
--- a/Source/CMakeVersion.cmake
+++ b/Source/CMakeVersion.cmake
@@ -1,7 +1,7 @@
# CMake version number components.
set(CMake_VERSION_MAJOR 3)
set(CMake_VERSION_MINOR 20)
-set(CMake_VERSION_PATCH 20210324)
+set(CMake_VERSION_PATCH 20210325)
#set(CMake_VERSION_RC 0)
set(CMake_VERSION_IS_DIRTY 0)
diff --git a/Source/CPack/cmCPackNSISGenerator.cxx b/Source/CPack/cmCPackNSISGenerator.cxx
index 9b00704..6bd0d1b 100644
--- a/Source/CPack/cmCPackNSISGenerator.cxx
+++ b/Source/CPack/cmCPackNSISGenerator.cxx
@@ -215,9 +215,16 @@ int cmCPackNSISGenerator::PackageFiles()
if (this->IsSet("CPACK_NSIS_BRANDING_TEXT_TRIM_POSITION")) {
std::string wantedPosition =
this->GetOption("CPACK_NSIS_BRANDING_TEXT_TRIM_POSITION");
- const std::set<std::string> possiblePositions{ "CENTER", "LEFT",
- "RIGHT" };
- if (possiblePositions.find(wantedPosition) != possiblePositions.end()) {
+ if (!wantedPosition.empty()) {
+ const std::set<std::string> possiblePositions{ "CENTER", "LEFT",
+ "RIGHT" };
+ if (possiblePositions.find(wantedPosition) ==
+ possiblePositions.end()) {
+ cmCPackLogger(cmCPackLog::LOG_ERROR,
+ "Unsupported branding text trim position "
+ << wantedPosition << std::endl);
+ return false;
+ }
brandingTextPosition = wantedPosition;
}
}