Sha256: d80ec3173a03cf9ac2fa00d79025a2fe3c73d7acd4ffe9c9c3fcc2376fe0d9f6

Contents?: true

Size: 1.91 KB

Versions: 20

Compression:

Stored size: 1.91 KB

Contents

# this module defines two macros:
# MACRO_PUSH_REQUIRED_VARS()
# and
# MACRO_POP_REQUIRED_VARS()
# use these if you call cmake macros which use
# any of the CMAKE_REQUIRED_XXX variables
#
# Usage:
# MACRO_PUSH_REQUIRED_VARS()
# SET(CMAKE_REQUIRED_DEFINITIONS ${CMAKE_REQUIRED_DEFINITIONS} -DSOME_MORE_DEF)
# CHECK_FUNCTION_EXISTS(...)
# MACRO_POP_REQUIRED_VARS()

# Copyright (c) 2006, Alexander Neundorf, <neundorf@kde.org>
#
# Redistribution and use is allowed according to the terms of the BSD license.
# For details see the accompanying COPYING-CMAKE-SCRIPTS file.

MACRO(MACRO_PUSH_REQUIRED_VARS)

   IF(NOT DEFINED _PUSH_REQUIRED_VARS_COUNTER)
      SET(_PUSH_REQUIRED_VARS_COUNTER 0)
   ENDIF(NOT DEFINED _PUSH_REQUIRED_VARS_COUNTER)

   MATH(EXPR _PUSH_REQUIRED_VARS_COUNTER "${_PUSH_REQUIRED_VARS_COUNTER}+1")

   SET(_CMAKE_REQUIRED_INCLUDES_SAVE_${_PUSH_REQUIRED_VARS_COUNTER}    ${CMAKE_REQUIRED_INCLUDES})
   SET(_CMAKE_REQUIRED_DEFINITIONS_SAVE_${_PUSH_REQUIRED_VARS_COUNTER} ${CMAKE_REQUIRED_DEFINITIONS})
   SET(_CMAKE_REQUIRED_LIBRARIES_SAVE_${_PUSH_REQUIRED_VARS_COUNTER}   ${CMAKE_REQUIRED_LIBRARIES})
   SET(_CMAKE_REQUIRED_FLAGS_SAVE_${_PUSH_REQUIRED_VARS_COUNTER}       ${CMAKE_REQUIRED_FLAGS})
ENDMACRO(MACRO_PUSH_REQUIRED_VARS)

MACRO(MACRO_POP_REQUIRED_VARS)

# don't pop more than we pushed
   IF("${_PUSH_REQUIRED_VARS_COUNTER}" GREATER "0")

      SET(CMAKE_REQUIRED_INCLUDES    ${_CMAKE_REQUIRED_INCLUDES_SAVE_${_PUSH_REQUIRED_VARS_COUNTER}})
      SET(CMAKE_REQUIRED_DEFINITIONS ${_CMAKE_REQUIRED_DEFINITIONS_SAVE_${_PUSH_REQUIRED_VARS_COUNTER}})
      SET(CMAKE_REQUIRED_LIBRARIES   ${_CMAKE_REQUIRED_LIBRARIES_SAVE_${_PUSH_REQUIRED_VARS_COUNTER}})
      SET(CMAKE_REQUIRED_FLAGS       ${_CMAKE_REQUIRED_FLAGS_SAVE_${_PUSH_REQUIRED_VARS_COUNTER}})

      MATH(EXPR _PUSH_REQUIRED_VARS_COUNTER "${_PUSH_REQUIRED_VARS_COUNTER}-1")
   ENDIF("${_PUSH_REQUIRED_VARS_COUNTER}" GREATER "0")

ENDMACRO(MACRO_POP_REQUIRED_VARS)

Version data entries

20 entries across 20 versions & 2 rubygems

Version Path
rock-qtbindings-4.8.6.5 ext/cmake/modules/MacroPushRequiredVars.cmake
qtbindings-4.8.6.5 ext/cmake/modules/MacroPushRequiredVars.cmake
qtbindings-4.8.6.4 ext/cmake/modules/MacroPushRequiredVars.cmake
qtbindings-4.8.6.2 ext/cmake/modules/MacroPushRequiredVars.cmake
qtbindings-4.8.6.1 ext/cmake/modules/MacroPushRequiredVars.cmake
qtbindings-4.8.6.0 ext/cmake/modules/MacroPushRequiredVars.cmake
qtbindings-4.8.5.2 ext/cmake/modules/MacroPushRequiredVars.cmake
qtbindings-4.8.5.1 ext/cmake/modules/MacroPushRequiredVars.cmake
qtbindings-4.8.5.0 ext/cmake/modules/MacroPushRequiredVars.cmake
qtbindings-4.8.3.0-x86-mingw32 ext/cmake/modules/MacroPushRequiredVars.cmake
qtbindings-4.8.3.0 ext/cmake/modules/MacroPushRequiredVars.cmake
qtbindings-4.6.3.4-x86-mingw32 ext/cmake/modules/MacroPushRequiredVars.cmake
qtbindings-4.6.3.4 ext/cmake/modules/MacroPushRequiredVars.cmake
qtbindings-4.6.3.3 ext/cmake/modules/MacroPushRequiredVars.cmake
qtbindings-4.6.3.2-x86-mingw32 ext/cmake/modules/MacroPushRequiredVars.cmake
qtbindings-4.6.3.2 ext/cmake/modules/MacroPushRequiredVars.cmake
qtbindings-4.6.3.1 ext/cmake/modules/MacroPushRequiredVars.cmake
qtbindings-4.6.3.1-x86-mingw32 ext/cmake/modules/MacroPushRequiredVars.cmake
qtbindings-4.6.3.0 ext/cmake/modules/MacroPushRequiredVars.cmake
qtbindings-4.6.3.0-x86-mingw32 ext/cmake/modules/MacroPushRequiredVars.cmake