Skip to content

Commit

Permalink
MDEV-20596 Configure fails with newer CMake
Browse files Browse the repository at this point in the history
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 <bluemrp9@gmail.com>
Signed-off-by: Vicențiu Ciorbaru <vicentiu@mariadb.org>
  • Loading branch information
ryco-dev authored and cvicentiu committed Sep 20, 2019
1 parent df61c58 commit f541d3f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cmake/os/Linux.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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()

Expand Down

0 comments on commit f541d3f

Please sign in to comment.