summaryrefslogtreecommitdiff
path: root/Modules/GNUInstallDirs.cmake
diff options
context:
space:
mode:
authorBen Boeckel <ben.boeckel@kitware.com>2021-08-22 12:35:56 -0400
committerBen Boeckel <ben.boeckel@kitware.com>2021-08-22 12:42:48 -0400
commit49a5dbcaff57da133aadd7a31abdd65515b426e6 (patch)
tree890c8ccdc210250519d91297b8604495a1bbfd7f /Modules/GNUInstallDirs.cmake
parentefa5e1f367ac76cb7aa919929ece1f4799cdc4b2 (diff)
downloadcmake-49a5dbcaff57da133aadd7a31abdd65515b426e6.tar.gz
GNUInstallDirs: avoid unwanted variable dereference
In some situations, it seems that the variable `0` is defined. In the case found, it was set to `1`. This makes the detection of the missing third argument bogus and unnecessarily triggers a warning. This oversight was introduced in 229b5ee994 (GNUInstallDirs: Add dir argument to GNUInstallDirs_get_absolute_install_dir, 2020-10-31) prior to CMake 3.20's release cycle.
Diffstat (limited to 'Modules/GNUInstallDirs.cmake')
-rw-r--r--Modules/GNUInstallDirs.cmake2
1 files changed, 1 insertions, 1 deletions
diff --git a/Modules/GNUInstallDirs.cmake b/Modules/GNUInstallDirs.cmake
index e149f4c5aa..4016a64888 100644
--- a/Modules/GNUInstallDirs.cmake
+++ b/Modules/GNUInstallDirs.cmake
@@ -349,7 +349,7 @@ mark_as_advanced(
macro(GNUInstallDirs_get_absolute_install_dir absvar var)
set(GGAID_extra_args ${ARGN})
list(LENGTH GGAID_extra_args GGAID_extra_arg_count)
- if(GGAID_extra_arg_count GREATER 0)
+ if(GGAID_extra_arg_count GREATER "0")
list(GET GGAID_extra_args 0 GGAID_dir)
else()
# Historical behaviour: use ${dir} from caller's scope