From 32d941e75cd1856813d5c5b116fbb01c54d5629f Mon Sep 17 00:00:00 2001 From: Rintaro Ishizaki Date: Mon, 16 Oct 2023 13:50:05 -0700 Subject: [PATCH] [CMake] Remove set(CACHE) line for SWIFT_MODULE_ABI_NAME_PREFIX Due to https://cmake.org/cmake/help/latest/policy/CMP0126.html set(CACHE) overwrites the existing value if the cache has not been set to any value. Since we don't need any default value, just remove it. (cherry picked from commit d8c86952281b50012766e0bcbf201c2ad16278ed) --- CMakeLists.txt | 2 -- cmake/modules/AddSwiftHostLibrary.cmake | 1 + 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 928f3a2b8a6..9b2cf7ad094 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -22,8 +22,6 @@ if(CMAKE_VERSION VERSION_LESS 3.21) endif() endif() -set(SWIFT_MODULE_ABI_NAME_PREFIX CACHE STRING "ABI name prefix to avoid name conflicts") - # The subdirectory into which host libraries will be installed. set(SWIFT_HOST_LIBRARIES_SUBDIRECTORY "swift/host") diff --git a/cmake/modules/AddSwiftHostLibrary.cmake b/cmake/modules/AddSwiftHostLibrary.cmake index e8e6e4c717b..f1158ab394a 100644 --- a/cmake/modules/AddSwiftHostLibrary.cmake +++ b/cmake/modules/AddSwiftHostLibrary.cmake @@ -79,6 +79,7 @@ function(add_swift_syntax_library name) -emit-module-interface-path;${module_interface_file} >) if(SWIFT_MODULE_ABI_NAME_PREFIX) + # ABI name prefix. this can be used to avoid name conflicts. target_compile_options("${name}" PRIVATE $<$: "SHELL:-Xfrontend -module-abi-name"