mirror of
https://github.com/MariaDB/server.git
synced 2025-10-22 19:52:58 +03:00
MDEV-20392: Skip ABI check if 'diff' is not found
Not all environments have 'diff' installed. Most notably CentOS 8 does not have diff out-of-the-box. Thus users running 'cmake .' and 'make' would fail to build MariaDB, and they would think the error was in ABI incompatibilities due to the error message emitted by CMake when in reality simply 'diff' was missing. This fixes it and makes the developer experience better by simply skipping the diffing if 'diff' is not found. Closes #1846
This commit is contained in:
committed by
Sergei Golubchik
parent
396864c6b3
commit
152c83d49c
@@ -74,7 +74,9 @@ FOREACH(file ${ABI_HEADERS})
|
||||
FILE(REMOVE ${tmpfile})
|
||||
EXECUTE_PROCESS(
|
||||
COMMAND diff -w ${file}.pp ${abi_check_out} RESULT_VARIABLE result)
|
||||
IF(NOT ${result} EQUAL 0)
|
||||
IF(result MATCHES "No such file or directory")
|
||||
MESSAGE("Command 'diff' not found. ABI check for ${file} skipped.")
|
||||
ELSEIF(NOT result EQUAL 0)
|
||||
IF(ABI_UPDATE)
|
||||
EXECUTE_PROCESS(COMMAND mv -v ${abi_check_out} ${file}.pp)
|
||||
ELSE(ABI_UPDATE)
|
||||
@@ -84,4 +86,3 @@ FOREACH(file ${ABI_HEADERS})
|
||||
ENDIF()
|
||||
FILE(REMOVE ${abi_check_out})
|
||||
ENDFOREACH()
|
||||
|
||||
|
Reference in New Issue
Block a user