mirror of
https://github.com/MariaDB/server.git
synced 2025-01-16 03:52:35 +01:00
ab3a6ca670
add cmake helper macro SET_IF_UNSET() and use it for CPACK_* variables
19 lines
500 B
CMake
19 lines
500 B
CMake
IF ("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}.${CMAKE_PATCH_VERSION}" VERSION_LESS "2.8.7")
|
|
FUNCTION(MESSAGE_ONCE id out)
|
|
MESSAGE(STATUS "${out}")
|
|
ENDFUNCTION()
|
|
ELSE()
|
|
FUNCTION(MESSAGE_ONCE id out)
|
|
STRING(MD5 hash "${out}")
|
|
IF(NOT __msg1_${id} STREQUAL "${hash}")
|
|
MESSAGE(STATUS "${out}")
|
|
ENDIF()
|
|
SET(__msg1_${id} ${hash} CACHE INTERNAL "")
|
|
ENDFUNCTION()
|
|
ENDIF()
|
|
|
|
MACRO(SET_IF_UNSET VAR VAL)
|
|
IF(NOT DEFINED ${VAR})
|
|
SET(${VAR} ${VAL})
|
|
ENDIF()
|
|
ENDMACRO()
|