diff options
author | Sergey Ponomarev <stokito@gmail.com> | 2024-09-07 10:23:31 +0300 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2024-09-07 12:44:33 +0300 |
commit | d3524123a9c24610176f238002887e2034a61685 (patch) | |
tree | 5f18322f0680b80904ce8596d90051aab006a5d9 /libs/libmdbx | |
parent | 88aa2752d994043599f9662b9fa2b629f07058c2 (diff) |
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
Diffstat (limited to 'libs/libmdbx')
-rw-r--r-- | libs/libmdbx/src/CMakeLists.txt | 4 |
1 files changed, 2 insertions, 2 deletions
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) |