mariadb/cmake/misc.cmake
Sergei Golubchik ab3a6ca670 cleanup: CPACK_RPM_* package description
add cmake helper macro SET_IF_UNSET()
and use it for CPACK_* variables
2019-07-10 09:02:10 +02:00

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()