From f541d3f18eec035242303928aa65558a391d165d Mon Sep 17 00:00:00 2001 From: Ryan Coe Date: Mon, 16 Sep 2019 10:40:06 -0700 Subject: MDEV-20596 Configure fails with newer CMake MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fix build error with newer cmake Fixes the following build error: CMake Error at cmake/os/Linux.cmake:29 (STRING): STRING sub-command REPLACE requires at least four arguments. Call Stack (most recent call first): CMakeLists.txt:101 (INCLUDE) CMake Error at cmake/os/Linux.cmake:29 (STRING): STRING sub-command REPLACE requires at least four arguments. Call Stack (most recent call first): CMakeLists.txt:101 (INCLUDE) The error happens when CMAKE_SHARED_LINKER_{LANG}_FLAGS is not set. Force the variable to be set to "" as input to prevent this. Signed-off-by: Ryan Coe Signed-off-by: Vicențiu Ciorbaru --- cmake/os/Linux.cmake | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'cmake/os') diff --git a/cmake/os/Linux.cmake b/cmake/os/Linux.cmake index e37fb284d70..461394c35ce 100644 --- a/cmake/os/Linux.cmake +++ b/cmake/os/Linux.cmake @@ -26,9 +26,9 @@ SET(CMAKE_REQUIRED_DEFINITIONS ${CMAKE_REQUIRED_DEFINITIONS} -D_GNU_SOURCE=1) # Fix CMake (< 2.8) flags. -rdynamic exports too many symbols. FOREACH(LANG C CXX) - STRING(REPLACE "-rdynamic" "" + STRING(REPLACE "-rdynamic" "" CMAKE_SHARED_LIBRARY_LINK_${LANG}_FLAGS - ${CMAKE_SHARED_LIBRARY_LINK_${LANG}_FLAGS} + "${CMAKE_SHARED_LIBRARY_LINK_${LANG}_FLAGS}" ) ENDFOREACH() -- cgit v1.2.1