summaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorAlex Turbov <i.zaufi@gmail.com>2022-08-21 08:58:24 +0400
committerBrad King <brad.king@kitware.com>2022-09-22 09:24:49 -0400
commit14b94f9bf2e8ada7508ae0a248f376746c18d29c (patch)
treeb7a28fedf5feaf0b09ec7007dc8777f0db7ce674 /CMakeLists.txt
parent4c6a47c6b6060c194f8b850f394ab2c831252f67 (diff)
downloadcmake-14b94f9bf2e8ada7508ae0a248f376746c18d29c.tar.gz
Build: Use `string(APPEND…)` in the root `CMakeLists.txt`
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt7
1 files changed, 3 insertions, 4 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index ae8d05ad91..a4f533d993 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -420,10 +420,9 @@ if(NOT CMake_TEST_EXTERNAL_CMAKE)
set(CMAKE_BUNDLE_LOCATION "${CMAKE_INSTALL_PREFIX}")
# make sure CMAKE_INSTALL_PREFIX ends in /
if(NOT CMAKE_INSTALL_PREFIX MATCHES "/$")
- set(CMAKE_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}/")
+ string(APPEND CMAKE_INSTALL_PREFIX "/")
endif()
- set(CMAKE_INSTALL_PREFIX
- "${CMAKE_INSTALL_PREFIX}CMake.app/Contents")
+ string(APPEND CMAKE_INSTALL_PREFIX "CMake.app/Contents")
endif()
endif()
@@ -467,7 +466,7 @@ if(NOT CMake_TEST_EXTERNAL_CMAKE)
foreach(FLAG_LANG IN ITEMS C CXX)
foreach(FLAG IN LISTS ${FLAG_LANG}_FLAGS_LIST)
if(NOT " ${CMAKE_${FLAG_LANG}_FLAGS} " MATCHES " ${FLAG} ")
- set(CMAKE_${FLAG_LANG}_FLAGS "${CMAKE_${FLAG_LANG}_FLAGS} ${FLAG}")
+ string(APPEND CMAKE_${FLAG_LANG}_FLAGS " ${FLAG}")
endif()
endforeach()
endforeach()