diff options
author | Brad King <brad.king@kitware.com> | 2023-03-16 11:16:07 -0400 |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2023-03-16 11:26:10 -0400 |
commit | 6988ddf8ac0830759acab6612c12df6d2f62287e (patch) | |
tree | 2f9f105af462913a16ccd30547f9ee744a15e4c6 | |
parent | 6c71fa6d56d3e2de30de3e0eb1d72375530598c4 (diff) | |
download | cmake-6988ddf8ac0830759acab6612c12df6d2f62287e.tar.gz |
WriteBasicConfigVersionFile: Fix regression in ARCH_INDEPENDENT check
Refactoring in commit 77982de955 (CMakePackageConfigHelpers: only emit
arch check if needed, 2023-01-29, v3.26.0-rc1~16^2) did not correctly
preserve the check for empty `CMAKE_SIZEOF_VOID_P`. Fix it.
The difference between the version files generated before and after is:
-if(CMAKE_SIZEOF_VOID_P STREQUAL "" OR "8" STREQUAL "")
+if("${CMAKE_SIZEOF_VOID_P}" STREQUAL "" OR "8" STREQUAL "")
This restores the check generated before the above-mentioned commit.
Fixes: #24608
-rw-r--r-- | Modules/WriteBasicConfigVersionFile.cmake | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Modules/WriteBasicConfigVersionFile.cmake b/Modules/WriteBasicConfigVersionFile.cmake index 1c5ecd5893..4db725cd39 100644 --- a/Modules/WriteBasicConfigVersionFile.cmake +++ b/Modules/WriteBasicConfigVersionFile.cmake @@ -49,7 +49,7 @@ function(WRITE_BASIC_CONFIG_VERSION_FILE _filename) if(NOT CVF_ARCH_INDEPENDENT) set(CVF_ARCH_INDEPENDENT_CHECK " # if the installed or the using project don't have CMAKE_SIZEOF_VOID_P set, ignore it: -if(CMAKE_SIZEOF_VOID_P STREQUAL \"\" OR \"${CMAKE_SIZEOF_VOID_P}\" STREQUAL \"\") +if(\"\${CMAKE_SIZEOF_VOID_P}\" STREQUAL \"\" OR \"${CMAKE_SIZEOF_VOID_P}\" STREQUAL \"\") return() endif() |