From d3524123a9c24610176f238002887e2034a61685 Mon Sep 17 00:00:00 2001 From: Sergey Ponomarev Date: Sat, 7 Sep 2024 10:23:31 +0300 Subject: cmake: enquote variable in string(REPLACE) macros If a var is empty then the cmake reports an error: string sub-command REPLACE requires at least four arguments --- libs/libmdbx/src/CMakeLists.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'libs/libmdbx') diff --git a/libs/libmdbx/src/CMakeLists.txt b/libs/libmdbx/src/CMakeLists.txt index 46afa66fca..b0a1d4604d 100644 --- a/libs/libmdbx/src/CMakeLists.txt +++ b/libs/libmdbx/src/CMakeLists.txt @@ -355,7 +355,7 @@ if(${CMAKE_SYSTEM_NAME} STREQUAL "Windows" AND EXISTS "${MDBX_SOURCE_DIR}/ntdll. if(NOT MSVC_LIB_EXE) # Find lib.exe get_filename_component(CL_NAME ${CMAKE_C_COMPILER} NAME) - string(REPLACE cl.exe lib.exe MSVC_LIB_EXE ${CL_NAME}) + string(REPLACE cl.exe lib.exe MSVC_LIB_EXE "${CL_NAME}") find_program(MSVC_LIB_EXE ${MSVC_LIB_EXE}) endif() if(MSVC_LIB_EXE) @@ -372,7 +372,7 @@ if(${CMAKE_SYSTEM_NAME} STREQUAL "Windows" AND EXISTS "${MDBX_SOURCE_DIR}/ntdll. if(NOT DLLTOOL) # Find dlltool get_filename_component(GCC_NAME ${CMAKE_C_COMPILER} NAME) - string(REPLACE gcc dlltool DLLTOOL_NAME ${GCC_NAME}) + string(REPLACE gcc dlltool DLLTOOL_NAME "${GCC_NAME}") find_program(DLLTOOL NAMES ${DLLTOOL_NAME}) endif() if(DLLTOOL) -- cgit v1.2.3