summaryrefslogtreecommitdiffstats
path: root/Help/guide/tutorial/Step3/MathFunctions/MathFunctions.h
diff options
context:
space:
mode:
authorDaniel Scharrer <daniel@constexpr.org>2022-09-05 21:42:28 (GMT)
committerBrad King <brad.king@kitware.com>2022-09-06 15:05:23 (GMT)
commit67b6f1a09b3e14373ba5683d11300a145c80877f (patch)
tree805159e90132a0c42d9411819ee3871af5f4742d /Help/guide/tutorial/Step3/MathFunctions/MathFunctions.h
parent6dd6f911178e7daface0b8c3be4b70f920dd8d40 (diff)
downloadCMake-67b6f1a09b3e14373ba5683d11300a145c80877f.zip
CMake-67b6f1a09b3e14373ba5683d11300a145c80877f.tar.gz
CMake-67b6f1a09b3e14373ba5683d11300a145c80877f.tar.bz2
FindZLIB: fix CMAKE_FIND_LIBRARY_PREFIXES being unset when it was empty
CMAKE_FIND_LIBRARY_PREFIXES and CMAKE_FIND_LIBRARY_SUFFIXES have different behavior when undefined and when defined but empty: Empty means to use an empty prefix/suffix while undefined means to use a hardcoded default for the platform we are running on. Unfortunately, set(a ${b}) will undefine a when b is empty, meaning that when targeting a platform where either of these variables is empty (e.g. Windows where CMAKE_FIND_LIBRARY_PREFIXES is empty) the unpatched FindZLIB code ends up unsetting that variable, causing all subsequent find_library calls to use the hardcoded default for the runtime platform (e.g. "lib" for CMAKE_FIND_LIBRARY_PREFIXES on Linux). On the other hand, set(a "${b}") will always define a to be empty but defined so we have to do this dance to fully preserve the state of these variables.
Diffstat (limited to 'Help/guide/tutorial/Step3/MathFunctions/MathFunctions.h')
0 files changed, 0 insertions, 0 deletions