From 5d0d980d9949daf596e10715d686adc95c1c232b Mon Sep 17 00:00:00 2001 From: Daniel Pfeifer Date: Thu, 28 Jul 2016 00:41:13 +0200 Subject: Use string(APPEND) in Modules Automate with: find Modules -type f -print0 | xargs -0 perl -i -0pe \ 's/set\(([a-zA-Z0-9_]+)(\s+)"\$\{\1\}([^"])/string(APPEND \1\2"\3/g' --- Modules/CheckTypeSize.cmake | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'Modules/CheckTypeSize.cmake') diff --git a/Modules/CheckTypeSize.cmake b/Modules/CheckTypeSize.cmake index 5938d6c9a7..827905b332 100644 --- a/Modules/CheckTypeSize.cmake +++ b/Modules/CheckTypeSize.cmake @@ -97,17 +97,17 @@ function(__check_type_size_impl type var map builtin language) set(headers) if(builtin) if(HAVE_SYS_TYPES_H) - set(headers "${headers}#include \n") + string(APPEND headers "#include \n") endif() if(HAVE_STDINT_H) - set(headers "${headers}#include \n") + string(APPEND headers "#include \n") endif() if(HAVE_STDDEF_H) - set(headers "${headers}#include \n") + string(APPEND headers "#include \n") endif() endif() foreach(h ${CMAKE_EXTRA_INCLUDE_FILES}) - set(headers "${headers}#include \"${h}\"\n") + string(APPEND headers "#include \"${h}\"\n") endforeach() # Perform the check. @@ -157,7 +157,7 @@ function(__check_type_size_impl type var map builtin language) string(REGEX MATCH "${regex_key}" key "${info}") string(REGEX REPLACE "${regex_key}" "\\1" key "${key}") if(key) - set(code "${code}\nset(${var}-${key} \"${size}\")") + string(APPEND code "\nset(${var}-${key} \"${size}\")") list(APPEND keys ${key}) endif() endif() -- cgit v1.2.1