summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorDavid Cole <david.cole@kitware.com>2011-08-24 18:06:51 (GMT)
committerDavid Cole <david.cole@kitware.com>2011-08-24 18:06:51 (GMT)
commit0ae78b76d544adad4860b66bdd6279fdde07ea34 (patch)
treeb81053919819a20a9f08d9fc5938c87dab54c63f /Modules
parent29b285c6a1b583f56257f3ca8113d6ce29f5d8d6 (diff)
downloadCMake-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.cmake1
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.