summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Pfeifer <daniel@pfeifer-mail.de>2016-07-27 22:43:04 (GMT)
committerDaniel Pfeifer <daniel@pfeifer-mail.de>2016-07-27 22:43:04 (GMT)
commit7a649111cdea2b10f2ec57084416be619867fbfb (patch)
tree072e1343376835ba4dda7689db02dc51598e005b
parent5d0d980d9949daf596e10715d686adc95c1c232b (diff)
downloadCMake-7a649111cdea2b10f2ec57084416be619867fbfb.zip
CMake-7a649111cdea2b10f2ec57084416be619867fbfb.tar.gz
CMake-7a649111cdea2b10f2ec57084416be619867fbfb.tar.bz2
Use string(APPEND) in Tests
Automate with: find Tests -type f -print0 | xargs -0 perl -i -0pe \ 's/set\(([a-zA-Z0-9_]+)(\s+)"\$\{\1\}([^"])/string(APPEND \1\2"\3/g'
-rw-r--r--Tests/AliasTarget/CMakeLists.txt2
-rw-r--r--Tests/CMakeOnly/CheckCXXSymbolExists/CMakeLists.txt2
-rw-r--r--Tests/CMakeOnly/CheckStructHasMember/CMakeLists.txt2
-rw-r--r--Tests/CMakeOnly/CheckSymbolExists/CMakeLists.txt2
-rw-r--r--Tests/CMakeTests/ModuleNoticesTest.cmake.in2
-rw-r--r--Tests/CMakeTests/WhileTest.cmake.in6
-rw-r--r--Tests/CPackComponentsDEB/RunCPackVerifyResult-components-lintian-dpkgdeb-checks.cmake2
-rw-r--r--Tests/CPackComponentsDEB/RunCPackVerifyResult.cmake2
-rw-r--r--Tests/CTestUpdateBZR.cmake.in2
-rw-r--r--Tests/CTestUpdateCVS.cmake.in2
-rw-r--r--Tests/CTestUpdateCommon.cmake12
-rw-r--r--Tests/CTestUpdateGIT.cmake.in2
-rw-r--r--Tests/CTestUpdateHG.cmake.in2
-rw-r--r--Tests/CTestUpdateP4.cmake.in8
-rw-r--r--Tests/CTestUpdateSVN.cmake.in2
-rw-r--r--Tests/Complex/CMakeLists.txt4
-rw-r--r--Tests/Complex/Executable/CMakeLists.txt4
-rw-r--r--Tests/Complex/Library/CMakeLists.txt2
-rw-r--r--Tests/Complex/VarTests.cmake2
-rw-r--r--Tests/ComplexOneConfig/CMakeLists.txt4
-rw-r--r--Tests/ComplexOneConfig/Executable/CMakeLists.txt4
-rw-r--r--Tests/ComplexOneConfig/Library/CMakeLists.txt2
-rw-r--r--Tests/ComplexOneConfig/VarTests.cmake2
-rw-r--r--Tests/CustomCommand/CMakeLists.txt6
-rw-r--r--Tests/FindPackageTest/CMakeLists.txt2
-rw-r--r--Tests/Fortran/CMakeLists.txt2
-rw-r--r--Tests/IncludeDirectories/CMakeLists.txt4
-rw-r--r--Tests/MakeClean/CMakeLists.txt2
-rw-r--r--Tests/MathTest/CMakeLists.txt2
-rw-r--r--Tests/Module/GenerateExportHeader/CMakeLists.txt4
-rw-r--r--Tests/Plugin/CMakeLists.txt2
-rw-r--r--Tests/Preprocess/CMakeLists.txt30
-rw-r--r--Tests/RunCMake/BuildDepends/check.cmake8
-rw-r--r--Tests/RunCMake/CMP0054/CMP0054-policy-while-scope.cmake4
-rw-r--r--Tests/RunCMake/CPack/DEB/Helpers.cmake10
-rw-r--r--Tests/RunCMake/CPack/VerifyResult.cmake4
-rw-r--r--Tests/RunCMake/RunCMake.cmake6
-rw-r--r--Tests/RunCMake/continue/ContinueWhile.cmake2
-rw-r--r--Tests/RunCMake/if/IsDirectoryLong.cmake2
-rw-r--r--Tests/RunCMake/include_external_msproject/check_utils.cmake6
-rw-r--r--Tests/RunCMake/install/DIRECTORY-MESSAGE_NEVER-check.cmake8
-rw-r--r--Tests/RunCMake/install/DIRECTORY-message-check.cmake12
-rw-r--r--Tests/RunCMake/install/DIRECTORY-message-lazy-check.cmake12
-rw-r--r--Tests/SimpleInstall/CMakeLists.txt4
-rw-r--r--Tests/SimpleInstallS2/CMakeLists.txt4
-rw-r--r--Tests/TryCompile/CMakeLists.txt4
-rw-r--r--Tests/VSMASM/CMakeLists.txt2
47 files changed, 108 insertions, 108 deletions
diff --git a/Tests/AliasTarget/CMakeLists.txt b/Tests/AliasTarget/CMakeLists.txt
index 47ccbdc..f9ae03a 100644
--- a/Tests/AliasTarget/CMakeLists.txt
+++ b/Tests/AliasTarget/CMakeLists.txt
@@ -8,7 +8,7 @@ set(CMAKE_CXX_STANDARD 98)
# template support also need a flag to use the newer C++ library.
if (CMAKE_CXX_COMPILER_ID STREQUAL HP AND
CMAKE_CXX98_STANDARD_COMPILE_OPTION STREQUAL "+hpxstd98")
- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -AA")
+ string(APPEND CMAKE_CXX_FLAGS " -AA")
endif ()
# Clang/C2 in C++98 mode cannot properly handle some of MSVC headers
diff --git a/Tests/CMakeOnly/CheckCXXSymbolExists/CMakeLists.txt b/Tests/CMakeOnly/CheckCXXSymbolExists/CMakeLists.txt
index 9528aa3..f058c19 100644
--- a/Tests/CMakeOnly/CheckCXXSymbolExists/CMakeLists.txt
+++ b/Tests/CMakeOnly/CheckCXXSymbolExists/CMakeLists.txt
@@ -50,7 +50,7 @@ else ()
endif ()
if (CMAKE_COMPILER_IS_GNUCXX)
- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O3")
+ string(APPEND CMAKE_CXX_FLAGS " -O3")
unset(CSE_RESULT_O3 CACHE)
message(STATUS "Testing with optimization -O3")
diff --git a/Tests/CMakeOnly/CheckStructHasMember/CMakeLists.txt b/Tests/CMakeOnly/CheckStructHasMember/CMakeLists.txt
index f06d5c3..a584505 100644
--- a/Tests/CMakeOnly/CheckStructHasMember/CMakeLists.txt
+++ b/Tests/CMakeOnly/CheckStructHasMember/CMakeLists.txt
@@ -77,7 +77,7 @@ endforeach()
set(CMAKE_TRY_COMPILE_CONFIGURATION ${CMAKE_BUILD_TYPE})
if (CMAKE_COMPILER_IS_GNUCC)
- set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -O3")
+ string(APPEND CMAKE_C_FLAGS " -O3")
unset(CSHM_RESULT_O3 CACHE)
unset(CSHM_RESULT_O3_C CACHE)
unset(CSHM_RESULT_O3_CXX CACHE)
diff --git a/Tests/CMakeOnly/CheckSymbolExists/CMakeLists.txt b/Tests/CMakeOnly/CheckSymbolExists/CMakeLists.txt
index 7656577..7f01463 100644
--- a/Tests/CMakeOnly/CheckSymbolExists/CMakeLists.txt
+++ b/Tests/CMakeOnly/CheckSymbolExists/CMakeLists.txt
@@ -39,7 +39,7 @@ else ()
endif ()
if (CMAKE_COMPILER_IS_GNUCC)
- set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -O3")
+ string(APPEND CMAKE_C_FLAGS " -O3")
unset(CSE_RESULT_O3 CACHE)
message(STATUS "Testing with optimization -O3")
diff --git a/Tests/CMakeTests/ModuleNoticesTest.cmake.in b/Tests/CMakeTests/ModuleNoticesTest.cmake.in
index 8ecebd3..7bea0af 100644
--- a/Tests/CMakeTests/ModuleNoticesTest.cmake.in
+++ b/Tests/CMakeTests/ModuleNoticesTest.cmake.in
@@ -35,7 +35,7 @@ foreach(module ${all_modules})
message(STATUS "module: ${module}")
file(READ "${dir}/${module}" module_content)
if(NOT "${module_content}" MATCHES "${notice_regex}")
- set(notice_missing "${notice_missing} ${module}\n")
+ string(APPEND notice_missing " ${module}\n")
endif()
endforeach()
diff --git a/Tests/CMakeTests/WhileTest.cmake.in b/Tests/CMakeTests/WhileTest.cmake.in
index cc22978..9066544 100644
--- a/Tests/CMakeTests/WhileTest.cmake.in
+++ b/Tests/CMakeTests/WhileTest.cmake.in
@@ -2,13 +2,13 @@ set(NUMBERS "")
set(COUNT 0)
while(COUNT LESS 200)
- set(NUMBERS "${NUMBERS} ${COUNT}")
+ string(APPEND NUMBERS " ${COUNT}")
set(COUNT "2${COUNT}")
set(NCOUNT 3)
while(NCOUNT LESS 31)
- set(NUMBERS "${NUMBERS} ${NCOUNT}")
- set(NCOUNT "${NCOUNT}0")
+ string(APPEND NUMBERS " ${NCOUNT}")
+ string(APPEND NCOUNT "0")
endwhile()
endwhile()
diff --git a/Tests/CPackComponentsDEB/RunCPackVerifyResult-components-lintian-dpkgdeb-checks.cmake b/Tests/CPackComponentsDEB/RunCPackVerifyResult-components-lintian-dpkgdeb-checks.cmake
index d51650c..f1391cd 100644
--- a/Tests/CPackComponentsDEB/RunCPackVerifyResult-components-lintian-dpkgdeb-checks.cmake
+++ b/Tests/CPackComponentsDEB/RunCPackVerifyResult-components-lintian-dpkgdeb-checks.cmake
@@ -41,7 +41,7 @@ if(LINTIAN_EXECUTABLE)
FILENAME "${_f}"
ERROR_REGEX_STRINGS "${STRINGS_TO_AVOID}")
- set(lintian_output_errors_all "${lintian_output_errors_all}${lintian_output_errors}")
+ string(APPEND lintian_output_errors_all "${lintian_output_errors}")
endforeach()
if(NOT "${lintian_output_errors_all}" STREQUAL "")
diff --git a/Tests/CPackComponentsDEB/RunCPackVerifyResult.cmake b/Tests/CPackComponentsDEB/RunCPackVerifyResult.cmake
index b4e567c..2f9e2fc 100644
--- a/Tests/CPackComponentsDEB/RunCPackVerifyResult.cmake
+++ b/Tests/CPackComponentsDEB/RunCPackVerifyResult.cmake
@@ -126,7 +126,7 @@ function(lintian_check_specific_errors output_errors)
string(REGEX MATCHALL "${_s}" "_TMP_CHECK_ERROR" "${lintian_output}")
if(NOT "${_TMP_CHECK_ERROR}" STREQUAL "")
- set(ERROR_ACC "${ERROR_ACC}\nlintian: ${_f}: output contains an undesirable regex:\n\t${_TMP_CHECK_ERROR}")
+ string(APPEND ERROR_ACC "\nlintian: ${_f}: output contains an undesirable regex:\n\t${_TMP_CHECK_ERROR}")
endif()
endforeach()
diff --git a/Tests/CTestUpdateBZR.cmake.in b/Tests/CTestUpdateBZR.cmake.in
index 8fb1d34..da181d2 100644
--- a/Tests/CTestUpdateBZR.cmake.in
+++ b/Tests/CTestUpdateBZR.cmake.in
@@ -4,7 +4,7 @@
#-----------------------------------------------------------------------------
# Test in a directory next to this script.
get_filename_component(TOP "${CMAKE_CURRENT_LIST_FILE}" PATH)
-set(TOP "${TOP}/@CTestUpdateBZR_DIR@")
+string(APPEND TOP "/@CTestUpdateBZR_DIR@")
# Include code common to all update tests.
include("@CMAKE_CURRENT_SOURCE_DIR@/CTestUpdateCommon.cmake")
diff --git a/Tests/CTestUpdateCVS.cmake.in b/Tests/CTestUpdateCVS.cmake.in
index 277b3a6..5389bdf 100644
--- a/Tests/CTestUpdateCVS.cmake.in
+++ b/Tests/CTestUpdateCVS.cmake.in
@@ -4,7 +4,7 @@
#-----------------------------------------------------------------------------
# Test in a directory next to this script.
get_filename_component(TOP "${CMAKE_CURRENT_LIST_FILE}" PATH)
-set(TOP "${TOP}/@CTestUpdateCVS_DIR@")
+string(APPEND TOP "/@CTestUpdateCVS_DIR@")
set(UPDATE_NOT_GLOBAL 1)
set(UPDATE_MAYBE Updated{CTestConfig.cmake})
diff --git a/Tests/CTestUpdateCommon.cmake b/Tests/CTestUpdateCommon.cmake
index 458e427..61aa13b 100644
--- a/Tests/CTestUpdateCommon.cmake
+++ b/Tests/CTestUpdateCommon.cmake
@@ -84,9 +84,9 @@ function(check_updates build)
set(MSG "")
if(MISSING)
# List the missing entries
- set(MSG "${MSG}Update.xml is missing expected entries:\n")
+ string(APPEND MSG "Update.xml is missing expected entries:\n")
foreach(f ${MISSING})
- set(MSG "${MSG} ${f}\n")
+ string(APPEND MSG " ${f}\n")
endforeach()
else()
# Success
@@ -96,9 +96,9 @@ function(check_updates build)
# Report the result
if(EXTRA)
# List the extra entries
- set(MSG "${MSG}Update.xml has extra unexpected entries:\n")
+ string(APPEND MSG "Update.xml has extra unexpected entries:\n")
foreach(f ${EXTRA})
- set(MSG "${MSG} ${f}\n")
+ string(APPEND MSG " ${f}\n")
endforeach()
else()
# Success
@@ -112,9 +112,9 @@ function(check_updates build)
if(UPDATE_LOG_FILE)
file(READ ${UPDATE_LOG_FILE} UPDATE_LOG LIMIT ${max_update_xml_size})
string(REPLACE "\n" "\n " UPDATE_LOG "${UPDATE_LOG}")
- set(MSG "${MSG}Update log:\n ${UPDATE_LOG}")
+ string(APPEND MSG "Update log:\n ${UPDATE_LOG}")
else()
- set(MSG "${MSG}No update log found!")
+ string(APPEND MSG "No update log found!")
endif()
# Display the error message
diff --git a/Tests/CTestUpdateGIT.cmake.in b/Tests/CTestUpdateGIT.cmake.in
index 46230cc..7d0fa0f 100644
--- a/Tests/CTestUpdateGIT.cmake.in
+++ b/Tests/CTestUpdateGIT.cmake.in
@@ -4,7 +4,7 @@
#-----------------------------------------------------------------------------
# Test in a directory next to this script.
get_filename_component(TOP "${CMAKE_CURRENT_LIST_FILE}" PATH)
-set(TOP "${TOP}/@CTestUpdateGIT_DIR@")
+string(APPEND TOP "/@CTestUpdateGIT_DIR@")
set(UPDATE_EXTRA Updated{module})
# Include code common to all update tests.
diff --git a/Tests/CTestUpdateHG.cmake.in b/Tests/CTestUpdateHG.cmake.in
index c76bf91..055d309 100644
--- a/Tests/CTestUpdateHG.cmake.in
+++ b/Tests/CTestUpdateHG.cmake.in
@@ -4,7 +4,7 @@
#-----------------------------------------------------------------------------
# Test in a directory next to this script.
get_filename_component(TOP "${CMAKE_CURRENT_LIST_FILE}" PATH)
-set(TOP "${TOP}/@CTestUpdateHG_DIR@")
+string(APPEND TOP "/@CTestUpdateHG_DIR@")
# Include code common to all update tests.
include("@CMAKE_CURRENT_SOURCE_DIR@/CTestUpdateCommon.cmake")
diff --git a/Tests/CTestUpdateP4.cmake.in b/Tests/CTestUpdateP4.cmake.in
index f0420c4..5eef9fb 100644
--- a/Tests/CTestUpdateP4.cmake.in
+++ b/Tests/CTestUpdateP4.cmake.in
@@ -5,7 +5,7 @@
# Test in a directory next to this script.
get_filename_component(TOP "${CMAKE_CURRENT_LIST_FILE}" PATH)
set(P4_TOP "${TOP}")
-set(TOP "${TOP}/@CTestUpdateP4_DIR@")
+string(APPEND TOP "/@CTestUpdateP4_DIR@")
# Include code common to all update tests.
set(REPOSITORY_FILE_PREFIX "//ctest/")
@@ -48,9 +48,9 @@ if(UNIX)
file(MAKE_DIRECTORY ${P4_ROOT})
set(P4_SERVER "nohup '${P4D}' -d -r '${P4_ROOT}'")
- set(P4_SERVER "${P4_SERVER} -L '${P4_ROOT}/p4.log'")
- set(P4_SERVER "${P4_SERVER} -J '${P4_ROOT}/journal'")
- set(P4_SERVER "${P4_SERVER} -p ${P4_PORT} >/dev/null 2>&1 &")
+ string(APPEND P4_SERVER " -L '${P4_ROOT}/p4.log'")
+ string(APPEND P4_SERVER " -J '${P4_ROOT}/journal'")
+ string(APPEND P4_SERVER " -p ${P4_PORT} >/dev/null 2>&1 &")
message("Server command line: ${P4_SERVER}")
diff --git a/Tests/CTestUpdateSVN.cmake.in b/Tests/CTestUpdateSVN.cmake.in
index b757a44..12a3526 100644
--- a/Tests/CTestUpdateSVN.cmake.in
+++ b/Tests/CTestUpdateSVN.cmake.in
@@ -4,7 +4,7 @@
#-----------------------------------------------------------------------------
# Test in a directory next to this script.
get_filename_component(TOP "${CMAKE_CURRENT_LIST_FILE}" PATH)
-set(TOP "${TOP}/@CTestUpdateSVN_DIR@")
+string(APPEND TOP "/@CTestUpdateSVN_DIR@")
set(UPDATE_GLOBAL_ELEMENTS SVNPath)
# Include code common to all update tests.
diff --git a/Tests/Complex/CMakeLists.txt b/Tests/Complex/CMakeLists.txt
index a4a33c3..80cc2e3 100644
--- a/Tests/Complex/CMakeLists.txt
+++ b/Tests/Complex/CMakeLists.txt
@@ -95,7 +95,7 @@ endif()
if(CMAKE_SYSTEM MATCHES "OSF1-V")
if(NOT CMAKE_COMPILER_IS_GNUCXX)
- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -timplicit_local -no_implicit_include ")
+ string(APPEND CMAKE_CXX_FLAGS " -timplicit_local -no_implicit_include ")
endif()
endif()
@@ -436,7 +436,7 @@ set(CMAKE_CXX_EXTENSIONS TRUE)
# template support also need a flag to use the newer C++ library.
if (CMAKE_CXX_COMPILER_ID STREQUAL HP AND
CMAKE_CXX98_STANDARD_COMPILE_OPTION STREQUAL "+hpxstd98")
- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -AA")
+ string(APPEND CMAKE_CXX_FLAGS " -AA")
endif ()
# Clang/C2 in C++98 mode cannot properly handle some of MSVC headers
diff --git a/Tests/Complex/Executable/CMakeLists.txt b/Tests/Complex/Executable/CMakeLists.txt
index c30dcbc..2a79629 100644
--- a/Tests/Complex/Executable/CMakeLists.txt
+++ b/Tests/Complex/Executable/CMakeLists.txt
@@ -1,8 +1,8 @@
#
# Create exe.
#
-set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DTEST_CXX_FLAGS")
-set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DTEST_C_FLAGS")
+string(APPEND CMAKE_CXX_FLAGS " -DTEST_CXX_FLAGS")
+string(APPEND CMAKE_C_FLAGS " -DTEST_C_FLAGS")
# Create an imported target for if(TARGET) test below.
add_library(ExeImportedTarget UNKNOWN IMPORTED)
diff --git a/Tests/Complex/Library/CMakeLists.txt b/Tests/Complex/Library/CMakeLists.txt
index f00cbd6..dbf806e 100644
--- a/Tests/Complex/Library/CMakeLists.txt
+++ b/Tests/Complex/Library/CMakeLists.txt
@@ -43,7 +43,7 @@ endif()
#
set(SharedLibrarySources sharedFile)
add_library(CMakeTestLibraryShared SHARED ${SharedLibrarySources})
-set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DTEST_C_FLAGS")
+string(APPEND CMAKE_C_FLAGS " -DTEST_C_FLAGS")
add_library(CMakeTestCLibraryShared SHARED testConly.c)
define_property(
TARGET PROPERTY FOO
diff --git a/Tests/Complex/VarTests.cmake b/Tests/Complex/VarTests.cmake
index 70b803a..9d35949 100644
--- a/Tests/Complex/VarTests.cmake
+++ b/Tests/Complex/VarTests.cmake
@@ -180,5 +180,5 @@ endforeach()
set(FOREACH_CONCAT "")
foreach (INDEX a;b;c;d;e;f;g)
- set(FOREACH_CONCAT "${FOREACH_CONCAT}${INDEX}")
+ string(APPEND FOREACH_CONCAT "${INDEX}")
endforeach()
diff --git a/Tests/ComplexOneConfig/CMakeLists.txt b/Tests/ComplexOneConfig/CMakeLists.txt
index 9090ab5..1b833b2 100644
--- a/Tests/ComplexOneConfig/CMakeLists.txt
+++ b/Tests/ComplexOneConfig/CMakeLists.txt
@@ -88,7 +88,7 @@ endif()
if(CMAKE_SYSTEM MATCHES "OSF1-V")
if(NOT CMAKE_COMPILER_IS_GNUCXX)
- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -timplicit_local -no_implicit_include ")
+ string(APPEND CMAKE_CXX_FLAGS " -timplicit_local -no_implicit_include ")
endif()
endif()
@@ -399,7 +399,7 @@ set(CMAKE_CXX_EXTENSIONS TRUE)
# template support also need a flag to use the newer C++ library.
if (CMAKE_CXX_COMPILER_ID STREQUAL HP AND
CMAKE_CXX98_STANDARD_COMPILE_OPTION STREQUAL "+hpxstd98")
- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -AA")
+ string(APPEND CMAKE_CXX_FLAGS " -AA")
endif ()
# Clang/C2 in C++98 mode cannot properly handle some of MSVC headers
diff --git a/Tests/ComplexOneConfig/Executable/CMakeLists.txt b/Tests/ComplexOneConfig/Executable/CMakeLists.txt
index 4897b48..f935aed 100644
--- a/Tests/ComplexOneConfig/Executable/CMakeLists.txt
+++ b/Tests/ComplexOneConfig/Executable/CMakeLists.txt
@@ -1,8 +1,8 @@
#
# Create exe.
#
-set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DTEST_CXX_FLAGS")
-set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DTEST_C_FLAGS")
+string(APPEND CMAKE_CXX_FLAGS " -DTEST_CXX_FLAGS")
+string(APPEND CMAKE_C_FLAGS " -DTEST_C_FLAGS")
# Create an imported target for if(TARGET) test below.
add_library(ExeImportedTarget UNKNOWN IMPORTED)
diff --git a/Tests/ComplexOneConfig/Library/CMakeLists.txt b/Tests/ComplexOneConfig/Library/CMakeLists.txt
index f00cbd6..dbf806e 100644
--- a/Tests/ComplexOneConfig/Library/CMakeLists.txt
+++ b/Tests/ComplexOneConfig/Library/CMakeLists.txt
@@ -43,7 +43,7 @@ endif()
#
set(SharedLibrarySources sharedFile)
add_library(CMakeTestLibraryShared SHARED ${SharedLibrarySources})
-set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DTEST_C_FLAGS")
+string(APPEND CMAKE_C_FLAGS " -DTEST_C_FLAGS")
add_library(CMakeTestCLibraryShared SHARED testConly.c)
define_property(
TARGET PROPERTY FOO
diff --git a/Tests/ComplexOneConfig/VarTests.cmake b/Tests/ComplexOneConfig/VarTests.cmake
index 70b803a..9d35949 100644
--- a/Tests/ComplexOneConfig/VarTests.cmake
+++ b/Tests/ComplexOneConfig/VarTests.cmake
@@ -180,5 +180,5 @@ endforeach()
set(FOREACH_CONCAT "")
foreach (INDEX a;b;c;d;e;f;g)
- set(FOREACH_CONCAT "${FOREACH_CONCAT}${INDEX}")
+ string(APPEND FOREACH_CONCAT "${INDEX}")
endforeach()
diff --git a/Tests/CustomCommand/CMakeLists.txt b/Tests/CustomCommand/CMakeLists.txt
index 268069d..db57e19 100644
--- a/Tests/CustomCommand/CMakeLists.txt
+++ b/Tests/CustomCommand/CMakeLists.txt
@@ -376,8 +376,8 @@ foreach(arg ${CHECK_ARGS} "")
set(ARG "${arg}")
string(REPLACE "\\" "\\\\" ARG "${ARG}")
string(REPLACE "\"" "\\\"" ARG "${ARG}")
- set(EXPECTED_ARGUMENTS
- "${EXPECTED_ARGUMENTS} \"${ARG}\",
+ string(APPEND EXPECTED_ARGUMENTS
+ " \"${ARG}\",
")
endforeach()
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/check_command_line.c.in
@@ -476,7 +476,7 @@ add_custom_command(
add_library(NormOutput "${gen_file}")
-set(gen_path "${gen_path}/bar")
+string(APPEND gen_path "/bar")
set(gen_file "${gen_path}/bar.cxx")
add_custom_command(
diff --git a/Tests/FindPackageTest/CMakeLists.txt b/Tests/FindPackageTest/CMakeLists.txt
index fadd0fe..d3e68bc 100644
--- a/Tests/FindPackageTest/CMakeLists.txt
+++ b/Tests/FindPackageTest/CMakeLists.txt
@@ -333,7 +333,7 @@ endif()
# Choose a unique version.
string(REGEX REPLACE "-.*$" "" version ${CMAKE_VERSION})
string(RANDOM LENGTH 4 ALPHABET "0123456789" v)
-set(version "${version}.${v}")
+string(APPEND version ".${v}")
message(STATUS "Preparing export(PACKAGE) test project")
try_compile(EXPORTER_COMPILED
diff --git a/Tests/Fortran/CMakeLists.txt b/Tests/Fortran/CMakeLists.txt
index 1268982..99fcc0a 100644
--- a/Tests/Fortran/CMakeLists.txt
+++ b/Tests/Fortran/CMakeLists.txt
@@ -188,7 +188,7 @@ if(TEST_MODULE_DEPENDS)
if("${testf_BINARY_DIR}" MATCHES " ")
# Our build tree has a space, so the build tool supports spaces.
# Test using modules from a path with spaces.
- set(External_BINARY_DIR "${External_BINARY_DIR} Build")
+ string(APPEND External_BINARY_DIR " Build")
endif()
add_custom_command(
OUTPUT ${testf_BINARY_DIR}/ExternalProject
diff --git a/Tests/IncludeDirectories/CMakeLists.txt b/Tests/IncludeDirectories/CMakeLists.txt
index 523c4f7..4920582 100644
--- a/Tests/IncludeDirectories/CMakeLists.txt
+++ b/Tests/IncludeDirectories/CMakeLists.txt
@@ -39,9 +39,9 @@ if(WATCOM OR MSVC60)
set(USE_FULLPATH FALSE)
endif()
if(USE_FULLPATH)
- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} \"-I${CMAKE_BINARY_DIR}/Flags\"")
+ string(APPEND CMAKE_CXX_FLAGS " \"-I${CMAKE_BINARY_DIR}/Flags\"")
else()
- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -IFlags")
+ string(APPEND CMAKE_CXX_FLAGS " -IFlags")
endif()
include_directories(${CMAKE_BINARY_DIR}/IncDir)
diff --git a/Tests/MakeClean/CMakeLists.txt b/Tests/MakeClean/CMakeLists.txt
index 8ac624a..fbd4995 100644
--- a/Tests/MakeClean/CMakeLists.txt
+++ b/Tests/MakeClean/CMakeLists.txt
@@ -34,7 +34,7 @@ endforeach()
# Configure an executable to check that all the files are missing.
set(CHECK_FILES)
foreach(f ${TOCLEAN_FILES})
- set(CHECK_FILES "${CHECK_FILES} \"${f}\",\n")
+ string(APPEND CHECK_FILES " \"${f}\",\n")
endforeach()
configure_file(${MakeClean_SOURCE_DIR}/check_clean.c.in
${MakeClean_BINARY_DIR}/check_clean.c @ONLY)
diff --git a/Tests/MathTest/CMakeLists.txt b/Tests/MathTest/CMakeLists.txt
index 34beaa0..ed2c7d4 100644
--- a/Tests/MathTest/CMakeLists.txt
+++ b/Tests/MathTest/CMakeLists.txt
@@ -16,7 +16,7 @@ set(FILE_EXPRESSIONS "")
foreach(expression
${expressions})
math(EXPR expr "${expression}")
- set(FILE_EXPRESSIONS "${FILE_EXPRESSIONS}TEST_EXPRESSION(${expression}, ${expr})\n")
+ string(APPEND FILE_EXPRESSIONS "TEST_EXPRESSION(${expression}, ${expr})\n")
endforeach()
configure_file(
diff --git a/Tests/Module/GenerateExportHeader/CMakeLists.txt b/Tests/Module/GenerateExportHeader/CMakeLists.txt
index 8b94ca7..56f0f28 100644
--- a/Tests/Module/GenerateExportHeader/CMakeLists.txt
+++ b/Tests/Module/GenerateExportHeader/CMakeLists.txt
@@ -64,7 +64,7 @@ set(CMAKE_CXX_STANDARD 98)
# template support also need a flag to use the newer C++ library.
if (CMAKE_CXX_COMPILER_ID STREQUAL HP AND
CMAKE_CXX98_STANDARD_COMPILE_OPTION STREQUAL "+hpxstd98")
- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -AA")
+ string(APPEND CMAKE_CXX_FLAGS " -AA")
endif ()
# Clang/C2 in C++98 mode cannot properly handle some of MSVC headers
@@ -103,7 +103,7 @@ endif()
if (CMAKE_COMPILER_IS_GNUCXX OR (${CMAKE_CXX_COMPILER_ID} MATCHES Clang))
# No need to clutter the test output with warnings.
- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-deprecated-declarations")
+ string(APPEND CMAKE_CXX_FLAGS " -Wno-deprecated-declarations")
endif()
if(MSVC AND COMPILER_HAS_DEPRECATED)
diff --git a/Tests/Plugin/CMakeLists.txt b/Tests/Plugin/CMakeLists.txt
index 49ff317..f52b479 100644
--- a/Tests/Plugin/CMakeLists.txt
+++ b/Tests/Plugin/CMakeLists.txt
@@ -32,7 +32,7 @@ set(CMAKE_CXX_STANDARD 98)
# template support also need a flag to use the newer C++ library.
if (CMAKE_CXX_COMPILER_ID STREQUAL HP AND
CMAKE_CXX98_STANDARD_COMPILE_OPTION STREQUAL "+hpxstd98")
- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -AA")
+ string(APPEND CMAKE_CXX_FLAGS " -AA")
endif ()
# Clang/C2 in C++98 mode cannot properly handle some of MSVC headers
diff --git a/Tests/Preprocess/CMakeLists.txt b/Tests/Preprocess/CMakeLists.txt
index b930f56..15f0338 100644
--- a/Tests/Preprocess/CMakeLists.txt
+++ b/Tests/Preprocess/CMakeLists.txt
@@ -57,7 +57,7 @@ if(NOT BORLAND AND NOT PP_VS70)
set(SEMICOLON "\;")
endif()
-set(STRING_EXTRA "${STRING_EXTRA} ")
+string(APPEND STRING_EXTRA " ")
if(NOT PP_BORLAND AND NOT PP_WATCOM)
# Borland, WMake: multiple spaces
@@ -65,7 +65,7 @@ if(NOT PP_BORLAND AND NOT PP_WATCOM)
# quoted strings when passing to the compiler. It does not have
# trouble passing to other tools, and the compiler may be directly
# invoked from the command line.
- set(STRING_EXTRA "${STRING_EXTRA} ")
+ string(APPEND STRING_EXTRA " ")
endif()
if(NOT PP_VS)
@@ -73,21 +73,21 @@ if(NOT PP_VS)
# Visual Studio will not accept a comma in the value of a definition.
# The comma-separated list of PreprocessorDefinitions in the project
# file seems to be parsed before the content of entries is examined.
- set(STRING_EXTRA "${STRING_EXTRA},")
+ string(APPEND STRING_EXTRA ",")
endif()
if(NOT PP_MINGW)
# MinGW: &
# When inside -D"FOO=\"a & b\"" MinGW make wants -D"FOO=\"a "&" b\""
# but it does not like quoted ampersand elsewhere.
- set(STRING_EXTRA "${STRING_EXTRA}&")
+ string(APPEND STRING_EXTRA "&")
endif()
if(NOT PP_MINGW)
# MinGW: |
# When inside -D"FOO=\"a | b\"" MinGW make wants -D"FOO=\"a "|" b\""
# but it does not like quoted pipe elsewhere.
- set(STRING_EXTRA "${STRING_EXTRA}|")
+ string(APPEND STRING_EXTRA "|")
endif()
if(NOT PP_BORLAND AND NOT PP_MINGW AND NOT PP_NMAKE)
@@ -95,13 +95,13 @@ if(NOT PP_BORLAND AND NOT PP_MINGW AND NOT PP_NMAKE)
# When inside -D"FOO=\"a ^ b\"" the make tools want -D"FOO=\"a "^" b\""
# but do not like quoted carrot elsewhere. In NMake the non-quoted
# syntax works when the flags are not in a make variable.
- set(STRING_EXTRA "${STRING_EXTRA}^")
+ string(APPEND STRING_EXTRA "^")
endif()
if(NOT PP_BORLAND AND NOT PP_MINGW AND NOT PP_NMAKE)
# Borland, MinGW: < >
# Angle-brackets have funny behavior that is hard to escape.
- set(STRING_EXTRA "${STRING_EXTRA}<>")
+ string(APPEND STRING_EXTRA "<>")
endif()
set(EXPR_OP1 "/")
@@ -122,7 +122,7 @@ if((NOT MSVC OR PP_NMAKE) AND
# be written just '%'. However nmake requires '%%' except when using
# response files. Currently we have no way to affect escaping based
# on whether flags go in a response file, so we just have to skip it.
- set(STRING_EXTRA "${STRING_EXTRA}%")
+ string(APPEND STRING_EXTRA "%")
set(EXPR_OP1 "%")
endif()
@@ -130,9 +130,9 @@ endif()
# The XL compiler cannot pass unbalanced parens correctly to a tool
# it launches internally.
if(CMAKE_C_COMPILER_ID STREQUAL "XL")
- set(STRING_EXTRA "${STRING_EXTRA}()")
+ string(APPEND STRING_EXTRA "()")
else()
- set(STRING_EXTRA "${STRING_EXTRA})(")
+ string(APPEND STRING_EXTRA ")(")
endif()
# General: \"
@@ -146,7 +146,7 @@ endif()
# internal tool to do preprocessing .
if((PP_NMAKE OR PP_UMAKE) AND
NOT CMAKE_C_COMPILER_ID STREQUAL "XL")
- set(STRING_EXTRA "${STRING_EXTRA}\\\"")
+ string(APPEND STRING_EXTRA "\\\"")
endif()
# General: #
@@ -183,15 +183,15 @@ set(EXPR "x*y+!(x==(y+1*2))*f(x${EXPR_OP1}2)")
if(NOT WATCOM)
# Watcom does not support - or / because it parses them as options.
- set(EXPR "${EXPR} + y/x-x")
+ string(APPEND EXPR " + y/x-x")
endif()
#-----------------------------------------------------------------------------
# Inform the test if the debug configuration is getting built.
# The NDEBUG definition takes care of this for release.
-set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -DPREPROCESS_DEBUG")
-set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -DPREPROCESS_DEBUG")
+string(APPEND CMAKE_C_FLAGS_DEBUG " -DPREPROCESS_DEBUG")
+string(APPEND CMAKE_CXX_FLAGS_DEBUG " -DPREPROCESS_DEBUG")
# Inform the test if it built from Xcode.
if(PP_XCODE)
@@ -265,7 +265,7 @@ add_custom_target(drive COMMAND Preprocess)
# Configure the header file with the desired string value.
if(SEMICOLON)
- set(STRING_VALUE "${STRING_VALUE};")
+ string(APPEND STRING_VALUE ";")
endif()
configure_file(${Preprocess_SOURCE_DIR}/preprocess.h.in
${Preprocess_BINARY_DIR}/preprocess.h)
diff --git a/Tests/RunCMake/BuildDepends/check.cmake b/Tests/RunCMake/BuildDepends/check.cmake
index 26a9eb6..c7b5c3d 100644
--- a/Tests/RunCMake/BuildDepends/check.cmake
+++ b/Tests/RunCMake/BuildDepends/check.cmake
@@ -6,7 +6,7 @@ if(EXISTS ${RunCMake_TEST_BINARY_DIR}/check-debug.cmake)
foreach(exe IN LISTS check_exes)
execute_process(COMMAND ${exe} RESULT_VARIABLE res)
if(NOT res EQUAL ${check_step})
- set(RunCMake_TEST_FAILED "${RunCMake_TEST_FAILED}
+ string(APPEND RunCMake_TEST_FAILED "
'${exe}' returned '${res}' but expected '${check_step}'
")
endif()
@@ -16,15 +16,15 @@ if(EXISTS ${RunCMake_TEST_BINARY_DIR}/check-debug.cmake)
set(lhs "${CMAKE_MATCH_1}")
set(rhs "${CMAKE_MATCH_2}")
if(NOT EXISTS "${lhs}")
- set(RunCMake_TEST_FAILED "${RunCMake_TEST_FAILED}
+ string(APPEND RunCMake_TEST_FAILED "
'${lhs}' missing
")
elseif(NOT EXISTS "${rhs}")
- set(RunCMake_TEST_FAILED "${RunCMake_TEST_FAILED}
+ string(APPEND RunCMake_TEST_FAILED "
'${rhs}' missing
")
elseif(NOT "${lhs}" IS_NEWER_THAN "${rhs}")
- set(RunCMake_TEST_FAILED "${RunCMake_TEST_FAILED}
+ string(APPEND RunCMake_TEST_FAILED "
'${lhs}' is not newer than '${rhs}'
")
endif()
diff --git a/Tests/RunCMake/CMP0054/CMP0054-policy-while-scope.cmake b/Tests/RunCMake/CMP0054/CMP0054-policy-while-scope.cmake
index 2b22778..7fb836e 100644
--- a/Tests/RunCMake/CMP0054/CMP0054-policy-while-scope.cmake
+++ b/Tests/RunCMake/CMP0054/CMP0054-policy-while-scope.cmake
@@ -25,7 +25,7 @@ while(NOT LOOP_VAR STREQUAL "xx")
cmake_policy(SET CMP0054 NEW)
- set(LOOP_VAR "${LOOP_VAR}x")
+ string(APPEND LOOP_VAR "x")
endwhile()
while("FOO" STREQUAL BAR)
@@ -57,7 +57,7 @@ while(NOT LOOP_VAR STREQUAL "xx")
cmake_policy(SET CMP0054 OLD)
- set(LOOP_VAR "${LOOP_VAR}x")
+ string(APPEND LOOP_VAR "x")
endwhile()
if(NOT "FOO" STREQUAL BAR)
diff --git a/Tests/RunCMake/CPack/DEB/Helpers.cmake b/Tests/RunCMake/CPack/DEB/Helpers.cmake
index d05f115..9b1be22 100644
--- a/Tests/RunCMake/CPack/DEB/Helpers.cmake
+++ b/Tests/RunCMake/CPack/DEB/Helpers.cmake
@@ -40,13 +40,13 @@ function(getMissingShlibsErrorExtra FILE RESULT_VAR)
set(error_extra " Extra: install files '${deb_install_files}'")
if(deb_install_files_errors)
- set(error_extra "${error_extra}; errors \"${deb_install_files_errors}\"")
+ string(APPEND error_extra "; errors \"${deb_install_files_errors}\"")
endif()
find_program(READELF_EXECUTABLE NAMES readelf)
if(READELF_EXECUTABLE)
- set(error_extra "${error_extra}; readelf \"\n")
+ string(APPEND error_extra "; readelf \"\n")
# Only dynamically linked ELF files are included
# Extract only file name infront of ":"
@@ -61,13 +61,13 @@ function(getMissingShlibsErrorExtra FILE RESULT_VAR)
ERROR_VARIABLE err_
OUTPUT_STRIP_TRAILING_WHITESPACE)
- set(error_extra "${error_extra} name '${CMAKE_MATCH_1}'\n result '${result}'\n output '${output}'\n error '${err_}'\n")
+ string(APPEND error_extra " name '${CMAKE_MATCH_1}'\n result '${result}'\n output '${output}'\n error '${err_}'\n")
endif()
endforeach()
- set(error_extra "${error_extra}\"")
+ string(APPEND error_extra "\"")
else()
- set(error_extra "${error_extra}; error readelf missing")
+ string(APPEND error_extra "; error readelf missing")
endif()
endif()
diff --git a/Tests/RunCMake/CPack/VerifyResult.cmake b/Tests/RunCMake/CPack/VerifyResult.cmake
index 6eab531..8047668 100644
--- a/Tests/RunCMake/CPack/VerifyResult.cmake
+++ b/Tests/RunCMake/CPack/VerifyResult.cmake
@@ -16,7 +16,7 @@ include("${src_dir}/${GENERATOR_TYPE}/${RunCMake_TEST}-ExpectedFiles.cmake")
if(NOT EXPECTED_FILES_COUNT EQUAL 0)
foreach(file_no_ RANGE 1 ${EXPECTED_FILES_COUNT})
file(GLOB FOUND_FILE_${file_no_} RELATIVE "${bin_dir}" "${EXPECTED_FILE_${file_no_}}")
- set(foundFiles_ "${foundFiles_};${FOUND_FILE_${file_no_}}")
+ string(APPEND foundFiles_ ";${FOUND_FILE_${file_no_}}")
list(LENGTH FOUND_FILE_${file_no_} foundFilesCount_)
if(foundFilesCount_ EQUAL 1)
@@ -45,7 +45,7 @@ if(NOT EXPECTED_FILES_COUNT EQUAL 0)
# check that there were no extra files generated
foreach(all_files_glob_ IN LISTS ALL_FILES_GLOB)
file(GLOB foundAll_ RELATIVE "${bin_dir}" "${all_files_glob_}")
- set(allFoundFiles_ "${allFoundFiles_};${foundAll_}")
+ string(APPEND allFoundFiles_ ";${foundAll_}")
endforeach()
list(LENGTH foundFiles_ foundFilesCount_)
diff --git a/Tests/RunCMake/RunCMake.cmake b/Tests/RunCMake/RunCMake.cmake
index fa0c980..247855a 100644
--- a/Tests/RunCMake/RunCMake.cmake
+++ b/Tests/RunCMake/RunCMake.cmake
@@ -95,7 +95,7 @@ function(run_cmake test)
endif()
set(msg "")
if(NOT "${actual_result}" MATCHES "${expect_result}")
- set(msg "${msg}Result is [${actual_result}], not [${expect_result}].\n")
+ string(APPEND msg "Result is [${actual_result}], not [${expect_result}].\n")
endif()
foreach(o out err)
string(REGEX REPLACE "\r\n" "\n" actual_std${o} "${actual_std${o}}")
@@ -107,7 +107,7 @@ function(run_cmake test)
string(REGEX REPLACE "\n" "\n expect-${o}> " expect_${o}
" expect-${o}> ${expect_std${o}}")
set(expect_${o} "Expected std${o} to match:\n${expect_${o}}\n")
- set(msg "${msg}std${o} does not match that expected.\n")
+ string(APPEND msg "std${o} does not match that expected.\n")
endif()
endif()
endforeach()
@@ -122,7 +122,7 @@ function(run_cmake test)
endif()
if(msg AND RunCMake_TEST_COMMAND)
string(REPLACE ";" "\" \"" command "\"${RunCMake_TEST_COMMAND}\"")
- set(msg "${msg}Command was:\n command> ${command}\n")
+ string(APPEND msg "Command was:\n command> ${command}\n")
endif()
if(msg)
string(REGEX REPLACE "\n" "\n actual-out> " actual_out " actual-out> ${actual_stdout}")
diff --git a/Tests/RunCMake/continue/ContinueWhile.cmake b/Tests/RunCMake/continue/ContinueWhile.cmake
index c1fa87a..f69993c 100644
--- a/Tests/RunCMake/continue/ContinueWhile.cmake
+++ b/Tests/RunCMake/continue/ContinueWhile.cmake
@@ -1,7 +1,7 @@
message(STATUS "start")
unset(iter)
while(NOT "${iter}" STREQUAL "aaaaa")
- set(iter "${iter}a")
+ string(APPEND iter "a")
if("${iter}" STREQUAL "aaa")
continue()
endif()
diff --git a/Tests/RunCMake/if/IsDirectoryLong.cmake b/Tests/RunCMake/if/IsDirectoryLong.cmake
index 0e93be7..e6939ac 100644
--- a/Tests/RunCMake/if/IsDirectoryLong.cmake
+++ b/Tests/RunCMake/if/IsDirectoryLong.cmake
@@ -1,6 +1,6 @@
set(d "/long/path/to/directory")
foreach(i RANGE 11)
- set(d "${d}${d}")
+ string(APPEND d "${d}")
endforeach()
string(LENGTH "${d}" dl)
if(IS_DIRECTORY "${d}/")
diff --git a/Tests/RunCMake/include_external_msproject/check_utils.cmake b/Tests/RunCMake/include_external_msproject/check_utils.cmake
index 408cadb..5dd92f9 100644
--- a/Tests/RunCMake/include_external_msproject/check_utils.cmake
+++ b/Tests/RunCMake/include_external_msproject/check_utils.cmake
@@ -91,7 +91,7 @@ function(check_project test name guid type platform)
if(guid)
check_project_guid("${sln}" "${name}" "${guid}" passed_guid)
if(NOT passed_guid)
- set(failed "${failed}${sep}${name} solution has no project with expected GUID=${guid}")
+ string(APPEND failed "${sep}${name} solution has no project with expected GUID=${guid}")
set(sep "\n")
endif()
else()
@@ -99,12 +99,12 @@ function(check_project test name guid type platform)
endif()
check_project_type("${sln}" "${name}" "${type}" passed_type)
if(NOT passed_type)
- set(failed "${failed}${sep}${name} solution has no project with expected TYPE=${type}")
+ string(APPEND failed "${sep}${name} solution has no project with expected TYPE=${type}")
set(sep "\n")
endif()
check_custom_platform("${sln}" "${name}" "${platform}" passed_platform)
if(NOT passed_platform)
- set(failed "${failed}${sep}${name} solution has no project with expected PLATFORM=${platform}")
+ string(APPEND failed "${sep}${name} solution has no project with expected PLATFORM=${platform}")
set(sep "\n")
endif()
set(RunCMake_TEST_FAILED "${failed}" PARENT_SCOPE)
diff --git a/Tests/RunCMake/install/DIRECTORY-MESSAGE_NEVER-check.cmake b/Tests/RunCMake/install/DIRECTORY-MESSAGE_NEVER-check.cmake
index 2c716e1..3605163 100644
--- a/Tests/RunCMake/install/DIRECTORY-MESSAGE_NEVER-check.cmake
+++ b/Tests/RunCMake/install/DIRECTORY-MESSAGE_NEVER-check.cmake
@@ -3,11 +3,11 @@ execute_process(COMMAND ${CMAKE_COMMAND} -P ${RunCMake_TEST_BINARY_DIR}/cmake_in
OUTPUT_VARIABLE out ERROR_VARIABLE err)
if(out MATCHES "-- Installing: [^\n]*prefix/dir")
string(REGEX REPLACE "\n" "\n " out " ${out}")
- set(RunCMake_TEST_FAILED
- "${RunCMake_TEST_FAILED}Installation output was not quiet:\n${out}")
+ string(APPEND RunCMake_TEST_FAILED
+ "Installation output was not quiet:\n${out}")
endif()
set(f ${RunCMake_TEST_BINARY_DIR}/prefix/dir/empty.txt)
if(NOT EXISTS "${f}")
- set(RunCMake_TEST_FAILED
- "${RunCMake_TEST_FAILED}File was not installed:\n ${f}\n")
+ string(APPEND RunCMake_TEST_FAILED
+ "File was not installed:\n ${f}\n")
endif()
diff --git a/Tests/RunCMake/install/DIRECTORY-message-check.cmake b/Tests/RunCMake/install/DIRECTORY-message-check.cmake
index 857681f..c9de3ea 100644
--- a/Tests/RunCMake/install/DIRECTORY-message-check.cmake
+++ b/Tests/RunCMake/install/DIRECTORY-message-check.cmake
@@ -7,13 +7,13 @@ set(expect "
")
if(NOT out MATCHES "${expect}")
string(REGEX REPLACE "\n" "\n " out " ${out}")
- set(RunCMake_TEST_FAILED
- "${RunCMake_TEST_FAILED}First install did not say 'Installing' as expected:\n${out}")
+ string(APPEND RunCMake_TEST_FAILED
+ "First install did not say 'Installing' as expected:\n${out}")
endif()
set(f ${RunCMake_TEST_BINARY_DIR}/prefix/dir/empty.txt)
if(NOT EXISTS "${f}")
- set(RunCMake_TEST_FAILED
- "${RunCMake_TEST_FAILED}File was not installed:\n ${f}\n")
+ string(APPEND RunCMake_TEST_FAILED
+ "File was not installed:\n ${f}\n")
endif()
execute_process(COMMAND ${CMAKE_COMMAND} -P ${RunCMake_TEST_BINARY_DIR}/cmake_install.cmake
OUTPUT_VARIABLE out ERROR_VARIABLE err)
@@ -23,6 +23,6 @@ set(expect "
")
if(NOT out MATCHES "${expect}")
string(REGEX REPLACE "\n" "\n " out " ${out}")
- set(RunCMake_TEST_FAILED
- "${RunCMake_TEST_FAILED}Second install did not say 'Up-to-date' as expected:\n${out}")
+ string(APPEND RunCMake_TEST_FAILED
+ "Second install did not say 'Up-to-date' as expected:\n${out}")
endif()
diff --git a/Tests/RunCMake/install/DIRECTORY-message-lazy-check.cmake b/Tests/RunCMake/install/DIRECTORY-message-lazy-check.cmake
index c7e6018..4339012 100644
--- a/Tests/RunCMake/install/DIRECTORY-message-lazy-check.cmake
+++ b/Tests/RunCMake/install/DIRECTORY-message-lazy-check.cmake
@@ -7,18 +7,18 @@ set(expect "
")
if(NOT out MATCHES "${expect}")
string(REGEX REPLACE "\n" "\n " out " ${out}")
- set(RunCMake_TEST_FAILED
- "${RunCMake_TEST_FAILED}First install did not say 'Installing' as expected:\n${out}")
+ string(APPEND RunCMake_TEST_FAILED
+ "First install did not say 'Installing' as expected:\n${out}")
endif()
set(f ${RunCMake_TEST_BINARY_DIR}/prefix/dir/empty.txt)
if(NOT EXISTS "${f}")
- set(RunCMake_TEST_FAILED
- "${RunCMake_TEST_FAILED}File was not installed:\n ${f}\n")
+ string(APPEND RunCMake_TEST_FAILED
+ "File was not installed:\n ${f}\n")
endif()
execute_process(COMMAND ${CMAKE_COMMAND} -P ${RunCMake_TEST_BINARY_DIR}/cmake_install.cmake
OUTPUT_VARIABLE out ERROR_VARIABLE err)
if(out MATCHES "(Installing|Up-to-date)")
string(REGEX REPLACE "\n" "\n " out " ${out}")
- set(RunCMake_TEST_FAILED
- "${RunCMake_TEST_FAILED}Second install was not silent as expected:\n${out}")
+ string(APPEND RunCMake_TEST_FAILED
+ "Second install was not silent as expected:\n${out}")
endif()
diff --git a/Tests/SimpleInstall/CMakeLists.txt b/Tests/SimpleInstall/CMakeLists.txt
index aee92f6..5a1392b 100644
--- a/Tests/SimpleInstall/CMakeLists.txt
+++ b/Tests/SimpleInstall/CMakeLists.txt
@@ -348,7 +348,7 @@ if(UNIX AND NOT APPLE)
# if(NOT SKIP_TZ)
# message("compress found and it was not a script")
# message("output from file command: [${output}]")
- # set(CPACK_GENERATOR "${CPACK_GENERATOR};TZ")
+ # string(APPEND CPACK_GENERATOR ";TZ")
# else()
# message("compress found, but it was a script so dont use it")
# message("output from file command: [${output}]")
@@ -357,7 +357,7 @@ if(UNIX AND NOT APPLE)
find_program(found_bz2
NAMES bzip2)
if(found_bz2)
- set(CPACK_GENERATOR "${CPACK_GENERATOR};TBZ2")
+ string(APPEND CPACK_GENERATOR ";TBZ2")
endif()
endif()
diff --git a/Tests/SimpleInstallS2/CMakeLists.txt b/Tests/SimpleInstallS2/CMakeLists.txt
index aee92f6..5a1392b 100644
--- a/Tests/SimpleInstallS2/CMakeLists.txt
+++ b/Tests/SimpleInstallS2/CMakeLists.txt
@@ -348,7 +348,7 @@ if(UNIX AND NOT APPLE)
# if(NOT SKIP_TZ)
# message("compress found and it was not a script")
# message("output from file command: [${output}]")
- # set(CPACK_GENERATOR "${CPACK_GENERATOR};TZ")
+ # string(APPEND CPACK_GENERATOR ";TZ")
# else()
# message("compress found, but it was a script so dont use it")
# message("output from file command: [${output}]")
@@ -357,7 +357,7 @@ if(UNIX AND NOT APPLE)
find_program(found_bz2
NAMES bzip2)
if(found_bz2)
- set(CPACK_GENERATOR "${CPACK_GENERATOR};TBZ2")
+ string(APPEND CPACK_GENERATOR ";TBZ2")
endif()
endif()
diff --git a/Tests/TryCompile/CMakeLists.txt b/Tests/TryCompile/CMakeLists.txt
index d11cfc5..2f8e4fb 100644
--- a/Tests/TryCompile/CMakeLists.txt
+++ b/Tests/TryCompile/CMakeLists.txt
@@ -109,9 +109,9 @@ endif()
# try to compile a file that should compile
set(_c_flags "${CMAKE_C_FLAGS}")
if(WATCOM)
- set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -dTESTDEF")
+ string(APPEND CMAKE_C_FLAGS " -dTESTDEF")
else()
- set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} \"-DTESTDEF\"")
+ string(APPEND CMAKE_C_FLAGS " \"-DTESTDEF\"")
endif()
try_compile(SHOULD_PASS
${TryCompile_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp
diff --git a/Tests/VSMASM/CMakeLists.txt b/Tests/VSMASM/CMakeLists.txt
index f2570a3..2923e15 100644
--- a/Tests/VSMASM/CMakeLists.txt
+++ b/Tests/VSMASM/CMakeLists.txt
@@ -4,7 +4,7 @@ if(CMAKE_SIZEOF_VOID_P EQUAL 8)
add_definitions(-DTESTx64)
else()
add_definitions(-DTESTi386)
- set(CMAKE_ASM_MASM_FLAGS "${CMAKE_ASM_MASM_FLAGS} /safeseh")
+ string(APPEND CMAKE_ASM_MASM_FLAGS " /safeseh")
endif()
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/include)
add_executable(VSMASM main.c foo.asm)