diff options
author | David Cole <david.cole@kitware.com> | 2011-08-24 18:06:51 (GMT) |
---|---|---|
committer | David Cole <david.cole@kitware.com> | 2011-08-24 18:06:51 (GMT) |
commit | 0ae78b76d544adad4860b66bdd6279fdde07ea34 (patch) | |
tree | b81053919819a20a9f08d9fc5938c87dab54c63f /Modules | |
parent | 29b285c6a1b583f56257f3ca8113d6ce29f5d8d6 (diff) | |
download | CMake-0ae78b76d544adad4860b66bdd6279fdde07ea34.zip CMake-0ae78b76d544adad4860b66bdd6279fdde07ea34.tar.gz CMake-0ae78b76d544adad4860b66bdd6279fdde07ea34.tar.bz2 |
FindPackageMessage: Eliminate new lines in cache entries
Fix problem exposed by recent commit to FindPythonInterp.
If the find "details" has new lines in it, then replace them
with literal "\n" two character sequences so that the string
may be saved as a cache entry that can be re-read next time
CMake runs.
Diffstat (limited to 'Modules')
-rw-r--r-- | Modules/FindPackageMessage.cmake | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/Modules/FindPackageMessage.cmake b/Modules/FindPackageMessage.cmake index eb398b2..5afee3e 100644 --- a/Modules/FindPackageMessage.cmake +++ b/Modules/FindPackageMessage.cmake @@ -34,6 +34,7 @@ FUNCTION(FIND_PACKAGE_MESSAGE pkg msg details) # Avoid printing a message repeatedly for the same find result. IF(NOT ${pkg}_FIND_QUIETLY) + STRING(REPLACE "\n" "\\n" details "${details}") SET(DETAILS_VAR FIND_PACKAGE_MESSAGE_DETAILS_${pkg}) IF(NOT "${details}" STREQUAL "${${DETAILS_VAR}}") # The message has not yet been printed. |