Merge branch 'master' into import-KWSys-subtree
This commit is contained in:
commit
a61f633737
|
@ -18,6 +18,11 @@ else()
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
# if the installed or the using project don't have CMAKE_SIZEOF_VOID_P set, ignore it:
|
||||||
|
if("${CMAKE_SIZEOF_VOID_P}" STREQUAL "" OR "@CMAKE_SIZEOF_VOID_P@" STREQUAL "")
|
||||||
|
return()
|
||||||
|
endif()
|
||||||
|
|
||||||
# check that the installed version has the same 32/64bit-ness as the one which is currently searching:
|
# check that the installed version has the same 32/64bit-ness as the one which is currently searching:
|
||||||
if(NOT "${CMAKE_SIZEOF_VOID_P}" STREQUAL "@CMAKE_SIZEOF_VOID_P@")
|
if(NOT "${CMAKE_SIZEOF_VOID_P}" STREQUAL "@CMAKE_SIZEOF_VOID_P@")
|
||||||
math(EXPR installedBits "@CMAKE_SIZEOF_VOID_P@ * 8")
|
math(EXPR installedBits "@CMAKE_SIZEOF_VOID_P@ * 8")
|
||||||
|
|
|
@ -34,6 +34,11 @@ if( "${PACKAGE_FIND_VERSION}" STREQUAL "${PACKAGE_VERSION}")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
|
||||||
|
# if the installed or the using project don't have CMAKE_SIZEOF_VOID_P set, ignore it:
|
||||||
|
if("${CMAKE_SIZEOF_VOID_P}" STREQUAL "" OR "@CMAKE_SIZEOF_VOID_P@" STREQUAL "")
|
||||||
|
return()
|
||||||
|
endif()
|
||||||
|
|
||||||
# check that the installed version has the same 32/64bit-ness as the one which is currently searching:
|
# check that the installed version has the same 32/64bit-ness as the one which is currently searching:
|
||||||
if(NOT "${CMAKE_SIZEOF_VOID_P}" STREQUAL "@CMAKE_SIZEOF_VOID_P@")
|
if(NOT "${CMAKE_SIZEOF_VOID_P}" STREQUAL "@CMAKE_SIZEOF_VOID_P@")
|
||||||
math(EXPR installedBits "@CMAKE_SIZEOF_VOID_P@ * 8")
|
math(EXPR installedBits "@CMAKE_SIZEOF_VOID_P@ * 8")
|
||||||
|
|
|
@ -33,6 +33,11 @@ else()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
|
||||||
|
# if the installed or the using project don't have CMAKE_SIZEOF_VOID_P set, ignore it:
|
||||||
|
if("${CMAKE_SIZEOF_VOID_P}" STREQUAL "" OR "@CMAKE_SIZEOF_VOID_P@" STREQUAL "")
|
||||||
|
return()
|
||||||
|
endif()
|
||||||
|
|
||||||
# check that the installed version has the same 32/64bit-ness as the one which is currently searching:
|
# check that the installed version has the same 32/64bit-ness as the one which is currently searching:
|
||||||
if(NOT "${CMAKE_SIZEOF_VOID_P}" STREQUAL "@CMAKE_SIZEOF_VOID_P@")
|
if(NOT "${CMAKE_SIZEOF_VOID_P}" STREQUAL "@CMAKE_SIZEOF_VOID_P@")
|
||||||
math(EXPR installedBits "@CMAKE_SIZEOF_VOID_P@ * 8")
|
math(EXPR installedBits "@CMAKE_SIZEOF_VOID_P@ * 8")
|
||||||
|
|
|
@ -12,7 +12,7 @@
|
||||||
# (To distribute this file outside of CMake, substitute the full
|
# (To distribute this file outside of CMake, substitute the full
|
||||||
# License text for the above reference.)
|
# License text for the above reference.)
|
||||||
|
|
||||||
SET(CMAKE_SHARED_LIBRARY_C_FLAGS "") # -pic
|
SET(CMAKE_SHARED_LIBRARY_C_FLAGS "") # -pic
|
||||||
SET(CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS "-shared") # -shared
|
SET(CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS "-shared") # -shared
|
||||||
SET(CMAKE_SHARED_LIBRARY_LINK_C_FLAGS "") # +s, flag for exe link to use shared lib
|
SET(CMAKE_SHARED_LIBRARY_LINK_C_FLAGS "") # +s, flag for exe link to use shared lib
|
||||||
SET(CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG "") # -rpath
|
SET(CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG "") # -rpath
|
||||||
|
@ -42,7 +42,7 @@ SET (CMAKE_SKIP_RPATH "NO" CACHE BOOL
|
||||||
SET (CMAKE_SKIP_INSTALL_RPATH "NO" CACHE BOOL
|
SET (CMAKE_SKIP_INSTALL_RPATH "NO" CACHE BOOL
|
||||||
"If set, runtime paths are not added when installing shared libraries, but are added when building.")
|
"If set, runtime paths are not added when installing shared libraries, but are added when building.")
|
||||||
|
|
||||||
SET(CMAKE_VERBOSE_MAKEFILE FALSE CACHE BOOL "If this value is on, makefiles will be generated without the .SILENT directive, and all commands will be echoed to the console during the make. This is useful for debugging only. With Visual Studio IDE projects all commands are done without /nologo.")
|
SET(CMAKE_VERBOSE_MAKEFILE FALSE CACHE BOOL "If this value is on, makefiles will be generated without the .SILENT directive, and all commands will be echoed to the console during the make. This is useful for debugging only. With Visual Studio IDE projects all commands are done without /nologo.")
|
||||||
|
|
||||||
IF(CMAKE_GENERATOR MATCHES "Makefiles")
|
IF(CMAKE_GENERATOR MATCHES "Makefiles")
|
||||||
SET(CMAKE_COLOR_MAKEFILE ON CACHE BOOL
|
SET(CMAKE_COLOR_MAKEFILE ON CACHE BOOL
|
||||||
|
@ -60,6 +60,12 @@ IF(CMAKE_GENERATOR MATCHES "Makefiles")
|
||||||
ENDIF(CMAKE_GENERATOR MATCHES "Unix Makefiles")
|
ENDIF(CMAKE_GENERATOR MATCHES "Unix Makefiles")
|
||||||
ENDIF(CMAKE_GENERATOR MATCHES "Makefiles")
|
ENDIF(CMAKE_GENERATOR MATCHES "Makefiles")
|
||||||
|
|
||||||
|
IF(CMAKE_GENERATOR MATCHES "Ninja")
|
||||||
|
SET(CMAKE_EXPORT_COMPILE_COMMANDS OFF CACHE BOOL
|
||||||
|
"Enable/Disable output of compile commands during generation."
|
||||||
|
)
|
||||||
|
MARK_AS_ADVANCED(CMAKE_EXPORT_COMPILE_COMMANDS)
|
||||||
|
ENDIF(CMAKE_GENERATOR MATCHES "Ninja")
|
||||||
|
|
||||||
# GetDefaultWindowsPrefixBase
|
# GetDefaultWindowsPrefixBase
|
||||||
#
|
#
|
||||||
|
@ -77,6 +83,8 @@ function(GetDefaultWindowsPrefixBase var)
|
||||||
#
|
#
|
||||||
if("${CMAKE_GENERATOR}" MATCHES "(Win64|IA64)")
|
if("${CMAKE_GENERATOR}" MATCHES "(Win64|IA64)")
|
||||||
set(arch_hint "x64")
|
set(arch_hint "x64")
|
||||||
|
elseif("${CMAKE_GENERATOR}" MATCHES "ARM")
|
||||||
|
set(arch_hint "ARM")
|
||||||
elseif("${CMAKE_SIZEOF_VOID_P}" STREQUAL "8")
|
elseif("${CMAKE_SIZEOF_VOID_P}" STREQUAL "8")
|
||||||
set(arch_hint "x64")
|
set(arch_hint "x64")
|
||||||
elseif("$ENV{LIB}" MATCHES "(amd64|ia64)")
|
elseif("$ENV{LIB}" MATCHES "(amd64|ia64)")
|
||||||
|
@ -168,6 +176,10 @@ ELSE(CMAKE_HOST_UNIX)
|
||||||
SET(CMAKE_GENERIC_PROGRAM_FILES)
|
SET(CMAKE_GENERIC_PROGRAM_FILES)
|
||||||
ENDIF(CMAKE_HOST_UNIX)
|
ENDIF(CMAKE_HOST_UNIX)
|
||||||
|
|
||||||
|
# Set a variable which will be used as component name in install() commands
|
||||||
|
# where no COMPONENT has been given:
|
||||||
|
SET(CMAKE_INSTALL_DEFAULT_COMPONENT_NAME "Unspecified")
|
||||||
|
|
||||||
MARK_AS_ADVANCED(
|
MARK_AS_ADVANCED(
|
||||||
CMAKE_SKIP_RPATH
|
CMAKE_SKIP_RPATH
|
||||||
CMAKE_SKIP_INSTALL_RPATH
|
CMAKE_SKIP_INSTALL_RPATH
|
||||||
|
|
|
@ -97,6 +97,9 @@
|
||||||
# elif defined(_M_IX86)
|
# elif defined(_M_IX86)
|
||||||
# define ARCHITECTURE_ID "X86"
|
# define ARCHITECTURE_ID "X86"
|
||||||
|
|
||||||
|
# elif defined(_M_ARM)
|
||||||
|
# define ARCHITECTURE_ID "ARM"
|
||||||
|
|
||||||
# else /* unknown architecture */
|
# else /* unknown architecture */
|
||||||
# define ARCHITECTURE_ID ""
|
# define ARCHITECTURE_ID ""
|
||||||
# endif
|
# endif
|
||||||
|
|
|
@ -488,7 +488,10 @@ FOREACH(_RPM_SPEC_HEADER URL REQUIRES SUGGESTS PROVIDES OBSOLETES PREFIX CONFLIC
|
||||||
MESSAGE("CPackRPM:Debug: User defined ${_PACKAGE_HEADER_NAME}:\n ${CPACK_RPM_PACKAGE_${_RPM_SPEC_HEADER}_TMP}")
|
MESSAGE("CPackRPM:Debug: User defined ${_PACKAGE_HEADER_NAME}:\n ${CPACK_RPM_PACKAGE_${_RPM_SPEC_HEADER}_TMP}")
|
||||||
ENDIF(CPACK_RPM_PACKAGE_DEBUG)
|
ENDIF(CPACK_RPM_PACKAGE_DEBUG)
|
||||||
SET(TMP_RPM_${_RPM_SPEC_HEADER} "${_PACKAGE_HEADER_NAME}: ${CPACK_RPM_PACKAGE_${_RPM_SPEC_HEADER}_TMP}")
|
SET(TMP_RPM_${_RPM_SPEC_HEADER} "${_PACKAGE_HEADER_NAME}: ${CPACK_RPM_PACKAGE_${_RPM_SPEC_HEADER}_TMP}")
|
||||||
ENDIF(CPACK_RPM_PACKAGE_${_RPM_SPEC_HEADER}_TMP)
|
ELSE(CPACK_RPM_PACKAGE_${_RPM_SPEC_HEADER}_TMP)
|
||||||
|
# Do not forget to unset previously set header (from previous component)
|
||||||
|
UNSET(TMP_RPM_${_RPM_SPEC_HEADER})
|
||||||
|
ENDIF(CPACK_RPM_PACKAGE_${_RPM_SPEC_HEADER}_TMP)
|
||||||
ENDFOREACH(_RPM_SPEC_HEADER)
|
ENDFOREACH(_RPM_SPEC_HEADER)
|
||||||
|
|
||||||
# CPACK_RPM_SPEC_INSTALL_POST
|
# CPACK_RPM_SPEC_INSTALL_POST
|
||||||
|
|
|
@ -712,8 +712,12 @@ function(_ep_get_build_command name step cmd_var)
|
||||||
endif()
|
endif()
|
||||||
else() # if(cfg_cmd_id STREQUAL "configure")
|
else() # if(cfg_cmd_id STREQUAL "configure")
|
||||||
# Non-CMake project. Guess "make" and "make install" and "make test".
|
# Non-CMake project. Guess "make" and "make install" and "make test".
|
||||||
# But use "$(MAKE)" to get recursive parallel make.
|
if("${CMAKE_GENERATOR}" MATCHES "Makefiles")
|
||||||
set(cmd "$(MAKE)")
|
# Try to get the parallel arguments
|
||||||
|
set(cmd "$(MAKE)")
|
||||||
|
else()
|
||||||
|
set(cmd "make")
|
||||||
|
endif()
|
||||||
if(step STREQUAL "INSTALL")
|
if(step STREQUAL "INSTALL")
|
||||||
set(args install)
|
set(args install)
|
||||||
endif()
|
endif()
|
||||||
|
|
|
@ -318,7 +318,7 @@ FUNCTION(_FS_GET_FEATURE_SUMMARY _property _var _includeQuiet)
|
||||||
|
|
||||||
GET_PROPERTY(_info GLOBAL PROPERTY _CMAKE_${_currentFeature}_PURPOSE)
|
GET_PROPERTY(_info GLOBAL PROPERTY _CMAKE_${_currentFeature}_PURPOSE)
|
||||||
FOREACH(_purpose ${_info})
|
FOREACH(_purpose ${_info})
|
||||||
SET(_currentFeatureText "${_currentFeatureText}\n * ${_purpose}")
|
SET(_currentFeatureText "${_currentFeatureText}\n ${_purpose}")
|
||||||
ENDFOREACH()
|
ENDFOREACH()
|
||||||
|
|
||||||
ENDIF(includeThisOne)
|
ENDIF(includeThisOne)
|
||||||
|
@ -399,7 +399,7 @@ FUNCTION(FEATURE_SUMMARY)
|
||||||
SET(_tmp)
|
SET(_tmp)
|
||||||
_FS_GET_FEATURE_SUMMARY( ${part} _tmp ${_FS_INCLUDE_QUIET_PACKAGES})
|
_FS_GET_FEATURE_SUMMARY( ${part} _tmp ${_FS_INCLUDE_QUIET_PACKAGES})
|
||||||
IF(_tmp)
|
IF(_tmp)
|
||||||
SET(_fullText "${_fullText}\n\n-- ${title_${part}}\n${_tmp}")
|
SET(_fullText "${_fullText}\n-- ${title_${part}}\n${_tmp}\n")
|
||||||
IF("${part}" STREQUAL "REQUIRED_PACKAGES_NOT_FOUND")
|
IF("${part}" STREQUAL "REQUIRED_PACKAGES_NOT_FOUND")
|
||||||
SET(requiredPackagesNotFound TRUE)
|
SET(requiredPackagesNotFound TRUE)
|
||||||
ENDIF()
|
ENDIF()
|
||||||
|
|
|
@ -22,11 +22,15 @@
|
||||||
# (To distribute this file outside of CMake, substitute the full
|
# (To distribute this file outside of CMake, substitute the full
|
||||||
# License text for the above reference.)
|
# License text for the above reference.)
|
||||||
|
|
||||||
FIND_PATH(BZIP2_INCLUDE_DIR bzlib.h )
|
SET(_BZIP2_PATHS PATHS
|
||||||
|
"[HKEY_LOCAL_MACHINE\\SOFTWARE\\GnuWin32\\Bzip2;InstallPath]"
|
||||||
|
)
|
||||||
|
|
||||||
|
FIND_PATH(BZIP2_INCLUDE_DIR bzlib.h ${_BZIP2_PATHS} PATH_SUFFIXES include)
|
||||||
|
|
||||||
IF (NOT BZIP2_LIBRARIES)
|
IF (NOT BZIP2_LIBRARIES)
|
||||||
FIND_LIBRARY(BZIP2_LIBRARY_RELEASE NAMES bz2 bzip2 )
|
FIND_LIBRARY(BZIP2_LIBRARY_RELEASE NAMES bz2 bzip2 ${_BZIP2_PATHS} PATH_SUFFIXES lib)
|
||||||
FIND_LIBRARY(BZIP2_LIBRARY_DEBUG NAMES bzip2d )
|
FIND_LIBRARY(BZIP2_LIBRARY_DEBUG NAMES bzip2d ${_BZIP2_PATHS} PATH_SUFFIXES lib)
|
||||||
|
|
||||||
INCLUDE(${CMAKE_CURRENT_LIST_DIR}/SelectLibraryConfigurations.cmake)
|
INCLUDE(${CMAKE_CURRENT_LIST_DIR}/SelectLibraryConfigurations.cmake)
|
||||||
SELECT_LIBRARY_CONFIGURATIONS(BZIP2)
|
SELECT_LIBRARY_CONFIGURATIONS(BZIP2)
|
||||||
|
|
|
@ -0,0 +1,69 @@
|
||||||
|
# - Find LibLZMA
|
||||||
|
# Find LibLZMA headers and library
|
||||||
|
#
|
||||||
|
# LIBLZMA_FOUND - True if liblzma is found.
|
||||||
|
# LIBLZMA_INCLUDE_DIRS - Directory where liblzma headers are located.
|
||||||
|
# LIBLZMA_LIBRARIES - Lzma libraries to link against.
|
||||||
|
# LIBLZMA_HAS_AUTO_DECODER - True if lzma_auto_decoder() is found (required).
|
||||||
|
# LIBLZMA_HAS_EASY_ENCODER - True if lzma_easy_encoder() is found (required).
|
||||||
|
# LIBLZMA_HAS_LZMA_PRESET - True if lzma_lzma_preset() is found (required).
|
||||||
|
# LIBLZMA_VERSION_MAJOR - The major version of lzma
|
||||||
|
# LIBLZMA_VERSION_MINOR - The minor version of lzma
|
||||||
|
# LIBLZMA_VERSION_PATCH - The patch version of lzma
|
||||||
|
# LIBLZMA_VERSION_STRING - version number as a string (ex: "5.0.3")
|
||||||
|
|
||||||
|
#=============================================================================
|
||||||
|
# Copyright 2008 Per Øyvind Karlsen <peroyvind@mandriva.org>
|
||||||
|
# Copyright 2009 Alexander Neundorf <neundorf@kde.org>
|
||||||
|
# Copyright 2009 Helio Chissini de Castro <helio@kde.org>
|
||||||
|
# Copyright 2012 Mario Bensi <mbensi@ipsquad.net>
|
||||||
|
#
|
||||||
|
# Distributed under the OSI-approved BSD License (the "License");
|
||||||
|
# see accompanying file Copyright.txt for details.
|
||||||
|
#
|
||||||
|
# This software is distributed WITHOUT ANY WARRANTY; without even the
|
||||||
|
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||||
|
# See the License for more information.
|
||||||
|
#=============================================================================
|
||||||
|
# (To distribute this file outside of CMake, substitute the full
|
||||||
|
# License text for the above reference.)
|
||||||
|
|
||||||
|
|
||||||
|
FIND_PATH(LIBLZMA_INCLUDE_DIR lzma.h )
|
||||||
|
FIND_LIBRARY(LIBLZMA_LIBRARY lzma)
|
||||||
|
|
||||||
|
IF(LIBLZMA_INCLUDE_DIR AND EXISTS "${LIBLZMA_INCLUDE_DIR}/lzma/version.h")
|
||||||
|
FILE(READ "${LIBLZMA_INCLUDE_DIR}/lzma/version.h" LIBLZMA_HEADER_CONTENTS)
|
||||||
|
|
||||||
|
STRING(REGEX REPLACE ".*#define LZMA_VERSION_MAJOR ([0-9]+).*" "\\1" LIBLZMA_VERSION_MAJOR "${LIBLZMA_HEADER_CONTENTS}")
|
||||||
|
STRING(REGEX REPLACE ".*#define LZMA_VERSION_MINOR ([0-9]+).*" "\\1" LIBLZMA_VERSION_MINOR "${LIBLZMA_HEADER_CONTENTS}")
|
||||||
|
STRING(REGEX REPLACE ".*#define LZMA_VERSION_PATCH ([0-9]+).*" "\\1" LIBLZMA_VERSION_PATCH "${LIBLZMA_HEADER_CONTENTS}")
|
||||||
|
|
||||||
|
SET(LIBLZMA_VERSION_STRING "${LIBLZMA_VERSION_MAJOR}.${LIBLZMA_VERSION_MINOR}.${LIBLZMA_VERSION_PATCH}")
|
||||||
|
ENDIF(LIBLZMA_INCLUDE_DIR AND EXISTS "${LIBLZMA_INCLUDE_DIR}/lzma/version.h")
|
||||||
|
|
||||||
|
# We're using new code known now as XZ, even library still been called LZMA
|
||||||
|
# it can be found in http://tukaani.org/xz/
|
||||||
|
# Avoid using old codebase
|
||||||
|
IF (LIBLZMA_LIBRARY)
|
||||||
|
INCLUDE(CheckLibraryExists)
|
||||||
|
CHECK_LIBRARY_EXISTS(${LIBLZMA_LIBRARY} lzma_auto_decoder "" LIBLZMA_HAS_AUTO_DECODER)
|
||||||
|
CHECK_LIBRARY_EXISTS(${LIBLZMA_LIBRARY} lzma_easy_encoder "" LIBLZMA_HAS_EASY_ENCODER)
|
||||||
|
CHECK_LIBRARY_EXISTS(${LIBLZMA_LIBRARY} lzma_lzma_preset "" LIBLZMA_HAS_LZMA_PRESET)
|
||||||
|
ENDIF (LIBLZMA_LIBRARY)
|
||||||
|
|
||||||
|
INCLUDE(FindPackageHandleStandardArgs)
|
||||||
|
FIND_PACKAGE_HANDLE_STANDARD_ARGS(LibLZMA REQUIRED_VARS LIBLZMA_INCLUDE_DIR
|
||||||
|
LIBLZMA_LIBRARY
|
||||||
|
LIBLZMA_HAS_AUTO_DECODER
|
||||||
|
LIBLZMA_HAS_EASY_ENCODER
|
||||||
|
LIBLZMA_HAS_LZMA_PRESET
|
||||||
|
VERSION_VAR LIBLZMA_VERSION_STRING
|
||||||
|
)
|
||||||
|
|
||||||
|
IF (LIBLZMA_FOUND)
|
||||||
|
SET(LIBLZMA_LIBRARIES ${LIBLZMA_LIBRARY})
|
||||||
|
SET(LIBLZMA_INCLUDE_DIRS ${LIBLZMA_INCLUDE_DIR})
|
||||||
|
ENDIF (LIBLZMA_FOUND)
|
||||||
|
|
||||||
|
MARK_AS_ADVANCED( LIBLZMA_INCLUDE_DIR LIBLZMA_LIBRARY )
|
|
@ -13,6 +13,11 @@
|
||||||
# The Python_ADDITIONAL_VERSIONS variable can be used to specify a list of
|
# The Python_ADDITIONAL_VERSIONS variable can be used to specify a list of
|
||||||
# version numbers that should be taken into account when searching for Python.
|
# version numbers that should be taken into account when searching for Python.
|
||||||
# You need to set this variable before calling find_package(PythonLibs).
|
# You need to set this variable before calling find_package(PythonLibs).
|
||||||
|
#
|
||||||
|
# If you'd like to specify the installation of Python to use, you should modify
|
||||||
|
# the following cache variables:
|
||||||
|
# PYTHON_LIBRARY - path to the python library
|
||||||
|
# PYTHON_INCLUDE_DIR - path to where Python.h is found
|
||||||
|
|
||||||
#=============================================================================
|
#=============================================================================
|
||||||
# Copyright 2001-2009 Kitware, Inc.
|
# Copyright 2001-2009 Kitware, Inc.
|
||||||
|
@ -40,13 +45,19 @@ IF(PythonLibs_FIND_VERSION)
|
||||||
STRING(REGEX REPLACE "^([0-9]+\\.[0-9]+).*" "\\1" _PYTHON_FIND_MAJ_MIN "${PythonLibs_FIND_VERSION}")
|
STRING(REGEX REPLACE "^([0-9]+\\.[0-9]+).*" "\\1" _PYTHON_FIND_MAJ_MIN "${PythonLibs_FIND_VERSION}")
|
||||||
STRING(REGEX REPLACE "^([0-9]+).*" "\\1" _PYTHON_FIND_MAJ "${_PYTHON_FIND_MAJ_MIN}")
|
STRING(REGEX REPLACE "^([0-9]+).*" "\\1" _PYTHON_FIND_MAJ "${_PYTHON_FIND_MAJ_MIN}")
|
||||||
UNSET(_PYTHON_FIND_OTHER_VERSIONS)
|
UNSET(_PYTHON_FIND_OTHER_VERSIONS)
|
||||||
IF(NOT PythonLibs_FIND_VERSION_EXACT)
|
IF(PythonLibs_FIND_VERSION_EXACT)
|
||||||
|
IF(_PYTHON_FIND_MAJ_MIN STREQUAL PythonLibs_FIND_VERSION)
|
||||||
|
SET(_PYTHON_FIND_OTHER_VERSIONS "${PythonLibs_FIND_VERSION}")
|
||||||
|
ELSE(_PYTHON_FIND_MAJ_MIN STREQUAL PythonLibs_FIND_VERSION)
|
||||||
|
SET(_PYTHON_FIND_OTHER_VERSIONS "${PythonLibs_FIND_VERSION}" "${_PYTHON_FIND_MAJ_MIN}")
|
||||||
|
ENDIF(_PYTHON_FIND_MAJ_MIN STREQUAL PythonLibs_FIND_VERSION)
|
||||||
|
ELSE(PythonLibs_FIND_VERSION_EXACT)
|
||||||
FOREACH(_PYTHON_V ${_PYTHON${_PYTHON_FIND_MAJ}_VERSIONS})
|
FOREACH(_PYTHON_V ${_PYTHON${_PYTHON_FIND_MAJ}_VERSIONS})
|
||||||
IF(NOT _PYTHON_V VERSION_LESS _PYTHON_FIND_MAJ_MIN)
|
IF(NOT _PYTHON_V VERSION_LESS _PYTHON_FIND_MAJ_MIN)
|
||||||
LIST(APPEND _PYTHON_FIND_OTHER_VERSIONS ${_PYTHON_V})
|
LIST(APPEND _PYTHON_FIND_OTHER_VERSIONS ${_PYTHON_V})
|
||||||
ENDIF()
|
ENDIF()
|
||||||
ENDFOREACH()
|
ENDFOREACH()
|
||||||
ENDIF(NOT PythonLibs_FIND_VERSION_EXACT)
|
ENDIF(PythonLibs_FIND_VERSION_EXACT)
|
||||||
UNSET(_PYTHON_FIND_MAJ_MIN)
|
UNSET(_PYTHON_FIND_MAJ_MIN)
|
||||||
UNSET(_PYTHON_FIND_MAJ)
|
UNSET(_PYTHON_FIND_MAJ)
|
||||||
ELSE(PythonLibs_FIND_VERSION MATCHES "^[0-9]+\\.[0-9]+(\\.[0-9]+.*)?$")
|
ELSE(PythonLibs_FIND_VERSION MATCHES "^[0-9]+\\.[0-9]+(\\.[0-9]+.*)?$")
|
||||||
|
|
|
@ -1059,7 +1059,11 @@ IF (QT_QMAKE_EXECUTABLE AND QTVERSION)
|
||||||
SET( QT_IMAGEFORMATS_PLUGINS qgif qjpeg qmng qico qsvg qtiff )
|
SET( QT_IMAGEFORMATS_PLUGINS qgif qjpeg qmng qico qsvg qtiff )
|
||||||
SET( QT_INPUTMETHODS_PLUGINS qimsw_multi )
|
SET( QT_INPUTMETHODS_PLUGINS qimsw_multi )
|
||||||
SET( QT_MOUSEDRIVERS_PLUGINS qwstslibmousehandler )
|
SET( QT_MOUSEDRIVERS_PLUGINS qwstslibmousehandler )
|
||||||
SET( QT_PHONON_BACKEND_PLUGINS phonon_qt7 )
|
IF(APPLE)
|
||||||
|
SET( QT_PHONON_BACKEND_PLUGINS phonon_qt7 )
|
||||||
|
ELSEIF(WIN32)
|
||||||
|
SET( QT_PHONON_BACKEND_PLUGINS phonon_ds9 )
|
||||||
|
ENDIF()
|
||||||
SET( QT_SCRIPT_PLUGINS qtscriptdbus )
|
SET( QT_SCRIPT_PLUGINS qtscriptdbus )
|
||||||
SET( QT_SQLDRIVERS_PLUGINS qsqldb2 qsqlibase qsqlite qsqlite2 qsqlmysql qsqloci qsqlodbc qsqlpsql qsqltds )
|
SET( QT_SQLDRIVERS_PLUGINS qsqldb2 qsqlibase qsqlite qsqlite2 qsqlmysql qsqloci qsqlodbc qsqlpsql qsqltds )
|
||||||
|
|
||||||
|
@ -1169,10 +1173,22 @@ ELSE( Qt4_FIND_COMPONENTS )
|
||||||
|
|
||||||
ENDIF( Qt4_FIND_COMPONENTS )
|
ENDIF( Qt4_FIND_COMPONENTS )
|
||||||
|
|
||||||
FIND_PACKAGE_HANDLE_STANDARD_ARGS(Qt4
|
if (QT_VERSION_MAJOR GREATER 4)
|
||||||
REQUIRED_VARS ${_QT4_FOUND_REQUIRED_VARS}
|
SET(VERSION_MSG "Found unsuitable Qt version \"${QTVERSION}\" from ${QT_QMAKE_EXECUTABLE}")
|
||||||
VERSION_VAR QTVERSION
|
SET(QT4_FOUND FALSE)
|
||||||
)
|
IF(Qt4_FIND_REQUIRED)
|
||||||
|
MESSAGE( FATAL_ERROR "${VERSION_MSG}, this code requires Qt 4.x")
|
||||||
|
ELSE(Qt4_FIND_REQUIRED)
|
||||||
|
IF(NOT Qt4_FIND_QUIETLY)
|
||||||
|
MESSAGE( STATUS "${VERSION_MSG}")
|
||||||
|
ENDIF(NOT Qt4_FIND_QUIETLY)
|
||||||
|
ENDIF(Qt4_FIND_REQUIRED)
|
||||||
|
else()
|
||||||
|
FIND_PACKAGE_HANDLE_STANDARD_ARGS(Qt4
|
||||||
|
REQUIRED_VARS ${_QT4_FOUND_REQUIRED_VARS}
|
||||||
|
VERSION_VAR QTVERSION
|
||||||
|
)
|
||||||
|
endif()
|
||||||
|
|
||||||
#######################################
|
#######################################
|
||||||
#
|
#
|
||||||
|
|
|
@ -167,9 +167,9 @@ SET(wxWidgets_CXX_FLAGS "")
|
||||||
# http://www.cmake.org/pipermail/cmake/2008-April/021115.html
|
# http://www.cmake.org/pipermail/cmake/2008-April/021115.html
|
||||||
# http://www.cmake.org/pipermail/cmake/2008-April/021146.html
|
# http://www.cmake.org/pipermail/cmake/2008-April/021146.html
|
||||||
#
|
#
|
||||||
IF(APPLE)
|
IF(APPLE OR CMAKE_CXX_PLATFORM_ID MATCHES "OpenBSD")
|
||||||
SET(wxWidgets_INCLUDE_DIRS_NO_SYSTEM 1)
|
SET(wxWidgets_INCLUDE_DIRS_NO_SYSTEM 1)
|
||||||
ENDIF(APPLE)
|
ENDIF()
|
||||||
|
|
||||||
# DEPRECATED: This is a patch to support the DEPRECATED use of
|
# DEPRECATED: This is a patch to support the DEPRECATED use of
|
||||||
# wxWidgets_USE_LIBS.
|
# wxWidgets_USE_LIBS.
|
||||||
|
|
|
@ -106,7 +106,9 @@ SET(CMAKE_Fortran_CREATE_SHARED_MODULE
|
||||||
|
|
||||||
|
|
||||||
# default to searching for frameworks first
|
# default to searching for frameworks first
|
||||||
SET(CMAKE_FIND_FRAMEWORK FIRST)
|
IF(NOT DEFINED CMAKE_FIND_FRAMEWORK)
|
||||||
|
SET(CMAKE_FIND_FRAMEWORK FIRST)
|
||||||
|
ENDIF()
|
||||||
# set up the default search directories for frameworks
|
# set up the default search directories for frameworks
|
||||||
SET(CMAKE_SYSTEM_FRAMEWORK_PATH
|
SET(CMAKE_SYSTEM_FRAMEWORK_PATH
|
||||||
~/Library/Frameworks
|
~/Library/Frameworks
|
||||||
|
@ -115,7 +117,9 @@ SET(CMAKE_SYSTEM_FRAMEWORK_PATH
|
||||||
/System/Library/Frameworks)
|
/System/Library/Frameworks)
|
||||||
|
|
||||||
# default to searching for application bundles first
|
# default to searching for application bundles first
|
||||||
SET(CMAKE_FIND_APPBUNDLE FIRST)
|
IF(NOT DEFINED CMAKE_FIND_APPBUNDLE)
|
||||||
|
SET(CMAKE_FIND_APPBUNDLE FIRST)
|
||||||
|
ENDIF()
|
||||||
# set up the default search directories for application bundles
|
# set up the default search directories for application bundles
|
||||||
SET(CMAKE_SYSTEM_APPBUNDLE_PATH
|
SET(CMAKE_SYSTEM_APPBUNDLE_PATH
|
||||||
~/Applications
|
~/Applications
|
||||||
|
@ -125,4 +129,3 @@ SET(CMAKE_SYSTEM_APPBUNDLE_PATH
|
||||||
INCLUDE(Platform/UnixPaths)
|
INCLUDE(Platform/UnixPaths)
|
||||||
SET(CMAKE_SYSTEM_INCLUDE_PATH ${CMAKE_SYSTEM_INCLUDE_PATH} /sw/include)
|
SET(CMAKE_SYSTEM_INCLUDE_PATH ${CMAKE_SYSTEM_INCLUDE_PATH} /sw/include)
|
||||||
SET(CMAKE_SYSTEM_LIBRARY_PATH ${CMAKE_SYSTEM_LIBRARY_PATH} /sw/lib)
|
SET(CMAKE_SYSTEM_LIBRARY_PATH ${CMAKE_SYSTEM_LIBRARY_PATH} /sw/lib)
|
||||||
|
|
||||||
|
|
|
@ -228,9 +228,10 @@ SET(CMAKE_CXX_CREATE_MACOSX_FRAMEWORK
|
||||||
"<CMAKE_CXX_COMPILER> <LANGUAGE_COMPILE_FLAGS> <CMAKE_SHARED_LIBRARY_CREATE_CXX_FLAGS> <LINK_FLAGS> -o <TARGET> <SONAME_FLAG> <TARGET_INSTALLNAME_DIR><TARGET_SONAME> <OBJECTS> <LINK_LIBRARIES>")
|
"<CMAKE_CXX_COMPILER> <LANGUAGE_COMPILE_FLAGS> <CMAKE_SHARED_LIBRARY_CREATE_CXX_FLAGS> <LINK_FLAGS> -o <TARGET> <SONAME_FLAG> <TARGET_INSTALLNAME_DIR><TARGET_SONAME> <OBJECTS> <LINK_LIBRARIES>")
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# default to searching for frameworks first
|
# default to searching for frameworks first
|
||||||
SET(CMAKE_FIND_FRAMEWORK FIRST)
|
IF(NOT DEFINED CMAKE_FIND_FRAMEWORK)
|
||||||
|
SET(CMAKE_FIND_FRAMEWORK FIRST)
|
||||||
|
ENDIF()
|
||||||
# set up the default search directories for frameworks
|
# set up the default search directories for frameworks
|
||||||
SET(CMAKE_SYSTEM_FRAMEWORK_PATH
|
SET(CMAKE_SYSTEM_FRAMEWORK_PATH
|
||||||
~/Library/Frameworks
|
~/Library/Frameworks
|
||||||
|
@ -239,7 +240,9 @@ SET(CMAKE_SYSTEM_FRAMEWORK_PATH
|
||||||
/System/Library/Frameworks)
|
/System/Library/Frameworks)
|
||||||
|
|
||||||
# default to searching for application bundles first
|
# default to searching for application bundles first
|
||||||
SET(CMAKE_FIND_APPBUNDLE FIRST)
|
IF(NOT DEFINED CMAKE_FIND_APPBUNDLE)
|
||||||
|
SET(CMAKE_FIND_APPBUNDLE FIRST)
|
||||||
|
ENDIF()
|
||||||
# set up the default search directories for application bundles
|
# set up the default search directories for application bundles
|
||||||
SET(_apps_paths)
|
SET(_apps_paths)
|
||||||
FOREACH(_path
|
FOREACH(_path
|
||||||
|
|
|
@ -182,23 +182,31 @@ MACRO (QT4_ADD_RESOURCES outfiles )
|
||||||
GET_FILENAME_COMPONENT(infile ${it} ABSOLUTE)
|
GET_FILENAME_COMPONENT(infile ${it} ABSOLUTE)
|
||||||
GET_FILENAME_COMPONENT(rc_path ${infile} PATH)
|
GET_FILENAME_COMPONENT(rc_path ${infile} PATH)
|
||||||
SET(outfile ${CMAKE_CURRENT_BINARY_DIR}/qrc_${outfilename}.cxx)
|
SET(outfile ${CMAKE_CURRENT_BINARY_DIR}/qrc_${outfilename}.cxx)
|
||||||
# parse file for dependencies
|
|
||||||
# all files are absolute paths or relative to the location of the qrc file
|
|
||||||
FILE(READ "${infile}" _RC_FILE_CONTENTS)
|
|
||||||
STRING(REGEX MATCHALL "<file[^<]+" _RC_FILES "${_RC_FILE_CONTENTS}")
|
|
||||||
SET(_RC_DEPENDS)
|
SET(_RC_DEPENDS)
|
||||||
FOREACH(_RC_FILE ${_RC_FILES})
|
IF(EXISTS "${infile}")
|
||||||
STRING(REGEX REPLACE "^<file[^>]*>" "" _RC_FILE "${_RC_FILE}")
|
# parse file for dependencies
|
||||||
IF(NOT IS_ABSOLUTE "${_RC_FILE}")
|
# all files are absolute paths or relative to the location of the qrc file
|
||||||
SET(_RC_FILE "${rc_path}/${_RC_FILE}")
|
FILE(READ "${infile}" _RC_FILE_CONTENTS)
|
||||||
ENDIF(NOT IS_ABSOLUTE "${_RC_FILE}")
|
STRING(REGEX MATCHALL "<file[^<]+" _RC_FILES "${_RC_FILE_CONTENTS}")
|
||||||
SET(_RC_DEPENDS ${_RC_DEPENDS} "${_RC_FILE}")
|
FOREACH(_RC_FILE ${_RC_FILES})
|
||||||
ENDFOREACH(_RC_FILE)
|
STRING(REGEX REPLACE "^<file[^>]*>" "" _RC_FILE "${_RC_FILE}")
|
||||||
# Since this cmake macro is doing the dependency scanning for these files,
|
IF(NOT IS_ABSOLUTE "${_RC_FILE}")
|
||||||
# let's make a configured file and add it as a dependency so cmake is run
|
SET(_RC_FILE "${rc_path}/${_RC_FILE}")
|
||||||
# again when dependencies need to be recomputed.
|
ENDIF(NOT IS_ABSOLUTE "${_RC_FILE}")
|
||||||
QT4_MAKE_OUTPUT_FILE("${infile}" "" "qrc.depends" out_depends)
|
SET(_RC_DEPENDS ${_RC_DEPENDS} "${_RC_FILE}")
|
||||||
CONFIGURE_FILE("${infile}" "${out_depends}" COPY_ONLY)
|
ENDFOREACH(_RC_FILE)
|
||||||
|
# Since this cmake macro is doing the dependency scanning for these files,
|
||||||
|
# let's make a configured file and add it as a dependency so cmake is run
|
||||||
|
# again when dependencies need to be recomputed.
|
||||||
|
QT4_MAKE_OUTPUT_FILE("${infile}" "" "qrc.depends" out_depends)
|
||||||
|
CONFIGURE_FILE("${infile}" "${out_depends}" COPY_ONLY)
|
||||||
|
ELSE(EXISTS "${infile}")
|
||||||
|
# The .qrc file does not exist (yet). Let's add a dependency and hope
|
||||||
|
# that it will be generated later
|
||||||
|
SET(out_depends)
|
||||||
|
ENDIF(EXISTS "${infile}")
|
||||||
|
|
||||||
ADD_CUSTOM_COMMAND(OUTPUT ${outfile}
|
ADD_CUSTOM_COMMAND(OUTPUT ${outfile}
|
||||||
COMMAND ${QT_RCC_EXECUTABLE}
|
COMMAND ${QT_RCC_EXECUTABLE}
|
||||||
ARGS ${rcc_options} -name ${outfilename} -o ${outfile} ${infile}
|
ARGS ${rcc_options} -name ${outfilename} -o ${outfile} ${infile}
|
||||||
|
|
|
@ -337,6 +337,8 @@ IF (WIN32)
|
||||||
cmGlobalVisualStudio11Generator.cxx
|
cmGlobalVisualStudio11Generator.cxx
|
||||||
cmGlobalVisualStudio11Win64Generator.h
|
cmGlobalVisualStudio11Win64Generator.h
|
||||||
cmGlobalVisualStudio11Win64Generator.cxx
|
cmGlobalVisualStudio11Win64Generator.cxx
|
||||||
|
cmGlobalVisualStudio11ARMGenerator.h
|
||||||
|
cmGlobalVisualStudio11ARMGenerator.cxx
|
||||||
cmGlobalVisualStudioGenerator.cxx
|
cmGlobalVisualStudioGenerator.cxx
|
||||||
cmGlobalVisualStudioGenerator.h
|
cmGlobalVisualStudioGenerator.h
|
||||||
cmGlobalWatcomWMakeGenerator.cxx
|
cmGlobalWatcomWMakeGenerator.cxx
|
||||||
|
@ -423,6 +425,9 @@ SET(CTEST_SRCS cmCTest.cxx
|
||||||
CTest/cmCTestConfigureHandler.cxx
|
CTest/cmCTestConfigureHandler.cxx
|
||||||
CTest/cmCTestCoverageCommand.cxx
|
CTest/cmCTestCoverageCommand.cxx
|
||||||
CTest/cmCTestCoverageHandler.cxx
|
CTest/cmCTestCoverageHandler.cxx
|
||||||
|
CTest/cmParseMumpsCoverage.cxx
|
||||||
|
CTest/cmParseCacheCoverage.cxx
|
||||||
|
CTest/cmParseGTMCoverage.cxx
|
||||||
CTest/cmParsePHPCoverage.cxx
|
CTest/cmParsePHPCoverage.cxx
|
||||||
CTest/cmCTestEmptyBinaryDirectoryCommand.cxx
|
CTest/cmCTestEmptyBinaryDirectoryCommand.cxx
|
||||||
CTest/cmCTestGenericHandler.cxx
|
CTest/cmCTestGenericHandler.cxx
|
||||||
|
|
|
@ -2,5 +2,5 @@
|
||||||
SET(CMake_VERSION_MAJOR 2)
|
SET(CMake_VERSION_MAJOR 2)
|
||||||
SET(CMake_VERSION_MINOR 8)
|
SET(CMake_VERSION_MINOR 8)
|
||||||
SET(CMake_VERSION_PATCH 8)
|
SET(CMake_VERSION_PATCH 8)
|
||||||
SET(CMake_VERSION_TWEAK 20120508)
|
SET(CMake_VERSION_TWEAK 20120612)
|
||||||
#SET(CMake_VERSION_RC 1)
|
#SET(CMake_VERSION_RC 1)
|
||||||
|
|
|
@ -31,6 +31,17 @@ public:
|
||||||
cmCPackDebGenerator();
|
cmCPackDebGenerator();
|
||||||
virtual ~cmCPackDebGenerator();
|
virtual ~cmCPackDebGenerator();
|
||||||
|
|
||||||
|
static bool CanGenerate()
|
||||||
|
{
|
||||||
|
#ifdef __APPLE__
|
||||||
|
// on MacOS enable CPackDeb iff dpkg is found
|
||||||
|
return cmSystemTools::FindProgram("dpkg") != "" ? true : false;
|
||||||
|
#else
|
||||||
|
// legacy behavior on other systems
|
||||||
|
return true;
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
virtual int InitializeInternal();
|
virtual int InitializeInternal();
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -77,4 +77,35 @@ void cmCPackDocumentVariables::DefineVariables(cmake* cm)
|
||||||
"which is done right before packaging the files."
|
"which is done right before packaging the files."
|
||||||
" The script is not called by e.g.: make install.", false,
|
" The script is not called by e.g.: make install.", false,
|
||||||
"Variables common to all CPack generators");
|
"Variables common to all CPack generators");
|
||||||
|
|
||||||
|
cm->DefineProperty
|
||||||
|
("CPACK_ABSOLUTE_DESTINATION_FILES", cmProperty::VARIABLE,
|
||||||
|
"List of files which have been installed using "
|
||||||
|
" an ABSOLUTE DESTINATION path.",
|
||||||
|
"This variable is a Read-Only variable which is set internally"
|
||||||
|
" by CPack during installation and before packaging using"
|
||||||
|
" CMAKE_ABSOLUTE_DESTINATION_FILES defined in cmake_install.cmake "
|
||||||
|
"scripts. The value can be used within CPack project configuration"
|
||||||
|
" file and/or CPack<GEN>.cmake file of <GEN> generator.", false,
|
||||||
|
"Variables common to all CPack generators");
|
||||||
|
|
||||||
|
cm->DefineProperty
|
||||||
|
("CPACK_WARN_ON_ABSOLUTE_INSTALL_DESTINATION", cmProperty::VARIABLE,
|
||||||
|
"Ask CPack to warn each time a file with absolute INSTALL"
|
||||||
|
" DESTINATION is encountered.",
|
||||||
|
"This variable triggers the definition of "
|
||||||
|
"CMAKE_WARN_ON_ABSOLUTE_INSTALL_DESTINATION when CPack runs"
|
||||||
|
" cmake_install.cmake scripts.", false,
|
||||||
|
"Variables common to all CPack generators");
|
||||||
|
|
||||||
|
cm->DefineProperty
|
||||||
|
("CPACK_ERROR_ON_ABSOLUTE_INSTALL_DESTINATION", cmProperty::VARIABLE,
|
||||||
|
"Ask CPack to error out as soon as a file with absolute INSTALL"
|
||||||
|
" DESTINATION is encountered.",
|
||||||
|
"The fatal error is emitted before the installation of "
|
||||||
|
"the offending file takes place. Some CPack generators, like NSIS,"
|
||||||
|
"enforce this internally. "
|
||||||
|
"This variable triggers the definition of"
|
||||||
|
"CMAKE_ERROR_ON_ABSOLUTE_INSTALL_DESTINATION when CPack runs"
|
||||||
|
"Variables common to all CPack generators");
|
||||||
}
|
}
|
||||||
|
|
|
@ -62,10 +62,31 @@ void cmCPackGenerator::DisplayVerboseOutput(const char* msg,
|
||||||
|
|
||||||
//----------------------------------------------------------------------
|
//----------------------------------------------------------------------
|
||||||
int cmCPackGenerator::PrepareNames()
|
int cmCPackGenerator::PrepareNames()
|
||||||
{
|
{
|
||||||
cmCPackLogger(cmCPackLog::LOG_DEBUG,
|
cmCPackLogger(cmCPackLog::LOG_DEBUG,
|
||||||
"Create temp directory." << std::endl);
|
"Create temp directory." << std::endl);
|
||||||
|
|
||||||
|
// checks CPACK_SET_DESTDIR support
|
||||||
|
if (IsOn("CPACK_SET_DESTDIR"))
|
||||||
|
{
|
||||||
|
if (SETDESTDIR_UNSUPPORTED==SupportsSetDestdir())
|
||||||
|
{
|
||||||
|
cmCPackLogger(cmCPackLog::LOG_ERROR,
|
||||||
|
"CPACK_SET_DESTDIR is set to ON but the '"
|
||||||
|
<< Name << "' generator does NOT support it."
|
||||||
|
<< std::endl);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
else if (SETDESTDIR_SHOULD_NOT_BE_USED==SupportsSetDestdir())
|
||||||
|
{
|
||||||
|
cmCPackLogger(cmCPackLog::LOG_WARNING,
|
||||||
|
"CPACK_SET_DESTDIR is set to ON but it is "
|
||||||
|
<< "usually a bad idea to do that with '"
|
||||||
|
<< Name << "' generator. Use at your own risk."
|
||||||
|
<< std::endl);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
std::string tempDirectory = this->GetOption("CPACK_PACKAGE_DIRECTORY");
|
std::string tempDirectory = this->GetOption("CPACK_PACKAGE_DIRECTORY");
|
||||||
tempDirectory += "/_CPack_Packages/";
|
tempDirectory += "/_CPack_Packages/";
|
||||||
const char* toplevelTag = this->GetOption("CPACK_TOPLEVEL_TAG");
|
const char* toplevelTag = this->GetOption("CPACK_TOPLEVEL_TAG");
|
||||||
|
@ -388,8 +409,11 @@ int cmCPackGenerator::InstallProjectViaInstalledDirectories(
|
||||||
std::string>(targetFile,inFileRelative));
|
std::string>(targetFile,inFileRelative));
|
||||||
}
|
}
|
||||||
/* If it is not a symlink then do a plain copy */
|
/* If it is not a symlink then do a plain copy */
|
||||||
else if ( !cmSystemTools::CopyFileIfDifferent(inFile.c_str(),
|
else if (!(
|
||||||
filePath.c_str()) )
|
cmSystemTools::CopyFileIfDifferent(inFile.c_str(),filePath.c_str())
|
||||||
|
&&
|
||||||
|
cmSystemTools::CopyFileTime(inFile.c_str(),filePath.c_str())
|
||||||
|
) )
|
||||||
{
|
{
|
||||||
cmCPackLogger(cmCPackLog::LOG_ERROR, "Problem copying file: "
|
cmCPackLogger(cmCPackLog::LOG_ERROR, "Problem copying file: "
|
||||||
<< inFile.c_str() << " -> " << filePath.c_str() << std::endl);
|
<< inFile.c_str() << " -> " << filePath.c_str() << std::endl);
|
||||||
|
@ -828,8 +852,35 @@ int cmCPackGenerator::InstallProjectViaInstallCMakeProjects(
|
||||||
filesBefore = glB.GetFiles();
|
filesBefore = glB.GetFiles();
|
||||||
std::sort(filesBefore.begin(),filesBefore.end());
|
std::sort(filesBefore.begin(),filesBefore.end());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// If CPack was asked to warn on ABSOLUTE INSTALL DESTINATION
|
||||||
|
// then forward request to cmake_install.cmake script
|
||||||
|
if (this->GetOption("CPACK_WARN_ON_ABSOLUTE_INSTALL_DESTINATION"))
|
||||||
|
{
|
||||||
|
mf->AddDefinition("CMAKE_WARN_ON_ABSOLUTE_INSTALL_DESTINATION",
|
||||||
|
"1");
|
||||||
|
}
|
||||||
|
// If current CPack generator does support
|
||||||
|
// ABSOLUTE INSTALL DESTINATION or CPack has been asked for
|
||||||
|
// then ask cmake_install.cmake script to error out
|
||||||
|
// as soon as it occurs (before installing file)
|
||||||
|
if (!SupportsAbsoluteDestination() ||
|
||||||
|
this->GetOption("CPACK_ERROR_ON_ABSOLUTE_INSTALL_DESTINATION"))
|
||||||
|
{
|
||||||
|
mf->AddDefinition("CMAKE_ERROR_ON_ABSOLUTE_INSTALL_DESTINATION",
|
||||||
|
"1");
|
||||||
|
}
|
||||||
// do installation
|
// do installation
|
||||||
int res = mf->ReadListFile(0, installFile.c_str());
|
int res = mf->ReadListFile(0, installFile.c_str());
|
||||||
|
// forward definition of CMAKE_ABSOLUTE_DESTINATION_FILES
|
||||||
|
// to CPack (may be used by generators like CPack RPM or DEB)
|
||||||
|
// in order to transparently handle ABSOLUTE PATH
|
||||||
|
if (mf->GetDefinition("CMAKE_ABSOLUTE_DESTINATION_FILES"))
|
||||||
|
{
|
||||||
|
mf->AddDefinition("CPACK_ABSOLUTE_DESTINATION_FILES",
|
||||||
|
mf->GetDefinition("CMAKE_ABSOLUTE_DESTINATION_FILES"));
|
||||||
|
}
|
||||||
|
|
||||||
// Now rebuild the list of files after installation
|
// Now rebuild the list of files after installation
|
||||||
// of the current component (if we are in component install)
|
// of the current component (if we are in component install)
|
||||||
if (componentInstall)
|
if (componentInstall)
|
||||||
|
@ -953,6 +1004,8 @@ int cmCPackGenerator::DoPackage()
|
||||||
cmCPackLogger(cmCPackLog::LOG_OUTPUT,
|
cmCPackLogger(cmCPackLog::LOG_OUTPUT,
|
||||||
"Create package using " << this->Name.c_str() << std::endl);
|
"Create package using " << this->Name.c_str() << std::endl);
|
||||||
|
|
||||||
|
// Prepare CPack internal name and check
|
||||||
|
// values for many CPACK_xxx vars
|
||||||
if ( !this->PrepareNames() )
|
if ( !this->PrepareNames() )
|
||||||
{
|
{
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -1430,6 +1483,19 @@ std::string cmCPackGenerator::GetComponentPackageFileName(
|
||||||
return initialPackageFileName + suffix;
|
return initialPackageFileName + suffix;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//----------------------------------------------------------------------
|
||||||
|
enum cmCPackGenerator::CPackSetDestdirSupport
|
||||||
|
cmCPackGenerator::SupportsSetDestdir() const
|
||||||
|
{
|
||||||
|
return cmCPackGenerator::SETDESTDIR_SUPPORTED;
|
||||||
|
}
|
||||||
|
|
||||||
|
//----------------------------------------------------------------------
|
||||||
|
bool cmCPackGenerator::SupportsAbsoluteDestination() const
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
//----------------------------------------------------------------------
|
//----------------------------------------------------------------------
|
||||||
bool cmCPackGenerator::SupportsComponentInstallation() const
|
bool cmCPackGenerator::SupportsComponentInstallation() const
|
||||||
{
|
{
|
||||||
|
|
|
@ -62,6 +62,16 @@ public:
|
||||||
{ this->GeneratorVerbose = val ?
|
{ this->GeneratorVerbose = val ?
|
||||||
cmSystemTools::OUTPUT_MERGE : cmSystemTools::OUTPUT_NONE; }
|
cmSystemTools::OUTPUT_MERGE : cmSystemTools::OUTPUT_NONE; }
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns true if the generator may work on this system.
|
||||||
|
* Rational:
|
||||||
|
* Some CPack generator may run on some host and may not on others
|
||||||
|
* (with the same system) because some tools are missing. If the tool
|
||||||
|
* is missing then CPack won't activate (in the CPackGeneratorFactory)
|
||||||
|
* this particular generator.
|
||||||
|
*/
|
||||||
|
static bool CanGenerate() { return true; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Do the actual whole package processing.
|
* Do the actual whole package processing.
|
||||||
* Subclass may redefine it but its usually enough
|
* Subclass may redefine it but its usually enough
|
||||||
|
@ -189,6 +199,38 @@ protected:
|
||||||
virtual int InstallProjectViaInstallCMakeProjects(
|
virtual int InstallProjectViaInstallCMakeProjects(
|
||||||
bool setDestDir, const char* tempInstallDirectory);
|
bool setDestDir, const char* tempInstallDirectory);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The various level of support of
|
||||||
|
* CPACK_SET_DESTDIR used by the generator.
|
||||||
|
*/
|
||||||
|
enum CPackSetDestdirSupport {
|
||||||
|
/* the generator works with or without it */
|
||||||
|
SETDESTDIR_SUPPORTED,
|
||||||
|
/* the generator works best if automatically handled */
|
||||||
|
SETDESTDIR_INTERNALLY_SUPPORTED,
|
||||||
|
/* no official support, use at your own risk */
|
||||||
|
SETDESTDIR_SHOULD_NOT_BE_USED,
|
||||||
|
/* officially NOT supported */
|
||||||
|
SETDESTDIR_UNSUPPORTED
|
||||||
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Does the CPack generator support CPACK_SET_DESTDIR?
|
||||||
|
* The default legacy value is 'SETDESTDIR_SUPPORTED' generator
|
||||||
|
* have to override it in order change this.
|
||||||
|
* @return CPackSetDestdirSupport
|
||||||
|
*/
|
||||||
|
virtual enum CPackSetDestdirSupport SupportsSetDestdir() const;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Does the CPack generator support absolute path
|
||||||
|
* in INSTALL DESTINATION?
|
||||||
|
* The default legacy value is 'true' generator
|
||||||
|
* have to override it in order change this.
|
||||||
|
* @return true if supported false otherwise
|
||||||
|
*/
|
||||||
|
virtual bool SupportsAbsoluteDestination() const;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Does the CPack generator support component installation?.
|
* Does the CPack generator support component installation?.
|
||||||
* Some Generators requires the user to set
|
* Some Generators requires the user to set
|
||||||
|
|
|
@ -31,7 +31,7 @@
|
||||||
# include "cmCPackCygwinSourceGenerator.h"
|
# include "cmCPackCygwinSourceGenerator.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if !defined(_WIN32) && !defined(__APPLE__) \
|
#if !defined(_WIN32) \
|
||||||
&& !defined(__QNXNTO__) && !defined(__BEOS__)
|
&& !defined(__QNXNTO__) && !defined(__BEOS__)
|
||||||
# include "cmCPackDebGenerator.h"
|
# include "cmCPackDebGenerator.h"
|
||||||
# include "cmCPackRPMGenerator.h"
|
# include "cmCPackRPMGenerator.h"
|
||||||
|
@ -40,44 +40,90 @@
|
||||||
|
|
||||||
#include "cmCPackLog.h"
|
#include "cmCPackLog.h"
|
||||||
|
|
||||||
|
#if defined(__BORLANDC__)
|
||||||
|
# pragma warn -8008 /* condition is always true */
|
||||||
|
#endif
|
||||||
|
|
||||||
//----------------------------------------------------------------------
|
//----------------------------------------------------------------------
|
||||||
cmCPackGeneratorFactory::cmCPackGeneratorFactory()
|
cmCPackGeneratorFactory::cmCPackGeneratorFactory()
|
||||||
{
|
{
|
||||||
this->RegisterGenerator("TGZ", "Tar GZip compression",
|
if (cmCPackTGZGenerator::CanGenerate())
|
||||||
cmCPackTGZGenerator::CreateGenerator);
|
{
|
||||||
this->RegisterGenerator("STGZ", "Self extracting Tar GZip compression",
|
this->RegisterGenerator("TGZ", "Tar GZip compression",
|
||||||
cmCPackSTGZGenerator::CreateGenerator);
|
cmCPackTGZGenerator::CreateGenerator);
|
||||||
this->RegisterGenerator("NSIS", "Null Soft Installer",
|
}
|
||||||
cmCPackNSISGenerator::CreateGenerator);
|
if (cmCPackSTGZGenerator::CanGenerate())
|
||||||
|
{
|
||||||
|
this->RegisterGenerator("STGZ", "Self extracting Tar GZip compression",
|
||||||
|
cmCPackSTGZGenerator::CreateGenerator);
|
||||||
|
}
|
||||||
|
if (cmCPackNSISGenerator::CanGenerate())
|
||||||
|
{
|
||||||
|
this->RegisterGenerator("NSIS", "Null Soft Installer",
|
||||||
|
cmCPackNSISGenerator::CreateGenerator);
|
||||||
|
}
|
||||||
#ifdef __CYGWIN__
|
#ifdef __CYGWIN__
|
||||||
this->RegisterGenerator("CygwinBinary", "Cygwin Binary Installer",
|
if (cmCPackCygwinBinaryGenerator::CanGenerate())
|
||||||
cmCPackCygwinBinaryGenerator::CreateGenerator);
|
{
|
||||||
this->RegisterGenerator("CygwinSource", "Cygwin Source Installer",
|
this->RegisterGenerator("CygwinBinary", "Cygwin Binary Installer",
|
||||||
cmCPackCygwinSourceGenerator::CreateGenerator);
|
cmCPackCygwinBinaryGenerator::CreateGenerator);
|
||||||
|
}
|
||||||
|
if (cmCPackCygwinSourceGenerator::CanGenerate())
|
||||||
|
{
|
||||||
|
this->RegisterGenerator("CygwinSource", "Cygwin Source Installer",
|
||||||
|
cmCPackCygwinSourceGenerator::CreateGenerator);
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
this->RegisterGenerator("ZIP", "ZIP file format",
|
if (cmCPackZIPGenerator::CanGenerate())
|
||||||
cmCPackZIPGenerator::CreateGenerator);
|
{
|
||||||
this->RegisterGenerator("TBZ2", "Tar BZip2 compression",
|
this->RegisterGenerator("ZIP", "ZIP file format",
|
||||||
cmCPackTarBZip2Generator::CreateGenerator);
|
cmCPackZIPGenerator::CreateGenerator);
|
||||||
this->RegisterGenerator("TZ", "Tar Compress compression",
|
}
|
||||||
cmCPackTarCompressGenerator::CreateGenerator);
|
if (cmCPackTarBZip2Generator::CanGenerate())
|
||||||
|
{
|
||||||
|
this->RegisterGenerator("TBZ2", "Tar BZip2 compression",
|
||||||
|
cmCPackTarBZip2Generator::CreateGenerator);
|
||||||
|
}
|
||||||
|
if (cmCPackTarCompressGenerator::CanGenerate())
|
||||||
|
{
|
||||||
|
this->RegisterGenerator("TZ", "Tar Compress compression",
|
||||||
|
cmCPackTarCompressGenerator::CreateGenerator);
|
||||||
|
}
|
||||||
#ifdef __APPLE__
|
#ifdef __APPLE__
|
||||||
this->RegisterGenerator("DragNDrop", "Mac OSX Drag And Drop",
|
if (cmCPackDragNDropGenerator::CanGenerate())
|
||||||
cmCPackDragNDropGenerator::CreateGenerator);
|
{
|
||||||
this->RegisterGenerator("Bundle", "Mac OSX bundle",
|
this->RegisterGenerator("DragNDrop", "Mac OSX Drag And Drop",
|
||||||
cmCPackBundleGenerator::CreateGenerator);
|
cmCPackDragNDropGenerator::CreateGenerator);
|
||||||
this->RegisterGenerator("PackageMaker", "Mac OSX Package Maker installer",
|
}
|
||||||
cmCPackPackageMakerGenerator::CreateGenerator);
|
if (cmCPackBundleGenerator::CanGenerate())
|
||||||
this->RegisterGenerator("OSXX11", "Mac OSX X11 bundle",
|
{
|
||||||
cmCPackOSXX11Generator::CreateGenerator);
|
this->RegisterGenerator("Bundle", "Mac OSX bundle",
|
||||||
|
cmCPackBundleGenerator::CreateGenerator);
|
||||||
|
}
|
||||||
|
if (cmCPackPackageMakerGenerator::CanGenerate())
|
||||||
|
{
|
||||||
|
this->RegisterGenerator("PackageMaker", "Mac OSX Package Maker installer",
|
||||||
|
cmCPackPackageMakerGenerator::CreateGenerator);
|
||||||
|
}
|
||||||
|
if (cmCPackOSXX11Generator::CanGenerate())
|
||||||
|
{
|
||||||
|
this->RegisterGenerator("OSXX11", "Mac OSX X11 bundle",
|
||||||
|
cmCPackOSXX11Generator::CreateGenerator);
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
#if !defined(_WIN32) && !defined(__APPLE__) \
|
#if !defined(_WIN32) \
|
||||||
&& !defined(__QNXNTO__) && !defined(__BEOS__)
|
&& !defined(__QNXNTO__) && !defined(__BEOS__)
|
||||||
this->RegisterGenerator("DEB", "Debian packages",
|
if (cmCPackDebGenerator::CanGenerate())
|
||||||
cmCPackDebGenerator::CreateGenerator);
|
{
|
||||||
this->RegisterGenerator("RPM", "RPM packages",
|
this->RegisterGenerator("DEB", "Debian packages",
|
||||||
cmCPackRPMGenerator::CreateGenerator);
|
cmCPackDebGenerator::CreateGenerator);
|
||||||
|
}
|
||||||
|
if (cmCPackRPMGenerator::CanGenerate())
|
||||||
|
{
|
||||||
|
this->RegisterGenerator("RPM", "RPM packages",
|
||||||
|
cmCPackRPMGenerator::CreateGenerator);
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -64,6 +64,7 @@ int cmCPackNSISGenerator::PackageFiles()
|
||||||
<< std::endl);
|
<< std::endl);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string nsisFileName = this->GetOption("CPACK_TOPLEVEL_DIRECTORY");
|
std::string nsisFileName = this->GetOption("CPACK_TOPLEVEL_DIRECTORY");
|
||||||
std::string tmpFile = nsisFileName;
|
std::string tmpFile = nsisFileName;
|
||||||
tmpFile += "/NSISOutput.log";
|
tmpFile += "/NSISOutput.log";
|
||||||
|
@ -542,8 +543,8 @@ void cmCPackNSISGenerator::CreateMenuLinks( cmOStringStream& str,
|
||||||
{
|
{
|
||||||
cmCPackLogger(
|
cmCPackLogger(
|
||||||
cmCPackLog::LOG_ERROR,
|
cmCPackLog::LOG_ERROR,
|
||||||
"CPACK_PACKAGE_EXECUTABLES should contain pairs of <executable> and "
|
"CPACK_NSIS_MENU_LINKS should contain pairs of <shortcut target> and "
|
||||||
"<icon name>." << std::endl);
|
"<shortcut label>." << std::endl);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -630,6 +631,19 @@ bool cmCPackNSISGenerator::GetListOfSubdirectories(const char* topdir,
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//----------------------------------------------------------------------
|
||||||
|
enum cmCPackGenerator::CPackSetDestdirSupport
|
||||||
|
cmCPackNSISGenerator::SupportsSetDestdir() const
|
||||||
|
{
|
||||||
|
return cmCPackGenerator::SETDESTDIR_SHOULD_NOT_BE_USED;
|
||||||
|
}
|
||||||
|
|
||||||
|
//----------------------------------------------------------------------
|
||||||
|
bool cmCPackNSISGenerator::SupportsAbsoluteDestination() const
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
//----------------------------------------------------------------------
|
//----------------------------------------------------------------------
|
||||||
bool cmCPackNSISGenerator::SupportsComponentInstallation() const
|
bool cmCPackNSISGenerator::SupportsComponentInstallation() const
|
||||||
{
|
{
|
||||||
|
|
|
@ -44,6 +44,8 @@ protected:
|
||||||
bool GetListOfSubdirectories(const char* dir,
|
bool GetListOfSubdirectories(const char* dir,
|
||||||
std::vector<std::string>& dirs);
|
std::vector<std::string>& dirs);
|
||||||
|
|
||||||
|
enum cmCPackGenerator::CPackSetDestdirSupport SupportsSetDestdir() const;
|
||||||
|
virtual bool SupportsAbsoluteDestination() const;
|
||||||
virtual bool SupportsComponentInstallation() const;
|
virtual bool SupportsComponentInstallation() const;
|
||||||
|
|
||||||
/// Produce a string that contains the NSIS code to describe a
|
/// Produce a string that contains the NSIS code to describe a
|
||||||
|
|
|
@ -35,6 +35,17 @@ public:
|
||||||
cmCPackRPMGenerator();
|
cmCPackRPMGenerator();
|
||||||
virtual ~cmCPackRPMGenerator();
|
virtual ~cmCPackRPMGenerator();
|
||||||
|
|
||||||
|
static bool CanGenerate()
|
||||||
|
{
|
||||||
|
#ifdef __APPLE__
|
||||||
|
// on MacOS enable CPackRPM iff rpmbuild is found
|
||||||
|
return cmSystemTools::FindProgram("rpmbuild") != "" ? true : false;
|
||||||
|
#else
|
||||||
|
// legacy behavior on other systems
|
||||||
|
return true;
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
virtual int InitializeInternal();
|
virtual int InitializeInternal();
|
||||||
virtual int PackageFiles();
|
virtual int PackageFiles();
|
||||||
|
|
|
@ -11,6 +11,8 @@
|
||||||
============================================================================*/
|
============================================================================*/
|
||||||
#include "cmCTestCoverageHandler.h"
|
#include "cmCTestCoverageHandler.h"
|
||||||
#include "cmParsePHPCoverage.h"
|
#include "cmParsePHPCoverage.h"
|
||||||
|
#include "cmParseGTMCoverage.h"
|
||||||
|
#include "cmParseCacheCoverage.h"
|
||||||
#include "cmCTest.h"
|
#include "cmCTest.h"
|
||||||
#include "cmake.h"
|
#include "cmake.h"
|
||||||
#include "cmMakefile.h"
|
#include "cmMakefile.h"
|
||||||
|
@ -373,21 +375,29 @@ int cmCTestCoverageHandler::ProcessHandler()
|
||||||
}
|
}
|
||||||
int file_count = 0;
|
int file_count = 0;
|
||||||
file_count += this->HandleGCovCoverage(&cont);
|
file_count += this->HandleGCovCoverage(&cont);
|
||||||
|
error = cont.Error;
|
||||||
if ( file_count < 0 )
|
if ( file_count < 0 )
|
||||||
{
|
{
|
||||||
return error;
|
return error;
|
||||||
}
|
}
|
||||||
file_count += this->HandleTracePyCoverage(&cont);
|
file_count += this->HandleTracePyCoverage(&cont);
|
||||||
|
error = cont.Error;
|
||||||
if ( file_count < 0 )
|
if ( file_count < 0 )
|
||||||
{
|
{
|
||||||
return error;
|
return error;
|
||||||
}
|
}
|
||||||
file_count += this->HandlePHPCoverage(&cont);
|
file_count += this->HandlePHPCoverage(&cont);
|
||||||
|
error = cont.Error;
|
||||||
if ( file_count < 0 )
|
if ( file_count < 0 )
|
||||||
{
|
{
|
||||||
return error;
|
return error;
|
||||||
}
|
}
|
||||||
|
file_count += this->HandleMumpsCoverage(&cont);
|
||||||
error = cont.Error;
|
error = cont.Error;
|
||||||
|
if ( file_count < 0 )
|
||||||
|
{
|
||||||
|
return error;
|
||||||
|
}
|
||||||
|
|
||||||
std::set<std::string> uncovered = this->FindUncoveredFiles(&cont);
|
std::set<std::string> uncovered = this->FindUncoveredFiles(&cont);
|
||||||
|
|
||||||
|
@ -751,6 +761,46 @@ int cmCTestCoverageHandler::HandlePHPCoverage(
|
||||||
}
|
}
|
||||||
return static_cast<int>(cont->TotalCoverage.size());
|
return static_cast<int>(cont->TotalCoverage.size());
|
||||||
}
|
}
|
||||||
|
//----------------------------------------------------------------------
|
||||||
|
int cmCTestCoverageHandler::HandleMumpsCoverage(
|
||||||
|
cmCTestCoverageHandlerContainer* cont)
|
||||||
|
{
|
||||||
|
// try gtm coverage
|
||||||
|
cmParseGTMCoverage cov(*cont, this->CTest);
|
||||||
|
std::string coverageFile = this->CTest->GetBinaryDir() +
|
||||||
|
"/gtm_coverage.mcov";
|
||||||
|
if(cmSystemTools::FileExists(coverageFile.c_str()))
|
||||||
|
{
|
||||||
|
cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT,
|
||||||
|
"Parsing Cache Coverage: " << coverageFile
|
||||||
|
<< std::endl);
|
||||||
|
cov.ReadCoverageFile(coverageFile.c_str());
|
||||||
|
return static_cast<int>(cont->TotalCoverage.size());
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT,
|
||||||
|
" Cannot find foobar GTM coverage file: " << coverageFile
|
||||||
|
<< std::endl);
|
||||||
|
}
|
||||||
|
cmParseCacheCoverage ccov(*cont, this->CTest);
|
||||||
|
coverageFile = this->CTest->GetBinaryDir() +
|
||||||
|
"/cache_coverage.cmcov";
|
||||||
|
if(cmSystemTools::FileExists(coverageFile.c_str()))
|
||||||
|
{
|
||||||
|
cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT,
|
||||||
|
"Parsing Cache Coverage: " << coverageFile
|
||||||
|
<< std::endl);
|
||||||
|
ccov.ReadCoverageFile(coverageFile.c_str());
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT,
|
||||||
|
" Cannot find Cache coverage file: " << coverageFile
|
||||||
|
<< std::endl);
|
||||||
|
}
|
||||||
|
return static_cast<int>(cont->TotalCoverage.size());
|
||||||
|
}
|
||||||
|
|
||||||
struct cmCTestCoverageHandlerLocale
|
struct cmCTestCoverageHandlerLocale
|
||||||
{
|
{
|
||||||
|
@ -800,7 +850,7 @@ int cmCTestCoverageHandler::HandleGCovCoverage(
|
||||||
std::string st2gcovOutputRex1 = "^File *[`'](.*)'$";
|
std::string st2gcovOutputRex1 = "^File *[`'](.*)'$";
|
||||||
std::string st2gcovOutputRex2
|
std::string st2gcovOutputRex2
|
||||||
= "Lines executed: *[0-9]+\\.[0-9]+% of [0-9]+$";
|
= "Lines executed: *[0-9]+\\.[0-9]+% of [0-9]+$";
|
||||||
std::string st2gcovOutputRex3 = "^(.*):creating [`'](.*\\.gcov)'";
|
std::string st2gcovOutputRex3 = "^(.*)reating [`'](.*\\.gcov)'";
|
||||||
std::string st2gcovOutputRex4 = "^(.*):unexpected EOF *$";
|
std::string st2gcovOutputRex4 = "^(.*):unexpected EOF *$";
|
||||||
std::string st2gcovOutputRex5 = "^(.*):cannot open source file*$";
|
std::string st2gcovOutputRex5 = "^(.*):cannot open source file*$";
|
||||||
std::string st2gcovOutputRex6
|
std::string st2gcovOutputRex6
|
||||||
|
@ -1806,7 +1856,7 @@ int cmCTestCoverageHandler::HandleBullseyeCoverage(
|
||||||
cmCTestCoverageHandlerContainer* cont)
|
cmCTestCoverageHandlerContainer* cont)
|
||||||
{
|
{
|
||||||
const char* covfile = cmSystemTools::GetEnv("COVFILE");
|
const char* covfile = cmSystemTools::GetEnv("COVFILE");
|
||||||
if(!covfile)
|
if(!covfile || strlen(covfile) == 0)
|
||||||
{
|
{
|
||||||
cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT,
|
cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT,
|
||||||
" COVFILE environment variable not found, not running "
|
" COVFILE environment variable not found, not running "
|
||||||
|
|
|
@ -70,6 +70,8 @@ private:
|
||||||
|
|
||||||
//! Handle coverage using xdebug php coverage
|
//! Handle coverage using xdebug php coverage
|
||||||
int HandlePHPCoverage(cmCTestCoverageHandlerContainer* cont);
|
int HandlePHPCoverage(cmCTestCoverageHandlerContainer* cont);
|
||||||
|
//! Handle coverage for mumps
|
||||||
|
int HandleMumpsCoverage(cmCTestCoverageHandlerContainer* cont);
|
||||||
|
|
||||||
//! Handle coverage using Bullseye
|
//! Handle coverage using Bullseye
|
||||||
int HandleBullseyeCoverage(cmCTestCoverageHandlerContainer* cont);
|
int HandleBullseyeCoverage(cmCTestCoverageHandlerContainer* cont);
|
||||||
|
|
|
@ -0,0 +1,220 @@
|
||||||
|
#include "cmStandardIncludes.h"
|
||||||
|
#include <stdio.h>
|
||||||
|
#include <stdlib.h>
|
||||||
|
#include "cmSystemTools.h"
|
||||||
|
#include "cmParseCacheCoverage.h"
|
||||||
|
#include <cmsys/Directory.hxx>
|
||||||
|
#include <cmsys/Glob.hxx>
|
||||||
|
|
||||||
|
|
||||||
|
cmParseCacheCoverage::cmParseCacheCoverage(
|
||||||
|
cmCTestCoverageHandlerContainer& cont,
|
||||||
|
cmCTest* ctest)
|
||||||
|
:cmParseMumpsCoverage(cont, ctest)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
bool cmParseCacheCoverage::LoadCoverageData(const char* d)
|
||||||
|
{
|
||||||
|
// load all the .mcov files in the specified directory
|
||||||
|
cmsys::Directory dir;
|
||||||
|
if(!dir.Load(d))
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
size_t numf;
|
||||||
|
unsigned int i;
|
||||||
|
numf = dir.GetNumberOfFiles();
|
||||||
|
for (i = 0; i < numf; i++)
|
||||||
|
{
|
||||||
|
std::string file = dir.GetFile(i);
|
||||||
|
if(file != "." && file != ".."
|
||||||
|
&& !cmSystemTools::FileIsDirectory(file.c_str()))
|
||||||
|
{
|
||||||
|
std::string path = d;
|
||||||
|
path += "/";
|
||||||
|
path += file;
|
||||||
|
if(cmSystemTools::GetFilenameLastExtension(path) == ".cmcov")
|
||||||
|
{
|
||||||
|
if(!this->ReadCMCovFile(path.c_str()))
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
// not currently used, but leave it in case we want it in the future
|
||||||
|
void cmParseCacheCoverage::RemoveUnCoveredFiles()
|
||||||
|
{
|
||||||
|
// loop over the coverage data computed and remove all files
|
||||||
|
// that only have -1 or 0 for the lines.
|
||||||
|
cmCTestCoverageHandlerContainer::TotalCoverageMap::iterator ci =
|
||||||
|
this->Coverage.TotalCoverage.begin();
|
||||||
|
while(ci != this->Coverage.TotalCoverage.end())
|
||||||
|
{
|
||||||
|
cmCTestCoverageHandlerContainer::SingleFileCoverageVector& v =
|
||||||
|
ci->second;
|
||||||
|
bool nothing = true;
|
||||||
|
for(cmCTestCoverageHandlerContainer::SingleFileCoverageVector::iterator i=
|
||||||
|
v.begin(); i != v.end(); ++i)
|
||||||
|
{
|
||||||
|
if(*i > 0)
|
||||||
|
{
|
||||||
|
nothing = false;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if(nothing)
|
||||||
|
{
|
||||||
|
cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT,
|
||||||
|
"No coverage found in: " << ci->first
|
||||||
|
<< std::endl);
|
||||||
|
this->Coverage.TotalCoverage.erase(ci++);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
++ci;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
bool cmParseCacheCoverage::SplitString(std::vector<std::string>& args,
|
||||||
|
std::string const& line)
|
||||||
|
{
|
||||||
|
std::string::size_type pos1 = 0;
|
||||||
|
std::string::size_type pos2 = line.find(',', 0);
|
||||||
|
if(pos2 == std::string::npos)
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
std::string arg;
|
||||||
|
while(pos2 != std::string::npos)
|
||||||
|
{
|
||||||
|
arg = line.substr(pos1, pos2-pos1);
|
||||||
|
args.push_back(arg);
|
||||||
|
pos1 = pos2+1;
|
||||||
|
pos2 = line.find(',',pos1);
|
||||||
|
}
|
||||||
|
arg = line.substr(pos1);
|
||||||
|
args.push_back(arg);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool cmParseCacheCoverage::ReadCMCovFile(const char* file)
|
||||||
|
{
|
||||||
|
std::ifstream in(file);
|
||||||
|
if(!in)
|
||||||
|
{
|
||||||
|
cmCTestLog(this->CTest, ERROR_MESSAGE,
|
||||||
|
"Can not open : "
|
||||||
|
<< file << "\n");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
std::string line;
|
||||||
|
std::vector<std::string> separateLine;
|
||||||
|
if(!cmSystemTools::GetLineFromStream(in, line))
|
||||||
|
{
|
||||||
|
cmCTestLog(this->CTest, ERROR_MESSAGE,
|
||||||
|
"Empty file : "
|
||||||
|
<< file << " referenced in this line of cmcov data:\n"
|
||||||
|
"[" << line << "]\n");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
separateLine.clear();
|
||||||
|
this->SplitString(separateLine, line);
|
||||||
|
if(separateLine.size() !=4 || separateLine[0] != "Routine"
|
||||||
|
|| separateLine[1] != "Line" || separateLine[2] != "RtnLine"
|
||||||
|
|| separateLine[3] != "Code")
|
||||||
|
{
|
||||||
|
cmCTestLog(this->CTest, ERROR_MESSAGE,
|
||||||
|
"Bad first line of cmcov file : "
|
||||||
|
<< file << " line:\n"
|
||||||
|
"[" << line << "]\n");
|
||||||
|
}
|
||||||
|
std::string routine;
|
||||||
|
std::string filepath;
|
||||||
|
while(cmSystemTools::GetLineFromStream(in, line))
|
||||||
|
{
|
||||||
|
// clear out line argument vector
|
||||||
|
separateLine.clear();
|
||||||
|
// parse the comma separated line
|
||||||
|
this->SplitString(separateLine, line);
|
||||||
|
// might have more because code could have a quoted , in it
|
||||||
|
// but we only care about the first 3 args anyway
|
||||||
|
if(separateLine.size() < 4)
|
||||||
|
{
|
||||||
|
cmCTestLog(this->CTest, ERROR_MESSAGE,
|
||||||
|
"Bad line of cmcov file expected at least 4 found: "
|
||||||
|
<< separateLine.size() << " "
|
||||||
|
<< file << " line:\n"
|
||||||
|
"[" << line << "]\n");
|
||||||
|
for(std::string::size_type i = 0; i < separateLine.size(); ++i)
|
||||||
|
{
|
||||||
|
cmCTestLog(this->CTest, ERROR_MESSAGE,""
|
||||||
|
<< separateLine[1] << " ");
|
||||||
|
}
|
||||||
|
cmCTestLog(this->CTest, ERROR_MESSAGE, "\n");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
// if we do not have a routine yet, then it should be
|
||||||
|
// the first argument in the vector
|
||||||
|
if(routine.size() == 0)
|
||||||
|
{
|
||||||
|
routine = separateLine[0];
|
||||||
|
// Find the full path to the file
|
||||||
|
if(!this->FindMumpsFile(routine, filepath))
|
||||||
|
{
|
||||||
|
cmCTestLog(this->CTest, ERROR_MESSAGE,
|
||||||
|
"Could not find mumps file for routine: "
|
||||||
|
<< routine << "\n");
|
||||||
|
filepath = "";
|
||||||
|
continue; // move to next line
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// if we have a routine name, check for end of routine
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// Totals in arg 0 marks the end of a routine
|
||||||
|
if(separateLine[0].substr(0, 6) == "Totals")
|
||||||
|
{
|
||||||
|
routine = ""; // at the end of this routine
|
||||||
|
filepath = "";
|
||||||
|
continue; // move to next line
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// if the file path was not found for the routine
|
||||||
|
// move to next line. We should have already warned
|
||||||
|
// after the call to FindMumpsFile that we did not find
|
||||||
|
// it, so don't report again to cut down on output
|
||||||
|
if(filepath.size() == 0)
|
||||||
|
{
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
// now we are ready to set the coverage from the line of data
|
||||||
|
cmCTestCoverageHandlerContainer::SingleFileCoverageVector&
|
||||||
|
coverageVector = this->Coverage.TotalCoverage[filepath];
|
||||||
|
std::string::size_type linenumber = atoi(separateLine[1].c_str()) -1;
|
||||||
|
int count = atoi(separateLine[2].c_str());
|
||||||
|
if(linenumber > coverageVector.size())
|
||||||
|
{
|
||||||
|
cmCTestLog(this->CTest, ERROR_MESSAGE,
|
||||||
|
"Parse error line is greater than number of lines in file: "
|
||||||
|
<< linenumber << " " << filepath << "\n");
|
||||||
|
continue; // skip setting count to avoid crash
|
||||||
|
}
|
||||||
|
// now add to count for linenumber
|
||||||
|
// for some reason the cache coverage adds extra lines to the
|
||||||
|
// end of the file in some cases. Since they do not exist, we will
|
||||||
|
// mark them as non executable
|
||||||
|
while(linenumber >= coverageVector.size())
|
||||||
|
{
|
||||||
|
coverageVector.push_back(-1);
|
||||||
|
}
|
||||||
|
coverageVector[linenumber] += count;
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
|
@ -0,0 +1,42 @@
|
||||||
|
/*============================================================================
|
||||||
|
CMake - Cross Platform Makefile Generator
|
||||||
|
Copyright 2000-2009 Kitware, Inc.
|
||||||
|
|
||||||
|
Distributed under the OSI-approved BSD License (the "License");
|
||||||
|
see accompanying file Copyright.txt for details.
|
||||||
|
|
||||||
|
This software is distributed WITHOUT ANY WARRANTY; without even the
|
||||||
|
implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||||
|
See the License for more information.
|
||||||
|
============================================================================*/
|
||||||
|
|
||||||
|
#ifndef cmParseCacheCoverage_h
|
||||||
|
#define cmParseCacheCoverage_h
|
||||||
|
|
||||||
|
#include "cmParseMumpsCoverage.h"
|
||||||
|
|
||||||
|
/** \class cmParseCacheCoverage
|
||||||
|
* \brief Parse Cache coverage information
|
||||||
|
*
|
||||||
|
* This class is used to parse Cache coverage information for
|
||||||
|
* mumps.
|
||||||
|
*/
|
||||||
|
class cmParseCacheCoverage : public cmParseMumpsCoverage
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
cmParseCacheCoverage(cmCTestCoverageHandlerContainer& cont,
|
||||||
|
cmCTest* ctest);
|
||||||
|
protected:
|
||||||
|
// implement virtual from parent
|
||||||
|
bool LoadCoverageData(const char* dir);
|
||||||
|
// remove files with no coverage
|
||||||
|
void RemoveUnCoveredFiles();
|
||||||
|
// Read a single mcov file
|
||||||
|
bool ReadCMCovFile(const char* f);
|
||||||
|
// split a string based on ,
|
||||||
|
bool SplitString(std::vector<std::string>& args,
|
||||||
|
std::string const& line);
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
#endif
|
|
@ -0,0 +1,272 @@
|
||||||
|
#include "cmStandardIncludes.h"
|
||||||
|
#include <stdio.h>
|
||||||
|
#include <stdlib.h>
|
||||||
|
#include "cmSystemTools.h"
|
||||||
|
#include "cmParseGTMCoverage.h"
|
||||||
|
#include <cmsys/Directory.hxx>
|
||||||
|
#include <cmsys/Glob.hxx>
|
||||||
|
|
||||||
|
|
||||||
|
cmParseGTMCoverage::cmParseGTMCoverage(cmCTestCoverageHandlerContainer& cont,
|
||||||
|
cmCTest* ctest)
|
||||||
|
:cmParseMumpsCoverage(cont, ctest)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
bool cmParseGTMCoverage::LoadCoverageData(const char* d)
|
||||||
|
{
|
||||||
|
// load all the .mcov files in the specified directory
|
||||||
|
cmsys::Directory dir;
|
||||||
|
if(!dir.Load(d))
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
size_t numf;
|
||||||
|
unsigned int i;
|
||||||
|
numf = dir.GetNumberOfFiles();
|
||||||
|
for (i = 0; i < numf; i++)
|
||||||
|
{
|
||||||
|
std::string file = dir.GetFile(i);
|
||||||
|
if(file != "." && file != ".."
|
||||||
|
&& !cmSystemTools::FileIsDirectory(file.c_str()))
|
||||||
|
{
|
||||||
|
std::string path = d;
|
||||||
|
path += "/";
|
||||||
|
path += file;
|
||||||
|
if(cmSystemTools::GetFilenameLastExtension(path) == ".mcov")
|
||||||
|
{
|
||||||
|
if(!this->ReadMCovFile(path.c_str()))
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool cmParseGTMCoverage::ReadMCovFile(const char* file)
|
||||||
|
{
|
||||||
|
std::ifstream in(file);
|
||||||
|
if(!in)
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
std::string line;
|
||||||
|
std::string lastfunction;
|
||||||
|
std::string lastroutine;
|
||||||
|
std::string lastpath;
|
||||||
|
int lastoffset = 0;
|
||||||
|
while( cmSystemTools::GetLineFromStream(in, line))
|
||||||
|
{
|
||||||
|
// only look at lines that have coverage data
|
||||||
|
if(line.find("^ZZCOVERAGE") == line.npos)
|
||||||
|
{
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
std::string filepath;
|
||||||
|
std::string function;
|
||||||
|
std::string routine;
|
||||||
|
int linenumber = 0;
|
||||||
|
int count = 0;
|
||||||
|
this->ParseMCOVLine(line, routine, function, linenumber, count);
|
||||||
|
// skip this one
|
||||||
|
if(routine == "RSEL")
|
||||||
|
{
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
// no need to search the file if we just did it
|
||||||
|
if(function == lastfunction && lastroutine == routine)
|
||||||
|
{
|
||||||
|
if(lastpath.size())
|
||||||
|
{
|
||||||
|
this->Coverage.TotalCoverage[lastpath][lastoffset + linenumber]
|
||||||
|
+= count;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
cmCTestLog(this->CTest, ERROR_MESSAGE,
|
||||||
|
"Can not find mumps file : "
|
||||||
|
<< lastroutine <<
|
||||||
|
" referenced in this line of mcov data:\n"
|
||||||
|
"[" << line << "]\n");
|
||||||
|
}
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
// Find the full path to the file
|
||||||
|
bool found = this->FindMumpsFile(routine, filepath);
|
||||||
|
if(found)
|
||||||
|
{
|
||||||
|
int lineoffset;
|
||||||
|
if(this->FindFunctionInMumpsFile(filepath,
|
||||||
|
function,
|
||||||
|
lineoffset))
|
||||||
|
{
|
||||||
|
cmCTestCoverageHandlerContainer::SingleFileCoverageVector&
|
||||||
|
coverageVector = this->Coverage.TotalCoverage[filepath];
|
||||||
|
coverageVector[lineoffset + linenumber] += count;
|
||||||
|
}
|
||||||
|
lastoffset = lineoffset;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
cmCTestLog(this->CTest, ERROR_MESSAGE,
|
||||||
|
"Can not find mumps file : "
|
||||||
|
<< routine << " referenced in this line of mcov data:\n"
|
||||||
|
"[" << line << "]\n");
|
||||||
|
}
|
||||||
|
lastfunction = function;
|
||||||
|
lastroutine = routine;
|
||||||
|
lastpath = filepath;
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool cmParseGTMCoverage::FindFunctionInMumpsFile(std::string const& filepath,
|
||||||
|
std::string const& function,
|
||||||
|
int& lineoffset)
|
||||||
|
{
|
||||||
|
std::ifstream in(filepath.c_str());
|
||||||
|
if(!in)
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
std::string line;
|
||||||
|
int linenum = 0;
|
||||||
|
while( cmSystemTools::GetLineFromStream(in, line))
|
||||||
|
{
|
||||||
|
std::string::size_type pos = line.find(function.c_str());
|
||||||
|
if(pos == 0)
|
||||||
|
{
|
||||||
|
char nextchar = line[function.size()];
|
||||||
|
if(nextchar == ' ' || nextchar == '(')
|
||||||
|
{
|
||||||
|
lineoffset = linenum;
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if(pos == 1)
|
||||||
|
{
|
||||||
|
char prevchar = line[0];
|
||||||
|
char nextchar = line[function.size()+1];
|
||||||
|
if(prevchar == '%' && (nextchar == ' ' || nextchar == '('))
|
||||||
|
{
|
||||||
|
lineoffset = linenum;
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
linenum++; // move to next line count
|
||||||
|
}
|
||||||
|
lineoffset = 0;
|
||||||
|
cmCTestLog(this->CTest, ERROR_MESSAGE,
|
||||||
|
"Could not find entry point : "
|
||||||
|
<< function << " in " << filepath << "\n");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool cmParseGTMCoverage::ParseMCOVLine(std::string const& line,
|
||||||
|
std::string& routine,
|
||||||
|
std::string& function,
|
||||||
|
int& linenumber,
|
||||||
|
int& count)
|
||||||
|
{
|
||||||
|
// this method parses lines from the .mcov file
|
||||||
|
// each line has ^COVERAGE(...) in it, and there
|
||||||
|
// are several varients of coverage lines:
|
||||||
|
//
|
||||||
|
// ^COVERAGE("DIC11","PR1",0)="2:0:0:0"
|
||||||
|
// ( file , entry, line ) = "number_executed:timing_info"
|
||||||
|
// ^COVERAGE("%RSEL","SRC")="1:0:0:0"
|
||||||
|
// ( file , entry ) = "number_executed:timing_info"
|
||||||
|
// ^COVERAGE("%RSEL","init",8,"FOR_LOOP",1)=1
|
||||||
|
// ( file , entry, line, IGNORE ) =number_executed
|
||||||
|
std::vector<cmStdString> args;
|
||||||
|
std::string::size_type pos = line.find('(', 0);
|
||||||
|
// if no ( is found, then return line has no coverage
|
||||||
|
if(pos == std::string::npos)
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
std::string arg;
|
||||||
|
bool done = false;
|
||||||
|
// separate out all of the comma separated arguments found
|
||||||
|
// in the COVERAGE(...) line
|
||||||
|
while(line[pos] && !done)
|
||||||
|
{
|
||||||
|
// save the char we are looking at
|
||||||
|
char cur = line[pos];
|
||||||
|
// , or ) means end of argument
|
||||||
|
if(cur == ',' || cur == ')')
|
||||||
|
{
|
||||||
|
// save the argument into the argument vector
|
||||||
|
args.push_back(arg);
|
||||||
|
// start on a new argument
|
||||||
|
arg = "";
|
||||||
|
// if we are at the end of the ), then finish while loop
|
||||||
|
if(cur == ')')
|
||||||
|
{
|
||||||
|
done = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// all chars except ", (, and % get stored in the arg string
|
||||||
|
if(cur != '\"' && cur != '(' && cur != '%')
|
||||||
|
{
|
||||||
|
arg.append(1, line[pos]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// move to next char
|
||||||
|
pos++;
|
||||||
|
}
|
||||||
|
// now parse the right hand side of the =
|
||||||
|
pos = line.find('=');
|
||||||
|
// no = found, this is an error
|
||||||
|
if(pos == line.npos)
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
pos++; // move past =
|
||||||
|
|
||||||
|
// if the next positing is not a ", then this is a
|
||||||
|
// COVERAGE(..)=count line and turn the rest of the string
|
||||||
|
// past the = into an integer and set it to count
|
||||||
|
if(line[pos] != '\"')
|
||||||
|
{
|
||||||
|
count = atoi(line.substr(pos).c_str());
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// this means line[pos] is a ", and we have a
|
||||||
|
// COVERAGE(...)="1:0:0:0" type of line
|
||||||
|
pos++; // move past "
|
||||||
|
// find the first : past the "
|
||||||
|
std::string::size_type pos2 = line.find(':', pos);
|
||||||
|
// turn the string between the " and the first : into an integer
|
||||||
|
// and set it to count
|
||||||
|
count = atoi(line.substr(pos, pos2-pos).c_str());
|
||||||
|
}
|
||||||
|
// less then two arguments is an error
|
||||||
|
if(args.size() < 2)
|
||||||
|
{
|
||||||
|
cmCTestLog(this->CTest, ERROR_MESSAGE,
|
||||||
|
"Error parsing mcov line: [" << line << "]\n");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
routine = args[0]; // the routine is the first argument
|
||||||
|
function = args[1]; // the function in the routine is the second
|
||||||
|
// in the two argument only format
|
||||||
|
// ^COVERAGE("%RSEL","SRC"), the line offset is 0
|
||||||
|
if(args.size() == 2)
|
||||||
|
{
|
||||||
|
linenumber = 0;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// this is the format for this line
|
||||||
|
// ^COVERAGE("%RSEL","SRC",count)
|
||||||
|
linenumber = atoi(args[2].c_str());
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
|
@ -0,0 +1,49 @@
|
||||||
|
/*============================================================================
|
||||||
|
CMake - Cross Platform Makefile Generator
|
||||||
|
Copyright 2000-2009 Kitware, Inc.
|
||||||
|
|
||||||
|
Distributed under the OSI-approved BSD License (the "License");
|
||||||
|
see accompanying file Copyright.txt for details.
|
||||||
|
|
||||||
|
This software is distributed WITHOUT ANY WARRANTY; without even the
|
||||||
|
implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||||
|
See the License for more information.
|
||||||
|
============================================================================*/
|
||||||
|
|
||||||
|
#ifndef cmParseGTMCoverage_h
|
||||||
|
#define cmParseGTMCoverage_h
|
||||||
|
|
||||||
|
#include "cmParseMumpsCoverage.h"
|
||||||
|
|
||||||
|
/** \class cmParseGTMCoverage
|
||||||
|
* \brief Parse GTM coverage information
|
||||||
|
*
|
||||||
|
* This class is used to parse GTM coverage information for
|
||||||
|
* mumps.
|
||||||
|
*/
|
||||||
|
class cmParseGTMCoverage : public cmParseMumpsCoverage
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
cmParseGTMCoverage(cmCTestCoverageHandlerContainer& cont,
|
||||||
|
cmCTest* ctest);
|
||||||
|
protected:
|
||||||
|
// implement virtual from parent
|
||||||
|
bool LoadCoverageData(const char* dir);
|
||||||
|
// Read a single mcov file
|
||||||
|
bool ReadMCovFile(const char* f);
|
||||||
|
// find out what line in a mumps file (filepath) the given entry point
|
||||||
|
// or function is. lineoffset is set by this method.
|
||||||
|
bool FindFunctionInMumpsFile(std::string const& filepath,
|
||||||
|
std::string const& function,
|
||||||
|
int& lineoffset);
|
||||||
|
// parse a line from a .mcov file, and fill in the
|
||||||
|
// routine, function, linenumber and coverage count
|
||||||
|
bool ParseMCOVLine(std::string const& line,
|
||||||
|
std::string& routine,
|
||||||
|
std::string& function,
|
||||||
|
int& linenumber,
|
||||||
|
int& count);
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
#endif
|
|
@ -0,0 +1,165 @@
|
||||||
|
#include "cmStandardIncludes.h"
|
||||||
|
#include <stdio.h>
|
||||||
|
#include <stdlib.h>
|
||||||
|
#include "cmSystemTools.h"
|
||||||
|
#include "cmParseGTMCoverage.h"
|
||||||
|
#include <cmsys/Directory.hxx>
|
||||||
|
#include <cmsys/Glob.hxx>
|
||||||
|
|
||||||
|
|
||||||
|
cmParseMumpsCoverage::cmParseMumpsCoverage(
|
||||||
|
cmCTestCoverageHandlerContainer& cont,
|
||||||
|
cmCTest* ctest)
|
||||||
|
:Coverage(cont), CTest(ctest)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
cmParseMumpsCoverage::~cmParseMumpsCoverage()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
bool cmParseMumpsCoverage::ReadCoverageFile(const char* file)
|
||||||
|
{
|
||||||
|
// Read the gtm_coverage.mcov file, that has two lines of data:
|
||||||
|
// packages:/full/path/to/Vista/Packages
|
||||||
|
// coverage_dir:/full/path/to/dir/with/*.mcov
|
||||||
|
std::ifstream in(file);
|
||||||
|
if(!in)
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
std::string line;
|
||||||
|
while(cmSystemTools::GetLineFromStream(in, line))
|
||||||
|
{
|
||||||
|
std::string::size_type pos = line.find(':', 0);
|
||||||
|
std::string packages;
|
||||||
|
if(pos != std::string::npos)
|
||||||
|
{
|
||||||
|
std::string type = line.substr(0, pos);
|
||||||
|
std::string path = line.substr(pos+1);
|
||||||
|
if(type == "packages")
|
||||||
|
{
|
||||||
|
this->LoadPackages(path.c_str());
|
||||||
|
}
|
||||||
|
else if(type == "coverage_dir")
|
||||||
|
{
|
||||||
|
this->LoadCoverageData(path.c_str());
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
cmCTestLog(this->CTest, ERROR_MESSAGE,
|
||||||
|
"Parse Error in Mumps coverage file :\n"
|
||||||
|
<< file <<
|
||||||
|
"\ntype: [" << type << "]\npath:[" << path << "]\n"
|
||||||
|
"input line: [" << line << "]\n");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
void cmParseMumpsCoverage::InitializeMumpsFile(std::string& file)
|
||||||
|
{
|
||||||
|
// initialize the coverage information for a given mumps file
|
||||||
|
std::ifstream in(file.c_str());
|
||||||
|
if(!in)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
std::string line;
|
||||||
|
cmCTestCoverageHandlerContainer::SingleFileCoverageVector&
|
||||||
|
coverageVector = this->Coverage.TotalCoverage[file];
|
||||||
|
if(!cmSystemTools::GetLineFromStream(in, line))
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
// first line of a .m file can never be run
|
||||||
|
coverageVector.push_back(-1);
|
||||||
|
while( cmSystemTools::GetLineFromStream(in, line) )
|
||||||
|
{
|
||||||
|
// putting in a 0 for a line means it is executable code
|
||||||
|
// putting in a -1 for a line means it is not executable code
|
||||||
|
int val = -1; // assume line is not executable
|
||||||
|
bool found = false;
|
||||||
|
std::string::size_type i = 0;
|
||||||
|
// (1) Search for the first whitespace or semicolon character on a line.
|
||||||
|
//This will skip over labels if the line starts with one, or will simply
|
||||||
|
//be the first character on the line for non-label lines.
|
||||||
|
for(; i < line.size(); ++i)
|
||||||
|
{
|
||||||
|
if(line[i] == ' ' || line[i] == '\t' || line[i] == ';')
|
||||||
|
{
|
||||||
|
found = true;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if(found)
|
||||||
|
{
|
||||||
|
// (2) If the first character found above is whitespace then continue the
|
||||||
|
// search for the first following non-whitespace character.
|
||||||
|
if(line[i] == ' ' || line[i] == '\t')
|
||||||
|
{
|
||||||
|
while(i < line.size() && (line[i] == ' ' || line[i] == '\t'))
|
||||||
|
{
|
||||||
|
i++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// (3) If the character found is not a semicolon then the line counts for
|
||||||
|
// coverage.
|
||||||
|
if(i < line.size() && line[i] != ';')
|
||||||
|
{
|
||||||
|
val = 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
coverageVector.push_back(val);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
bool cmParseMumpsCoverage::LoadPackages(const char* d)
|
||||||
|
{
|
||||||
|
cmsys::Glob glob;
|
||||||
|
glob.RecurseOn();
|
||||||
|
std::string pat = d;
|
||||||
|
pat += "/*.m";
|
||||||
|
glob.FindFiles(pat.c_str());
|
||||||
|
std::vector<std::string>& files = glob.GetFiles();
|
||||||
|
std::vector<std::string>::iterator fileIt;
|
||||||
|
for ( fileIt = files.begin(); fileIt != files.end();
|
||||||
|
++ fileIt )
|
||||||
|
{
|
||||||
|
std::string name = cmSystemTools::GetFilenameName(*fileIt);
|
||||||
|
this->RoutineToDirectory[name.substr(0, name.size()-2)] = *fileIt;
|
||||||
|
// initialze each file, this is left out until CDash is fixed
|
||||||
|
// to handle large numbers of files
|
||||||
|
this->InitializeMumpsFile(*fileIt);
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool cmParseMumpsCoverage::FindMumpsFile(std::string const& routine,
|
||||||
|
std::string& filepath)
|
||||||
|
{
|
||||||
|
std::map<cmStdString, cmStdString>::iterator i =
|
||||||
|
this->RoutineToDirectory.find(routine);
|
||||||
|
if(i != this->RoutineToDirectory.end())
|
||||||
|
{
|
||||||
|
filepath = i->second;
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// try some alternate names
|
||||||
|
const char* tryname[] = {"GUX", "GTM", "ONT", 0};
|
||||||
|
for(int k=0; tryname[k] != 0; k++)
|
||||||
|
{
|
||||||
|
std::string routine2 = routine + tryname[k];
|
||||||
|
i = this->RoutineToDirectory.find(routine2);
|
||||||
|
if(i != this->RoutineToDirectory.end())
|
||||||
|
{
|
||||||
|
filepath = i->second;
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
|
@ -0,0 +1,52 @@
|
||||||
|
/*============================================================================
|
||||||
|
CMake - Cross Platform Makefile Generator
|
||||||
|
Copyright 2000-2009 Kitware, Inc.
|
||||||
|
|
||||||
|
Distributed under the OSI-approved BSD License (the "License");
|
||||||
|
see accompanying file Copyright.txt for details.
|
||||||
|
|
||||||
|
This software is distributed WITHOUT ANY WARRANTY; without even the
|
||||||
|
implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||||
|
See the License for more information.
|
||||||
|
============================================================================*/
|
||||||
|
|
||||||
|
#ifndef cmParseMumpsCoverage_h
|
||||||
|
#define cmParseMumpsCoverage_h
|
||||||
|
|
||||||
|
#include "cmStandardIncludes.h"
|
||||||
|
#include "cmCTestCoverageHandler.h"
|
||||||
|
|
||||||
|
/** \class cmParseMumpsCoverage
|
||||||
|
* \brief Parse Mumps coverage information
|
||||||
|
*
|
||||||
|
* This class is used as the base class for Mumps coverage
|
||||||
|
* parsing.
|
||||||
|
*/
|
||||||
|
class cmParseMumpsCoverage
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
cmParseMumpsCoverage(cmCTestCoverageHandlerContainer& cont,
|
||||||
|
cmCTest* ctest);
|
||||||
|
virtual ~cmParseMumpsCoverage();
|
||||||
|
// This is the toplevel coverage file locating the coverage files
|
||||||
|
// and the mumps source code package tree.
|
||||||
|
bool ReadCoverageFile(const char* file);
|
||||||
|
protected:
|
||||||
|
// sub classes will use this to
|
||||||
|
// load all coverage files found in the given directory
|
||||||
|
virtual bool LoadCoverageData(const char* d) = 0;
|
||||||
|
// search the package directory for mumps files and fill
|
||||||
|
// in the RoutineToDirectory map
|
||||||
|
bool LoadPackages(const char* dir);
|
||||||
|
// initialize the coverage information for a single mumps file
|
||||||
|
void InitializeMumpsFile(std::string& file);
|
||||||
|
// Find mumps file for routine
|
||||||
|
bool FindMumpsFile(std::string const& routine,
|
||||||
|
std::string& filepath);
|
||||||
|
protected:
|
||||||
|
std::map<cmStdString, cmStdString> RoutineToDirectory;
|
||||||
|
cmCTestCoverageHandlerContainer& Coverage;
|
||||||
|
cmCTest* CTest;
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif
|
|
@ -37,9 +37,6 @@ private:
|
||||||
bool ReadInt(std::ifstream& in, int& v);
|
bool ReadInt(std::ifstream& in, int& v);
|
||||||
bool ReadCoverageArray(std::ifstream& in, cmStdString const&);
|
bool ReadCoverageArray(std::ifstream& in, cmStdString const&);
|
||||||
bool ReadUntil(std::ifstream& in, char until);
|
bool ReadUntil(std::ifstream& in, char until);
|
||||||
typedef std::map<int, int> FileLineCoverage;
|
|
||||||
std::map<cmStdString, FileLineCoverage> FileToCoverage;
|
|
||||||
std::map<int, int> FileCoverage;
|
|
||||||
cmCTestCoverageHandlerContainer& Coverage;
|
cmCTestCoverageHandlerContainer& Coverage;
|
||||||
cmCTest* CTest;
|
cmCTest* CTest;
|
||||||
};
|
};
|
||||||
|
|
|
@ -20,7 +20,7 @@
|
||||||
#define FLEX_SCANNER
|
#define FLEX_SCANNER
|
||||||
#define YY_FLEX_MAJOR_VERSION 2
|
#define YY_FLEX_MAJOR_VERSION 2
|
||||||
#define YY_FLEX_MINOR_VERSION 5
|
#define YY_FLEX_MINOR_VERSION 5
|
||||||
#define YY_FLEX_SUBMINOR_VERSION 34
|
#define YY_FLEX_SUBMINOR_VERSION 35
|
||||||
#if YY_FLEX_SUBMINOR_VERSION > 0
|
#if YY_FLEX_SUBMINOR_VERSION > 0
|
||||||
#define FLEX_BETA
|
#define FLEX_BETA
|
||||||
#endif
|
#endif
|
||||||
|
@ -65,7 +65,6 @@ typedef int flex_int32_t;
|
||||||
typedef unsigned char flex_uint8_t;
|
typedef unsigned char flex_uint8_t;
|
||||||
typedef unsigned short int flex_uint16_t;
|
typedef unsigned short int flex_uint16_t;
|
||||||
typedef unsigned int flex_uint32_t;
|
typedef unsigned int flex_uint32_t;
|
||||||
#endif /* ! C99 */
|
|
||||||
|
|
||||||
/* Limits of integral types. */
|
/* Limits of integral types. */
|
||||||
#ifndef INT8_MIN
|
#ifndef INT8_MIN
|
||||||
|
@ -96,6 +95,8 @@ typedef unsigned int flex_uint32_t;
|
||||||
#define UINT32_MAX (4294967295U)
|
#define UINT32_MAX (4294967295U)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#endif /* ! C99 */
|
||||||
|
|
||||||
#endif /* ! FLEXINT_H */
|
#endif /* ! FLEXINT_H */
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
|
@ -169,7 +170,15 @@ typedef void* yyscan_t;
|
||||||
|
|
||||||
/* Size of default input buffer. */
|
/* Size of default input buffer. */
|
||||||
#ifndef YY_BUF_SIZE
|
#ifndef YY_BUF_SIZE
|
||||||
|
#ifdef __ia64__
|
||||||
|
/* On IA-64, the buffer size is 16k, not 8k.
|
||||||
|
* Moreover, YY_BUF_SIZE is 2*YY_READ_BUF_SIZE in the general case.
|
||||||
|
* Ditto for the __ia64__ case accordingly.
|
||||||
|
*/
|
||||||
|
#define YY_BUF_SIZE 32768
|
||||||
|
#else
|
||||||
#define YY_BUF_SIZE 16384
|
#define YY_BUF_SIZE 16384
|
||||||
|
#endif /* __ia64__ */
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* The state buf must be large enough to hold one state per character in the main buffer.
|
/* The state buf must be large enough to hold one state per character in the main buffer.
|
||||||
|
@ -203,13 +212,6 @@ typedef struct yy_buffer_state *YY_BUFFER_STATE;
|
||||||
|
|
||||||
#define unput(c) yyunput( c, yyg->yytext_ptr , yyscanner )
|
#define unput(c) yyunput( c, yyg->yytext_ptr , yyscanner )
|
||||||
|
|
||||||
/* The following is because we cannot portably get our hands on size_t
|
|
||||||
* (without autoconf's help, which isn't available because we want
|
|
||||||
* flex-generated scanners to compile on their own).
|
|
||||||
* Given that the standard has decreed that size_t exists since 1989,
|
|
||||||
* I guess we can afford to depend on it. Manoj.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifndef YY_TYPEDEF_YY_SIZE_T
|
#ifndef YY_TYPEDEF_YY_SIZE_T
|
||||||
#define YY_TYPEDEF_YY_SIZE_T
|
#define YY_TYPEDEF_YY_SIZE_T
|
||||||
typedef size_t yy_size_t;
|
typedef size_t yy_size_t;
|
||||||
|
@ -367,8 +369,8 @@ static void yy_fatal_error (yyconst char msg[] ,yyscan_t yyscanner );
|
||||||
*yy_cp = '\0'; \
|
*yy_cp = '\0'; \
|
||||||
yyg->yy_c_buf_p = yy_cp;
|
yyg->yy_c_buf_p = yy_cp;
|
||||||
|
|
||||||
#define YY_NUM_RULES 43
|
#define YY_NUM_RULES 44
|
||||||
#define YY_END_OF_BUFFER 44
|
#define YY_END_OF_BUFFER 45
|
||||||
/* This struct is not used in this scanner,
|
/* This struct is not used in this scanner,
|
||||||
but its presence is necessary. */
|
but its presence is necessary. */
|
||||||
struct yy_trans_info
|
struct yy_trans_info
|
||||||
|
@ -376,25 +378,26 @@ struct yy_trans_info
|
||||||
flex_int32_t yy_verify;
|
flex_int32_t yy_verify;
|
||||||
flex_int32_t yy_nxt;
|
flex_int32_t yy_nxt;
|
||||||
};
|
};
|
||||||
static yyconst flex_int16_t yy_accept[161] =
|
static yyconst flex_int16_t yy_accept[165] =
|
||||||
{ 0,
|
{ 0,
|
||||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||||
44, 38, 40, 39, 42, 1, 38, 31, 2, 33,
|
45, 39, 41, 40, 43, 1, 39, 32, 2, 34,
|
||||||
38, 39, 36, 38, 37, 38, 37, 40, 38, 39,
|
39, 40, 37, 39, 38, 39, 38, 41, 39, 40,
|
||||||
38, 37, 9, 8, 9, 4, 3, 38, 0, 10,
|
39, 38, 9, 8, 9, 4, 3, 39, 0, 10,
|
||||||
0, 0, 0, 0, 0, 31, 31, 32, 34, 36,
|
0, 0, 0, 0, 0, 32, 32, 33, 35, 37,
|
||||||
38, 37, 0, 41, 37, 0, 0, 0, 0, 0,
|
39, 38, 0, 42, 38, 0, 0, 0, 0, 0,
|
||||||
0, 0, 0, 38, 0, 11, 37, 0, 0, 5,
|
0, 0, 0, 39, 0, 11, 38, 0, 0, 5,
|
||||||
0, 0, 0, 27, 0, 0, 31, 31, 31, 31,
|
0, 0, 0, 28, 0, 0, 32, 32, 32, 32,
|
||||||
0, 0, 0, 0, 0, 21, 0, 0, 0, 0,
|
0, 0, 0, 0, 0, 22, 0, 0, 0, 0,
|
||||||
0, 6, 0, 0, 0, 0, 0, 0, 0, 0,
|
0, 6, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||||
|
|
||||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||||
0, 0, 28, 29, 0, 0, 0, 0, 0, 0,
|
0, 0, 29, 30, 0, 0, 0, 0, 0, 0,
|
||||||
0, 22, 23, 0, 0, 0, 0, 0, 0, 0,
|
0, 23, 24, 0, 0, 0, 0, 0, 0, 0,
|
||||||
0, 30, 25, 0, 0, 18, 0, 0, 24, 19,
|
0, 31, 26, 0, 0, 19, 0, 0, 25, 20,
|
||||||
0, 0, 17, 0, 0, 16, 26, 0, 0, 15,
|
0, 0, 18, 0, 0, 17, 27, 0, 0, 16,
|
||||||
20, 0, 7, 35, 7, 13, 0, 12, 14, 0
|
21, 0, 7, 36, 7, 14, 0, 13, 15, 0,
|
||||||
|
0, 0, 12, 0
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
static yyconst flex_int32_t yy_ec[256] =
|
static yyconst flex_int32_t yy_ec[256] =
|
||||||
|
@ -404,15 +407,15 @@ static yyconst flex_int32_t yy_ec[256] =
|
||||||
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
||||||
1, 5, 6, 7, 8, 9, 1, 10, 11, 1,
|
1, 5, 6, 7, 8, 9, 1, 10, 11, 1,
|
||||||
1, 12, 1, 13, 1, 1, 1, 14, 14, 14,
|
1, 12, 1, 13, 1, 1, 1, 14, 14, 14,
|
||||||
14, 14, 14, 14, 14, 14, 14, 15, 16, 1,
|
14, 14, 14, 14, 14, 14, 14, 15, 16, 17,
|
||||||
17, 18, 19, 1, 20, 20, 21, 22, 23, 24,
|
18, 19, 20, 1, 21, 21, 22, 23, 24, 25,
|
||||||
20, 20, 25, 20, 20, 26, 20, 27, 20, 20,
|
21, 21, 26, 21, 21, 27, 21, 28, 21, 21,
|
||||||
20, 20, 28, 20, 29, 20, 20, 20, 20, 20,
|
21, 21, 29, 21, 30, 21, 21, 21, 21, 21,
|
||||||
1, 30, 1, 1, 31, 1, 20, 20, 32, 33,
|
1, 31, 1, 1, 32, 1, 21, 21, 33, 34,
|
||||||
|
|
||||||
34, 35, 20, 20, 36, 20, 20, 37, 20, 38,
|
35, 36, 21, 21, 37, 21, 21, 38, 21, 39,
|
||||||
20, 20, 20, 20, 39, 20, 40, 20, 20, 20,
|
21, 21, 21, 21, 40, 21, 41, 21, 21, 21,
|
||||||
20, 20, 1, 1, 1, 1, 1, 1, 1, 1,
|
21, 21, 1, 1, 1, 1, 1, 1, 1, 1,
|
||||||
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
||||||
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
||||||
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
||||||
|
@ -429,178 +432,187 @@ static yyconst flex_int32_t yy_ec[256] =
|
||||||
1, 1, 1, 1, 1
|
1, 1, 1, 1, 1
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
static yyconst flex_int32_t yy_meta[41] =
|
static yyconst flex_int32_t yy_meta[42] =
|
||||||
{ 0,
|
{ 0,
|
||||||
1, 2, 2, 3, 4, 3, 3, 1, 1, 3,
|
1, 2, 2, 3, 4, 3, 3, 1, 1, 3,
|
||||||
3, 1, 3, 5, 1, 3, 3, 1, 1, 6,
|
3, 1, 3, 5, 1, 3, 1, 3, 6, 1,
|
||||||
6, 6, 6, 6, 6, 6, 6, 6, 6, 1,
|
7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
|
||||||
5, 6, 6, 6, 6, 6, 6, 6, 6, 6
|
1, 5, 7, 7, 7, 7, 7, 7, 7, 7,
|
||||||
|
7
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
static yyconst flex_int16_t yy_base[169] =
|
static yyconst flex_int16_t yy_base[174] =
|
||||||
{ 0,
|
{ 0,
|
||||||
0, 39, 0, 40, 184, 47, 43, 53, 55, 63,
|
0, 40, 0, 41, 188, 48, 44, 54, 56, 65,
|
||||||
186, 0, 476, 476, 164, 476, 79, 72, 476, 476,
|
186, 0, 505, 505, 171, 505, 81, 74, 505, 505,
|
||||||
143, 476, 130, 126, 0, 83, 119, 85, 149, 139,
|
158, 505, 151, 137, 0, 85, 122, 87, 153, 145,
|
||||||
189, 220, 476, 131, 89, 476, 476, 0, 132, 476,
|
194, 226, 505, 143, 91, 505, 505, 0, 142, 505,
|
||||||
259, 37, 69, 76, 34, 119, 137, 476, 0, 476,
|
266, 34, 70, 74, 34, 122, 141, 505, 0, 505,
|
||||||
121, 0, 150, 476, 0, 154, 298, 0, 75, 138,
|
112, 0, 98, 505, 0, 154, 306, 0, 43, 133,
|
||||||
142, 72, 127, 338, 94, 476, 0, 84, 158, 186,
|
139, 46, 130, 347, 130, 505, 0, 121, 163, 179,
|
||||||
81, 145, 108, 172, 147, 173, 260, 266, 284, 299,
|
104, 156, 129, 176, 147, 178, 214, 267, 273, 292,
|
||||||
272, 173, 178, 286, 245, 258, 285, 285, 78, 71,
|
279, 179, 249, 280, 257, 265, 288, 289, 116, 107,
|
||||||
207, 476, 288, 291, 296, 304, 310, 315, 317, 326,
|
317, 505, 287, 289, 291, 302, 307, 310, 307, 311,
|
||||||
|
|
||||||
330, 330, 335, 338, 338, 341, 343, 341, 348, 62,
|
316, 326, 329, 333, 332, 336, 347, 345, 349, 101,
|
||||||
52, 346, 476, 476, 353, 355, 357, 352, 359, 359,
|
86, 346, 505, 505, 350, 351, 353, 350, 357, 362,
|
||||||
359, 476, 476, 363, 365, 370, 366, 375, 46, 38,
|
362, 505, 505, 367, 369, 371, 366, 372, 56, 47,
|
||||||
378, 476, 476, 378, 381, 476, 376, 384, 476, 476,
|
374, 505, 505, 374, 379, 505, 374, 387, 505, 505,
|
||||||
384, 387, 476, 115, 0, 476, 476, 388, 393, 476,
|
387, 391, 505, 117, 0, 505, 505, 392, 394, 505,
|
||||||
476, 394, 476, 476, 476, 476, 398, 476, 476, 476,
|
505, 394, 505, 505, 505, 505, 395, 419, 505, 429,
|
||||||
432, 438, 443, 445, 451, 457, 463, 469
|
0, 25, 505, 505, 446, 453, 459, 462, 469, 476,
|
||||||
|
483, 490, 497
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
static yyconst flex_int16_t yy_def[169] =
|
static yyconst flex_int16_t yy_def[174] =
|
||||||
{ 0,
|
{ 0,
|
||||||
160, 1, 1, 1, 1, 1, 161, 161, 161, 161,
|
164, 1, 1, 1, 1, 1, 165, 165, 165, 165,
|
||||||
160, 162, 160, 160, 163, 160, 162, 160, 160, 160,
|
164, 166, 164, 164, 167, 164, 166, 164, 164, 164,
|
||||||
162, 160, 160, 162, 164, 162, 164, 160, 162, 160,
|
166, 164, 164, 166, 168, 166, 168, 164, 166, 164,
|
||||||
165, 160, 160, 160, 160, 160, 160, 162, 163, 160,
|
169, 164, 164, 164, 164, 164, 164, 166, 167, 164,
|
||||||
160, 160, 160, 160, 160, 160, 166, 160, 162, 160,
|
164, 164, 164, 164, 164, 164, 170, 164, 166, 164,
|
||||||
162, 164, 160, 160, 27, 160, 160, 57, 160, 160,
|
166, 168, 164, 164, 27, 164, 164, 57, 164, 164,
|
||||||
160, 160, 160, 165, 165, 160, 32, 160, 160, 160,
|
164, 164, 164, 169, 169, 164, 32, 164, 164, 164,
|
||||||
160, 160, 160, 160, 160, 160, 166, 166, 166, 166,
|
164, 164, 164, 164, 164, 164, 170, 170, 170, 170,
|
||||||
160, 160, 160, 160, 160, 160, 160, 160, 160, 160,
|
164, 164, 164, 164, 164, 164, 164, 164, 164, 164,
|
||||||
160, 160, 160, 160, 160, 160, 160, 160, 160, 160,
|
164, 164, 164, 164, 164, 164, 164, 164, 164, 164,
|
||||||
|
|
||||||
160, 160, 160, 160, 160, 160, 160, 160, 160, 160,
|
164, 164, 164, 164, 164, 164, 164, 164, 164, 164,
|
||||||
160, 160, 160, 160, 160, 160, 160, 160, 160, 160,
|
164, 164, 164, 164, 164, 164, 164, 164, 164, 164,
|
||||||
160, 160, 160, 160, 160, 160, 160, 160, 160, 160,
|
164, 164, 164, 164, 164, 164, 164, 164, 164, 164,
|
||||||
160, 160, 160, 160, 160, 160, 160, 160, 160, 160,
|
164, 164, 164, 164, 164, 164, 164, 164, 164, 164,
|
||||||
160, 160, 160, 167, 168, 160, 160, 160, 160, 160,
|
164, 164, 164, 171, 172, 164, 164, 164, 164, 164,
|
||||||
160, 160, 160, 160, 160, 160, 160, 160, 160, 0,
|
164, 164, 164, 164, 164, 164, 164, 164, 164, 164,
|
||||||
160, 160, 160, 160, 160, 160, 160, 160
|
173, 173, 164, 0, 164, 164, 164, 164, 164, 164,
|
||||||
|
164, 164, 164
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
static yyconst flex_int16_t yy_nxt[517] =
|
static yyconst flex_int16_t yy_nxt[547] =
|
||||||
{ 0,
|
{ 0,
|
||||||
12, 13, 14, 13, 13, 15, 16, 12, 17, 18,
|
12, 13, 14, 13, 13, 15, 16, 12, 17, 18,
|
||||||
19, 12, 20, 12, 21, 22, 23, 12, 24, 25,
|
19, 12, 20, 12, 21, 22, 12, 23, 12, 24,
|
||||||
25, 25, 25, 25, 25, 25, 25, 25, 25, 26,
|
25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
|
||||||
27, 25, 25, 25, 25, 25, 25, 25, 25, 25,
|
26, 27, 25, 25, 25, 25, 25, 25, 25, 25,
|
||||||
28, 28, 145, 28, 28, 34, 29, 29, 28, 30,
|
25, 28, 28, 163, 28, 28, 34, 29, 29, 28,
|
||||||
144, 28, 35, 36, 29, 34, 130, 34, 31, 71,
|
30, 145, 28, 35, 36, 29, 34, 71, 34, 31,
|
||||||
76, 37, 35, 36, 35, 34, 129, 32, 32, 37,
|
144, 76, 37, 35, 36, 35, 83, 34, 71, 32,
|
||||||
71, 76, 35, 46, 46, 111, 46, 47, 32, 32,
|
32, 37, 76, 88, 35, 46, 46, 83, 46, 47,
|
||||||
41, 48, 110, 41, 53, 54, 56, 53, 90, 56,
|
32, 32, 41, 48, 88, 41, 53, 54, 56, 53,
|
||||||
69, 70, 57, 69, 72, 73, 66, 83, 88, 74,
|
130, 56, 69, 70, 57, 69, 72, 73, 74, 53,
|
||||||
|
|
||||||
42, 43, 75, 44, 93, 72, 73, 45, 83, 88,
|
54, 75, 53, 42, 43, 129, 44, 72, 73, 74,
|
||||||
74, 42, 43, 75, 44, 93, 154, 154, 45, 38,
|
45, 111, 75, 81, 42, 43, 81, 44, 154, 154,
|
||||||
46, 46, 81, 46, 47, 81, 38, 38, 48, 96,
|
110, 45, 38, 46, 46, 90, 46, 47, 93, 38,
|
||||||
38, 89, 55, 38, 40, 68, 38, 38, 78, 46,
|
38, 48, 66, 38, 89, 55, 38, 82, 38, 93,
|
||||||
96, 78, 79, 63, 51, 82, 80, 50, 38, 55,
|
38, 38, 78, 46, 40, 78, 79, 68, 82, 63,
|
||||||
58, 53, 54, 58, 53, 56, 82, 49, 56, 69,
|
80, 96, 38, 55, 58, 56, 51, 58, 56, 84,
|
||||||
70, 57, 69, 84, 85, 86, 40, 99, 87, 94,
|
85, 57, 96, 86, 69, 70, 87, 69, 99, 50,
|
||||||
59, 60, 95, 61, 84, 85, 86, 62, 99, 87,
|
84, 85, 49, 40, 86, 59, 60, 87, 61, 99,
|
||||||
94, 59, 60, 95, 61, 160, 30, 91, 62, 64,
|
91, 94, 62, 91, 95, 164, 59, 60, 92, 61,
|
||||||
91, 66, 160, 97, 100, 92, 64, 64, 98, 101,
|
30, 164, 94, 62, 64, 95, 66, 164, 97, 164,
|
||||||
|
|
||||||
64, 102, 64, 64, 97, 100, 64, 64, 91, 98,
|
100, 64, 64, 98, 164, 64, 101, 64, 64, 97,
|
||||||
101, 91, 102, 160, 160, 160, 92, 160, 64, 64,
|
64, 100, 64, 64, 98, 78, 46, 101, 78, 79,
|
||||||
65, 65, 66, 65, 65, 65, 65, 65, 65, 65,
|
164, 164, 164, 80, 64, 64, 65, 65, 66, 65,
|
||||||
65, 65, 65, 67, 65, 65, 65, 65, 65, 67,
|
65, 65, 65, 65, 65, 65, 65, 65, 65, 67,
|
||||||
67, 67, 67, 67, 67, 67, 67, 67, 67, 65,
|
65, 65, 65, 65, 65, 65, 67, 67, 67, 67,
|
||||||
67, 67, 67, 67, 67, 67, 67, 67, 67, 67,
|
67, 67, 67, 67, 67, 67, 65, 67, 67, 67,
|
||||||
41, 78, 46, 41, 78, 79, 105, 78, 46, 80,
|
67, 67, 67, 67, 67, 67, 67, 41, 78, 46,
|
||||||
78, 79, 160, 81, 160, 80, 81, 105, 160, 106,
|
41, 78, 79, 102, 78, 46, 80, 78, 79, 105,
|
||||||
42, 43, 160, 44, 107, 78, 46, 45, 78, 79,
|
81, 164, 80, 81, 102, 164, 164, 106, 42, 43,
|
||||||
106, 42, 43, 80, 44, 107, 82, 160, 45, 58,
|
105, 44, 107, 78, 46, 45, 78, 79, 106, 42,
|
||||||
|
|
||||||
78, 46, 58, 78, 79, 108, 109, 82, 80, 160,
|
43, 80, 44, 107, 82, 103, 45, 58, 104, 108,
|
||||||
103, 160, 112, 104, 113, 160, 108, 109, 114, 59,
|
58, 109, 112, 113, 114, 82, 103, 164, 91, 104,
|
||||||
60, 103, 61, 112, 104, 113, 62, 160, 115, 114,
|
108, 91, 109, 112, 113, 114, 92, 115, 59, 60,
|
||||||
59, 60, 116, 61, 160, 160, 117, 62, 64, 115,
|
116, 61, 117, 118, 119, 62, 164, 120, 115, 59,
|
||||||
66, 160, 118, 116, 160, 64, 64, 117, 119, 64,
|
60, 116, 61, 117, 118, 119, 62, 64, 120, 66,
|
||||||
120, 64, 64, 118, 121, 64, 64, 160, 122, 119,
|
164, 121, 164, 122, 64, 64, 123, 124, 64, 125,
|
||||||
123, 120, 124, 125, 126, 121, 127, 64, 64, 122,
|
64, 64, 121, 64, 122, 64, 64, 123, 124, 126,
|
||||||
128, 123, 131, 124, 125, 126, 132, 127, 133, 134,
|
125, 127, 128, 131, 132, 133, 134, 64, 64, 135,
|
||||||
135, 128, 136, 131, 137, 138, 139, 132, 140, 133,
|
126, 136, 127, 128, 131, 132, 133, 134, 137, 138,
|
||||||
134, 135, 141, 136, 142, 137, 138, 139, 143, 140,
|
135, 139, 136, 140, 141, 142, 143, 146, 147, 137,
|
||||||
|
|
||||||
146, 147, 148, 141, 149, 142, 150, 151, 152, 143,
|
138, 148, 139, 149, 140, 141, 142, 143, 146, 147,
|
||||||
156, 146, 147, 148, 157, 149, 158, 150, 151, 152,
|
150, 151, 148, 152, 149, 156, 157, 158, 159, 164,
|
||||||
159, 156, 160, 160, 160, 157, 160, 158, 160, 160,
|
160, 150, 151, 160, 152, 164, 156, 157, 158, 159,
|
||||||
160, 159, 33, 33, 33, 33, 33, 33, 38, 160,
|
160, 164, 164, 160, 164, 161, 164, 164, 164, 164,
|
||||||
160, 160, 38, 39, 39, 39, 39, 39, 39, 52,
|
164, 164, 164, 164, 164, 161, 33, 33, 33, 33,
|
||||||
52, 65, 65, 65, 65, 65, 65, 77, 77, 77,
|
33, 33, 33, 38, 164, 164, 164, 38, 38, 39,
|
||||||
77, 77, 77, 153, 153, 153, 160, 153, 153, 155,
|
39, 39, 39, 39, 39, 39, 52, 164, 52, 65,
|
||||||
160, 155, 160, 155, 155, 11, 160, 160, 160, 160,
|
65, 65, 65, 65, 65, 65, 77, 77, 77, 77,
|
||||||
160, 160, 160, 160, 160, 160, 160, 160, 160, 160,
|
77, 77, 77, 153, 153, 153, 164, 153, 153, 153,
|
||||||
160, 160, 160, 160, 160, 160, 160, 160, 160, 160,
|
155, 164, 155, 164, 155, 155, 155, 162, 162, 162,
|
||||||
|
|
||||||
160, 160, 160, 160, 160, 160, 160, 160, 160, 160,
|
162, 162, 164, 162, 11, 164, 164, 164, 164, 164,
|
||||||
160, 160, 160, 160, 160, 160
|
164, 164, 164, 164, 164, 164, 164, 164, 164, 164,
|
||||||
|
164, 164, 164, 164, 164, 164, 164, 164, 164, 164,
|
||||||
|
164, 164, 164, 164, 164, 164, 164, 164, 164, 164,
|
||||||
|
164, 164, 164, 164, 164, 164
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
static yyconst flex_int16_t yy_chk[517] =
|
static yyconst flex_int16_t yy_chk[547] =
|
||||||
{ 0,
|
{ 0,
|
||||||
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
||||||
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
||||||
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
||||||
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
||||||
2, 4, 130, 2, 4, 7, 2, 4, 6, 6,
|
1, 2, 4, 162, 2, 4, 7, 2, 4, 6,
|
||||||
129, 6, 7, 7, 6, 8, 111, 9, 6, 42,
|
6, 130, 6, 7, 7, 6, 8, 42, 9, 6,
|
||||||
45, 9, 8, 8, 9, 10, 110, 6, 6, 10,
|
129, 45, 9, 8, 8, 9, 59, 10, 42, 6,
|
||||||
42, 45, 10, 18, 18, 90, 18, 18, 6, 6,
|
6, 10, 45, 62, 10, 18, 18, 59, 18, 18,
|
||||||
17, 18, 89, 17, 26, 26, 28, 26, 68, 28,
|
6, 6, 17, 18, 62, 17, 26, 26, 28, 26,
|
||||||
35, 35, 28, 35, 43, 43, 65, 59, 62, 44,
|
111, 28, 35, 35, 28, 35, 43, 43, 44, 53,
|
||||||
|
|
||||||
17, 17, 44, 17, 71, 43, 43, 17, 59, 62,
|
53, 44, 53, 17, 17, 110, 17, 43, 43, 44,
|
||||||
44, 17, 17, 44, 17, 71, 144, 144, 17, 27,
|
17, 90, 44, 51, 17, 17, 51, 17, 144, 144,
|
||||||
46, 46, 51, 46, 46, 51, 27, 27, 46, 73,
|
89, 17, 27, 46, 46, 68, 46, 46, 71, 27,
|
||||||
27, 63, 27, 27, 39, 34, 27, 27, 47, 47,
|
27, 46, 65, 27, 63, 27, 27, 51, 27, 71,
|
||||||
73, 47, 47, 30, 24, 51, 47, 23, 27, 27,
|
27, 27, 47, 47, 39, 47, 47, 34, 51, 30,
|
||||||
29, 53, 53, 29, 53, 56, 51, 21, 56, 69,
|
47, 73, 27, 27, 29, 56, 24, 29, 56, 60,
|
||||||
69, 56, 69, 60, 60, 61, 15, 75, 61, 72,
|
60, 56, 73, 61, 69, 69, 61, 69, 75, 23,
|
||||||
29, 29, 72, 29, 60, 60, 61, 29, 75, 61,
|
60, 60, 21, 15, 61, 29, 29, 61, 29, 75,
|
||||||
72, 29, 29, 72, 29, 11, 5, 70, 29, 31,
|
70, 72, 29, 70, 72, 11, 29, 29, 70, 29,
|
||||||
70, 31, 0, 74, 76, 70, 31, 31, 74, 82,
|
5, 0, 72, 29, 31, 72, 31, 0, 74, 0,
|
||||||
|
|
||||||
31, 83, 31, 31, 74, 76, 31, 31, 91, 74,
|
76, 31, 31, 74, 0, 31, 82, 31, 31, 74,
|
||||||
82, 91, 83, 0, 0, 0, 91, 0, 31, 31,
|
31, 76, 31, 31, 74, 77, 77, 82, 77, 77,
|
||||||
|
0, 0, 0, 77, 31, 31, 32, 32, 32, 32,
|
||||||
32, 32, 32, 32, 32, 32, 32, 32, 32, 32,
|
32, 32, 32, 32, 32, 32, 32, 32, 32, 32,
|
||||||
32, 32, 32, 32, 32, 32, 32, 32, 32, 32,
|
32, 32, 32, 32, 32, 32, 32, 32, 32, 32,
|
||||||
32, 32, 32, 32, 32, 32, 32, 32, 32, 32,
|
32, 32, 32, 32, 32, 32, 32, 32, 32, 32,
|
||||||
32, 32, 32, 32, 32, 32, 32, 32, 32, 32,
|
32, 32, 32, 32, 32, 32, 32, 41, 78, 78,
|
||||||
41, 77, 77, 41, 77, 77, 85, 78, 78, 77,
|
41, 78, 78, 83, 79, 79, 78, 79, 79, 85,
|
||||||
78, 78, 0, 81, 0, 78, 81, 85, 0, 86,
|
81, 0, 79, 81, 83, 0, 0, 86, 41, 41,
|
||||||
41, 41, 0, 41, 86, 79, 79, 41, 79, 79,
|
85, 41, 86, 80, 80, 41, 80, 80, 86, 41,
|
||||||
86, 41, 41, 79, 41, 86, 81, 0, 41, 57,
|
|
||||||
|
|
||||||
80, 80, 57, 80, 80, 87, 88, 81, 80, 0,
|
41, 80, 41, 86, 81, 84, 41, 57, 84, 87,
|
||||||
84, 0, 93, 84, 94, 0, 87, 88, 95, 57,
|
57, 88, 93, 94, 95, 81, 84, 0, 91, 84,
|
||||||
57, 84, 57, 93, 84, 94, 57, 0, 96, 95,
|
87, 91, 88, 93, 94, 95, 91, 96, 57, 57,
|
||||||
57, 57, 97, 57, 0, 0, 98, 57, 64, 96,
|
97, 57, 98, 99, 100, 57, 0, 101, 96, 57,
|
||||||
64, 0, 99, 97, 0, 64, 64, 98, 100, 64,
|
57, 97, 57, 98, 99, 100, 57, 64, 101, 64,
|
||||||
101, 64, 64, 99, 102, 64, 64, 0, 103, 100,
|
0, 102, 0, 103, 64, 64, 104, 105, 64, 106,
|
||||||
104, 101, 105, 106, 107, 102, 108, 64, 64, 103,
|
64, 64, 102, 64, 103, 64, 64, 104, 105, 107,
|
||||||
109, 104, 112, 105, 106, 107, 115, 108, 116, 117,
|
106, 108, 109, 112, 115, 116, 117, 64, 64, 118,
|
||||||
118, 109, 119, 112, 120, 121, 124, 115, 125, 116,
|
107, 119, 108, 109, 112, 115, 116, 117, 120, 121,
|
||||||
117, 118, 126, 119, 127, 120, 121, 124, 128, 125,
|
118, 124, 119, 125, 126, 127, 128, 131, 134, 120,
|
||||||
|
|
||||||
131, 134, 135, 126, 137, 127, 138, 141, 142, 128,
|
121, 135, 124, 137, 125, 126, 127, 128, 131, 134,
|
||||||
148, 131, 134, 135, 149, 137, 152, 138, 141, 142,
|
138, 141, 135, 142, 137, 148, 149, 152, 157, 0,
|
||||||
157, 148, 0, 0, 0, 149, 0, 152, 0, 0,
|
158, 138, 141, 158, 142, 0, 148, 149, 152, 157,
|
||||||
0, 157, 161, 161, 161, 161, 161, 161, 162, 0,
|
160, 0, 0, 160, 0, 158, 0, 0, 0, 0,
|
||||||
0, 0, 162, 163, 163, 163, 163, 163, 163, 164,
|
0, 0, 0, 0, 0, 160, 165, 165, 165, 165,
|
||||||
164, 165, 165, 165, 165, 165, 165, 166, 166, 166,
|
165, 165, 165, 166, 0, 0, 0, 166, 166, 167,
|
||||||
166, 166, 166, 167, 167, 167, 0, 167, 167, 168,
|
167, 167, 167, 167, 167, 167, 168, 0, 168, 169,
|
||||||
0, 168, 0, 168, 168, 160, 160, 160, 160, 160,
|
169, 169, 169, 169, 169, 169, 170, 170, 170, 170,
|
||||||
160, 160, 160, 160, 160, 160, 160, 160, 160, 160,
|
170, 170, 170, 171, 171, 171, 0, 171, 171, 171,
|
||||||
160, 160, 160, 160, 160, 160, 160, 160, 160, 160,
|
172, 0, 172, 0, 172, 172, 172, 173, 173, 173,
|
||||||
|
|
||||||
160, 160, 160, 160, 160, 160, 160, 160, 160, 160,
|
173, 173, 0, 173, 164, 164, 164, 164, 164, 164,
|
||||||
160, 160, 160, 160, 160, 160
|
164, 164, 164, 164, 164, 164, 164, 164, 164, 164,
|
||||||
|
164, 164, 164, 164, 164, 164, 164, 164, 164, 164,
|
||||||
|
164, 164, 164, 164, 164, 164, 164, 164, 164, 164,
|
||||||
|
164, 164, 164, 164, 164, 164
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
/* The intent behind this definition is that it'll catch
|
/* The intent behind this definition is that it'll catch
|
||||||
|
@ -673,7 +685,7 @@ Modify cmDependsFortranLexer.h:
|
||||||
/*--------------------------------------------------------------------------*/
|
/*--------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
|
||||||
#line 670 "cmDependsFortranLexer.cxx"
|
#line 678 "cmDependsFortranLexer.cxx"
|
||||||
|
|
||||||
#define INITIAL 0
|
#define INITIAL 0
|
||||||
#define free_fmt 1
|
#define free_fmt 1
|
||||||
|
@ -796,7 +808,12 @@ static int input (yyscan_t yyscanner );
|
||||||
|
|
||||||
/* Amount of stuff to slurp up with each read. */
|
/* Amount of stuff to slurp up with each read. */
|
||||||
#ifndef YY_READ_BUF_SIZE
|
#ifndef YY_READ_BUF_SIZE
|
||||||
|
#ifdef __ia64__
|
||||||
|
/* On IA-64, the buffer size is 16k, not 8k */
|
||||||
|
#define YY_READ_BUF_SIZE 16384
|
||||||
|
#else
|
||||||
#define YY_READ_BUF_SIZE 8192
|
#define YY_READ_BUF_SIZE 8192
|
||||||
|
#endif /* __ia64__ */
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Copy whatever the last rule matched to the standard output. */
|
/* Copy whatever the last rule matched to the standard output. */
|
||||||
|
@ -804,7 +821,7 @@ static int input (yyscan_t yyscanner );
|
||||||
/* This used to be an fputs(), but since the string might contain NUL's,
|
/* This used to be an fputs(), but since the string might contain NUL's,
|
||||||
* we now use fwrite().
|
* we now use fwrite().
|
||||||
*/
|
*/
|
||||||
#define ECHO fwrite( yytext, yyleng, 1, yyout )
|
#define ECHO do { if (fwrite( yytext, yyleng, 1, yyout )) {} } while (0)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Gets input and stuffs it into "buf". number of characters read, or YY_NULL,
|
/* Gets input and stuffs it into "buf". number of characters read, or YY_NULL,
|
||||||
|
@ -815,7 +832,7 @@ static int input (yyscan_t yyscanner );
|
||||||
if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \
|
if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \
|
||||||
{ \
|
{ \
|
||||||
int c = '*'; \
|
int c = '*'; \
|
||||||
int n; \
|
size_t n; \
|
||||||
for ( n = 0; n < max_size && \
|
for ( n = 0; n < max_size && \
|
||||||
(c = getc( yyin )) != EOF && c != '\n'; ++n ) \
|
(c = getc( yyin )) != EOF && c != '\n'; ++n ) \
|
||||||
buf[n] = (char) c; \
|
buf[n] = (char) c; \
|
||||||
|
@ -901,10 +918,10 @@ YY_DECL
|
||||||
register int yy_act;
|
register int yy_act;
|
||||||
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
|
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
|
||||||
|
|
||||||
#line 75 "cmDependsFortranLexer.in.l"
|
#line 71 "cmDependsFortranLexer.in.l"
|
||||||
|
|
||||||
|
|
||||||
#line 901 "cmDependsFortranLexer.cxx"
|
#line 914 "cmDependsFortranLexer.cxx"
|
||||||
|
|
||||||
if ( !yyg->yy_init )
|
if ( !yyg->yy_init )
|
||||||
{
|
{
|
||||||
|
@ -958,13 +975,13 @@ yy_match:
|
||||||
while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
|
while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
|
||||||
{
|
{
|
||||||
yy_current_state = (int) yy_def[yy_current_state];
|
yy_current_state = (int) yy_def[yy_current_state];
|
||||||
if ( yy_current_state >= 161 )
|
if ( yy_current_state >= 165 )
|
||||||
yy_c = yy_meta[(unsigned int) yy_c];
|
yy_c = yy_meta[(unsigned int) yy_c];
|
||||||
}
|
}
|
||||||
yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
|
yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
|
||||||
++yy_cp;
|
++yy_cp;
|
||||||
}
|
}
|
||||||
while ( yy_base[yy_current_state] != 476 );
|
while ( yy_base[yy_current_state] != 505 );
|
||||||
|
|
||||||
yy_find_action:
|
yy_find_action:
|
||||||
yy_act = yy_accept[yy_current_state];
|
yy_act = yy_accept[yy_current_state];
|
||||||
|
@ -990,7 +1007,7 @@ do_action: /* This label is used only to access EOF actions. */
|
||||||
|
|
||||||
case 1:
|
case 1:
|
||||||
YY_RULE_SETUP
|
YY_RULE_SETUP
|
||||||
#line 77 "cmDependsFortranLexer.in.l"
|
#line 73 "cmDependsFortranLexer.in.l"
|
||||||
{
|
{
|
||||||
cmDependsFortranParser_StringStart(yyextra);
|
cmDependsFortranParser_StringStart(yyextra);
|
||||||
cmDependsFortranParser_SetOldStartcond(yyextra, YY_START);
|
cmDependsFortranParser_SetOldStartcond(yyextra, YY_START);
|
||||||
|
@ -999,7 +1016,7 @@ YY_RULE_SETUP
|
||||||
YY_BREAK
|
YY_BREAK
|
||||||
case 2:
|
case 2:
|
||||||
YY_RULE_SETUP
|
YY_RULE_SETUP
|
||||||
#line 83 "cmDependsFortranLexer.in.l"
|
#line 79 "cmDependsFortranLexer.in.l"
|
||||||
{
|
{
|
||||||
cmDependsFortranParser_StringStart(yyextra);
|
cmDependsFortranParser_StringStart(yyextra);
|
||||||
cmDependsFortranParser_SetOldStartcond(yyextra, YY_START);
|
cmDependsFortranParser_SetOldStartcond(yyextra, YY_START);
|
||||||
|
@ -1007,10 +1024,10 @@ YY_RULE_SETUP
|
||||||
}
|
}
|
||||||
YY_BREAK
|
YY_BREAK
|
||||||
case 3:
|
case 3:
|
||||||
#line 90 "cmDependsFortranLexer.in.l"
|
#line 86 "cmDependsFortranLexer.in.l"
|
||||||
case 4:
|
case 4:
|
||||||
YY_RULE_SETUP
|
YY_RULE_SETUP
|
||||||
#line 90 "cmDependsFortranLexer.in.l"
|
#line 86 "cmDependsFortranLexer.in.l"
|
||||||
{
|
{
|
||||||
BEGIN(cmDependsFortranParser_GetOldStartcond(yyextra) );
|
BEGIN(cmDependsFortranParser_GetOldStartcond(yyextra) );
|
||||||
yylvalp->string = strdup(cmDependsFortranParser_StringEnd(yyextra));
|
yylvalp->string = strdup(cmDependsFortranParser_StringEnd(yyextra));
|
||||||
|
@ -1018,17 +1035,17 @@ YY_RULE_SETUP
|
||||||
}
|
}
|
||||||
case 5:
|
case 5:
|
||||||
/* rule 5 can match eol */
|
/* rule 5 can match eol */
|
||||||
#line 97 "cmDependsFortranLexer.in.l"
|
#line 93 "cmDependsFortranLexer.in.l"
|
||||||
case 6:
|
case 6:
|
||||||
/* rule 6 can match eol */
|
/* rule 6 can match eol */
|
||||||
YY_RULE_SETUP
|
YY_RULE_SETUP
|
||||||
#line 97 "cmDependsFortranLexer.in.l"
|
#line 93 "cmDependsFortranLexer.in.l"
|
||||||
/* Ignore (continued strings, free fmt) */
|
/* Ignore (continued strings, free fmt) */
|
||||||
YY_BREAK
|
YY_BREAK
|
||||||
case 7:
|
case 7:
|
||||||
/* rule 7 can match eol */
|
/* rule 7 can match eol */
|
||||||
YY_RULE_SETUP
|
YY_RULE_SETUP
|
||||||
#line 99 "cmDependsFortranLexer.in.l"
|
#line 95 "cmDependsFortranLexer.in.l"
|
||||||
{
|
{
|
||||||
if (cmDependsFortranParser_GetOldStartcond(yyextra) == fixed_fmt)
|
if (cmDependsFortranParser_GetOldStartcond(yyextra) == fixed_fmt)
|
||||||
; /* Ignore (cont. strings, fixed fmt) */
|
; /* Ignore (cont. strings, fixed fmt) */
|
||||||
|
@ -1041,7 +1058,7 @@ YY_RULE_SETUP
|
||||||
case 8:
|
case 8:
|
||||||
/* rule 8 can match eol */
|
/* rule 8 can match eol */
|
||||||
YY_RULE_SETUP
|
YY_RULE_SETUP
|
||||||
#line 109 "cmDependsFortranLexer.in.l"
|
#line 105 "cmDependsFortranLexer.in.l"
|
||||||
{
|
{
|
||||||
unput ('\n');
|
unput ('\n');
|
||||||
BEGIN(INITIAL);
|
BEGIN(INITIAL);
|
||||||
|
@ -1049,7 +1066,7 @@ YY_RULE_SETUP
|
||||||
}
|
}
|
||||||
case 9:
|
case 9:
|
||||||
YY_RULE_SETUP
|
YY_RULE_SETUP
|
||||||
#line 115 "cmDependsFortranLexer.in.l"
|
#line 111 "cmDependsFortranLexer.in.l"
|
||||||
{
|
{
|
||||||
cmDependsFortranParser_StringAppend(yyextra, yytext[0]);
|
cmDependsFortranParser_StringAppend(yyextra, yytext[0]);
|
||||||
}
|
}
|
||||||
|
@ -1057,96 +1074,99 @@ YY_RULE_SETUP
|
||||||
case 10:
|
case 10:
|
||||||
/* rule 10 can match eol */
|
/* rule 10 can match eol */
|
||||||
YY_RULE_SETUP
|
YY_RULE_SETUP
|
||||||
#line 119 "cmDependsFortranLexer.in.l"
|
#line 115 "cmDependsFortranLexer.in.l"
|
||||||
{ return EOSTMT; } /* Treat comments like */
|
{ return EOSTMT; } /* Treat comments like */
|
||||||
case 11:
|
case 11:
|
||||||
/* rule 11 can match eol */
|
/* rule 11 can match eol */
|
||||||
YY_RULE_SETUP
|
YY_RULE_SETUP
|
||||||
#line 120 "cmDependsFortranLexer.in.l"
|
#line 116 "cmDependsFortranLexer.in.l"
|
||||||
{ return EOSTMT; } /* empty lines */
|
{ return EOSTMT; } /* empty lines */
|
||||||
case 12:
|
case 12:
|
||||||
|
/* rule 12 can match eol */
|
||||||
YY_RULE_SETUP
|
YY_RULE_SETUP
|
||||||
#line 122 "cmDependsFortranLexer.in.l"
|
#line 118 "cmDependsFortranLexer.in.l"
|
||||||
{ return CPP_INCLUDE; }
|
{
|
||||||
|
yytext[yyleng-1] = 0;
|
||||||
|
yylvalp->string = strdup(strchr(yytext, '<')+1);
|
||||||
|
return CPP_INCLUDE_ANGLE;
|
||||||
|
}
|
||||||
case 13:
|
case 13:
|
||||||
YY_RULE_SETUP
|
YY_RULE_SETUP
|
||||||
#line 123 "cmDependsFortranLexer.in.l"
|
#line 123 "cmDependsFortranLexer.in.l"
|
||||||
{ return F90PPR_INCLUDE; }
|
{ return CPP_INCLUDE; }
|
||||||
case 14:
|
case 14:
|
||||||
YY_RULE_SETUP
|
YY_RULE_SETUP
|
||||||
#line 124 "cmDependsFortranLexer.in.l"
|
#line 124 "cmDependsFortranLexer.in.l"
|
||||||
{ return COCO_INCLUDE; }
|
{ return F90PPR_INCLUDE; }
|
||||||
case 15:
|
case 15:
|
||||||
YY_RULE_SETUP
|
YY_RULE_SETUP
|
||||||
#line 126 "cmDependsFortranLexer.in.l"
|
#line 125 "cmDependsFortranLexer.in.l"
|
||||||
{ return CPP_DEFINE; }
|
{ return COCO_INCLUDE; }
|
||||||
case 16:
|
case 16:
|
||||||
YY_RULE_SETUP
|
YY_RULE_SETUP
|
||||||
#line 127 "cmDependsFortranLexer.in.l"
|
#line 127 "cmDependsFortranLexer.in.l"
|
||||||
{ return F90PPR_DEFINE; }
|
{ return CPP_DEFINE; }
|
||||||
case 17:
|
case 17:
|
||||||
YY_RULE_SETUP
|
YY_RULE_SETUP
|
||||||
#line 129 "cmDependsFortranLexer.in.l"
|
#line 128 "cmDependsFortranLexer.in.l"
|
||||||
{ return CPP_UNDEF; }
|
{ return F90PPR_DEFINE; }
|
||||||
case 18:
|
case 18:
|
||||||
YY_RULE_SETUP
|
YY_RULE_SETUP
|
||||||
#line 130 "cmDependsFortranLexer.in.l"
|
#line 130 "cmDependsFortranLexer.in.l"
|
||||||
{ return F90PPR_UNDEF; }
|
{ return CPP_UNDEF; }
|
||||||
case 19:
|
case 19:
|
||||||
YY_RULE_SETUP
|
YY_RULE_SETUP
|
||||||
#line 132 "cmDependsFortranLexer.in.l"
|
#line 131 "cmDependsFortranLexer.in.l"
|
||||||
{ return CPP_IFDEF; }
|
{ return F90PPR_UNDEF; }
|
||||||
case 20:
|
case 20:
|
||||||
YY_RULE_SETUP
|
YY_RULE_SETUP
|
||||||
#line 133 "cmDependsFortranLexer.in.l"
|
#line 133 "cmDependsFortranLexer.in.l"
|
||||||
{ return CPP_IFNDEF; }
|
{ return CPP_IFDEF; }
|
||||||
case 21:
|
case 21:
|
||||||
YY_RULE_SETUP
|
YY_RULE_SETUP
|
||||||
#line 134 "cmDependsFortranLexer.in.l"
|
#line 134 "cmDependsFortranLexer.in.l"
|
||||||
{ return CPP_IF; }
|
{ return CPP_IFNDEF; }
|
||||||
case 22:
|
case 22:
|
||||||
YY_RULE_SETUP
|
YY_RULE_SETUP
|
||||||
#line 135 "cmDependsFortranLexer.in.l"
|
#line 135 "cmDependsFortranLexer.in.l"
|
||||||
{ return CPP_ELIF; }
|
{ return CPP_IF; }
|
||||||
case 23:
|
case 23:
|
||||||
YY_RULE_SETUP
|
YY_RULE_SETUP
|
||||||
#line 136 "cmDependsFortranLexer.in.l"
|
#line 136 "cmDependsFortranLexer.in.l"
|
||||||
{ return CPP_ELSE; }
|
{ return CPP_ELIF; }
|
||||||
case 24:
|
case 24:
|
||||||
YY_RULE_SETUP
|
YY_RULE_SETUP
|
||||||
#line 137 "cmDependsFortranLexer.in.l"
|
#line 137 "cmDependsFortranLexer.in.l"
|
||||||
{ return CPP_ENDIF; }
|
{ return CPP_ELSE; }
|
||||||
case 25:
|
case 25:
|
||||||
YY_RULE_SETUP
|
YY_RULE_SETUP
|
||||||
#line 139 "cmDependsFortranLexer.in.l"
|
#line 138 "cmDependsFortranLexer.in.l"
|
||||||
{ return F90PPR_IFDEF; }
|
{ return CPP_ENDIF; }
|
||||||
case 26:
|
case 26:
|
||||||
YY_RULE_SETUP
|
YY_RULE_SETUP
|
||||||
#line 140 "cmDependsFortranLexer.in.l"
|
#line 140 "cmDependsFortranLexer.in.l"
|
||||||
{ return F90PPR_IFNDEF; }
|
{ return F90PPR_IFDEF; }
|
||||||
case 27:
|
case 27:
|
||||||
YY_RULE_SETUP
|
YY_RULE_SETUP
|
||||||
#line 141 "cmDependsFortranLexer.in.l"
|
#line 141 "cmDependsFortranLexer.in.l"
|
||||||
{ return F90PPR_IF; }
|
{ return F90PPR_IFNDEF; }
|
||||||
case 28:
|
case 28:
|
||||||
YY_RULE_SETUP
|
YY_RULE_SETUP
|
||||||
#line 142 "cmDependsFortranLexer.in.l"
|
#line 142 "cmDependsFortranLexer.in.l"
|
||||||
{ return F90PPR_ELIF; }
|
{ return F90PPR_IF; }
|
||||||
case 29:
|
case 29:
|
||||||
YY_RULE_SETUP
|
YY_RULE_SETUP
|
||||||
#line 143 "cmDependsFortranLexer.in.l"
|
#line 143 "cmDependsFortranLexer.in.l"
|
||||||
{ return F90PPR_ELSE; }
|
{ return F90PPR_ELIF; }
|
||||||
case 30:
|
case 30:
|
||||||
YY_RULE_SETUP
|
YY_RULE_SETUP
|
||||||
#line 144 "cmDependsFortranLexer.in.l"
|
#line 144 "cmDependsFortranLexer.in.l"
|
||||||
|
{ return F90PPR_ELSE; }
|
||||||
|
case 31:
|
||||||
|
YY_RULE_SETUP
|
||||||
|
#line 145 "cmDependsFortranLexer.in.l"
|
||||||
{ return F90PPR_ENDIF; }
|
{ return F90PPR_ENDIF; }
|
||||||
/* Line continuations, possible involving comments. */
|
/* Line continuations, possible involving comments. */
|
||||||
case 31:
|
|
||||||
/* rule 31 can match eol */
|
|
||||||
YY_RULE_SETUP
|
|
||||||
#line 147 "cmDependsFortranLexer.in.l"
|
|
||||||
|
|
||||||
YY_BREAK
|
|
||||||
case 32:
|
case 32:
|
||||||
/* rule 32 can match eol */
|
/* rule 32 can match eol */
|
||||||
YY_RULE_SETUP
|
YY_RULE_SETUP
|
||||||
|
@ -1154,59 +1174,65 @@ YY_RULE_SETUP
|
||||||
|
|
||||||
YY_BREAK
|
YY_BREAK
|
||||||
case 33:
|
case 33:
|
||||||
|
/* rule 33 can match eol */
|
||||||
YY_RULE_SETUP
|
YY_RULE_SETUP
|
||||||
#line 150 "cmDependsFortranLexer.in.l"
|
#line 149 "cmDependsFortranLexer.in.l"
|
||||||
{ return COMMA; }
|
|
||||||
|
YY_BREAK
|
||||||
case 34:
|
case 34:
|
||||||
YY_RULE_SETUP
|
YY_RULE_SETUP
|
||||||
#line 152 "cmDependsFortranLexer.in.l"
|
#line 151 "cmDependsFortranLexer.in.l"
|
||||||
{ return DCOLON; }
|
{ return COMMA; }
|
||||||
case 35:
|
case 35:
|
||||||
/* rule 35 can match eol */
|
|
||||||
YY_RULE_SETUP
|
YY_RULE_SETUP
|
||||||
#line 154 "cmDependsFortranLexer.in.l"
|
#line 153 "cmDependsFortranLexer.in.l"
|
||||||
{ return GARBAGE; }
|
{ return DCOLON; }
|
||||||
case 36:
|
case 36:
|
||||||
|
/* rule 36 can match eol */
|
||||||
YY_RULE_SETUP
|
YY_RULE_SETUP
|
||||||
#line 156 "cmDependsFortranLexer.in.l"
|
#line 155 "cmDependsFortranLexer.in.l"
|
||||||
{ return ASSIGNMENT_OP; }
|
{ return GARBAGE; }
|
||||||
case 37:
|
case 37:
|
||||||
YY_RULE_SETUP
|
YY_RULE_SETUP
|
||||||
#line 158 "cmDependsFortranLexer.in.l"
|
#line 157 "cmDependsFortranLexer.in.l"
|
||||||
|
{ return ASSIGNMENT_OP; }
|
||||||
|
case 38:
|
||||||
|
YY_RULE_SETUP
|
||||||
|
#line 159 "cmDependsFortranLexer.in.l"
|
||||||
{
|
{
|
||||||
yylvalp->string = strdup(yytext);
|
yylvalp->string = strdup(yytext);
|
||||||
return WORD;
|
return WORD;
|
||||||
}
|
}
|
||||||
case 38:
|
|
||||||
YY_RULE_SETUP
|
|
||||||
#line 163 "cmDependsFortranLexer.in.l"
|
|
||||||
{ return GARBAGE; }
|
|
||||||
case 39:
|
case 39:
|
||||||
/* rule 39 can match eol */
|
|
||||||
YY_RULE_SETUP
|
YY_RULE_SETUP
|
||||||
#line 165 "cmDependsFortranLexer.in.l"
|
#line 164 "cmDependsFortranLexer.in.l"
|
||||||
{ return EOSTMT; }
|
{ return GARBAGE; }
|
||||||
case 40:
|
case 40:
|
||||||
|
/* rule 40 can match eol */
|
||||||
YY_RULE_SETUP
|
YY_RULE_SETUP
|
||||||
#line 168 "cmDependsFortranLexer.in.l"
|
#line 166 "cmDependsFortranLexer.in.l"
|
||||||
/* Ignore */
|
{ return EOSTMT; }
|
||||||
YY_BREAK
|
|
||||||
case 41:
|
case 41:
|
||||||
/* rule 41 can match eol */
|
|
||||||
YY_RULE_SETUP
|
YY_RULE_SETUP
|
||||||
#line 169 "cmDependsFortranLexer.in.l"
|
#line 169 "cmDependsFortranLexer.in.l"
|
||||||
/* Ignore line-endings preceeded by \ */
|
/* Ignore */
|
||||||
YY_BREAK
|
YY_BREAK
|
||||||
case 42:
|
case 42:
|
||||||
|
/* rule 42 can match eol */
|
||||||
YY_RULE_SETUP
|
YY_RULE_SETUP
|
||||||
#line 171 "cmDependsFortranLexer.in.l"
|
#line 170 "cmDependsFortranLexer.in.l"
|
||||||
|
/* Ignore line-endings preceeded by \ */
|
||||||
|
YY_BREAK
|
||||||
|
case 43:
|
||||||
|
YY_RULE_SETUP
|
||||||
|
#line 172 "cmDependsFortranLexer.in.l"
|
||||||
{ return *yytext; }
|
{ return *yytext; }
|
||||||
case YY_STATE_EOF(INITIAL):
|
case YY_STATE_EOF(INITIAL):
|
||||||
case YY_STATE_EOF(free_fmt):
|
case YY_STATE_EOF(free_fmt):
|
||||||
case YY_STATE_EOF(fixed_fmt):
|
case YY_STATE_EOF(fixed_fmt):
|
||||||
case YY_STATE_EOF(str_sq):
|
case YY_STATE_EOF(str_sq):
|
||||||
case YY_STATE_EOF(str_dq):
|
case YY_STATE_EOF(str_dq):
|
||||||
#line 173 "cmDependsFortranLexer.in.l"
|
#line 174 "cmDependsFortranLexer.in.l"
|
||||||
{
|
{
|
||||||
if(!cmDependsFortranParser_FilePop(yyextra) )
|
if(!cmDependsFortranParser_FilePop(yyextra) )
|
||||||
{
|
{
|
||||||
|
@ -1214,12 +1240,12 @@ case YY_STATE_EOF(str_dq):
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
YY_BREAK
|
YY_BREAK
|
||||||
case 43:
|
case 44:
|
||||||
YY_RULE_SETUP
|
YY_RULE_SETUP
|
||||||
#line 180 "cmDependsFortranLexer.in.l"
|
#line 181 "cmDependsFortranLexer.in.l"
|
||||||
ECHO;
|
ECHO;
|
||||||
YY_BREAK
|
YY_BREAK
|
||||||
#line 1247 "cmDependsFortranLexer.cxx"
|
#line 1270 "cmDependsFortranLexer.cxx"
|
||||||
|
|
||||||
case YY_END_OF_BUFFER:
|
case YY_END_OF_BUFFER:
|
||||||
{
|
{
|
||||||
|
@ -1512,7 +1538,7 @@ static int yy_get_next_buffer (yyscan_t yyscanner)
|
||||||
while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
|
while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
|
||||||
{
|
{
|
||||||
yy_current_state = (int) yy_def[yy_current_state];
|
yy_current_state = (int) yy_def[yy_current_state];
|
||||||
if ( yy_current_state >= 161 )
|
if ( yy_current_state >= 165 )
|
||||||
yy_c = yy_meta[(unsigned int) yy_c];
|
yy_c = yy_meta[(unsigned int) yy_c];
|
||||||
}
|
}
|
||||||
yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
|
yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
|
||||||
|
@ -1541,11 +1567,11 @@ static int yy_get_next_buffer (yyscan_t yyscanner)
|
||||||
while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
|
while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
|
||||||
{
|
{
|
||||||
yy_current_state = (int) yy_def[yy_current_state];
|
yy_current_state = (int) yy_def[yy_current_state];
|
||||||
if ( yy_current_state >= 161 )
|
if ( yy_current_state >= 165 )
|
||||||
yy_c = yy_meta[(unsigned int) yy_c];
|
yy_c = yy_meta[(unsigned int) yy_c];
|
||||||
}
|
}
|
||||||
yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
|
yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
|
||||||
yy_is_jam = (yy_current_state == 160);
|
yy_is_jam = (yy_current_state == 164);
|
||||||
|
|
||||||
return yy_is_jam ? 0 : yy_current_state;
|
return yy_is_jam ? 0 : yy_current_state;
|
||||||
}
|
}
|
||||||
|
@ -1991,7 +2017,7 @@ YY_BUFFER_STATE cmDependsFortran_yy_scan_string (yyconst char * yystr , yyscan_t
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Setup the input buffer state to scan the given bytes. The next call to cmDependsFortran_yylex() will
|
/** Setup the input buffer state to scan the given bytes. The next call to cmDependsFortran_yylex() will
|
||||||
* scan from a @e copy of @a yybytes.
|
* scan from a @e copy of @a bytes.
|
||||||
* @param yybytes the byte buffer to scan
|
* @param yybytes the byte buffer to scan
|
||||||
* @param _yybytes_len the number of bytes in the buffer pointed to by @a bytes.
|
* @param _yybytes_len the number of bytes in the buffer pointed to by @a bytes.
|
||||||
* @param yyscanner The scanner object.
|
* @param yyscanner The scanner object.
|
||||||
|
@ -2154,7 +2180,7 @@ void cmDependsFortran_yyset_lineno (int line_number , yyscan_t yyscanner)
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Set the current column.
|
/** Set the current column.
|
||||||
* @param column_no
|
* @param line_number
|
||||||
* @param yyscanner The scanner object.
|
* @param yyscanner The scanner object.
|
||||||
*/
|
*/
|
||||||
void cmDependsFortran_yyset_column (int column_no , yyscan_t yyscanner)
|
void cmDependsFortran_yyset_column (int column_no , yyscan_t yyscanner)
|
||||||
|
@ -2374,7 +2400,7 @@ void cmDependsFortran_yyfree (void * ptr , yyscan_t)
|
||||||
|
|
||||||
#define YYTABLES_NAME "yytables"
|
#define YYTABLES_NAME "yytables"
|
||||||
|
|
||||||
#line 180 "cmDependsFortranLexer.in.l"
|
#line 181 "cmDependsFortranLexer.in.l"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -20,7 +20,7 @@
|
||||||
#define FLEX_SCANNER
|
#define FLEX_SCANNER
|
||||||
#define YY_FLEX_MAJOR_VERSION 2
|
#define YY_FLEX_MAJOR_VERSION 2
|
||||||
#define YY_FLEX_MINOR_VERSION 5
|
#define YY_FLEX_MINOR_VERSION 5
|
||||||
#define YY_FLEX_SUBMINOR_VERSION 34
|
#define YY_FLEX_SUBMINOR_VERSION 35
|
||||||
#if YY_FLEX_SUBMINOR_VERSION > 0
|
#if YY_FLEX_SUBMINOR_VERSION > 0
|
||||||
#define FLEX_BETA
|
#define FLEX_BETA
|
||||||
#endif
|
#endif
|
||||||
|
@ -65,7 +65,6 @@ typedef int flex_int32_t;
|
||||||
typedef unsigned char flex_uint8_t;
|
typedef unsigned char flex_uint8_t;
|
||||||
typedef unsigned short int flex_uint16_t;
|
typedef unsigned short int flex_uint16_t;
|
||||||
typedef unsigned int flex_uint32_t;
|
typedef unsigned int flex_uint32_t;
|
||||||
#endif /* ! C99 */
|
|
||||||
|
|
||||||
/* Limits of integral types. */
|
/* Limits of integral types. */
|
||||||
#ifndef INT8_MIN
|
#ifndef INT8_MIN
|
||||||
|
@ -96,6 +95,8 @@ typedef unsigned int flex_uint32_t;
|
||||||
#define UINT32_MAX (4294967295U)
|
#define UINT32_MAX (4294967295U)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#endif /* ! C99 */
|
||||||
|
|
||||||
#endif /* ! FLEXINT_H */
|
#endif /* ! FLEXINT_H */
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
|
@ -138,7 +139,15 @@ typedef void* yyscan_t;
|
||||||
|
|
||||||
/* Size of default input buffer. */
|
/* Size of default input buffer. */
|
||||||
#ifndef YY_BUF_SIZE
|
#ifndef YY_BUF_SIZE
|
||||||
|
#ifdef __ia64__
|
||||||
|
/* On IA-64, the buffer size is 16k, not 8k.
|
||||||
|
* Moreover, YY_BUF_SIZE is 2*YY_READ_BUF_SIZE in the general case.
|
||||||
|
* Ditto for the __ia64__ case accordingly.
|
||||||
|
*/
|
||||||
|
#define YY_BUF_SIZE 32768
|
||||||
|
#else
|
||||||
#define YY_BUF_SIZE 16384
|
#define YY_BUF_SIZE 16384
|
||||||
|
#endif /* __ia64__ */
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef YY_TYPEDEF_YY_BUFFER_STATE
|
#ifndef YY_TYPEDEF_YY_BUFFER_STATE
|
||||||
|
@ -146,13 +155,6 @@ typedef void* yyscan_t;
|
||||||
typedef struct yy_buffer_state *YY_BUFFER_STATE;
|
typedef struct yy_buffer_state *YY_BUFFER_STATE;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* The following is because we cannot portably get our hands on size_t
|
|
||||||
* (without autoconf's help, which isn't available because we want
|
|
||||||
* flex-generated scanners to compile on their own).
|
|
||||||
* Given that the standard has decreed that size_t exists since 1989,
|
|
||||||
* I guess we can afford to depend on it. Manoj.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifndef YY_TYPEDEF_YY_SIZE_T
|
#ifndef YY_TYPEDEF_YY_SIZE_T
|
||||||
#define YY_TYPEDEF_YY_SIZE_T
|
#define YY_TYPEDEF_YY_SIZE_T
|
||||||
typedef size_t yy_size_t;
|
typedef size_t yy_size_t;
|
||||||
|
@ -304,7 +306,12 @@ static int yy_flex_strlen (yyconst char * ,yyscan_t yyscanner);
|
||||||
|
|
||||||
/* Amount of stuff to slurp up with each read. */
|
/* Amount of stuff to slurp up with each read. */
|
||||||
#ifndef YY_READ_BUF_SIZE
|
#ifndef YY_READ_BUF_SIZE
|
||||||
|
#ifdef __ia64__
|
||||||
|
/* On IA-64, the buffer size is 16k, not 8k */
|
||||||
|
#define YY_READ_BUF_SIZE 16384
|
||||||
|
#else
|
||||||
#define YY_READ_BUF_SIZE 8192
|
#define YY_READ_BUF_SIZE 8192
|
||||||
|
#endif /* __ia64__ */
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Number of entries by which start-condition stack grows. */
|
/* Number of entries by which start-condition stack grows. */
|
||||||
|
|
|
@ -115,6 +115,11 @@ Modify cmDependsFortranLexer.h:
|
||||||
!.*\n { return EOSTMT; } /* Treat comments like */
|
!.*\n { return EOSTMT; } /* Treat comments like */
|
||||||
<fixed_fmt>^[cC*dD].*\n { return EOSTMT; } /* empty lines */
|
<fixed_fmt>^[cC*dD].*\n { return EOSTMT; } /* empty lines */
|
||||||
|
|
||||||
|
^[ \t]*#[ \t]*include[ \t]*<[^>]+> {
|
||||||
|
yytext[yyleng-1] = 0;
|
||||||
|
yylvalp->string = strdup(strchr(yytext, '<')+1);
|
||||||
|
return CPP_INCLUDE_ANGLE;
|
||||||
|
}
|
||||||
^[ \t]*#[ \t]*include { return CPP_INCLUDE; }
|
^[ \t]*#[ \t]*include { return CPP_INCLUDE; }
|
||||||
\$[ \t]*include { return F90PPR_INCLUDE; }
|
\$[ \t]*include { return F90PPR_INCLUDE; }
|
||||||
\?\?[ \t]*include { return COCO_INCLUDE; }
|
\?\?[ \t]*include { return COCO_INCLUDE; }
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -102,6 +102,7 @@ static bool cmDependsFortranParserIsKeyword(const char* word,
|
||||||
%token <string> CPP_TOENDL
|
%token <string> CPP_TOENDL
|
||||||
%token <number> UNTERMINATED_STRING
|
%token <number> UNTERMINATED_STRING
|
||||||
%token <string> STRING WORD
|
%token <string> STRING WORD
|
||||||
|
%token <string> CPP_INCLUDE_ANGLE
|
||||||
|
|
||||||
/*-------------------------------------------------------------------------*/
|
/*-------------------------------------------------------------------------*/
|
||||||
/* grammar */
|
/* grammar */
|
||||||
|
@ -192,6 +193,13 @@ keyword_stmt:
|
||||||
free($1);
|
free($1);
|
||||||
free($2);
|
free($2);
|
||||||
}
|
}
|
||||||
|
| CPP_INCLUDE_ANGLE other EOSTMT
|
||||||
|
{
|
||||||
|
cmDependsFortranParser* parser =
|
||||||
|
cmDependsFortran_yyget_extra(yyscanner);
|
||||||
|
cmDependsFortranParser_RuleInclude(parser, $1);
|
||||||
|
free($1);
|
||||||
|
}
|
||||||
| include STRING other EOSTMT
|
| include STRING other EOSTMT
|
||||||
{
|
{
|
||||||
cmDependsFortranParser* parser =
|
cmDependsFortranParser* parser =
|
||||||
|
|
|
@ -1,9 +1,8 @@
|
||||||
/* A Bison parser, made by GNU Bison 2.4.1. */
|
/* A Bison parser, made by GNU Bison 2.5. */
|
||||||
|
|
||||||
/* Skeleton interface for Bison's Yacc-like parsers in C
|
/* Bison interface for Yacc-like parsers in C
|
||||||
|
|
||||||
Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006
|
Copyright (C) 1984, 1989-1990, 2000-2011 Free Software Foundation, Inc.
|
||||||
Free Software Foundation, Inc.
|
|
||||||
|
|
||||||
This program is free software: you can redistribute it and/or modify
|
This program is free software: you can redistribute it and/or modify
|
||||||
it under the terms of the GNU General Public License as published by
|
it under the terms of the GNU General Public License as published by
|
||||||
|
@ -31,6 +30,7 @@
|
||||||
This special exception was added by the Free Software Foundation in
|
This special exception was added by the Free Software Foundation in
|
||||||
version 2.2 of Bison. */
|
version 2.2 of Bison. */
|
||||||
|
|
||||||
|
|
||||||
/* Tokens. */
|
/* Tokens. */
|
||||||
#ifndef YYTOKENTYPE
|
#ifndef YYTOKENTYPE
|
||||||
# define YYTOKENTYPE
|
# define YYTOKENTYPE
|
||||||
|
@ -64,7 +64,8 @@
|
||||||
CPP_TOENDL = 282,
|
CPP_TOENDL = 282,
|
||||||
UNTERMINATED_STRING = 283,
|
UNTERMINATED_STRING = 283,
|
||||||
STRING = 284,
|
STRING = 284,
|
||||||
WORD = 285
|
WORD = 285,
|
||||||
|
CPP_INCLUDE_ANGLE = 286
|
||||||
};
|
};
|
||||||
#endif
|
#endif
|
||||||
/* Tokens. */
|
/* Tokens. */
|
||||||
|
@ -96,6 +97,7 @@
|
||||||
#define UNTERMINATED_STRING 283
|
#define UNTERMINATED_STRING 283
|
||||||
#define STRING 284
|
#define STRING 284
|
||||||
#define WORD 285
|
#define WORD 285
|
||||||
|
#define CPP_INCLUDE_ANGLE 286
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -104,12 +106,14 @@
|
||||||
typedef union YYSTYPE
|
typedef union YYSTYPE
|
||||||
{
|
{
|
||||||
|
|
||||||
/* Line 1676 of yacc.c */
|
/* Line 2068 of yacc.c */
|
||||||
#line 94 "cmDependsFortranParser.y"
|
#line 89 "cmDependsFortranParser.y"
|
||||||
|
|
||||||
char* string;
|
char* string;
|
||||||
|
|
||||||
/* Line 1676 of yacc.c */
|
|
||||||
|
|
||||||
|
/* Line 2068 of yacc.c */
|
||||||
#line 118 "cmDependsFortranParserTokens.h"
|
#line 118 "cmDependsFortranParserTokens.h"
|
||||||
} YYSTYPE;
|
} YYSTYPE;
|
||||||
# define YYSTYPE_IS_TRIVIAL 1
|
# define YYSTYPE_IS_TRIVIAL 1
|
||||||
|
|
|
@ -522,6 +522,16 @@ void cmDocumentVariables::DefineVariables(cmake* cm)
|
||||||
false,
|
false,
|
||||||
"Variables That Change Behavior");
|
"Variables That Change Behavior");
|
||||||
|
|
||||||
|
cm->DefineProperty
|
||||||
|
("CMAKE_INSTALL_DEFAULT_COMPONENT_NAME", cmProperty::VARIABLE,
|
||||||
|
"Default component used in install() commands.",
|
||||||
|
"If an install() command is used without the COMPONENT argument, "
|
||||||
|
"these files will be grouped into a default component. The name of this "
|
||||||
|
"default install component will be taken from this variable. "
|
||||||
|
"It defaults to \"Unspecified\". ",
|
||||||
|
false,
|
||||||
|
"Variables That Change Behavior");
|
||||||
|
|
||||||
cm->DefineProperty
|
cm->DefineProperty
|
||||||
("CMAKE_FIND_LIBRARY_PREFIXES", cmProperty::VARIABLE,
|
("CMAKE_FIND_LIBRARY_PREFIXES", cmProperty::VARIABLE,
|
||||||
"Prefixes to prepend when looking for libraries.",
|
"Prefixes to prepend when looking for libraries.",
|
||||||
|
@ -833,6 +843,36 @@ void cmDocumentVariables::DefineVariables(cmake* cm)
|
||||||
"Default is ON.",false,
|
"Default is ON.",false,
|
||||||
"Variables That Change Behavior");
|
"Variables That Change Behavior");
|
||||||
|
|
||||||
|
cm->DefineProperty
|
||||||
|
("CMAKE_ABSOLUTE_DESTINATION_FILES", cmProperty::VARIABLE,
|
||||||
|
"List of files which have been installed using "
|
||||||
|
" an ABSOLUTE DESTINATION path.",
|
||||||
|
"This variable is defined by CMake-generated cmake_install.cmake "
|
||||||
|
"scripts."
|
||||||
|
" It can be used (read-only) by program or script that source those"
|
||||||
|
" install scripts. This is used by some CPack generators (e.g. RPM).",
|
||||||
|
false,
|
||||||
|
"Variables That Change Behavior");
|
||||||
|
|
||||||
|
cm->DefineProperty
|
||||||
|
("CMAKE_WARN_ON_ABSOLUTE_INSTALL_DESTINATION", cmProperty::VARIABLE,
|
||||||
|
"Ask cmake_install.cmake script to warn each time a file with "
|
||||||
|
"absolute INSTALL DESTINATION is encountered.",
|
||||||
|
"This variable is used by CMake-generated cmake_install.cmake"
|
||||||
|
" scripts. If ones set this variable to ON while running the"
|
||||||
|
" script, it may get warning messages from the script.", false,
|
||||||
|
"Variables That Change Behavior");
|
||||||
|
|
||||||
|
cm->DefineProperty
|
||||||
|
("CMAKE_ERROR_ON_ABSOLUTE_INSTALL_DESTINATION", cmProperty::VARIABLE,
|
||||||
|
"Ask cmake_install.cmake script to error out as soon as "
|
||||||
|
"a file with absolute INSTALL DESTINATION is encountered.",
|
||||||
|
"The fatal error is emitted before the installation of "
|
||||||
|
"the offending file takes place."
|
||||||
|
" This variable is used by CMake-generated cmake_install.cmake"
|
||||||
|
" scripts. If ones set this variable to ON while running the"
|
||||||
|
" script, it may get fatal error messages from the script.",false,
|
||||||
|
"Variables That Change Behavior");
|
||||||
|
|
||||||
// Variables defined by CMake that describe the system
|
// Variables defined by CMake that describe the system
|
||||||
|
|
||||||
|
|
|
@ -145,7 +145,7 @@ void cmDocumentationFormatterHTML
|
||||||
cmDocumentationPrintHTMLId(os, op->Name.c_str());
|
cmDocumentationPrintHTMLId(os, op->Name.c_str());
|
||||||
os << "\"><b><code>";
|
os << "\"><b><code>";
|
||||||
this->PrintHTMLEscapes(os, op->Name.c_str());
|
this->PrintHTMLEscapes(os, op->Name.c_str());
|
||||||
os << "</code></b></a></li>";
|
os << "</code></b></a></li>\n";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
os << "</ul>\n" ;
|
os << "</ul>\n" ;
|
||||||
|
|
|
@ -1368,41 +1368,73 @@ bool cmFindPackageCommand::ReadListFile(const char* f, PolicyScopeRule psr)
|
||||||
}
|
}
|
||||||
|
|
||||||
//----------------------------------------------------------------------------
|
//----------------------------------------------------------------------------
|
||||||
void cmFindPackageCommand::AppendToProperty(const char* propertyName)
|
void cmFindPackageCommand::AppendToFoundProperty(bool found)
|
||||||
{
|
{
|
||||||
std::string propertyValue;
|
std::vector<std::string> foundContents;
|
||||||
const char *prop =
|
const char *foundProp =
|
||||||
this->Makefile->GetCMakeInstance()->GetProperty(propertyName);
|
this->Makefile->GetCMakeInstance()->GetProperty("PACKAGES_FOUND");
|
||||||
if (prop && *prop)
|
if (foundProp && *foundProp)
|
||||||
{
|
{
|
||||||
propertyValue = prop;
|
std::string tmp = foundProp;
|
||||||
|
|
||||||
std::vector<std::string> contents;
|
cmSystemTools::ExpandListArgument(tmp, foundContents, false);
|
||||||
cmSystemTools::ExpandListArgument(propertyValue, contents, false);
|
std::vector<std::string>::iterator nameIt = std::find(
|
||||||
|
foundContents.begin(), foundContents.end(), this->Name);
|
||||||
|
if(nameIt != foundContents.end())
|
||||||
|
{
|
||||||
|
foundContents.erase(nameIt);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
bool alreadyInserted = false;
|
std::vector<std::string> notFoundContents;
|
||||||
for(std::vector<std::string>::const_iterator it = contents.begin();
|
const char *notFoundProp =
|
||||||
it != contents.end(); ++ it )
|
this->Makefile->GetCMakeInstance()->GetProperty("PACKAGES_NOT_FOUND");
|
||||||
|
if (notFoundProp && *notFoundProp)
|
||||||
|
{
|
||||||
|
std::string tmp = notFoundProp;
|
||||||
|
|
||||||
|
cmSystemTools::ExpandListArgument(tmp, notFoundContents, false);
|
||||||
|
std::vector<std::string>::iterator nameIt = std::find(
|
||||||
|
notFoundContents.begin(), notFoundContents.end(), this->Name);
|
||||||
|
if(nameIt != notFoundContents.end())
|
||||||
{
|
{
|
||||||
if (*it == this->Name)
|
notFoundContents.erase(nameIt);
|
||||||
{
|
|
||||||
alreadyInserted = true;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (!alreadyInserted)
|
|
||||||
{
|
|
||||||
propertyValue += ";";
|
|
||||||
propertyValue += this->Name;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(found)
|
||||||
|
{
|
||||||
|
foundContents.push_back(this->Name);
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
propertyValue = this->Name;
|
notFoundContents.push_back(this->Name);
|
||||||
}
|
}
|
||||||
this->Makefile->GetCMakeInstance()->SetProperty(propertyName,
|
|
||||||
propertyValue.c_str());
|
|
||||||
}
|
std::string tmp;
|
||||||
|
const char* sep ="";
|
||||||
|
for(size_t i=0; i<foundContents.size(); i++)
|
||||||
|
{
|
||||||
|
tmp += sep;
|
||||||
|
tmp += foundContents[i];
|
||||||
|
sep = ";";
|
||||||
|
}
|
||||||
|
|
||||||
|
this->Makefile->GetCMakeInstance()->SetProperty("PACKAGES_FOUND",
|
||||||
|
tmp.c_str());
|
||||||
|
|
||||||
|
tmp = "";
|
||||||
|
sep = "";
|
||||||
|
for(size_t i=0; i<notFoundContents.size(); i++)
|
||||||
|
{
|
||||||
|
tmp += sep;
|
||||||
|
tmp += notFoundContents[i];
|
||||||
|
sep = ";";
|
||||||
|
}
|
||||||
|
this->Makefile->GetCMakeInstance()->SetProperty("PACKAGES_NOT_FOUND",
|
||||||
|
tmp.c_str());
|
||||||
|
}
|
||||||
|
|
||||||
//----------------------------------------------------------------------------
|
//----------------------------------------------------------------------------
|
||||||
void cmFindPackageCommand::AppendSuccessInformation()
|
void cmFindPackageCommand::AppendSuccessInformation()
|
||||||
|
@ -1413,14 +1445,10 @@ void cmFindPackageCommand::AppendSuccessInformation()
|
||||||
|
|
||||||
const char* upperResult = this->Makefile->GetDefinition(upperFound.c_str());
|
const char* upperResult = this->Makefile->GetDefinition(upperFound.c_str());
|
||||||
const char* result = this->Makefile->GetDefinition(found.c_str());
|
const char* result = this->Makefile->GetDefinition(found.c_str());
|
||||||
if ((cmSystemTools::IsOn(result)) || (cmSystemTools::IsOn(upperResult)))
|
bool packageFound = ((cmSystemTools::IsOn(result))
|
||||||
{
|
|| (cmSystemTools::IsOn(upperResult)));
|
||||||
this->AppendToProperty("PACKAGES_FOUND");
|
|
||||||
}
|
this->AppendToFoundProperty(packageFound);
|
||||||
else
|
|
||||||
{
|
|
||||||
this->AppendToProperty("PACKAGES_NOT_FOUND");
|
|
||||||
}
|
|
||||||
|
|
||||||
// Record whether the find was quiet or not, so this can be used
|
// Record whether the find was quiet or not, so this can be used
|
||||||
// e.g. in FeatureSummary.cmake
|
// e.g. in FeatureSummary.cmake
|
||||||
|
|
|
@ -69,7 +69,7 @@ protected:
|
||||||
virtual void GenerateDocumentation();
|
virtual void GenerateDocumentation();
|
||||||
private:
|
private:
|
||||||
void AppendSuccessInformation();
|
void AppendSuccessInformation();
|
||||||
void AppendToProperty(const char* propertyName);
|
void AppendToFoundProperty(bool found);
|
||||||
void SetModuleVariables(const std::string& components);
|
void SetModuleVariables(const std::string& components);
|
||||||
bool FindModule(bool& found);
|
bool FindModule(bool& found);
|
||||||
void AddFindDefinition(const char* var, const char* val);
|
void AddFindDefinition(const char* var, const char* val);
|
||||||
|
|
|
@ -39,17 +39,10 @@ void cmGeneratorTarget::ClassifySources()
|
||||||
{
|
{
|
||||||
cmSourceFile* sf = *si;
|
cmSourceFile* sf = *si;
|
||||||
std::string ext = cmSystemTools::LowerCase(sf->GetExtension());
|
std::string ext = cmSystemTools::LowerCase(sf->GetExtension());
|
||||||
cmTarget::SourceFileFlags tsFlags =
|
|
||||||
this->Target->GetTargetSourceFileFlags(sf);
|
|
||||||
if(sf->GetCustomCommand())
|
if(sf->GetCustomCommand())
|
||||||
{
|
{
|
||||||
this->CustomCommands.push_back(sf);
|
this->CustomCommands.push_back(sf);
|
||||||
}
|
}
|
||||||
else if(tsFlags.Type != cmTarget::SourceFileTypeNormal)
|
|
||||||
{
|
|
||||||
this->OSXContent.push_back(sf);
|
|
||||||
if(isObjLib) { badObjLib.push_back(sf); }
|
|
||||||
}
|
|
||||||
else if(sf->GetPropertyAsBool("HEADER_FILE_ONLY"))
|
else if(sf->GetPropertyAsBool("HEADER_FILE_ONLY"))
|
||||||
{
|
{
|
||||||
this->HeaderSources.push_back(sf);
|
this->HeaderSources.push_back(sf);
|
||||||
|
|
|
@ -37,7 +37,6 @@ public:
|
||||||
std::vector<cmSourceFile*> HeaderSources;
|
std::vector<cmSourceFile*> HeaderSources;
|
||||||
std::vector<cmSourceFile*> ObjectSources;
|
std::vector<cmSourceFile*> ObjectSources;
|
||||||
std::vector<cmSourceFile*> ExternalObjects;
|
std::vector<cmSourceFile*> ExternalObjects;
|
||||||
std::vector<cmSourceFile*> OSXContent;
|
|
||||||
std::vector<cmSourceFile*> IDLSources;
|
std::vector<cmSourceFile*> IDLSources;
|
||||||
std::string ModuleDefinitionFile;
|
std::string ModuleDefinitionFile;
|
||||||
|
|
||||||
|
|
|
@ -2474,3 +2474,16 @@ void cmGlobalGenerator::WriteSummary(cmTarget* target)
|
||||||
cmSystemTools::RemoveFile(file.c_str());
|
cmSystemTools::RemoveFile(file.c_str());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//----------------------------------------------------------------------------
|
||||||
|
// static
|
||||||
|
std::string cmGlobalGenerator::EscapeJSON(const std::string& s) {
|
||||||
|
std::string result;
|
||||||
|
for (std::string::size_type i = 0; i < s.size(); ++i) {
|
||||||
|
if (s[i] == '"' || s[i] == '\\') {
|
||||||
|
result += '\\';
|
||||||
|
}
|
||||||
|
result += s[i];
|
||||||
|
}
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
|
@ -280,6 +280,8 @@ public:
|
||||||
/** Generate an <output>.rule file path for a given command output. */
|
/** Generate an <output>.rule file path for a given command output. */
|
||||||
virtual std::string GenerateRuleFile(std::string const& output) const;
|
virtual std::string GenerateRuleFile(std::string const& output) const;
|
||||||
|
|
||||||
|
static std::string EscapeJSON(const std::string& s);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
typedef std::vector<cmLocalGenerator*> GeneratorVector;
|
typedef std::vector<cmLocalGenerator*> GeneratorVector;
|
||||||
// for a project collect all its targets by following depend
|
// for a project collect all its targets by following depend
|
||||||
|
|
|
@ -341,6 +341,7 @@ cmGlobalNinjaGenerator::cmGlobalNinjaGenerator()
|
||||||
: cmGlobalGenerator()
|
: cmGlobalGenerator()
|
||||||
, BuildFileStream(0)
|
, BuildFileStream(0)
|
||||||
, RulesFileStream(0)
|
, RulesFileStream(0)
|
||||||
|
, CompileCommandsStream(0)
|
||||||
, Rules()
|
, Rules()
|
||||||
, AllDependencies()
|
, AllDependencies()
|
||||||
{
|
{
|
||||||
|
@ -385,6 +386,12 @@ void cmGlobalNinjaGenerator::Generate()
|
||||||
this->WriteTargetAliases(*this->BuildFileStream);
|
this->WriteTargetAliases(*this->BuildFileStream);
|
||||||
this->WriteBuiltinTargets(*this->BuildFileStream);
|
this->WriteBuiltinTargets(*this->BuildFileStream);
|
||||||
|
|
||||||
|
if (cmSystemTools::GetErrorOccuredFlag()) {
|
||||||
|
this->RulesFileStream->setstate(std::ios_base::failbit);
|
||||||
|
this->BuildFileStream->setstate(std::ios_base::failbit);
|
||||||
|
}
|
||||||
|
|
||||||
|
this->CloseCompileCommandsStream();
|
||||||
this->CloseRulesFileStream();
|
this->CloseRulesFileStream();
|
||||||
this->CloseBuildFileStream();
|
this->CloseBuildFileStream();
|
||||||
}
|
}
|
||||||
|
@ -618,6 +625,46 @@ void cmGlobalNinjaGenerator::CloseRulesFileStream()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void cmGlobalNinjaGenerator::AddCXXCompileCommand(
|
||||||
|
const std::string &commandLine,
|
||||||
|
const std::string &sourceFile)
|
||||||
|
{
|
||||||
|
// Compute Ninja's build file path.
|
||||||
|
std::string buildFileDir =
|
||||||
|
this->GetCMakeInstance()->GetHomeOutputDirectory();
|
||||||
|
if (!this->CompileCommandsStream)
|
||||||
|
{
|
||||||
|
std::string buildFilePath = buildFileDir + "/compile_commands.json";
|
||||||
|
|
||||||
|
// Get a stream where to generate things.
|
||||||
|
this->CompileCommandsStream =
|
||||||
|
new cmGeneratedFileStream(buildFilePath.c_str());
|
||||||
|
*this->CompileCommandsStream << "[";
|
||||||
|
} else {
|
||||||
|
*this->CompileCommandsStream << "," << std::endl;
|
||||||
|
}
|
||||||
|
|
||||||
|
*this->CompileCommandsStream << "\n{\n"
|
||||||
|
<< " \"directory\": \""
|
||||||
|
<< cmGlobalGenerator::EscapeJSON(buildFileDir) << "\",\n"
|
||||||
|
<< " \"command\": \""
|
||||||
|
<< cmGlobalGenerator::EscapeJSON(commandLine) << "\",\n"
|
||||||
|
<< " \"file\": \""
|
||||||
|
<< cmGlobalGenerator::EscapeJSON(sourceFile) << "\"\n"
|
||||||
|
<< "}";
|
||||||
|
}
|
||||||
|
|
||||||
|
void cmGlobalNinjaGenerator::CloseCompileCommandsStream()
|
||||||
|
{
|
||||||
|
if (this->CompileCommandsStream)
|
||||||
|
{
|
||||||
|
*this->CompileCommandsStream << "\n]";
|
||||||
|
delete this->CompileCommandsStream;
|
||||||
|
this->CompileCommandsStream = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
void cmGlobalNinjaGenerator::WriteDisclaimer(std::ostream& os)
|
void cmGlobalNinjaGenerator::WriteDisclaimer(std::ostream& os)
|
||||||
{
|
{
|
||||||
os
|
os
|
||||||
|
@ -754,6 +801,8 @@ void cmGlobalNinjaGenerator::WriteBuiltinTargets(std::ostream& os)
|
||||||
|
|
||||||
this->WriteTargetAll(os);
|
this->WriteTargetAll(os);
|
||||||
this->WriteTargetRebuildManifest(os);
|
this->WriteTargetRebuildManifest(os);
|
||||||
|
this->WriteTargetClean(os);
|
||||||
|
this->WriteTargetHelp(os);
|
||||||
}
|
}
|
||||||
|
|
||||||
void cmGlobalNinjaGenerator::WriteTargetAll(std::ostream& os)
|
void cmGlobalNinjaGenerator::WriteTargetAll(std::ostream& os)
|
||||||
|
@ -820,3 +869,43 @@ void cmGlobalNinjaGenerator::WriteTargetRebuildManifest(std::ostream& os)
|
||||||
implicitDeps,
|
implicitDeps,
|
||||||
cmNinjaDeps());
|
cmNinjaDeps());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void cmGlobalNinjaGenerator::WriteTargetClean(std::ostream& os)
|
||||||
|
{
|
||||||
|
WriteRule(*this->RulesFileStream,
|
||||||
|
"CLEAN",
|
||||||
|
"ninja -t clean",
|
||||||
|
"Cleaning all built files...",
|
||||||
|
"Rule for cleaning all built files.",
|
||||||
|
/*depfile=*/ "",
|
||||||
|
/*restat=*/ false,
|
||||||
|
/*generator=*/ false);
|
||||||
|
WriteBuild(os,
|
||||||
|
"Clean all the built files.",
|
||||||
|
"CLEAN",
|
||||||
|
/*outputs=*/ cmNinjaDeps(1, "clean"),
|
||||||
|
/*explicitDeps=*/ cmNinjaDeps(),
|
||||||
|
/*implicitDeps=*/ cmNinjaDeps(),
|
||||||
|
/*orderOnlyDeps=*/ cmNinjaDeps(),
|
||||||
|
/*variables=*/ cmNinjaVars());
|
||||||
|
}
|
||||||
|
|
||||||
|
void cmGlobalNinjaGenerator::WriteTargetHelp(std::ostream& os)
|
||||||
|
{
|
||||||
|
WriteRule(*this->RulesFileStream,
|
||||||
|
"HELP",
|
||||||
|
"ninja -t targets",
|
||||||
|
"All primary targets available:",
|
||||||
|
"Rule for printing all primary targets available.",
|
||||||
|
/*depfile=*/ "",
|
||||||
|
/*restat=*/ false,
|
||||||
|
/*generator=*/ false);
|
||||||
|
WriteBuild(os,
|
||||||
|
"Print all primary targets available.",
|
||||||
|
"HELP",
|
||||||
|
/*outputs=*/ cmNinjaDeps(1, "help"),
|
||||||
|
/*explicitDeps=*/ cmNinjaDeps(),
|
||||||
|
/*implicitDeps=*/ cmNinjaDeps(),
|
||||||
|
/*orderOnlyDeps=*/ cmNinjaDeps(),
|
||||||
|
/*variables=*/ cmNinjaVars());
|
||||||
|
}
|
||||||
|
|
|
@ -213,6 +213,9 @@ public:
|
||||||
cmGeneratedFileStream* GetRulesFileStream() const
|
cmGeneratedFileStream* GetRulesFileStream() const
|
||||||
{ return this->RulesFileStream; }
|
{ return this->RulesFileStream; }
|
||||||
|
|
||||||
|
void AddCXXCompileCommand(const std::string &commandLine,
|
||||||
|
const std::string &sourceFile);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Add a rule to the generated build system.
|
* Add a rule to the generated build system.
|
||||||
* Call WriteRule() behind the scene but perform some check before like:
|
* Call WriteRule() behind the scene but perform some check before like:
|
||||||
|
@ -254,6 +257,8 @@ private:
|
||||||
void OpenBuildFileStream();
|
void OpenBuildFileStream();
|
||||||
void CloseBuildFileStream();
|
void CloseBuildFileStream();
|
||||||
|
|
||||||
|
void CloseCompileCommandsStream();
|
||||||
|
|
||||||
void OpenRulesFileStream();
|
void OpenRulesFileStream();
|
||||||
void CloseRulesFileStream();
|
void CloseRulesFileStream();
|
||||||
|
|
||||||
|
@ -273,6 +278,8 @@ private:
|
||||||
void WriteBuiltinTargets(std::ostream& os);
|
void WriteBuiltinTargets(std::ostream& os);
|
||||||
void WriteTargetAll(std::ostream& os);
|
void WriteTargetAll(std::ostream& os);
|
||||||
void WriteTargetRebuildManifest(std::ostream& os);
|
void WriteTargetRebuildManifest(std::ostream& os);
|
||||||
|
void WriteTargetClean(std::ostream& os);
|
||||||
|
void WriteTargetHelp(std::ostream& os);
|
||||||
|
|
||||||
/// Called when we have seen the given custom command. Returns true
|
/// Called when we have seen the given custom command. Returns true
|
||||||
/// if we has seen it before.
|
/// if we has seen it before.
|
||||||
|
@ -309,6 +316,7 @@ private:
|
||||||
/// The file containing the rule statements. (The action attached to each
|
/// The file containing the rule statements. (The action attached to each
|
||||||
/// edge of the compilation DAG).
|
/// edge of the compilation DAG).
|
||||||
cmGeneratedFileStream* RulesFileStream;
|
cmGeneratedFileStream* RulesFileStream;
|
||||||
|
cmGeneratedFileStream* CompileCommandsStream;
|
||||||
|
|
||||||
/// The type used to store the set of rules added to the generated build
|
/// The type used to store the set of rules added to the generated build
|
||||||
/// system.
|
/// system.
|
||||||
|
|
|
@ -103,18 +103,6 @@ cmGlobalUnixMakefileGenerator3
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//----------------------------------------------------------------------------
|
|
||||||
std::string EscapeJSON(const std::string& s) {
|
|
||||||
std::string result;
|
|
||||||
for (std::string::size_type i = 0; i < s.size(); ++i) {
|
|
||||||
if (s[i] == '"' || s[i] == '\\') {
|
|
||||||
result += '\\';
|
|
||||||
}
|
|
||||||
result += s[i];
|
|
||||||
}
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
|
|
||||||
void cmGlobalUnixMakefileGenerator3::Generate()
|
void cmGlobalUnixMakefileGenerator3::Generate()
|
||||||
{
|
{
|
||||||
// first do superclass method
|
// first do superclass method
|
||||||
|
@ -179,11 +167,14 @@ void cmGlobalUnixMakefileGenerator3::AddCXXCompileCommand(
|
||||||
*this->CommandDatabase << "," << std::endl;
|
*this->CommandDatabase << "," << std::endl;
|
||||||
}
|
}
|
||||||
*this->CommandDatabase << "{" << std::endl
|
*this->CommandDatabase << "{" << std::endl
|
||||||
<< " \"directory\": \"" << EscapeJSON(workingDirectory) << "\","
|
<< " \"directory\": \""
|
||||||
|
<< cmGlobalGenerator::EscapeJSON(workingDirectory) << "\","
|
||||||
<< std::endl
|
<< std::endl
|
||||||
<< " \"command\": \"" << EscapeJSON(compileCommand) << "\","
|
<< " \"command\": \"" <<
|
||||||
|
cmGlobalGenerator::EscapeJSON(compileCommand) << "\","
|
||||||
<< std::endl
|
<< std::endl
|
||||||
<< " \"file\": \"" << EscapeJSON(sourceFile) << "\""
|
<< " \"file\": \"" <<
|
||||||
|
cmGlobalGenerator::EscapeJSON(sourceFile) << "\""
|
||||||
<< std::endl << "}";
|
<< std::endl << "}";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -278,3 +278,9 @@ void cmGlobalVisualStudio10Generator::PathTooLong(
|
||||||
this->LongestSource.SourceRel = sfRel;
|
this->LongestSource.SourceRel = sfRel;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//----------------------------------------------------------------------------
|
||||||
|
bool cmGlobalVisualStudio10Generator::UseFolderProperty()
|
||||||
|
{
|
||||||
|
return IsExpressEdition() ? false : cmGlobalGenerator::UseFolderProperty();
|
||||||
|
}
|
||||||
|
|
|
@ -88,6 +88,9 @@ protected:
|
||||||
|
|
||||||
std::string PlatformToolset;
|
std::string PlatformToolset;
|
||||||
bool ExpressEdition;
|
bool ExpressEdition;
|
||||||
|
|
||||||
|
bool UseFolderProperty();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
struct LongestSourcePath
|
struct LongestSourcePath
|
||||||
{
|
{
|
||||||
|
|
|
@ -0,0 +1,32 @@
|
||||||
|
/*============================================================================
|
||||||
|
CMake - Cross Platform Makefile Generator
|
||||||
|
Copyright 2000-2011 Kitware, Inc., Insight Software Consortium
|
||||||
|
|
||||||
|
Distributed under the OSI-approved BSD License (the "License");
|
||||||
|
see accompanying file Copyright.txt for details.
|
||||||
|
|
||||||
|
This software is distributed WITHOUT ANY WARRANTY; without even the
|
||||||
|
implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||||
|
See the License for more information.
|
||||||
|
============================================================================*/
|
||||||
|
#include "cmGlobalVisualStudio11ARMGenerator.h"
|
||||||
|
#include "cmMakefile.h"
|
||||||
|
#include "cmake.h"
|
||||||
|
|
||||||
|
//----------------------------------------------------------------------------
|
||||||
|
void cmGlobalVisualStudio11ARMGenerator
|
||||||
|
::GetDocumentation(cmDocumentationEntry& entry) const
|
||||||
|
{
|
||||||
|
entry.Name = this->GetName();
|
||||||
|
entry.Brief = "Generates Visual Studio 11 ARM project files.";
|
||||||
|
entry.Full = "";
|
||||||
|
}
|
||||||
|
|
||||||
|
//----------------------------------------------------------------------------
|
||||||
|
void cmGlobalVisualStudio11ARMGenerator
|
||||||
|
::AddPlatformDefinitions(cmMakefile* mf)
|
||||||
|
{
|
||||||
|
this->cmGlobalVisualStudio11Generator::AddPlatformDefinitions(mf);
|
||||||
|
mf->AddDefinition("MSVC_C_ARCHITECTURE_ID", "ARM");
|
||||||
|
mf->AddDefinition("MSVC_CXX_ARCHITECTURE_ID", "ARM");
|
||||||
|
}
|
|
@ -0,0 +1,37 @@
|
||||||
|
/*============================================================================
|
||||||
|
CMake - Cross Platform Makefile Generator
|
||||||
|
Copyright 2000-2011 Kitware, Inc., Insight Software Consortium
|
||||||
|
|
||||||
|
Distributed under the OSI-approved BSD License (the "License");
|
||||||
|
see accompanying file Copyright.txt for details.
|
||||||
|
|
||||||
|
This software is distributed WITHOUT ANY WARRANTY; without even the
|
||||||
|
implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||||
|
See the License for more information.
|
||||||
|
============================================================================*/
|
||||||
|
#ifndef cmGlobalVisualStudio11ARMGenerator_h
|
||||||
|
#define cmGlobalVisualStudio11ARMGenerator_h
|
||||||
|
|
||||||
|
#include "cmGlobalVisualStudio11Generator.h"
|
||||||
|
|
||||||
|
class cmGlobalVisualStudio11ARMGenerator :
|
||||||
|
public cmGlobalVisualStudio11Generator
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
cmGlobalVisualStudio11ARMGenerator() {}
|
||||||
|
static cmGlobalGenerator* New() {
|
||||||
|
return new cmGlobalVisualStudio11ARMGenerator; }
|
||||||
|
|
||||||
|
///! Get the name for the generator.
|
||||||
|
virtual const char* GetName() const {
|
||||||
|
return cmGlobalVisualStudio11ARMGenerator::GetActualName();}
|
||||||
|
static const char* GetActualName() {return "Visual Studio 11 ARM";}
|
||||||
|
|
||||||
|
virtual const char* GetPlatformName() const {return "ARM";}
|
||||||
|
|
||||||
|
/** Get the documentation entry for this generator. */
|
||||||
|
virtual void GetDocumentation(cmDocumentationEntry& entry) const;
|
||||||
|
|
||||||
|
virtual void AddPlatformDefinitions(cmMakefile* mf);
|
||||||
|
};
|
||||||
|
#endif
|
|
@ -723,6 +723,10 @@ GetSourcecodeValueFromFileExtension(const std::string& _ext,
|
||||||
{
|
{
|
||||||
sourcecode = "file.xib";
|
sourcecode = "file.xib";
|
||||||
}
|
}
|
||||||
|
else if(ext == "storyboard")
|
||||||
|
{
|
||||||
|
sourcecode = "file.storyboard";
|
||||||
|
}
|
||||||
else if(ext == "mm")
|
else if(ext == "mm")
|
||||||
{
|
{
|
||||||
sourcecode += ".cpp.objcpp";
|
sourcecode += ".cpp.objcpp";
|
||||||
|
|
|
@ -74,6 +74,13 @@ IsFunctionBlocked(const cmListFileFunction& lff,
|
||||||
{
|
{
|
||||||
this->IsBlocking = this->HasRun;
|
this->IsBlocking = this->HasRun;
|
||||||
this->HasRun = true;
|
this->HasRun = true;
|
||||||
|
|
||||||
|
// if trace is enabled, print a (trivially) evaluated "else"
|
||||||
|
// statement
|
||||||
|
if(!this->IsBlocking && mf.GetCMakeInstance()->GetTrace())
|
||||||
|
{
|
||||||
|
mf.PrintCommandTrace(this->Functions[c]);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else if (scopeDepth == 0 && !cmSystemTools::Strucmp
|
else if (scopeDepth == 0 && !cmSystemTools::Strucmp
|
||||||
(this->Functions[c].Name.c_str(),"elseif"))
|
(this->Functions[c].Name.c_str(),"elseif"))
|
||||||
|
@ -88,6 +95,12 @@ IsFunctionBlocked(const cmListFileFunction& lff,
|
||||||
cmMakefileCall stack_manager(&mf, this->Functions[c], status);
|
cmMakefileCall stack_manager(&mf, this->Functions[c], status);
|
||||||
static_cast<void>(stack_manager);
|
static_cast<void>(stack_manager);
|
||||||
|
|
||||||
|
// if trace is enabled, print the evaluated "elseif" statement
|
||||||
|
if(mf.GetCMakeInstance()->GetTrace())
|
||||||
|
{
|
||||||
|
mf.PrintCommandTrace(this->Functions[c]);
|
||||||
|
}
|
||||||
|
|
||||||
std::string errorString;
|
std::string errorString;
|
||||||
|
|
||||||
std::vector<std::string> expandedArguments;
|
std::vector<std::string> expandedArguments;
|
||||||
|
|
|
@ -23,25 +23,25 @@
|
||||||
static cmInstallTargetGenerator* CreateInstallTargetGenerator(cmTarget& target,
|
static cmInstallTargetGenerator* CreateInstallTargetGenerator(cmTarget& target,
|
||||||
const cmInstallCommandArguments& args, bool impLib, bool forceOpt = false)
|
const cmInstallCommandArguments& args, bool impLib, bool forceOpt = false)
|
||||||
{
|
{
|
||||||
return new cmInstallTargetGenerator(target, args.GetDestination().c_str(),
|
return new cmInstallTargetGenerator(target, args.GetDestination().c_str(),
|
||||||
impLib, args.GetPermissions().c_str(),
|
impLib, args.GetPermissions().c_str(),
|
||||||
args.GetConfigurations(), args.GetComponent().c_str(),
|
args.GetConfigurations(), args.GetComponent().c_str(),
|
||||||
args.GetOptional() || forceOpt);
|
args.GetOptional() || forceOpt);
|
||||||
}
|
}
|
||||||
|
|
||||||
static cmInstallFilesGenerator* CreateInstallFilesGenerator(
|
static cmInstallFilesGenerator* CreateInstallFilesGenerator(
|
||||||
const std::vector<std::string>& absFiles,
|
const std::vector<std::string>& absFiles,
|
||||||
const cmInstallCommandArguments& args, bool programs)
|
const cmInstallCommandArguments& args, bool programs)
|
||||||
{
|
{
|
||||||
return new cmInstallFilesGenerator(absFiles, args.GetDestination().c_str(),
|
return new cmInstallFilesGenerator(absFiles, args.GetDestination().c_str(),
|
||||||
programs, args.GetPermissions().c_str(),
|
programs, args.GetPermissions().c_str(),
|
||||||
args.GetConfigurations(), args.GetComponent().c_str(),
|
args.GetConfigurations(), args.GetComponent().c_str(),
|
||||||
args.GetRename().c_str(), args.GetOptional());
|
args.GetRename().c_str(), args.GetOptional());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// cmInstallCommand
|
// cmInstallCommand
|
||||||
bool cmInstallCommand::InitialPass(std::vector<std::string> const& args,
|
bool cmInstallCommand::InitialPass(std::vector<std::string> const& args,
|
||||||
cmExecutionStatus &)
|
cmExecutionStatus &)
|
||||||
{
|
{
|
||||||
// Allow calling with no arguments so that arguments may be built up
|
// Allow calling with no arguments so that arguments may be built up
|
||||||
|
@ -55,6 +55,13 @@ bool cmInstallCommand::InitialPass(std::vector<std::string> const& args,
|
||||||
this->Makefile->GetLocalGenerator()
|
this->Makefile->GetLocalGenerator()
|
||||||
->GetGlobalGenerator()->EnableInstallTarget();
|
->GetGlobalGenerator()->EnableInstallTarget();
|
||||||
|
|
||||||
|
this->DefaultComponentName = this->Makefile->GetSafeDefinition(
|
||||||
|
"CMAKE_INSTALL_DEFAULT_COMPONENT_NAME");
|
||||||
|
if (this->DefaultComponentName.empty())
|
||||||
|
{
|
||||||
|
this->DefaultComponentName = "Unspecified";
|
||||||
|
}
|
||||||
|
|
||||||
// Switch among the command modes.
|
// Switch among the command modes.
|
||||||
if(args[0] == "SCRIPT")
|
if(args[0] == "SCRIPT")
|
||||||
{
|
{
|
||||||
|
@ -95,7 +102,7 @@ bool cmInstallCommand::InitialPass(std::vector<std::string> const& args,
|
||||||
//----------------------------------------------------------------------------
|
//----------------------------------------------------------------------------
|
||||||
bool cmInstallCommand::HandleScriptMode(std::vector<std::string> const& args)
|
bool cmInstallCommand::HandleScriptMode(std::vector<std::string> const& args)
|
||||||
{
|
{
|
||||||
std::string component("Unspecified");
|
std::string component = this->DefaultComponentName;
|
||||||
int componentCount = 0;
|
int componentCount = 0;
|
||||||
bool doing_script = false;
|
bool doing_script = false;
|
||||||
bool doing_code = false;
|
bool doing_code = false;
|
||||||
|
@ -190,7 +197,7 @@ bool cmInstallCommand::HandleScriptMode(std::vector<std::string> const& args)
|
||||||
|
|
||||||
/*struct InstallPart
|
/*struct InstallPart
|
||||||
{
|
{
|
||||||
InstallPart(cmCommandArgumentsHelper* helper, const char* key,
|
InstallPart(cmCommandArgumentsHelper* helper, const char* key,
|
||||||
cmCommandArgumentGroup* group);
|
cmCommandArgumentGroup* group);
|
||||||
cmCAStringVector argVector;
|
cmCAStringVector argVector;
|
||||||
cmInstallCommandArguments args;
|
cmInstallCommandArguments args;
|
||||||
|
@ -222,7 +229,7 @@ bool cmInstallCommand::HandleTargetsMode(std::vector<std::string> const& args)
|
||||||
// ARCHIVE, RUNTIME etc. (see above)
|
// ARCHIVE, RUNTIME etc. (see above)
|
||||||
// These generic args also contain the targets and the export stuff
|
// These generic args also contain the targets and the export stuff
|
||||||
std::vector<std::string> unknownArgs;
|
std::vector<std::string> unknownArgs;
|
||||||
cmInstallCommandArguments genericArgs;
|
cmInstallCommandArguments genericArgs(this->DefaultComponentName);
|
||||||
cmCAStringVector targetList(&genericArgs.Parser, "TARGETS");
|
cmCAStringVector targetList(&genericArgs.Parser, "TARGETS");
|
||||||
cmCAString exports(&genericArgs.Parser,"EXPORT", &genericArgs.ArgumentGroup);
|
cmCAString exports(&genericArgs.Parser,"EXPORT", &genericArgs.ArgumentGroup);
|
||||||
targetList.Follows(0);
|
targetList.Follows(0);
|
||||||
|
@ -230,16 +237,16 @@ bool cmInstallCommand::HandleTargetsMode(std::vector<std::string> const& args)
|
||||||
genericArgs.Parse(&genericArgVector.GetVector(), &unknownArgs);
|
genericArgs.Parse(&genericArgVector.GetVector(), &unknownArgs);
|
||||||
bool success = genericArgs.Finalize();
|
bool success = genericArgs.Finalize();
|
||||||
|
|
||||||
cmInstallCommandArguments archiveArgs;
|
cmInstallCommandArguments archiveArgs(this->DefaultComponentName);
|
||||||
cmInstallCommandArguments libraryArgs;
|
cmInstallCommandArguments libraryArgs(this->DefaultComponentName);
|
||||||
cmInstallCommandArguments runtimeArgs;
|
cmInstallCommandArguments runtimeArgs(this->DefaultComponentName);
|
||||||
cmInstallCommandArguments frameworkArgs;
|
cmInstallCommandArguments frameworkArgs(this->DefaultComponentName);
|
||||||
cmInstallCommandArguments bundleArgs;
|
cmInstallCommandArguments bundleArgs(this->DefaultComponentName);
|
||||||
cmInstallCommandArguments privateHeaderArgs;
|
cmInstallCommandArguments privateHeaderArgs(this->DefaultComponentName);
|
||||||
cmInstallCommandArguments publicHeaderArgs;
|
cmInstallCommandArguments publicHeaderArgs(this->DefaultComponentName);
|
||||||
cmInstallCommandArguments resourceArgs;
|
cmInstallCommandArguments resourceArgs(this->DefaultComponentName);
|
||||||
|
|
||||||
// now parse the args for specific parts of the target (e.g. LIBRARY,
|
// now parse the args for specific parts of the target (e.g. LIBRARY,
|
||||||
// RUNTIME, ARCHIVE etc.
|
// RUNTIME, ARCHIVE etc.
|
||||||
archiveArgs.Parse (&archiveArgVector.GetVector(), &unknownArgs);
|
archiveArgs.Parse (&archiveArgVector.GetVector(), &unknownArgs);
|
||||||
libraryArgs.Parse (&libraryArgVector.GetVector(), &unknownArgs);
|
libraryArgs.Parse (&libraryArgVector.GetVector(), &unknownArgs);
|
||||||
|
@ -345,7 +352,7 @@ bool cmInstallCommand::HandleTargetsMode(std::vector<std::string> const& args)
|
||||||
this->Makefile->IsOn("CYGWIN") ||
|
this->Makefile->IsOn("CYGWIN") ||
|
||||||
this->Makefile->IsOn("MINGW"));
|
this->Makefile->IsOn("MINGW"));
|
||||||
|
|
||||||
for(std::vector<std::string>::const_iterator
|
for(std::vector<std::string>::const_iterator
|
||||||
targetIt=targetList.GetVector().begin();
|
targetIt=targetList.GetVector().begin();
|
||||||
targetIt!=targetList.GetVector().end();
|
targetIt!=targetList.GetVector().end();
|
||||||
++targetIt)
|
++targetIt)
|
||||||
|
@ -422,7 +429,7 @@ bool cmInstallCommand::HandleTargetsMode(std::vector<std::string> const& args)
|
||||||
case cmTarget::SHARED_LIBRARY:
|
case cmTarget::SHARED_LIBRARY:
|
||||||
{
|
{
|
||||||
// Shared libraries are handled differently on DLL and non-DLL
|
// Shared libraries are handled differently on DLL and non-DLL
|
||||||
// platforms. All windows platforms are DLL platforms including
|
// platforms. All windows platforms are DLL platforms including
|
||||||
// cygwin. Currently no other platform is a DLL platform.
|
// cygwin. Currently no other platform is a DLL platform.
|
||||||
if(dll_platform)
|
if(dll_platform)
|
||||||
{
|
{
|
||||||
|
@ -436,13 +443,13 @@ bool cmInstallCommand::HandleTargetsMode(std::vector<std::string> const& args)
|
||||||
if(!archiveArgs.GetDestination().empty())
|
if(!archiveArgs.GetDestination().empty())
|
||||||
{
|
{
|
||||||
// The import library uses the ARCHIVE properties.
|
// The import library uses the ARCHIVE properties.
|
||||||
archiveGenerator = CreateInstallTargetGenerator(target,
|
archiveGenerator = CreateInstallTargetGenerator(target,
|
||||||
archiveArgs, true);
|
archiveArgs, true);
|
||||||
}
|
}
|
||||||
if(!runtimeArgs.GetDestination().empty())
|
if(!runtimeArgs.GetDestination().empty())
|
||||||
{
|
{
|
||||||
// The DLL uses the RUNTIME properties.
|
// The DLL uses the RUNTIME properties.
|
||||||
runtimeGenerator = CreateInstallTargetGenerator(target,
|
runtimeGenerator = CreateInstallTargetGenerator(target,
|
||||||
runtimeArgs, false);
|
runtimeArgs, false);
|
||||||
}
|
}
|
||||||
if ((archiveGenerator==0) && (runtimeGenerator==0))
|
if ((archiveGenerator==0) && (runtimeGenerator==0))
|
||||||
|
@ -467,7 +474,7 @@ bool cmInstallCommand::HandleTargetsMode(std::vector<std::string> const& args)
|
||||||
// Use the FRAMEWORK properties.
|
// Use the FRAMEWORK properties.
|
||||||
if (!frameworkArgs.GetDestination().empty())
|
if (!frameworkArgs.GetDestination().empty())
|
||||||
{
|
{
|
||||||
frameworkGenerator = CreateInstallTargetGenerator(target,
|
frameworkGenerator = CreateInstallTargetGenerator(target,
|
||||||
frameworkArgs, false);
|
frameworkArgs, false);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -484,7 +491,7 @@ bool cmInstallCommand::HandleTargetsMode(std::vector<std::string> const& args)
|
||||||
// The shared library uses the LIBRARY properties.
|
// The shared library uses the LIBRARY properties.
|
||||||
if (!libraryArgs.GetDestination().empty())
|
if (!libraryArgs.GetDestination().empty())
|
||||||
{
|
{
|
||||||
libraryGenerator = CreateInstallTargetGenerator(target,
|
libraryGenerator = CreateInstallTargetGenerator(target,
|
||||||
libraryArgs, false);
|
libraryArgs, false);
|
||||||
libraryGenerator->SetNamelinkMode(namelinkMode);
|
libraryGenerator->SetNamelinkMode(namelinkMode);
|
||||||
namelinkOnly =
|
namelinkOnly =
|
||||||
|
@ -507,7 +514,7 @@ bool cmInstallCommand::HandleTargetsMode(std::vector<std::string> const& args)
|
||||||
// Static libraries use ARCHIVE properties.
|
// Static libraries use ARCHIVE properties.
|
||||||
if (!archiveArgs.GetDestination().empty())
|
if (!archiveArgs.GetDestination().empty())
|
||||||
{
|
{
|
||||||
archiveGenerator = CreateInstallTargetGenerator(target, archiveArgs,
|
archiveGenerator = CreateInstallTargetGenerator(target, archiveArgs,
|
||||||
false);
|
false);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -525,7 +532,7 @@ bool cmInstallCommand::HandleTargetsMode(std::vector<std::string> const& args)
|
||||||
// Modules use LIBRARY properties.
|
// Modules use LIBRARY properties.
|
||||||
if (!libraryArgs.GetDestination().empty())
|
if (!libraryArgs.GetDestination().empty())
|
||||||
{
|
{
|
||||||
libraryGenerator = CreateInstallTargetGenerator(target, libraryArgs,
|
libraryGenerator = CreateInstallTargetGenerator(target, libraryArgs,
|
||||||
false);
|
false);
|
||||||
libraryGenerator->SetNamelinkMode(namelinkMode);
|
libraryGenerator->SetNamelinkMode(namelinkMode);
|
||||||
namelinkOnly =
|
namelinkOnly =
|
||||||
|
@ -548,7 +555,7 @@ bool cmInstallCommand::HandleTargetsMode(std::vector<std::string> const& args)
|
||||||
// Application bundles use the BUNDLE properties.
|
// Application bundles use the BUNDLE properties.
|
||||||
if (!bundleArgs.GetDestination().empty())
|
if (!bundleArgs.GetDestination().empty())
|
||||||
{
|
{
|
||||||
bundleGenerator = CreateInstallTargetGenerator(target, bundleArgs,
|
bundleGenerator = CreateInstallTargetGenerator(target, bundleArgs,
|
||||||
false);
|
false);
|
||||||
}
|
}
|
||||||
else if(!runtimeArgs.GetDestination().empty())
|
else if(!runtimeArgs.GetDestination().empty())
|
||||||
|
@ -580,7 +587,7 @@ bool cmInstallCommand::HandleTargetsMode(std::vector<std::string> const& args)
|
||||||
// Executables use the RUNTIME properties.
|
// Executables use the RUNTIME properties.
|
||||||
if (!runtimeArgs.GetDestination().empty())
|
if (!runtimeArgs.GetDestination().empty())
|
||||||
{
|
{
|
||||||
runtimeGenerator = CreateInstallTargetGenerator(target,
|
runtimeGenerator = CreateInstallTargetGenerator(target,
|
||||||
runtimeArgs, false);
|
runtimeArgs, false);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -600,7 +607,7 @@ bool cmInstallCommand::HandleTargetsMode(std::vector<std::string> const& args)
|
||||||
target.IsExecutableWithExports())
|
target.IsExecutableWithExports())
|
||||||
{
|
{
|
||||||
// The import library uses the ARCHIVE properties.
|
// The import library uses the ARCHIVE properties.
|
||||||
archiveGenerator = CreateInstallTargetGenerator(target,
|
archiveGenerator = CreateInstallTargetGenerator(target,
|
||||||
archiveArgs, true, true);
|
archiveArgs, true, true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -710,7 +717,7 @@ bool cmInstallCommand::HandleTargetsMode(std::vector<std::string> const& args)
|
||||||
installsRuntime = installsRuntime || runtimeGenerator != 0;
|
installsRuntime = installsRuntime || runtimeGenerator != 0;
|
||||||
installsFramework = installsFramework || frameworkGenerator != 0;
|
installsFramework = installsFramework || frameworkGenerator != 0;
|
||||||
installsBundle = installsBundle || bundleGenerator != 0;
|
installsBundle = installsBundle || bundleGenerator != 0;
|
||||||
installsPrivateHeader = installsPrivateHeader
|
installsPrivateHeader = installsPrivateHeader
|
||||||
|| privateHeaderGenerator != 0;
|
|| privateHeaderGenerator != 0;
|
||||||
installsPublicHeader = installsPublicHeader || publicHeaderGenerator != 0;
|
installsPublicHeader = installsPublicHeader || publicHeaderGenerator != 0;
|
||||||
installsResource = installsResource || resourceGenerator;
|
installsResource = installsResource || resourceGenerator;
|
||||||
|
@ -729,7 +736,7 @@ bool cmInstallCommand::HandleTargetsMode(std::vector<std::string> const& args)
|
||||||
if(!exports.GetString().empty() && !namelinkOnly)
|
if(!exports.GetString().empty() && !namelinkOnly)
|
||||||
{
|
{
|
||||||
this->Makefile->GetLocalGenerator()->GetGlobalGenerator()
|
this->Makefile->GetLocalGenerator()->GetGlobalGenerator()
|
||||||
->AddTargetToExports(exports.GetCString(), &target,
|
->AddTargetToExports(exports.GetCString(), &target,
|
||||||
archiveGenerator, runtimeGenerator,
|
archiveGenerator, runtimeGenerator,
|
||||||
libraryGenerator, frameworkGenerator,
|
libraryGenerator, frameworkGenerator,
|
||||||
bundleGenerator, publicHeaderGenerator);
|
bundleGenerator, publicHeaderGenerator);
|
||||||
|
@ -788,7 +795,7 @@ bool cmInstallCommand::HandleFilesMode(std::vector<std::string> const& args)
|
||||||
{
|
{
|
||||||
// This is the FILES mode.
|
// This is the FILES mode.
|
||||||
bool programs = (args[0] == "PROGRAMS");
|
bool programs = (args[0] == "PROGRAMS");
|
||||||
cmInstallCommandArguments ica;
|
cmInstallCommandArguments ica(this->DefaultComponentName);
|
||||||
cmCAStringVector files(&ica.Parser, programs ? "PROGRAMS" : "FILES");
|
cmCAStringVector files(&ica.Parser, programs ? "PROGRAMS" : "FILES");
|
||||||
files.Follows(0);
|
files.Follows(0);
|
||||||
ica.ArgumentGroup.Follows(&files);
|
ica.ArgumentGroup.Follows(&files);
|
||||||
|
@ -803,7 +810,7 @@ bool cmInstallCommand::HandleFilesMode(std::vector<std::string> const& args)
|
||||||
this->SetError(e.str().c_str());
|
this->SetError(e.str().c_str());
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Check if there is something to do.
|
// Check if there is something to do.
|
||||||
if(files.GetVector().empty())
|
if(files.GetVector().empty())
|
||||||
{
|
{
|
||||||
|
@ -865,7 +872,7 @@ cmInstallCommand::HandleDirectoryMode(std::vector<std::string> const& args)
|
||||||
std::string permissions_file;
|
std::string permissions_file;
|
||||||
std::string permissions_dir;
|
std::string permissions_dir;
|
||||||
std::vector<std::string> configurations;
|
std::vector<std::string> configurations;
|
||||||
std::string component = "Unspecified";
|
std::string component = this->DefaultComponentName;
|
||||||
std::string literal_args;
|
std::string literal_args;
|
||||||
for(unsigned int i=1; i < args.size(); ++i)
|
for(unsigned int i=1; i < args.size(); ++i)
|
||||||
{
|
{
|
||||||
|
@ -1179,7 +1186,7 @@ cmInstallCommand::HandleDirectoryMode(std::vector<std::string> const& args)
|
||||||
bool cmInstallCommand::HandleExportMode(std::vector<std::string> const& args)
|
bool cmInstallCommand::HandleExportMode(std::vector<std::string> const& args)
|
||||||
{
|
{
|
||||||
// This is the EXPORT mode.
|
// This is the EXPORT mode.
|
||||||
cmInstallCommandArguments ica;
|
cmInstallCommandArguments ica(this->DefaultComponentName);
|
||||||
cmCAString exp(&ica.Parser, "EXPORT");
|
cmCAString exp(&ica.Parser, "EXPORT");
|
||||||
cmCAString name_space(&ica.Parser, "NAMESPACE", &ica.ArgumentGroup);
|
cmCAString name_space(&ica.Parser, "NAMESPACE", &ica.ArgumentGroup);
|
||||||
cmCAString filename(&ica.Parser, "FILE", &ica.ArgumentGroup);
|
cmCAString filename(&ica.Parser, "FILE", &ica.ArgumentGroup);
|
||||||
|
|
|
@ -337,10 +337,12 @@ private:
|
||||||
bool HandleFilesMode(std::vector<std::string> const& args);
|
bool HandleFilesMode(std::vector<std::string> const& args);
|
||||||
bool HandleDirectoryMode(std::vector<std::string> const& args);
|
bool HandleDirectoryMode(std::vector<std::string> const& args);
|
||||||
bool HandleExportMode(std::vector<std::string> const& args);
|
bool HandleExportMode(std::vector<std::string> const& args);
|
||||||
bool MakeFilesFullPath(const char* modeName,
|
bool MakeFilesFullPath(const char* modeName,
|
||||||
const std::vector<std::string>& relFiles,
|
const std::vector<std::string>& relFiles,
|
||||||
std::vector<std::string>& absFiles);
|
std::vector<std::string>& absFiles);
|
||||||
bool CheckCMP0006(bool& failure);
|
bool CheckCMP0006(bool& failure);
|
||||||
|
|
||||||
|
std::string DefaultComponentName;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -23,7 +23,8 @@ const char* cmInstallCommandArguments::PermissionsTable[] =
|
||||||
|
|
||||||
const std::string cmInstallCommandArguments::EmptyString;
|
const std::string cmInstallCommandArguments::EmptyString;
|
||||||
|
|
||||||
cmInstallCommandArguments::cmInstallCommandArguments()
|
cmInstallCommandArguments::cmInstallCommandArguments(
|
||||||
|
const std::string& defaultComponent)
|
||||||
:Parser()
|
:Parser()
|
||||||
,ArgumentGroup()
|
,ArgumentGroup()
|
||||||
,Destination (&Parser, "DESTINATION" , &ArgumentGroup)
|
,Destination (&Parser, "DESTINATION" , &ArgumentGroup)
|
||||||
|
@ -35,7 +36,9 @@ cmInstallCommandArguments::cmInstallCommandArguments()
|
||||||
,NamelinkOnly (&Parser, "NAMELINK_ONLY" , &ArgumentGroup)
|
,NamelinkOnly (&Parser, "NAMELINK_ONLY" , &ArgumentGroup)
|
||||||
,NamelinkSkip (&Parser, "NAMELINK_SKIP" , &ArgumentGroup)
|
,NamelinkSkip (&Parser, "NAMELINK_SKIP" , &ArgumentGroup)
|
||||||
,GenericArguments(0)
|
,GenericArguments(0)
|
||||||
{}
|
{
|
||||||
|
this->Component.SetDefaultString(defaultComponent.c_str());
|
||||||
|
}
|
||||||
|
|
||||||
const std::string& cmInstallCommandArguments::GetDestination() const
|
const std::string& cmInstallCommandArguments::GetDestination() const
|
||||||
{
|
{
|
||||||
|
@ -130,7 +133,7 @@ bool cmInstallCommandArguments::GetNamelinkSkip() const
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
const std::vector<std::string>&
|
const std::vector<std::string>&
|
||||||
cmInstallCommandArguments::GetConfigurations() const
|
cmInstallCommandArguments::GetConfigurations() const
|
||||||
{
|
{
|
||||||
if (!this->Configurations.GetVector().empty())
|
if (!this->Configurations.GetVector().empty())
|
||||||
|
@ -156,7 +159,7 @@ bool cmInstallCommandArguments::Finalize()
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
void cmInstallCommandArguments::Parse(const std::vector<std::string>* args,
|
void cmInstallCommandArguments::Parse(const std::vector<std::string>* args,
|
||||||
std::vector<std::string>* unconsumedArgs)
|
std::vector<std::string>* unconsumedArgs)
|
||||||
{
|
{
|
||||||
this->Parser.Parse(args, unconsumedArgs);
|
this->Parser.Parse(args, unconsumedArgs);
|
||||||
|
@ -166,9 +169,9 @@ void cmInstallCommandArguments::Parse(const std::vector<std::string>* args,
|
||||||
bool cmInstallCommandArguments::CheckPermissions()
|
bool cmInstallCommandArguments::CheckPermissions()
|
||||||
{
|
{
|
||||||
this->PermissionsString = "";
|
this->PermissionsString = "";
|
||||||
for(std::vector<std::string>::const_iterator
|
for(std::vector<std::string>::const_iterator
|
||||||
permIt = this->Permissions.GetVector().begin();
|
permIt = this->Permissions.GetVector().begin();
|
||||||
permIt != this->Permissions.GetVector().end();
|
permIt != this->Permissions.GetVector().end();
|
||||||
++permIt)
|
++permIt)
|
||||||
{
|
{
|
||||||
if (!this->CheckPermissions(*permIt, this->PermissionsString))
|
if (!this->CheckPermissions(*permIt, this->PermissionsString))
|
||||||
|
@ -183,7 +186,7 @@ bool cmInstallCommandArguments::CheckPermissions(
|
||||||
const std::string& onePermission, std::string& permissions)
|
const std::string& onePermission, std::string& permissions)
|
||||||
{
|
{
|
||||||
// Check the permission against the table.
|
// Check the permission against the table.
|
||||||
for(const char** valid = cmInstallCommandArguments::PermissionsTable;
|
for(const char** valid = cmInstallCommandArguments::PermissionsTable;
|
||||||
*valid; ++valid)
|
*valid; ++valid)
|
||||||
{
|
{
|
||||||
if(onePermission == *valid)
|
if(onePermission == *valid)
|
||||||
|
|
|
@ -19,10 +19,10 @@
|
||||||
class cmInstallCommandArguments
|
class cmInstallCommandArguments
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
cmInstallCommandArguments();
|
cmInstallCommandArguments(const std::string& defaultComponent);
|
||||||
void SetGenericArguments(cmInstallCommandArguments* args)
|
void SetGenericArguments(cmInstallCommandArguments* args)
|
||||||
{this->GenericArguments = args;}
|
{this->GenericArguments = args;}
|
||||||
void Parse(const std::vector<std::string>* args,
|
void Parse(const std::vector<std::string>* args,
|
||||||
std::vector<std::string>* unconsumedArgs);
|
std::vector<std::string>* unconsumedArgs);
|
||||||
|
|
||||||
// Compute destination path.and check permissions
|
// Compute destination path.and check permissions
|
||||||
|
@ -37,14 +37,15 @@ class cmInstallCommandArguments
|
||||||
bool GetNamelinkOnly() const;
|
bool GetNamelinkOnly() const;
|
||||||
bool GetNamelinkSkip() const;
|
bool GetNamelinkSkip() const;
|
||||||
|
|
||||||
// once HandleDirectoryMode() is also switched to using
|
// once HandleDirectoryMode() is also switched to using
|
||||||
// cmInstallCommandArguments then these two functions can become non-static
|
// cmInstallCommandArguments then these two functions can become non-static
|
||||||
// private member functions without arguments
|
// private member functions without arguments
|
||||||
static bool CheckPermissions(const std::string& onePerm,
|
static bool CheckPermissions(const std::string& onePerm,
|
||||||
std::string& perm);
|
std::string& perm);
|
||||||
cmCommandArgumentsHelper Parser;
|
cmCommandArgumentsHelper Parser;
|
||||||
cmCommandArgumentGroup ArgumentGroup;
|
cmCommandArgumentGroup ArgumentGroup;
|
||||||
private:
|
private:
|
||||||
|
cmInstallCommandArguments(); // disabled
|
||||||
cmCAString Destination;
|
cmCAString Destination;
|
||||||
cmCAString Component;
|
cmCAString Component;
|
||||||
cmCAString Rename;
|
cmCAString Rename;
|
||||||
|
|
|
@ -34,7 +34,7 @@ bool cmInstallFilesCommand
|
||||||
|
|
||||||
if((args.size() > 1) && (args[1] == "FILES"))
|
if((args.size() > 1) && (args[1] == "FILES"))
|
||||||
{
|
{
|
||||||
this->IsFilesForm = true;
|
this->IsFilesForm = true;
|
||||||
for(std::vector<std::string>::const_iterator s = args.begin()+2;
|
for(std::vector<std::string>::const_iterator s = args.begin()+2;
|
||||||
s != args.end(); ++s)
|
s != args.end(); ++s)
|
||||||
{
|
{
|
||||||
|
@ -53,45 +53,46 @@ bool cmInstallFilesCommand
|
||||||
this->FinalArgs.push_back(*s);
|
this->FinalArgs.push_back(*s);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
this->Makefile->GetLocalGenerator()->GetGlobalGenerator()
|
this->Makefile->GetLocalGenerator()->GetGlobalGenerator()
|
||||||
->AddInstallComponent("Unspecified");
|
->AddInstallComponent(this->Makefile->GetSafeDefinition(
|
||||||
|
"CMAKE_INSTALL_DEFAULT_COMPONENT_NAME"));
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
void cmInstallFilesCommand::FinalPass()
|
void cmInstallFilesCommand::FinalPass()
|
||||||
{
|
{
|
||||||
// No final pass for "FILES" form of arguments.
|
// No final pass for "FILES" form of arguments.
|
||||||
if(this->IsFilesForm)
|
if(this->IsFilesForm)
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string testf;
|
std::string testf;
|
||||||
std::string ext = this->FinalArgs[0];
|
std::string ext = this->FinalArgs[0];
|
||||||
|
|
||||||
// two different options
|
// two different options
|
||||||
if (this->FinalArgs.size() > 1)
|
if (this->FinalArgs.size() > 1)
|
||||||
{
|
{
|
||||||
// now put the files into the list
|
// now put the files into the list
|
||||||
std::vector<std::string>::iterator s = this->FinalArgs.begin();
|
std::vector<std::string>::iterator s = this->FinalArgs.begin();
|
||||||
++s;
|
++s;
|
||||||
// for each argument, get the files
|
// for each argument, get the files
|
||||||
for (;s != this->FinalArgs.end(); ++s)
|
for (;s != this->FinalArgs.end(); ++s)
|
||||||
{
|
{
|
||||||
// replace any variables
|
// replace any variables
|
||||||
std::string temps = *s;
|
std::string temps = *s;
|
||||||
if (cmSystemTools::GetFilenamePath(temps).size() > 0)
|
if (cmSystemTools::GetFilenamePath(temps).size() > 0)
|
||||||
{
|
{
|
||||||
testf = cmSystemTools::GetFilenamePath(temps) + "/" +
|
testf = cmSystemTools::GetFilenamePath(temps) + "/" +
|
||||||
cmSystemTools::GetFilenameWithoutLastExtension(temps) + ext;
|
cmSystemTools::GetFilenameWithoutLastExtension(temps) + ext;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
testf = cmSystemTools::GetFilenameWithoutLastExtension(temps) + ext;
|
testf = cmSystemTools::GetFilenameWithoutLastExtension(temps) + ext;
|
||||||
}
|
}
|
||||||
|
|
||||||
// add to the result
|
// add to the result
|
||||||
this->Files.push_back(this->FindInstallSource(testf.c_str()));
|
this->Files.push_back(this->FindInstallSource(testf.c_str()));
|
||||||
}
|
}
|
||||||
|
@ -102,9 +103,9 @@ void cmInstallFilesCommand::FinalPass()
|
||||||
std::string regex = this->FinalArgs[0].c_str();
|
std::string regex = this->FinalArgs[0].c_str();
|
||||||
cmSystemTools::Glob(this->Makefile->GetCurrentDirectory(),
|
cmSystemTools::Glob(this->Makefile->GetCurrentDirectory(),
|
||||||
regex.c_str(), files);
|
regex.c_str(), files);
|
||||||
|
|
||||||
std::vector<std::string>::iterator s = files.begin();
|
std::vector<std::string>::iterator s = files.begin();
|
||||||
// for each argument, get the files
|
// for each argument, get the files
|
||||||
for (;s != files.end(); ++s)
|
for (;s != files.end(); ++s)
|
||||||
{
|
{
|
||||||
this->Files.push_back(this->FindInstallSource(s->c_str()));
|
this->Files.push_back(this->FindInstallSource(s->c_str()));
|
||||||
|
@ -128,13 +129,14 @@ void cmInstallFilesCommand::CreateInstallGenerator() const
|
||||||
// Use a file install generator.
|
// Use a file install generator.
|
||||||
const char* no_permissions = "";
|
const char* no_permissions = "";
|
||||||
const char* no_rename = "";
|
const char* no_rename = "";
|
||||||
const char* no_component = "Unspecified";
|
std::string no_component = this->Makefile->GetSafeDefinition(
|
||||||
|
"CMAKE_INSTALL_DEFAULT_COMPONENT_NAME");
|
||||||
std::vector<std::string> no_configurations;
|
std::vector<std::string> no_configurations;
|
||||||
this->Makefile->AddInstallGenerator(
|
this->Makefile->AddInstallGenerator(
|
||||||
new cmInstallFilesGenerator(this->Files,
|
new cmInstallFilesGenerator(this->Files,
|
||||||
destination.c_str(), false,
|
destination.c_str(), false,
|
||||||
no_permissions, no_configurations,
|
no_permissions, no_configurations,
|
||||||
no_component, no_rename));
|
no_component.c_str(), no_rename));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -151,7 +153,7 @@ std::string cmInstallFilesCommand::FindInstallSource(const char* name) const
|
||||||
// This is a full path.
|
// This is a full path.
|
||||||
return name;
|
return name;
|
||||||
}
|
}
|
||||||
|
|
||||||
// This is a relative path.
|
// This is a relative path.
|
||||||
std::string tb = this->Makefile->GetCurrentOutputDirectory();
|
std::string tb = this->Makefile->GetCurrentOutputDirectory();
|
||||||
tb += "/";
|
tb += "/";
|
||||||
|
@ -159,7 +161,7 @@ std::string cmInstallFilesCommand::FindInstallSource(const char* name) const
|
||||||
std::string ts = this->Makefile->GetCurrentDirectory();
|
std::string ts = this->Makefile->GetCurrentDirectory();
|
||||||
ts += "/";
|
ts += "/";
|
||||||
ts += name;
|
ts += name;
|
||||||
|
|
||||||
if(cmSystemTools::FileExists(tb.c_str()))
|
if(cmSystemTools::FileExists(tb.c_str()))
|
||||||
{
|
{
|
||||||
// The file exists in the binary tree. Use it.
|
// The file exists in the binary tree. Use it.
|
||||||
|
|
|
@ -60,7 +60,7 @@ void cmInstallGenerator
|
||||||
std::string dest = this->GetInstallDestination();
|
std::string dest = this->GetInstallDestination();
|
||||||
if (cmSystemTools::FileIsFullPath(dest.c_str()))
|
if (cmSystemTools::FileIsFullPath(dest.c_str()))
|
||||||
{
|
{
|
||||||
os << "list(APPEND CPACK_ABSOLUTE_DESTINATION_FILES\n";
|
os << "list(APPEND CMAKE_ABSOLUTE_DESTINATION_FILES\n";
|
||||||
os << indent << " \"";
|
os << indent << " \"";
|
||||||
for(std::vector<std::string>::const_iterator fi = files.begin();
|
for(std::vector<std::string>::const_iterator fi = files.begin();
|
||||||
fi != files.end(); ++fi)
|
fi != files.end(); ++fi)
|
||||||
|
@ -80,6 +80,16 @@ void cmInstallGenerator
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
os << "\")\n";
|
os << "\")\n";
|
||||||
|
os << indent << "IF (CMAKE_WARN_ON_ABSOLUTE_INSTALL_DESTINATION)\n";
|
||||||
|
os << indent << indent << "message(WARNING \"ABSOLUTE path INSTALL "
|
||||||
|
<< "DESTINATION : ${CMAKE_ABSOLUTE_DESTINATION_FILES}\")\n";
|
||||||
|
os << indent << "ENDIF (CMAKE_WARN_ON_ABSOLUTE_INSTALL_DESTINATION)\n";
|
||||||
|
|
||||||
|
os << indent << "IF (CMAKE_ERROR_ON_ABSOLUTE_INSTALL_DESTINATION)\n";
|
||||||
|
os << indent << indent << "message(FATAL_ERROR \"ABSOLUTE path INSTALL "
|
||||||
|
<< "DESTINATION forbidden (by caller): "
|
||||||
|
<< "${CMAKE_ABSOLUTE_DESTINATION_FILES}\")\n";
|
||||||
|
os << indent << "ENDIF (CMAKE_ERROR_ON_ABSOLUTE_INSTALL_DESTINATION)\n";
|
||||||
}
|
}
|
||||||
os << "FILE(INSTALL DESTINATION \"" << dest << "\" TYPE " << stype.c_str();
|
os << "FILE(INSTALL DESTINATION \"" << dest << "\" TYPE " << stype.c_str();
|
||||||
if(optional)
|
if(optional)
|
||||||
|
|
|
@ -31,26 +31,27 @@ bool cmInstallProgramsCommand
|
||||||
for (++s;s != args.end(); ++s)
|
for (++s;s != args.end(); ++s)
|
||||||
{
|
{
|
||||||
this->FinalArgs.push_back(*s);
|
this->FinalArgs.push_back(*s);
|
||||||
}
|
}
|
||||||
|
|
||||||
this->Makefile->GetLocalGenerator()->GetGlobalGenerator()
|
this->Makefile->GetLocalGenerator()->GetGlobalGenerator()
|
||||||
->AddInstallComponent("Unspecified");
|
->AddInstallComponent(this->Makefile->GetSafeDefinition(
|
||||||
|
"CMAKE_INSTALL_DEFAULT_COMPONENT_NAME"));
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
void cmInstallProgramsCommand::FinalPass()
|
void cmInstallProgramsCommand::FinalPass()
|
||||||
{
|
{
|
||||||
bool files_mode = false;
|
bool files_mode = false;
|
||||||
if(!this->FinalArgs.empty() && this->FinalArgs[0] == "FILES")
|
if(!this->FinalArgs.empty() && this->FinalArgs[0] == "FILES")
|
||||||
{
|
{
|
||||||
files_mode = true;
|
files_mode = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
// two different options
|
// two different options
|
||||||
if (this->FinalArgs.size() > 1 || files_mode)
|
if (this->FinalArgs.size() > 1 || files_mode)
|
||||||
{
|
{
|
||||||
// for each argument, get the programs
|
// for each argument, get the programs
|
||||||
std::vector<std::string>::iterator s = this->FinalArgs.begin();
|
std::vector<std::string>::iterator s = this->FinalArgs.begin();
|
||||||
if(files_mode)
|
if(files_mode)
|
||||||
{
|
{
|
||||||
|
@ -68,9 +69,9 @@ void cmInstallProgramsCommand::FinalPass()
|
||||||
std::vector<std::string> programs;
|
std::vector<std::string> programs;
|
||||||
cmSystemTools::Glob(this->Makefile->GetCurrentDirectory(),
|
cmSystemTools::Glob(this->Makefile->GetCurrentDirectory(),
|
||||||
this->FinalArgs[0].c_str(), programs);
|
this->FinalArgs[0].c_str(), programs);
|
||||||
|
|
||||||
std::vector<std::string>::iterator s = programs.begin();
|
std::vector<std::string>::iterator s = programs.begin();
|
||||||
// for each argument, get the programs
|
// for each argument, get the programs
|
||||||
for (;s != programs.end(); ++s)
|
for (;s != programs.end(); ++s)
|
||||||
{
|
{
|
||||||
this->Files.push_back(this->FindInstallSource(s->c_str()));
|
this->Files.push_back(this->FindInstallSource(s->c_str()));
|
||||||
|
@ -89,13 +90,14 @@ void cmInstallProgramsCommand::FinalPass()
|
||||||
// Use a file install generator.
|
// Use a file install generator.
|
||||||
const char* no_permissions = "";
|
const char* no_permissions = "";
|
||||||
const char* no_rename = "";
|
const char* no_rename = "";
|
||||||
const char* no_component = "Unspecified";
|
std::string no_component = this->Makefile->GetSafeDefinition(
|
||||||
|
"CMAKE_INSTALL_DEFAULT_COMPONENT_NAME");
|
||||||
std::vector<std::string> no_configurations;
|
std::vector<std::string> no_configurations;
|
||||||
this->Makefile->AddInstallGenerator(
|
this->Makefile->AddInstallGenerator(
|
||||||
new cmInstallFilesGenerator(this->Files,
|
new cmInstallFilesGenerator(this->Files,
|
||||||
destination.c_str(), true,
|
destination.c_str(), true,
|
||||||
no_permissions, no_configurations,
|
no_permissions, no_configurations,
|
||||||
no_component, no_rename));
|
no_component.c_str(), no_rename));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -112,7 +114,7 @@ std::string cmInstallProgramsCommand
|
||||||
// This is a full path.
|
// This is a full path.
|
||||||
return name;
|
return name;
|
||||||
}
|
}
|
||||||
|
|
||||||
// This is a relative path.
|
// This is a relative path.
|
||||||
std::string tb = this->Makefile->GetCurrentOutputDirectory();
|
std::string tb = this->Makefile->GetCurrentOutputDirectory();
|
||||||
tb += "/";
|
tb += "/";
|
||||||
|
@ -120,7 +122,7 @@ std::string cmInstallProgramsCommand
|
||||||
std::string ts = this->Makefile->GetCurrentDirectory();
|
std::string ts = this->Makefile->GetCurrentDirectory();
|
||||||
ts += "/";
|
ts += "/";
|
||||||
ts += name;
|
ts += name;
|
||||||
|
|
||||||
if(cmSystemTools::FileExists(tb.c_str()))
|
if(cmSystemTools::FileExists(tb.c_str()))
|
||||||
{
|
{
|
||||||
// The file exists in the binary tree. Use it.
|
// The file exists in the binary tree. Use it.
|
||||||
|
|
|
@ -58,7 +58,8 @@ bool cmInstallTargetsCommand
|
||||||
}
|
}
|
||||||
|
|
||||||
this->Makefile->GetLocalGenerator()->GetGlobalGenerator()
|
this->Makefile->GetLocalGenerator()->GetGlobalGenerator()
|
||||||
->AddInstallComponent("Unspecified");
|
->AddInstallComponent(this->Makefile->GetSafeDefinition(
|
||||||
|
"CMAKE_INSTALL_DEFAULT_COMPONENT_NAME"));
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1548,13 +1548,10 @@ void cmLocalGenerator::GetTargetFlags(std::string& linkLibs,
|
||||||
target.GetName());
|
target.GetName());
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
std::string langVar = "CMAKE_";
|
this->AddLanguageFlags(flags, linkLanguage, buildType.c_str());
|
||||||
langVar += linkLanguage;
|
|
||||||
std::string flagsVar = langVar + "_FLAGS";
|
|
||||||
std::string sharedFlagsVar = "CMAKE_SHARED_LIBRARY_";
|
std::string sharedFlagsVar = "CMAKE_SHARED_LIBRARY_";
|
||||||
sharedFlagsVar += linkLanguage;
|
sharedFlagsVar += linkLanguage;
|
||||||
sharedFlagsVar += "_FLAGS";
|
sharedFlagsVar += "_FLAGS";
|
||||||
flags += this->Makefile->GetSafeDefinition(flagsVar.c_str());
|
|
||||||
flags += " ";
|
flags += " ";
|
||||||
flags += this->Makefile->GetSafeDefinition(sharedFlagsVar.c_str());
|
flags += this->Makefile->GetSafeDefinition(sharedFlagsVar.c_str());
|
||||||
flags += " ";
|
flags += " ";
|
||||||
|
|
|
@ -353,6 +353,22 @@ bool cmMakefile::GetBacktrace(cmListFileBacktrace& backtrace) const
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//----------------------------------------------------------------------------
|
||||||
|
void cmMakefile::PrintCommandTrace(const cmListFileFunction& lff)
|
||||||
|
{
|
||||||
|
cmOStringStream msg;
|
||||||
|
msg << lff.FilePath << "(" << lff.Line << "): ";
|
||||||
|
msg << lff.Name << "(";
|
||||||
|
for(std::vector<cmListFileArgument>::const_iterator i =
|
||||||
|
lff.Arguments.begin(); i != lff.Arguments.end(); ++i)
|
||||||
|
{
|
||||||
|
msg << i->Value;
|
||||||
|
msg << " ";
|
||||||
|
}
|
||||||
|
msg << ")";
|
||||||
|
cmSystemTools::Message(msg.str().c_str());
|
||||||
|
}
|
||||||
|
|
||||||
//----------------------------------------------------------------------------
|
//----------------------------------------------------------------------------
|
||||||
bool cmMakefile::ExecuteCommand(const cmListFileFunction& lff,
|
bool cmMakefile::ExecuteCommand(const cmListFileFunction& lff,
|
||||||
cmExecutionStatus &status)
|
cmExecutionStatus &status)
|
||||||
|
@ -385,20 +401,10 @@ bool cmMakefile::ExecuteCommand(const cmListFileFunction& lff,
|
||||||
|| pcmd->IsScriptable()))
|
|| pcmd->IsScriptable()))
|
||||||
|
|
||||||
{
|
{
|
||||||
// if trace is one, print out invoke information
|
// if trace is enabled, print out invoke information
|
||||||
if(this->GetCMakeInstance()->GetTrace())
|
if(this->GetCMakeInstance()->GetTrace())
|
||||||
{
|
{
|
||||||
cmOStringStream msg;
|
this->PrintCommandTrace(lff);
|
||||||
msg << lff.FilePath << "(" << lff.Line << "): ";
|
|
||||||
msg << lff.Name << "(";
|
|
||||||
for(std::vector<cmListFileArgument>::const_iterator i =
|
|
||||||
lff.Arguments.begin(); i != lff.Arguments.end(); ++i)
|
|
||||||
{
|
|
||||||
msg << i->Value;
|
|
||||||
msg << " ";
|
|
||||||
}
|
|
||||||
msg << ")";
|
|
||||||
cmSystemTools::Message(msg.str().c_str());
|
|
||||||
}
|
}
|
||||||
// Try invoking the command.
|
// Try invoking the command.
|
||||||
if(!pcmd->InvokeInitialPass(lff.Arguments,status) ||
|
if(!pcmd->InvokeInitialPass(lff.Arguments,status) ||
|
||||||
|
|
|
@ -700,6 +700,11 @@ public:
|
||||||
std::vector<cmSourceGroup> &groups);
|
std::vector<cmSourceGroup> &groups);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Print a command's invocation
|
||||||
|
*/
|
||||||
|
void PrintCommandTrace(const cmListFileFunction& lff);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Execute a single CMake command. Returns true if the command
|
* Execute a single CMake command. Returns true if the command
|
||||||
* succeeded or false if it failed.
|
* succeeded or false if it failed.
|
||||||
|
|
|
@ -153,14 +153,8 @@ void cmMakefileTargetGenerator::WriteTargetBuildRules()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
for(std::vector<cmSourceFile*>::const_iterator
|
this->WriteMacOSXContentRules(this->GeneratorTarget->HeaderSources);
|
||||||
si = this->GeneratorTarget->OSXContent.begin();
|
this->WriteMacOSXContentRules(this->GeneratorTarget->ExtraSources);
|
||||||
si != this->GeneratorTarget->OSXContent.end(); ++si)
|
|
||||||
{
|
|
||||||
cmTarget::SourceFileFlags tsFlags =
|
|
||||||
this->Target->GetTargetSourceFileFlags(*si);
|
|
||||||
this->WriteMacOSXContentRules(**si, tsFlags.MacFolder);
|
|
||||||
}
|
|
||||||
for(std::vector<cmSourceFile*>::const_iterator
|
for(std::vector<cmSourceFile*>::const_iterator
|
||||||
si = this->GeneratorTarget->ExternalObjects.begin();
|
si = this->GeneratorTarget->ExternalObjects.begin();
|
||||||
si != this->GeneratorTarget->ExternalObjects.end(); ++si)
|
si != this->GeneratorTarget->ExternalObjects.end(); ++si)
|
||||||
|
@ -353,6 +347,22 @@ void cmMakefileTargetGenerator::WriteTargetLanguageFlags()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//----------------------------------------------------------------------------
|
||||||
|
void cmMakefileTargetGenerator::WriteMacOSXContentRules(
|
||||||
|
std::vector<cmSourceFile*> const& sources)
|
||||||
|
{
|
||||||
|
for(std::vector<cmSourceFile*>::const_iterator
|
||||||
|
si = sources.begin(); si != sources.end(); ++si)
|
||||||
|
{
|
||||||
|
cmTarget::SourceFileFlags tsFlags =
|
||||||
|
this->Target->GetTargetSourceFileFlags(*si);
|
||||||
|
if(tsFlags.Type != cmTarget::SourceFileTypeNormal)
|
||||||
|
{
|
||||||
|
this->WriteMacOSXContentRules(**si, tsFlags.MacFolder);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
//----------------------------------------------------------------------------
|
//----------------------------------------------------------------------------
|
||||||
void cmMakefileTargetGenerator::WriteMacOSXContentRules(cmSourceFile& source,
|
void cmMakefileTargetGenerator::WriteMacOSXContentRules(cmSourceFile& source,
|
||||||
const char* pkgloc)
|
const char* pkgloc)
|
||||||
|
|
|
@ -73,6 +73,7 @@ protected:
|
||||||
void WriteTargetDependRules();
|
void WriteTargetDependRules();
|
||||||
|
|
||||||
// write rules for Mac OS X Application Bundle content.
|
// write rules for Mac OS X Application Bundle content.
|
||||||
|
void WriteMacOSXContentRules(std::vector<cmSourceFile*> const& sources);
|
||||||
void WriteMacOSXContentRules(cmSourceFile& source, const char* pkgloc);
|
void WriteMacOSXContentRules(cmSourceFile& source, const char* pkgloc);
|
||||||
|
|
||||||
// write the rules for an object
|
// write the rules for an object
|
||||||
|
|
|
@ -193,12 +193,13 @@ cmNinjaNormalTargetGenerator
|
||||||
vars.LinkFlags = "$LINK_FLAGS";
|
vars.LinkFlags = "$LINK_FLAGS";
|
||||||
|
|
||||||
std::string langFlags;
|
std::string langFlags;
|
||||||
this->GetLocalGenerator()->AddLanguageFlags(langFlags,
|
if (targetType != cmTarget::EXECUTABLE) {
|
||||||
this->TargetLinkLanguage,
|
this->GetLocalGenerator()->AddLanguageFlags(langFlags,
|
||||||
this->GetConfigName());
|
this->TargetLinkLanguage,
|
||||||
if (targetType != cmTarget::EXECUTABLE)
|
this->GetConfigName());
|
||||||
langFlags += " $ARCH_FLAGS";
|
langFlags += " $ARCH_FLAGS";
|
||||||
vars.LanguageCompileFlags = langFlags.c_str();
|
vars.LanguageCompileFlags = langFlags.c_str();
|
||||||
|
}
|
||||||
|
|
||||||
// Rule for linking library.
|
// Rule for linking library.
|
||||||
std::vector<std::string> linkCmds = this->ComputeLinkCmd();
|
std::vector<std::string> linkCmds = this->ComputeLinkCmd();
|
||||||
|
|
|
@ -396,7 +396,6 @@ cmNinjaTargetGenerator
|
||||||
cmCustomCommand const* cc = (*si)->GetCustomCommand();
|
cmCustomCommand const* cc = (*si)->GetCustomCommand();
|
||||||
this->GetLocalGenerator()->AddCustomCommandTarget(cc, this->GetTarget());
|
this->GetLocalGenerator()->AddCustomCommandTarget(cc, this->GetTarget());
|
||||||
}
|
}
|
||||||
// TODO: this->GeneratorTarget->OSXContent
|
|
||||||
for(std::vector<cmSourceFile*>::const_iterator
|
for(std::vector<cmSourceFile*>::const_iterator
|
||||||
si = this->GeneratorTarget->ExternalObjects.begin();
|
si = this->GeneratorTarget->ExternalObjects.begin();
|
||||||
si != this->GeneratorTarget->ExternalObjects.end(); ++si)
|
si != this->GeneratorTarget->ExternalObjects.end(); ++si)
|
||||||
|
@ -488,6 +487,39 @@ cmNinjaTargetGenerator
|
||||||
vars["TARGET_PDB"] = this->GetLocalGenerator()->ConvertToOutputFormat(
|
vars["TARGET_PDB"] = this->GetLocalGenerator()->ConvertToOutputFormat(
|
||||||
this->GetTargetPDB().c_str(), cmLocalGenerator::SHELL);
|
this->GetTargetPDB().c_str(), cmLocalGenerator::SHELL);
|
||||||
|
|
||||||
|
if(this->Makefile->IsOn("CMAKE_EXPORT_COMPILE_COMMANDS"))
|
||||||
|
{
|
||||||
|
cmLocalGenerator::RuleVariables compileObjectVars;
|
||||||
|
std::string lang = language;
|
||||||
|
compileObjectVars.Language = lang.c_str();
|
||||||
|
std::string escapedSourceFileName =
|
||||||
|
this->LocalGenerator->ConvertToOutputFormat(
|
||||||
|
sourceFileName.c_str(), cmLocalGenerator::SHELL);
|
||||||
|
compileObjectVars.Source = escapedSourceFileName.c_str();
|
||||||
|
compileObjectVars.Object = objectFileName.c_str();
|
||||||
|
compileObjectVars.Flags = vars["FLAGS"].c_str();
|
||||||
|
compileObjectVars.Defines = vars["DEFINES"].c_str();
|
||||||
|
|
||||||
|
// Rule for compiling object file.
|
||||||
|
std::string compileCmdVar = "CMAKE_";
|
||||||
|
compileCmdVar += language;
|
||||||
|
compileCmdVar += "_COMPILE_OBJECT";
|
||||||
|
std::string compileCmd =
|
||||||
|
this->GetMakefile()->GetRequiredDefinition(compileCmdVar.c_str());
|
||||||
|
std::vector<std::string> compileCmds;
|
||||||
|
cmSystemTools::ExpandListArgument(compileCmd, compileCmds);
|
||||||
|
|
||||||
|
for (std::vector<std::string>::iterator i = compileCmds.begin();
|
||||||
|
i != compileCmds.end(); ++i)
|
||||||
|
this->GetLocalGenerator()->ExpandRuleVariables(*i, compileObjectVars);
|
||||||
|
|
||||||
|
std::string cmdLine =
|
||||||
|
this->GetLocalGenerator()->BuildCommandLine(compileCmds);
|
||||||
|
|
||||||
|
this->GetGlobalGenerator()->AddCXXCompileCommand(cmdLine,
|
||||||
|
sourceFileName);
|
||||||
|
}
|
||||||
|
|
||||||
cmGlobalNinjaGenerator::WriteBuild(this->GetBuildFileStream(),
|
cmGlobalNinjaGenerator::WriteBuild(this->GetBuildFileStream(),
|
||||||
comment,
|
comment,
|
||||||
rule,
|
rule,
|
||||||
|
|
|
@ -700,9 +700,9 @@ void cmTarget::DefineProperties(cmake *cm)
|
||||||
"Setting this property tells CMake what imported configurations are "
|
"Setting this property tells CMake what imported configurations are "
|
||||||
"suitable for use when building the <CONFIG> configuration. "
|
"suitable for use when building the <CONFIG> configuration. "
|
||||||
"The first configuration in the list found to be provided by the "
|
"The first configuration in the list found to be provided by the "
|
||||||
"imported target is selected. If no matching configurations are "
|
"imported target is selected. If this property is set and no matching "
|
||||||
"available the imported target is considered to be not found. "
|
"configurations are available, then the imported target is considered "
|
||||||
"This property is ignored for non-imported targets.",
|
"to be not found. This property is ignored for non-imported targets.",
|
||||||
false /* TODO: make this chained */ );
|
false /* TODO: make this chained */ );
|
||||||
|
|
||||||
cm->DefineProperty
|
cm->DefineProperty
|
||||||
|
@ -832,7 +832,7 @@ void cmTarget::DefineProperties(cmake *cm)
|
||||||
"plugins. If you use it on normal shared libraries which other targets "
|
"plugins. If you use it on normal shared libraries which other targets "
|
||||||
"link against, on some platforms a linker will insert a full path to "
|
"link against, on some platforms a linker will insert a full path to "
|
||||||
"the library (as specified at link time) into the dynamic section of "
|
"the library (as specified at link time) into the dynamic section of "
|
||||||
"the dependant binary. Therefore, once installed, dynamic linker may "
|
"the dependent binary. Therefore, once installed, dynamic loader may "
|
||||||
"eventually fail to locate the library for the binary.");
|
"eventually fail to locate the library for the binary.");
|
||||||
|
|
||||||
cm->DefineProperty
|
cm->DefineProperty
|
||||||
|
|
|
@ -70,6 +70,7 @@
|
||||||
# include "cmGlobalVisualStudio10Win64Generator.h"
|
# include "cmGlobalVisualStudio10Win64Generator.h"
|
||||||
# include "cmGlobalVisualStudio11Generator.h"
|
# include "cmGlobalVisualStudio11Generator.h"
|
||||||
# include "cmGlobalVisualStudio11Win64Generator.h"
|
# include "cmGlobalVisualStudio11Win64Generator.h"
|
||||||
|
# include "cmGlobalVisualStudio11ARMGenerator.h"
|
||||||
# include "cmGlobalVisualStudio8Win64Generator.h"
|
# include "cmGlobalVisualStudio8Win64Generator.h"
|
||||||
# include "cmGlobalBorlandMakefileGenerator.h"
|
# include "cmGlobalBorlandMakefileGenerator.h"
|
||||||
# include "cmGlobalNMakeMakefileGenerator.h"
|
# include "cmGlobalNMakeMakefileGenerator.h"
|
||||||
|
@ -2569,6 +2570,8 @@ void cmake::AddDefaultGenerators()
|
||||||
&cmGlobalVisualStudio11Generator::New;
|
&cmGlobalVisualStudio11Generator::New;
|
||||||
this->Generators[cmGlobalVisualStudio11Win64Generator::GetActualName()] =
|
this->Generators[cmGlobalVisualStudio11Win64Generator::GetActualName()] =
|
||||||
&cmGlobalVisualStudio11Win64Generator::New;
|
&cmGlobalVisualStudio11Win64Generator::New;
|
||||||
|
this->Generators[cmGlobalVisualStudio11ARMGenerator::GetActualName()] =
|
||||||
|
&cmGlobalVisualStudio11ARMGenerator::New;
|
||||||
this->Generators[cmGlobalVisualStudio71Generator::GetActualName()] =
|
this->Generators[cmGlobalVisualStudio71Generator::GetActualName()] =
|
||||||
&cmGlobalVisualStudio71Generator::New;
|
&cmGlobalVisualStudio71Generator::New;
|
||||||
this->Generators[cmGlobalVisualStudio8Generator::GetActualName()] =
|
this->Generators[cmGlobalVisualStudio8Generator::GetActualName()] =
|
||||||
|
|
|
@ -81,11 +81,7 @@
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if !KWSYS_CXX_HAS_ENVIRON_IN_STDLIB_H
|
#if !KWSYS_CXX_HAS_ENVIRON_IN_STDLIB_H
|
||||||
# if defined(_WIN32)
|
|
||||||
extern __declspec(dllimport) char **environ;
|
|
||||||
# else
|
|
||||||
extern char **environ;
|
extern char **environ;
|
||||||
# endif
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef __CYGWIN__
|
#ifdef __CYGWIN__
|
||||||
|
|
|
@ -394,7 +394,7 @@ enum { _stl_num_primes = 31 };
|
||||||
|
|
||||||
// create a function with a static local to that function that returns
|
// create a function with a static local to that function that returns
|
||||||
// the static
|
// the static
|
||||||
inline const unsigned long* get_stl_prime_list() {
|
static inline const unsigned long* get_stl_prime_list() {
|
||||||
|
|
||||||
static const unsigned long _stl_prime_list[_stl_num_primes] =
|
static const unsigned long _stl_prime_list[_stl_num_primes] =
|
||||||
{
|
{
|
||||||
|
|
|
@ -35,7 +35,7 @@ private:
|
||||||
void ParseTranslationUnits()
|
void ParseTranslationUnits()
|
||||||
{
|
{
|
||||||
this->TranslationUnits = TranslationUnitsType();
|
this->TranslationUnits = TranslationUnitsType();
|
||||||
ExpectOrDie('[', "at start of compile command file");
|
ExpectOrDie('[', "at start of compile command file\n");
|
||||||
do
|
do
|
||||||
{
|
{
|
||||||
ParseTranslationUnit();
|
ParseTranslationUnit();
|
||||||
|
|
|
@ -47,7 +47,7 @@ CONFIGURE_FILE(${CMake_SOURCE_DIR}/Tests/EnforceConfig.cmake.in
|
||||||
|
|
||||||
# Testing
|
# Testing
|
||||||
IF(BUILD_TESTING)
|
IF(BUILD_TESTING)
|
||||||
IF("${CMAKE_TEST_GENERATOR}" MATCHES "Unix Makefiles")
|
IF("${CMAKE_TEST_GENERATOR}" MATCHES "Unix Makefiles" OR ("${CMAKE_TEST_GENERATOR}" MATCHES Ninja AND NOT WIN32))
|
||||||
SET(TEST_CompileCommandOutput 1)
|
SET(TEST_CompileCommandOutput 1)
|
||||||
ENDIF()
|
ENDIF()
|
||||||
|
|
||||||
|
@ -699,6 +699,31 @@ ${CMake_BINARY_DIR}/bin/cmake -DVERSION=master -P ${CMake_SOURCE_DIR}/Utilities/
|
||||||
ENDIF(CTEST_RUN_CPackComponents)
|
ENDIF(CTEST_RUN_CPackComponents)
|
||||||
|
|
||||||
IF(CTEST_RUN_CPackComponentsForAll)
|
IF(CTEST_RUN_CPackComponentsForAll)
|
||||||
|
# Analyze 'cpack --help' output for list of available generators:
|
||||||
|
execute_process(COMMAND ${CMAKE_CPACK_COMMAND} --help
|
||||||
|
RESULT_VARIABLE result
|
||||||
|
OUTPUT_VARIABLE stdout
|
||||||
|
ERROR_VARIABLE stderr)
|
||||||
|
|
||||||
|
string(REPLACE ";" "\\;" stdout "${stdout}")
|
||||||
|
string(REPLACE "\n" "E;" stdout "${stdout}")
|
||||||
|
|
||||||
|
set(collecting 0)
|
||||||
|
set(ACTIVE_CPACK_GENERATORS)
|
||||||
|
foreach(eline ${stdout})
|
||||||
|
string(REGEX REPLACE "^(.*)E$" "\\1" line "${eline}")
|
||||||
|
if(collecting AND NOT line STREQUAL "")
|
||||||
|
string(REGEX REPLACE "^ ([^ ]+) += (.*)$" "\\1" gen "${line}")
|
||||||
|
string(REGEX REPLACE "^ ([^ ]+) += (.*)$" "\\2" doc "${line}")
|
||||||
|
list(APPEND ACTIVE_CPACK_GENERATORS ${gen})
|
||||||
|
endif()
|
||||||
|
if(line STREQUAL "Generators")
|
||||||
|
set(collecting 1)
|
||||||
|
endif()
|
||||||
|
endforeach()
|
||||||
|
# ACTIVE_CPACK_GENERATORS variable
|
||||||
|
# now contains the list of 'active generators'
|
||||||
|
|
||||||
set(CPackComponentsForAll_EXTRA_OPTIONS)
|
set(CPackComponentsForAll_EXTRA_OPTIONS)
|
||||||
set(CPackRun_CPackCommand "-DCPackCommand=${CMAKE_CPACK_COMMAND}")
|
set(CPackRun_CPackCommand "-DCPackCommand=${CMAKE_CPACK_COMMAND}")
|
||||||
# set up list of CPack generators
|
# set up list of CPack generators
|
||||||
|
@ -706,18 +731,17 @@ ${CMake_BINARY_DIR}/bin/cmake -DVERSION=master -P ${CMake_SOURCE_DIR}/Utilities/
|
||||||
if(APPLE)
|
if(APPLE)
|
||||||
list(APPEND GENLST "DragNDrop")
|
list(APPEND GENLST "DragNDrop")
|
||||||
endif(APPLE)
|
endif(APPLE)
|
||||||
if (CMAKE_SYSTEM_NAME MATCHES "Linux" AND NOT CMAKE_CURRENT_BINARY_DIR MATCHES ".* .*")
|
if (NOT CMAKE_CURRENT_BINARY_DIR MATCHES ".* .*")
|
||||||
find_program(RPMBUILD NAMES rpmbuild)
|
list(FIND ACTIVE_CPACK_GENERATORS "RPM" RPM_ACTIVE)
|
||||||
endif(CMAKE_SYSTEM_NAME MATCHES "Linux" AND NOT CMAKE_CURRENT_BINARY_DIR MATCHES ".* .*")
|
if (NOT ${RPM_ACTIVE} EQUAL -1)
|
||||||
if (RPMBUILD)
|
list(APPEND GENLST "RPM")
|
||||||
list(APPEND GENLST "RPM")
|
endif(NOT ${RPM_ACTIVE} EQUAL -1)
|
||||||
endif(RPMBUILD)
|
endif(NOT CMAKE_CURRENT_BINARY_DIR MATCHES ".* .*")
|
||||||
if (CMAKE_SYSTEM_NAME MATCHES "Linux")
|
list(FIND ACTIVE_CPACK_GENERATORS "DEB" DEB_ACTIVE)
|
||||||
find_program(DPKG NAMES dpkg)
|
if (NOT ${DEB_ACTIVE} EQUAL -1)
|
||||||
if (DPKG)
|
list(APPEND GENLST "DEB")
|
||||||
list(APPEND GENLST "DEB")
|
endif(NOT ${DEB_ACTIVE} EQUAL -1)
|
||||||
endif(DPKG)
|
|
||||||
endif(CMAKE_SYSTEM_NAME MATCHES "Linux")
|
|
||||||
# set up list of component packaging ways
|
# set up list of component packaging ways
|
||||||
list(APPEND CWAYLST "default")
|
list(APPEND CWAYLST "default")
|
||||||
list(APPEND CWAYLST "OnePackPerGroup")
|
list(APPEND CWAYLST "OnePackPerGroup")
|
||||||
|
@ -1708,6 +1732,42 @@ ${CMake_BINARY_DIR}/bin/cmake -DVERSION=master -P ${CMake_SOURCE_DIR}/Utilities/
|
||||||
PASS_REGULAR_EXPRESSION
|
PASS_REGULAR_EXPRESSION
|
||||||
"Reading ctest configuration file: ${CTEST_TEST_ESCAPED_BINARY_DIR}.Tests.CTestTestConfigFileInBuildDir2.CTestConfig.cmake")
|
"Reading ctest configuration file: ${CTEST_TEST_ESCAPED_BINARY_DIR}.Tests.CTestTestConfigFileInBuildDir2.CTestConfig.cmake")
|
||||||
|
|
||||||
|
# test coverage for mumps
|
||||||
|
# create a MumpsCoverage dir in the binary tree under Testing to
|
||||||
|
# avoid the .NoDartCoverage files in the cmake testing tree
|
||||||
|
configure_file(
|
||||||
|
"${CMake_SOURCE_DIR}/Tests/MumpsCoverage/DartConfiguration.tcl.in"
|
||||||
|
"${CMake_BINARY_DIR}/Testing/MumpsCoverage/DartConfiguration.tcl")
|
||||||
|
configure_file(
|
||||||
|
"${CMake_SOURCE_DIR}/Tests/MumpsCoverage/gtm_coverage.mcov.in"
|
||||||
|
"${CMake_BINARY_DIR}/Testing/MumpsCoverage/gtm_coverage.mcov")
|
||||||
|
file(COPY "${CMake_SOURCE_DIR}/Tests/MumpsCoverage/VistA-FOIA"
|
||||||
|
DESTINATION "${CMake_BINARY_DIR}/Testing/MumpsCoverage")
|
||||||
|
add_test(NAME CTestGTMCoverage
|
||||||
|
COMMAND cmake -E chdir
|
||||||
|
${CMake_BINARY_DIR}/Testing/MumpsCoverage
|
||||||
|
$<TARGET_FILE:ctest> -T Coverage --debug)
|
||||||
|
set_tests_properties(CTestGTMCoverage PROPERTIES
|
||||||
|
PASS_REGULAR_EXPRESSION
|
||||||
|
"Process file.*XINDEX.m.*Total LOC:.*127.*Percentage Coverage: 85.83.*"
|
||||||
|
ENVIRONMENT COVFILE=)
|
||||||
|
|
||||||
|
configure_file(
|
||||||
|
"${CMake_SOURCE_DIR}/Tests/MumpsCoverage/DartConfiguration.cache.tcl.in"
|
||||||
|
"${CMake_BINARY_DIR}/Testing/MumpsCacheCoverage/DartConfiguration.tcl")
|
||||||
|
configure_file(
|
||||||
|
"${CMake_SOURCE_DIR}/Tests/MumpsCoverage/cache_coverage.cmcov.in"
|
||||||
|
"${CMake_BINARY_DIR}/Testing/MumpsCacheCoverage/cache_coverage.cmcov")
|
||||||
|
file(COPY "${CMake_SOURCE_DIR}/Tests/MumpsCoverage/VistA-FOIA"
|
||||||
|
DESTINATION "${CMake_BINARY_DIR}/Testing/MumpsCacheCoverage")
|
||||||
|
add_test(NAME CTestCacheCoverage
|
||||||
|
COMMAND cmake -E chdir
|
||||||
|
${CMake_BINARY_DIR}/Testing/MumpsCacheCoverage
|
||||||
|
$<TARGET_FILE:ctest> -T Coverage --debug)
|
||||||
|
set_tests_properties(CTestCacheCoverage PROPERTIES
|
||||||
|
PASS_REGULAR_EXPRESSION
|
||||||
|
"Process file.*XINDEX.m.*Total LOC:.*125.*Percentage Coverage: 85.60.*"
|
||||||
|
ENVIRONMENT COVFILE=)
|
||||||
# Use macro, not function so that build can still be driven by CMake 2.4.
|
# Use macro, not function so that build can still be driven by CMake 2.4.
|
||||||
# After 2.6 is required, this could be a function without the extra 'set'
|
# After 2.6 is required, this could be a function without the extra 'set'
|
||||||
# calls.
|
# calls.
|
||||||
|
|
|
@ -71,7 +71,7 @@ endmacro(check_version_string)
|
||||||
# reported.
|
# reported.
|
||||||
|
|
||||||
foreach(VTEST ALSA ARMADILLO BZIP2 CUPS CURL EXPAT FREETYPE GETTEXT GIT HSPELL
|
foreach(VTEST ALSA ARMADILLO BZIP2 CUPS CURL EXPAT FREETYPE GETTEXT GIT HSPELL
|
||||||
JASPER LIBXML2 LIBXSLT PERL PKG_CONFIG PostgreSQL TIFF ZLIB)
|
JASPER LIBLZMA LIBXML2 LIBXSLT PERL PKG_CONFIG PostgreSQL TIFF ZLIB)
|
||||||
check_version_string(${VTEST} ${VTEST}_VERSION_STRING)
|
check_version_string(${VTEST} ${VTEST}_VERSION_STRING)
|
||||||
endforeach(VTEST)
|
endforeach(VTEST)
|
||||||
|
|
||||||
|
|
|
@ -363,10 +363,16 @@ endif()
|
||||||
#-----------------------------------------------------------------------------
|
#-----------------------------------------------------------------------------
|
||||||
# Test write_basic_config_version_file().
|
# Test write_basic_config_version_file().
|
||||||
|
|
||||||
|
# also test that an empty CMAKE_SIZEOF_VOID_P is accepted:
|
||||||
|
set(_CMAKE_SIZEOF_VOID_P ${CMAKE_SIZEOF_VOID_P})
|
||||||
|
set(CMAKE_SIZEOF_VOID_P "")
|
||||||
|
|
||||||
write_basic_package_version_file(${CMAKE_CURRENT_BINARY_DIR}/Foo123ConfigVersion.cmake
|
write_basic_package_version_file(${CMAKE_CURRENT_BINARY_DIR}/Foo123ConfigVersion.cmake
|
||||||
VERSION 1.2.3
|
VERSION 1.2.3
|
||||||
COMPATIBILITY AnyNewerVersion)
|
COMPATIBILITY AnyNewerVersion)
|
||||||
|
|
||||||
|
set(CMAKE_SIZEOF_VOID_P ${_CMAKE_SIZEOF_VOID_P})
|
||||||
|
|
||||||
set(PACKAGE_FIND_VERSION 2.3.4)
|
set(PACKAGE_FIND_VERSION 2.3.4)
|
||||||
include(${CMAKE_CURRENT_BINARY_DIR}/Foo123ConfigVersion.cmake)
|
include(${CMAKE_CURRENT_BINARY_DIR}/Foo123ConfigVersion.cmake)
|
||||||
if(PACKAGE_VERSION_COMPATIBLE)
|
if(PACKAGE_VERSION_COMPATIBLE)
|
||||||
|
@ -379,6 +385,10 @@ if(NOT PACKAGE_VERSION_COMPATIBLE)
|
||||||
message(SEND_ERROR "Did not find Foo123 with version 1.2.3 (0.0.1 was requested) !")
|
message(SEND_ERROR "Did not find Foo123 with version 1.2.3 (0.0.1 was requested) !")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
if(PACKAGE_VERSION_UNSUITABLE)
|
||||||
|
message(SEND_ERROR "PACKAGE_VERSION_UNSUITABLE set, but must not be !")
|
||||||
|
endif()
|
||||||
|
|
||||||
set(PACKAGE_FIND_VERSION 1.0.0)
|
set(PACKAGE_FIND_VERSION 1.0.0)
|
||||||
include(${CMAKE_CURRENT_BINARY_DIR}/Foo123ConfigVersion.cmake)
|
include(${CMAKE_CURRENT_BINARY_DIR}/Foo123ConfigVersion.cmake)
|
||||||
if(NOT PACKAGE_VERSION_COMPATIBLE)
|
if(NOT PACKAGE_VERSION_COMPATIBLE)
|
||||||
|
@ -405,6 +415,7 @@ write_basic_config_version_file(${CMAKE_CURRENT_BINARY_DIR}/Boo123ConfigVersion.
|
||||||
VERSION 1.2.3
|
VERSION 1.2.3
|
||||||
COMPATIBILITY SameMajorVersion)
|
COMPATIBILITY SameMajorVersion)
|
||||||
|
|
||||||
|
unset(PACKAGE_VERSION_UNSUITABLE)
|
||||||
set(PACKAGE_VERSION_EXACT FALSE)
|
set(PACKAGE_VERSION_EXACT FALSE)
|
||||||
set(PACKAGE_FIND_VERSION 2.3.4)
|
set(PACKAGE_FIND_VERSION 2.3.4)
|
||||||
set(PACKAGE_FIND_VERSION_MAJOR 2)
|
set(PACKAGE_FIND_VERSION_MAJOR 2)
|
||||||
|
@ -456,6 +467,7 @@ write_basic_package_version_file(${CMAKE_CURRENT_BINARY_DIR}/Bar123ConfigVersion
|
||||||
VERSION 1.2.3.17
|
VERSION 1.2.3.17
|
||||||
COMPATIBILITY ExactVersion)
|
COMPATIBILITY ExactVersion)
|
||||||
|
|
||||||
|
unset(PACKAGE_VERSION_UNSUITABLE)
|
||||||
set(PACKAGE_VERSION_EXACT FALSE)
|
set(PACKAGE_VERSION_EXACT FALSE)
|
||||||
set(PACKAGE_FIND_VERSION 2.3.4)
|
set(PACKAGE_FIND_VERSION 2.3.4)
|
||||||
include(${CMAKE_CURRENT_BINARY_DIR}/Bar123ConfigVersion.cmake)
|
include(${CMAKE_CURRENT_BINARY_DIR}/Bar123ConfigVersion.cmake)
|
||||||
|
|
|
@ -0,0 +1,2 @@
|
||||||
|
*.cmcov -crlf -whitespace
|
||||||
|
*.mcov -crlf -whitespace
|
|
@ -0,0 +1,304 @@
|
||||||
|
Routine,Line,RtnLine,Code
|
||||||
|
DDIOL,1,0,"DDIOL ;SFISC/MKO-THE LOADER ;1:53 PM 12 Sep 1995"
|
||||||
|
,2,0," ;;22.0;VA FileMan;;Mar 30, 1999"
|
||||||
|
,3,0," ;Per VHA Directive 10-93-142, this routine should not be modified."
|
||||||
|
,4,0," ;"
|
||||||
|
,5,0,"EN(A,G,FMT) ;Write the text contained in local array A or global array G"
|
||||||
|
,6,0," ;If one string passed, use format FMT"
|
||||||
|
,7,0," N %,Y,DINAKED"
|
||||||
|
,8,0," S DINAKED=$$LGR^%ZOSV"
|
||||||
|
,9,0," ;"
|
||||||
|
,10,0," S:'$D(A) A="""""
|
||||||
|
,11,0," I $G(A)="""",$D(A)<9,$G(FMT)="""",$G(G)'?1""^""1A.7AN,$G(G)'?1""^""1A.7AN1""("".E1"")"" Q"
|
||||||
|
,12,0," ;"
|
||||||
|
,13,0," G:$D(DDS) SM"
|
||||||
|
,14,0," G:$D(DIQUIET) LD"
|
||||||
|
,15,0," ;"
|
||||||
|
,16,0," N F,I,S"
|
||||||
|
,17,0," I $D(A)=1,$G(G)="""" D"
|
||||||
|
,18,0," . S F=$S($G(FMT)]"""":FMT,1:""!"")"
|
||||||
|
,19,0," . W @F,A"
|
||||||
|
,20,0," ;"
|
||||||
|
,21,0," E I $D(A)>9 S I=0 F S I=$O(A(I)) Q:I'=+$P(I,""E"") D"
|
||||||
|
,22,0," . S F=$G(A(I,""F""),""!"") S:F="""" F=""?0"""
|
||||||
|
,23,0," . W @F,$G(A(I))"
|
||||||
|
,24,0," ;"
|
||||||
|
,25,0," E S I=0 F S I=$O(@G@(I)) Q:I'=+$P(I,""E"") D"
|
||||||
|
,26,0," . S S=$G(@G@(I,0),$G(@G@(I)))"
|
||||||
|
,27,0," . S F=$G(@G@(I,""F""),""!"") S:F="""" F=""?0"""
|
||||||
|
,28,0," . W @F,S"
|
||||||
|
,29,0," ;"
|
||||||
|
,30,0," I DINAKED]"""" S DINAKED=$S(DINAKED["""""""""""":$O(@DINAKED),1:$D(@DINAKED))"
|
||||||
|
,31,0," Q"
|
||||||
|
,32,0," ;"
|
||||||
|
,33,0,"LD ;Load text into ^TMP"
|
||||||
|
,34,0," N I,N,T"
|
||||||
|
,35,0," S T=$S($G(DDIOLFLG)[""H"":""DIHELP"",1:""DIMSG"")"
|
||||||
|
,36,0," S N=$O(^TMP(T,$J,"" ""),-1)"
|
||||||
|
,37,0," ;"
|
||||||
|
,38,0," I $D(A)=1,$G(G)="""" D"
|
||||||
|
,39,0," . D LD1(A,$S($G(FMT)]"""":FMT,1:""!""))"
|
||||||
|
,40,0," ;"
|
||||||
|
,41,0," E I $D(A)>9 S I=0 F S I=$O(A(I)) Q:I'=+$P(I,""E"") D"
|
||||||
|
,42,0," . D LD1($G(A(I)),$G(A(I,""F""),""!""))"
|
||||||
|
,43,0," ;"
|
||||||
|
,44,0," E S I=0 F S I=$O(@G@(I)) Q:I'=+$P(I,""E"") D"
|
||||||
|
,45,0," . D LD1($G(@G@(I),$G(@G@(I,0))),$G(@G@(I,""F""),""!""))"
|
||||||
|
,46,0," ;"
|
||||||
|
,47,0," K:'N @T S:N @T=N"
|
||||||
|
,48,0," I DINAKED]"""" S DINAKED=$S(DINAKED["""""""""""":$O(@DINAKED),1:$D(@DINAKED))"
|
||||||
|
,49,0," Q"
|
||||||
|
,50,0," ;"
|
||||||
|
,51,0,"LD1(S,F) ;Load string S, with format F"
|
||||||
|
,52,0," ;In: N and T"
|
||||||
|
,53,0," N C,J,L"
|
||||||
|
,54,0," S:S[$C(7) S=$TR(S,$C(7),"""")"
|
||||||
|
,55,0," F J=1:1:$L(F,""!"")-1 S N=N+1,^TMP(T,$J,N)="""""
|
||||||
|
,56,0," S:'N N=1"
|
||||||
|
,57,0," S:F[""?"" @(""C=""_$P(F,""?"",2))"
|
||||||
|
,58,0," S L=$G(^TMP(T,$J,N))"
|
||||||
|
,59,0," S ^TMP(T,$J,N)=L_$J("""",$G(C)-$L(L))_S"
|
||||||
|
,60,0," Q"
|
||||||
|
,61,0," ;"
|
||||||
|
,62,0,"SM ;Print text in ScreenMan's Command Area"
|
||||||
|
,63,0," I $D(DDSID),$D(DTOUT)!$D(DUOUT) G SMQ"
|
||||||
|
,64,0," N DDIOL"
|
||||||
|
,65,0," S DDIOL=1"
|
||||||
|
,66,0," ;"
|
||||||
|
,67,0," I $D(A)=1&($G(G)="""")!($D(A)>9) D"
|
||||||
|
,68,0," . D MSG^DDSMSG(.A,"""",$G(FMT))"
|
||||||
|
,69,0," E I $D(@G@(+$O(@G@(0)),0))#2 D"
|
||||||
|
,70,0," . D WP^DDSMSG(G)"
|
||||||
|
,71,0," E D HLP^DDSMSG(G)"
|
||||||
|
,72,0," ;"
|
||||||
|
,73,0,"SMQ I DINAKED]"""" S DINAKED=$S(DINAKED["""""""""""":$O(@DINAKED),1:$D(@DINAKED))"
|
||||||
|
,74,0," Q"
|
||||||
|
Totals for DDIOL,,0,
|
||||||
|
XINDEX,1,0,"XINDEX ;ISC/REL,GFT,GRK,RWF - INDEX & CROSS-REFERENCE ;08/04/08 13:19"
|
||||||
|
,2,1," ;;7.3;TOOLKIT;**20,27,48,61,66,68,110,121,128**;Apr 25, 1995;Build 1"
|
||||||
|
,3,0," ; Per VHA Directive 2004-038, this routine should not be modified."
|
||||||
|
,4,1," G ^XINDX6"
|
||||||
|
,5,107216,"SEP F I=1:1 S CH=$E(LIN,I) D QUOTE:CH=Q Q:"" ""[CH"
|
||||||
|
,6,107216," S ARG=$E(LIN,1,I-1) S:CH="" "" I=I+1 S LIN=$E(LIN,I,999) Q"
|
||||||
|
,7,36371,"QUOTE F I=I+1:1 S CH=$E(LIN,I) Q:CH=""""!(CH=Q)"
|
||||||
|
,8,36371," Q:CH]"""" S ERR=6 G ^XINDX1"
|
||||||
|
,9,0,"ALIVE ;enter here from taskman"
|
||||||
|
,10,1," D SETUP^XINDX7 ;Get ready to process"
|
||||||
|
,11,468,"A2 S RTN=$O(^UTILITY($J,RTN)) G ^XINDX5:RTN="""""
|
||||||
|
,12,467," S INDLC=(RTN?1""|""1.4L.NP) D LOAD:'INDLC"
|
||||||
|
,13,467," I $D(ZTQUEUED),$$S^%ZTLOAD S RTN=""~"",IND(""QUIT"")=1,ZTSTOP=1 G A2"
|
||||||
|
,14,467," I 'INDDS,INDLC W !!?10,""Data Dictionaries"",! S INDDS=1"
|
||||||
|
,15,467," D BEG"
|
||||||
|
,16,467," G A2"
|
||||||
|
,17,0," ;"
|
||||||
|
,18,467,"LOAD S X=RTN,XCNP=0,DIF=""^UTILITY(""_$J_"",1,RTN,0,"" X ^%ZOSF(""TEST"") Q:'$T X ^%ZOSF(""LOAD"") S ^UTILITY($J,1,RTN,0,0)=XCNP-1"
|
||||||
|
,19,467," I $D(^UTILITY($J,1,RTN,0,0)) S ^UTILITY($J,1,RTN,""RSUM"")=""B""_$$SUMB^XPDRSUM($NA(^UTILITY($J,1,RTN,0)))"
|
||||||
|
,20,467," Q"
|
||||||
|
,21,0,"BEG ;"
|
||||||
|
,22,467," S %=INDLC*5 W:$X+10+%>IOM ! W RTN,$J("""",10+%-$L(RTN))"
|
||||||
|
,23,467," S (IND(""DO""),IND(""SZT""),IND(""SZC""),LABO)=0,LC=$G(^UTILITY($J,1,RTN,0,0))"
|
||||||
|
,24,467," I LC="""" W !,"">>>Routine '"",RTN,""' not found <<<"",! Q"
|
||||||
|
,25,467," S TXT="""",LAB=$P(^UTILITY($J,1,RTN,0,1,0),"" "") I RTN'=$P(LAB,""("") D E^XINDX1(17)"
|
||||||
|
,26,467," I 'INDLC,LAB[""("" D E^XINDX1(55) S LAB=$P(LAB,""("")"
|
||||||
|
,27,0," ;if M routine(not compiled template or DD) and has more than 2 lines, check lines 1 & 2"
|
||||||
|
,28,467," I 'INDLC,LC>2 D"
|
||||||
|
,29,467," . N LABO S LABO=1"
|
||||||
|
,30,467," . S LIN=$G(^UTILITY($J,1,RTN,0,1,0)),TXT=1"
|
||||||
|
,31,0," . ;check 1st line (site/dev - ) patch 128"
|
||||||
|
,32,467," . I $P(LIN,"";"",2,4)'?.E1""/"".E.1""-"".E D E^XINDX1(62)"
|
||||||
|
,33,467," . S LIN=$G(^UTILITY($J,1,RTN,0,2,0)),TXT=2"
|
||||||
|
,34,0," . ;check 2nd line (;;nn.nn[TV]nn;package;.anything)"
|
||||||
|
,35,467," . I $P(LIN,"";"",3,99)'?1.2N1"".""1.2N.1(1""T"",1""V"").2N1"";""1A.AP1"";"".E D E^XINDX1(44) ;patch 121"
|
||||||
|
,36,467," . I $L(INP(11)) X INP(11) ;Version number check"
|
||||||
|
,37,467," . I $L(INP(12)) X INP(12) ;Patch number check"
|
||||||
|
,38,467,"B5 F TXT=1:1:LC S LIN=^UTILITY($J,1,RTN,0,TXT,0),LN=$L(LIN),IND(""SZT"")=IND(""SZT"")+LN+2 D LN,ST ;Process Line"
|
||||||
|
,39,467," S LAB="""",LABO=0,TXT=0,^UTILITY($J,1,RTN,0)=IND(""SZT"")_""^""_LC_""^""_IND(""SZC"")"
|
||||||
|
,40,467," I IND(""SZT"")>INP(""MAX""),'INDLC S ERR=35,ERR(1)=IND(""SZT"") D ^XINDX1"
|
||||||
|
,41,467," I IND(""SZT"")-IND(""SZC"")>INP(""CMAX""),'INDLC S ERR=58,ERR(1)=IND(""SZT"")-IND(""SZC"") D ^XINDX1"
|
||||||
|
,42,467," D POSTRTN"
|
||||||
|
,43,467," Q"
|
||||||
|
,44,0," ;Proccess one line, LN = Length, LIN = Line."
|
||||||
|
,45,44620,"LN K V S (ARG,GRB,IND(""COM""),IND(""DOL""),IND(""F""))="""",X=$P(LIN,"" "")"
|
||||||
|
,46,44620," I '$L(X) S LABO=LABO+1 G CD"
|
||||||
|
,47,5073," S (IND(""COM""),LAB)=$P(X,""(""),ARG=$P($P(X,""("",2),"")""),LABO=0,IND(""PP"")=X?1.8E1""("".E1"")"""
|
||||||
|
,48,5073," D:$L(ARG) NE^XINDX3 ;Process formal parameters as New list."
|
||||||
|
,49,5073," I 'INDLC,'$$VT^XINDX2(LAB) D E^XINDX1($S(LAB=$$CASE^XINDX52(LAB):37,1:55)) ;Check for bad labels"
|
||||||
|
,50,5073," I $D(^UTILITY($J,1,RTN,""T"",LAB)) D E^XINDX1(15) G CD ;DUP label"
|
||||||
|
,51,5073," S ^UTILITY($J,1,RTN,""T"",LAB)="""""
|
||||||
|
,52,44620,"CD I LN>245 D:'(LN=246&($E(RTN,1,3)=""|dd"")) E^XINDX1(19) ;patch 119"
|
||||||
|
,53,44620," D:LIN'?1.ANP E^XINDX1(18)"
|
||||||
|
,54,44620," S LIN=$P(LIN,"" "",2,999),IND(""LCC"")=1"
|
||||||
|
,55,44620," I LIN="""" D E^XINDX1(42) Q ;Blank line ;p110"
|
||||||
|
,56,44620," S I=0 ;Watch the scope of I, counts dots"
|
||||||
|
,57,44620," I "" .""[$E(LIN) D S X=$L($E(LIN,1,I),""."")-1,LIN=$E(LIN,I,999)"
|
||||||
|
,58,10770," . F I=1:1:245 Q:"". ""'[$E(LIN,I)"
|
||||||
|
,59,10770," . Q"
|
||||||
|
,60,0," ;check dots against Do level IND(""DO""), IND(""DOL"")=dot level"
|
||||||
|
,61,44620," D:'I&$G(IND(""DO1"")) E^XINDX1(51) S IND(""DO1"")=0 S:'I IND(""DO"")=0"
|
||||||
|
,62,44620," I I D:X>IND(""DO"") E^XINDX1(51) S (IND(""DO""),IND(""DOL""))=X"
|
||||||
|
,63,0," ;Count Comment lines, skip ;; lines"
|
||||||
|
,64,44620," I $E(LIN)="";"",$E(LIN,2)'="";"" S IND(""SZC"")=IND(""SZC"")+$L(LIN) ;p110"
|
||||||
|
,65,0," ;Process commands on line."
|
||||||
|
,66,116081,"EE I LIN="""" D ^XINDX2 Q"
|
||||||
|
,67,71461," S COM=$E(LIN),GK="""",ARG="""""
|
||||||
|
,68,71461," I COM="";"" S LIN="""" G EE ;p110"
|
||||||
|
,69,54870," I COM="" "" S ERR=$S(LIN?1."" "":13,1:0),LIN=$S(ERR:"""",1:$E(LIN,2,999)) D:ERR ^XINDX1 G EE"
|
||||||
|
,70,53608," D SEP"
|
||||||
|
,71,53608," S CM=$P(ARG,"":"",1),POST=$P(ARG,"":"",2,999),IND(""COM"")=IND(""COM"")_$C(9)_COM,ERR=48"
|
||||||
|
,72,53608," D:ARG["":""&(POST']"""") ^XINDX1 S:POST]"""" GRB=GRB_$C(9)_POST,IND(""COM"")=IND(""COM"")_"":"""
|
||||||
|
,73,0," ;SAC now allows lowercase commands"
|
||||||
|
,74,53608," I CM?.E1L.E S CM=$$CASE^XINDX52(CM),COM=$E(CM) ;I IND(""LCC"") S IND(""LCC"")=0 D E^XINDX1(47)"
|
||||||
|
,75,53608," I CM="""" D E^XINDX1(21) G EE ;Missing command"
|
||||||
|
,76,53608," S CX=$G(IND(""CMD"",CM)) I CX="""" D G:CX="""" EE"
|
||||||
|
,77,0," . I $E(CM)=""Z"" S CX=""^Z"" Q ;Proccess Z commands"
|
||||||
|
,78,0," . D E^XINDX1(1) S LIN="""" Q"
|
||||||
|
,79,53608," S CX=$P(CX,""^"",2,9)"
|
||||||
|
,80,53608," D SEP I '$L(LIN),CH="" "" D E^XINDX1(13) ;trailing space"
|
||||||
|
,81,53608," I ARG="""",""CGJMORSUWX""[COM S ERR=49 G ^XINDX1"
|
||||||
|
,82,53608," I CX>0 D E^XINDX1(CX) S CX="""""
|
||||||
|
,83,53608," D:$L(CX) @CX S:ARG'="""" GRB=GRB_$C(9)_ARG G EE"
|
||||||
|
,84,0,"B S ERR=25 G ^XINDX1"
|
||||||
|
,85,0,"C S ERR=29 G ^XINDX1"
|
||||||
|
,86,0,"D G DG1^XINDX4"
|
||||||
|
,87,0,"E Q:ARG="""" S ERR=7 G ^XINDX1"
|
||||||
|
,88,1559,"F G:ARG]"""" FR^XINDX4 S IND(""F"")=1 Q"
|
||||||
|
,89,1932,"G G DG^XINDX4"
|
||||||
|
,90,11,"H Q:ARG'="""" S ERR=32 G ^XINDX1"
|
||||||
|
,91,0,"J S ERR=36,ARG="""" G ^XINDX1"
|
||||||
|
,92,2218,"K S ERR=$S(ARG?1""("".E:22,ARG?."" "":23,1:0) D:ERR ^XINDX1"
|
||||||
|
,93,2218," G KL^XINDX3"
|
||||||
|
,94,259,"L G LO^XINDX4"
|
||||||
|
,95,30,"M G S^XINDX3"
|
||||||
|
,96,1721,"N G NE^XINDX3"
|
||||||
|
,97,0,"O S ERR=34 D ^XINDX1,O^XINDX3 Q"
|
||||||
|
,98,7762,"Q Q:ARG="""" G Q^XINDX4"
|
||||||
|
,99,85,"R S RDTIME=0 G RD^XINDX3"
|
||||||
|
,100,17549,"S G S^XINDX3"
|
||||||
|
,101,0,"TR Q ;What to process. p110"
|
||||||
|
,102,72,"U S ARG=$P(ARG,"":"") Q"
|
||||||
|
,103,0,"V S ARG="""",ERR=20 G ^XINDX1"
|
||||||
|
,104,4584,"W G WR^XINDX4"
|
||||||
|
,105,220,"X G XE^XINDX4"
|
||||||
|
,106,0,"Z S ERR=2 D ^XINDX1 G ZC^XINDX4"
|
||||||
|
,107,0," ;"
|
||||||
|
,108,0," ;Save off items from line."
|
||||||
|
,109,44620,"ST S R=LAB_$S(LABO:""+""_LABO,1:"""")"
|
||||||
|
,110,0," ;Local variable, Global, Marked Items, Naked global, Internal ref, eXternal ref., Tag ref."
|
||||||
|
,111,44620," S LOC="""" F S LOC=$O(V(LOC)),S="""" Q:LOC="""" F S S=$O(V(LOC,S)) Q:S="""" D SET"
|
||||||
|
,112,44620," S ^UTILITY($J,1,RTN,""COM"",TXT)=IND(""COM"")"
|
||||||
|
,113,44620," Q"
|
||||||
|
,114,0," ;"
|
||||||
|
,115,85079,"SET I V(LOC,S)]"""" F %=""!"",""~"" I V(LOC,S)[%,$G(^UTILITY($J,1,RTN,LOC,S))'[% S ^(S)=$G(^(S))_%"
|
||||||
|
,116,85079," S %=0"
|
||||||
|
,117,86891,"SE2 S ARG=$G(^UTILITY($J,1,RTN,LOC,S,%)) I $L(ARG)>230 S %=%+1 G SE2"
|
||||||
|
,118,85079," S ^UTILITY($J,1,RTN,LOC,S,%)=ARG_R_V(LOC,S)_"","""
|
||||||
|
,119,85079," Q"
|
||||||
|
,120,0," ;"
|
||||||
|
,121,0,"POSTRTN ;Do more overall checking"
|
||||||
|
,122,467," N V,E,T,T1,T2"
|
||||||
|
,123,467," S T="""" ;Check for missing Labels"
|
||||||
|
,124,467," F S T=$O(^UTILITY($J,1,RTN,""I"",T)),T2=T Q:T="""" S T1=$G(^(T,0)) D"
|
||||||
|
,125,2091," . Q:$E(T2,1,2)=""@("""
|
||||||
|
,126,2044," . S:$E(T2,1,2)=""$$"" T2=$E(T2,3,99)"
|
||||||
|
,127,2044," . I T2]"""",'$D(^UTILITY($J,1,RTN,""T"",$P(T2,""+"",1))) D"
|
||||||
|
,128,0," . . F I=1:1:$L(T1,"","")-1 S LAB=$P(T1,"","",I),LABO=+$P(LAB,""+"",2),LAB=$P(LAB,""+""),E=14,E(1)=T D E^XINDX1(.E)"
|
||||||
|
,129,0," . . Q"
|
||||||
|
,130,2044," . Q"
|
||||||
|
,131,467," S LAB="""",LABO=0 ;Check for valid label names"
|
||||||
|
,132,467," I 'INDLC F S LAB=$O(^UTILITY($J,1,RTN,""T"",LAB)) Q:LAB="""" D"
|
||||||
|
,133,5073," . I '$$VA^XINDX2(LAB) D E^XINDX1(55) Q"
|
||||||
|
,134,5073," . D:'$$VT^XINDX2(LAB) E^XINDX1(37)"
|
||||||
|
,135,5073," . Q"
|
||||||
|
,136,467," S LAB="""",LABO=0 ;Check for valid variable names."
|
||||||
|
,137,467," F S LAB=$O(^UTILITY($J,1,RTN,""L"",LAB)) Q:LAB="""" D"
|
||||||
|
,138,15909," . D VLNF^XINDX3($P(LAB,""(""))"
|
||||||
|
,139,15909," . Q"
|
||||||
|
,140,467," Q"
|
||||||
|
,141,0," ;"
|
||||||
|
,142,0,"QUICK ;Quick, Just get a routine an print the results"
|
||||||
|
,143,0," D QUICK^XINDX6()"
|
||||||
|
,144,0," Q"
|
||||||
|
Totals for XINDEX,,2446443,
|
||||||
|
XINDX1,1,0,"XINDX1 ;ISC/REL,GRK,RWF - ERROR ROUTINE ;08/05/08 13:59"
|
||||||
|
,2,2," ;;7.3;TOOLKIT;**20,61,66,68,110,121,128**;Apr 25, 1995;Build 1"
|
||||||
|
,3,0," ; Per VHA Directive 2004-038, this routine should not be modified."
|
||||||
|
,4,2," G A"
|
||||||
|
,5,0,"E(ERR) ;"
|
||||||
|
,6,75,"A N %,%1 ;TXT is the line of the error."
|
||||||
|
,7,75," S ERTX=LAB_$S(LABO:""+""_LABO,1:"""")_$C(9),%1=$T(ERROR+ERR),ERTX=ERTX_$S(ERR:$P(%1,"";"",4,9),1:ERR) ;p110"
|
||||||
|
,8,75," I ERTX[""|"" F %=1:1 S ERTX=$P(ERTX,""|"")_$S($D(ERR(%)):ERR(%),1:""??"")_$P(ERTX,""|"",%+1,99) Q:ERTX'[""|"""
|
||||||
|
,9,75,"B I $P(%1,"";"",3)]"""" D Q:%1]"""" ;Don't flag kernel doing kernel."
|
||||||
|
,10,0," . S %1=$P(%1,"";"",3)"
|
||||||
|
,11,0," . F Q:RTN[$P(%1,"","") S %1=$P(%1,"","",2,99) ;quit if RTN[%1 or null."
|
||||||
|
,12,0," . Q"
|
||||||
|
,13,75," I ERR=17,$E(RTN)'=""%"",$E(LAB)=""%"" Q ;Don't flag %RTN w/o %."
|
||||||
|
,14,0," ;Global is Error Line,tab,error tag,tab,error text"
|
||||||
|
,15,75," S %=$G(^UTILITY($J,1,RTN,""E"",0))+1,^(0)=%,^(%)=TXT_$C(9)_ERTX"
|
||||||
|
,16,75," Q"
|
||||||
|
,17,0," ;"
|
||||||
|
,18,0," ;F = Fatal, S = Standard, W = Warning, I = Info"
|
||||||
|
,19,0,"ERROR ;"
|
||||||
|
,20,0,"1 ;;;F - UNDEFINED COMMAND (rest of line not checked)."
|
||||||
|
,21,0,"2 ;;;F - Non-standard (Undefined) 'Z' command."
|
||||||
|
,22,0,"3 ;;XTRMON;F - Undefined Function."
|
||||||
|
,23,0,"4 ;;;F - Undefined Special Variable."
|
||||||
|
,24,0,"5 ;;;F - Unmatched Parenthesis."
|
||||||
|
,25,0,"6 ;;;F - Unmatched Quotation Marks."
|
||||||
|
,26,0,"7 ;;;F - ELSE Command followed by only one space."
|
||||||
|
,27,0,"8 ;;;F - FOR Command did not contain '='."
|
||||||
|
,28,0,"9 ;;;I - QUIT Command followed by only one space."
|
||||||
|
,29,0,"10 ;;;F - Unrecognized argument in SET command."
|
||||||
|
,30,0,"11 ;;;W - Invalid local variable name."
|
||||||
|
,31,0,"12 ;;;W - Invalid global variable name."
|
||||||
|
,32,0,"13 ;;;W - Blank(s) at end of line."
|
||||||
|
,33,0,"14 ;;;F - Call to missing label '|' in this routine."
|
||||||
|
,34,0,"15 ;;;W - Duplicate label. (M57)"
|
||||||
|
,35,0,"16 ;;;F - Error in pattern code."
|
||||||
|
,36,0,"17 ;;;W - First line label NOT routine name."
|
||||||
|
,37,0,"18 ;;;W - Line contains a CONTROL (non-graphic) character."
|
||||||
|
,38,0,"19 ;;;S - Line is longer than 245 bytes."
|
||||||
|
,39,0,"20 ;;;S - View command used."
|
||||||
|
,40,0,"21 ;;;F - General Syntax Error."
|
||||||
|
,41,0,"22 ;;;S - Exclusive Kill."
|
||||||
|
,42,0,"23 ;;;S - Unargumented Kill."
|
||||||
|
,43,0,"24 ;;;S - Kill of an unsubscripted global."
|
||||||
|
,44,0,"25 ;;;S - Break command used."
|
||||||
|
,45,0,"26 ;;;S - Exclusive or Unargumented NEW command."
|
||||||
|
,46,0,"27 ;;;S - $View function used."
|
||||||
|
,47,0,"28 ;;ZOSV,ZIS,ZT;S - Non-standard $Z special variable used."
|
||||||
|
,48,0,"29 ;;ZIS,ZTM;S - 'Close' command should be invoked through 'D ^%ZISC'."
|
||||||
|
,49,0,"30 ;;;S - LABEL+OFFSET syntax."
|
||||||
|
,50,0,"31 ;;ZOSV,ZIS,ZT;S - Non-standard $Z function used."
|
||||||
|
,51,0,"32 ;;;S - 'HALT' command should be invoked through 'G ^XUSCLEAN'."
|
||||||
|
,52,0,"33 ;;;S - Read command doesn't have a timeout."
|
||||||
|
,53,0,"34 ;;ZIS;S - 'OPEN' command should be invoked through ^%ZIS."
|
||||||
|
,54,0,"35 ;;;S - Routine exceeds SACC maximum size of 20000 (|)."
|
||||||
|
,55,0,"36 ;;ZTM;S - Should use 'TASKMAN' instead of 'JOB' command."
|
||||||
|
,56,0,"37 ;;;F - Label is not valid."
|
||||||
|
,57,0,"38 ;;;F - Call to this |"
|
||||||
|
,58,0,"39 ;;ZIS,XUS,XUP;S - Kill of a protected variable (|)."
|
||||||
|
,59,0,"40 ;;;S - Space where a command should be."
|
||||||
|
,60,0,"41 ;;;I - Star or pound READ used."
|
||||||
|
,61,0,"42 ;;;W - Null line (no commands or comment)."
|
||||||
|
,62,0,"43 ;;;F - Invalid or wrong number of arguments to a function."
|
||||||
|
,63,0,"44 ;;;S - 2nd line of routine violates the SAC."
|
||||||
|
,64,0,"45 ;;ZT,ZIS,XUTM,XTER;S - Set to a '%' global."
|
||||||
|
,65,0,"46 ;;;F - Quoted string not followed by a separator."
|
||||||
|
,66,0,"47 ;;;S - Lowercase command(s) used in line."
|
||||||
|
,67,0,"48 ;;;F - Missing argument to a command post-conditional."
|
||||||
|
,68,0,"49 ;;;F - Command missing an argument."
|
||||||
|
,69,0,"50 ;;ZTM;S - Extended reference."
|
||||||
|
,70,0,"51 ;;;F - Block structure mismatch."
|
||||||
|
,71,0,"52 ;;;F - Reference to routine '^|'. That isn't in this UCI."
|
||||||
|
,72,0,"53 ;;;F - Bad Number."
|
||||||
|
,73,0,"54 ;;XG;S - Access to SSVN's restricted to Kernel."
|
||||||
|
,74,0,"55 ;;;S - Violates VA programming standards."
|
||||||
|
,75,0,"56 ;;;S - Patch number '|' missing from second line."
|
||||||
|
,76,0,"57 ;;;S - Lower/Mixed case Variable name used."
|
||||||
|
,77,0,"58 ;;;S - Routine code exceeds SACC maximum size of 15000 (|)."
|
||||||
|
,78,0,"59 ;;;F - Bad WRITE syntax."
|
||||||
|
,79,0,"60 ;;;S - Lock missing Timeout."
|
||||||
|
,80,0,"61 ;;;S - Non-Incremental Lock."
|
||||||
|
,81,0,"62 ;;;S - First line of routine violates the SAC."
|
||||||
|
,82,0,"63 ;;;F - GO or DO mismatch from block structure (M45)."
|
||||||
|
Totals for XINDX1,,529,
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,8 @@
|
||||||
|
# This file is configured by CMake automatically as DartConfiguration.tcl
|
||||||
|
# If you choose not to use CMake, this file may be hand configured, by
|
||||||
|
# filling in the required variables.
|
||||||
|
|
||||||
|
|
||||||
|
# Configuration directories and files
|
||||||
|
SourceDirectory: ${CMake_SOURCE_DIR}/Testing/MumpsCoverage
|
||||||
|
BuildDirectory: ${CMake_BINARY_DIR}/Testing/MumpsCacheCoverage
|
|
@ -0,0 +1,8 @@
|
||||||
|
# This file is configured by CMake automatically as DartConfiguration.tcl
|
||||||
|
# If you choose not to use CMake, this file may be hand configured, by
|
||||||
|
# filling in the required variables.
|
||||||
|
|
||||||
|
|
||||||
|
# Configuration directories and files
|
||||||
|
SourceDirectory: ${CMake_SOURCE_DIR}/Testing/MumpsCoverage
|
||||||
|
BuildDirectory: ${CMake_BINARY_DIR}/Testing/MumpsCoverage
|
|
@ -0,0 +1,144 @@
|
||||||
|
XINDEX ;ISC/REL,GFT,GRK,RWF - INDEX & CROSS-REFERENCE ;08/04/08 13:19
|
||||||
|
;;7.3;TOOLKIT;**20,27,48,61,66,68,110,121,128**;Apr 25, 1995;Build 1
|
||||||
|
; Per VHA Directive 2004-038, this routine should not be modified.
|
||||||
|
G ^XINDX6
|
||||||
|
SEP F I=1:1 S CH=$E(LIN,I) D QUOTE:CH=Q Q:" "[CH
|
||||||
|
S ARG=$E(LIN,1,I-1) S:CH=" " I=I+1 S LIN=$E(LIN,I,999) Q
|
||||||
|
QUOTE F I=I+1:1 S CH=$E(LIN,I) Q:CH=""!(CH=Q)
|
||||||
|
Q:CH]"" S ERR=6 G ^XINDX1
|
||||||
|
ALIVE ;enter here from taskman
|
||||||
|
D SETUP^XINDX7 ;Get ready to process
|
||||||
|
A2 S RTN=$O(^UTILITY($J,RTN)) G ^XINDX5:RTN=""
|
||||||
|
S INDLC=(RTN?1"|"1.4L.NP) D LOAD:'INDLC
|
||||||
|
I $D(ZTQUEUED),$$S^%ZTLOAD S RTN="~",IND("QUIT")=1,ZTSTOP=1 G A2
|
||||||
|
I 'INDDS,INDLC W !!?10,"Data Dictionaries",! S INDDS=1
|
||||||
|
D BEG
|
||||||
|
G A2
|
||||||
|
;
|
||||||
|
LOAD S X=RTN,XCNP=0,DIF="^UTILITY("_$J_",1,RTN,0," X ^%ZOSF("TEST") Q:'$T X ^%ZOSF("LOAD") S ^UTILITY($J,1,RTN,0,0)=XCNP-1
|
||||||
|
I $D(^UTILITY($J,1,RTN,0,0)) S ^UTILITY($J,1,RTN,"RSUM")="B"_$$SUMB^XPDRSUM($NA(^UTILITY($J,1,RTN,0)))
|
||||||
|
Q
|
||||||
|
BEG ;
|
||||||
|
S %=INDLC*5 W:$X+10+%>IOM ! W RTN,$J("",10+%-$L(RTN))
|
||||||
|
S (IND("DO"),IND("SZT"),IND("SZC"),LABO)=0,LC=$G(^UTILITY($J,1,RTN,0,0))
|
||||||
|
I LC="" W !,">>>Routine '",RTN,"' not found <<<",! Q
|
||||||
|
S TXT="",LAB=$P(^UTILITY($J,1,RTN,0,1,0)," ") I RTN'=$P(LAB,"(") D E^XINDX1(17)
|
||||||
|
I 'INDLC,LAB["(" D E^XINDX1(55) S LAB=$P(LAB,"(")
|
||||||
|
;if M routine(not compiled template or DD) and has more than 2 lines, check lines 1 & 2
|
||||||
|
I 'INDLC,LC>2 D
|
||||||
|
. N LABO S LABO=1
|
||||||
|
. S LIN=$G(^UTILITY($J,1,RTN,0,1,0)),TXT=1
|
||||||
|
. ;check 1st line (site/dev - ) patch 128
|
||||||
|
. I $P(LIN,";",2,4)'?.E1"/".E.1"-".E D E^XINDX1(62)
|
||||||
|
. S LIN=$G(^UTILITY($J,1,RTN,0,2,0)),TXT=2
|
||||||
|
. ;check 2nd line (;;nn.nn[TV]nn;package;.anything)
|
||||||
|
. I $P(LIN,";",3,99)'?1.2N1"."1.2N.1(1"T",1"V").2N1";"1A.AP1";".E D E^XINDX1(44) ;patch 121
|
||||||
|
. I $L(INP(11)) X INP(11) ;Version number check
|
||||||
|
. I $L(INP(12)) X INP(12) ;Patch number check
|
||||||
|
B5 F TXT=1:1:LC S LIN=^UTILITY($J,1,RTN,0,TXT,0),LN=$L(LIN),IND("SZT")=IND("SZT")+LN+2 D LN,ST ;Process Line
|
||||||
|
S LAB="",LABO=0,TXT=0,^UTILITY($J,1,RTN,0)=IND("SZT")_"^"_LC_"^"_IND("SZC")
|
||||||
|
I IND("SZT")>INP("MAX"),'INDLC S ERR=35,ERR(1)=IND("SZT") D ^XINDX1
|
||||||
|
I IND("SZT")-IND("SZC")>INP("CMAX"),'INDLC S ERR=58,ERR(1)=IND("SZT")-IND("SZC") D ^XINDX1
|
||||||
|
D POSTRTN
|
||||||
|
Q
|
||||||
|
;Proccess one line, LN = Length, LIN = Line.
|
||||||
|
LN K V S (ARG,GRB,IND("COM"),IND("DOL"),IND("F"))="",X=$P(LIN," ")
|
||||||
|
I '$L(X) S LABO=LABO+1 G CD
|
||||||
|
S (IND("COM"),LAB)=$P(X,"("),ARG=$P($P(X,"(",2),")"),LABO=0,IND("PP")=X?1.8E1"(".E1")"
|
||||||
|
D:$L(ARG) NE^XINDX3 ;Process formal parameters as New list.
|
||||||
|
I 'INDLC,'$$VT^XINDX2(LAB) D E^XINDX1($S(LAB=$$CASE^XINDX52(LAB):37,1:55)) ;Check for bad labels
|
||||||
|
I $D(^UTILITY($J,1,RTN,"T",LAB)) D E^XINDX1(15) G CD ;DUP label
|
||||||
|
S ^UTILITY($J,1,RTN,"T",LAB)=""
|
||||||
|
CD I LN>245 D:'(LN=246&($E(RTN,1,3)="|dd")) E^XINDX1(19) ;patch 119
|
||||||
|
D:LIN'?1.ANP E^XINDX1(18)
|
||||||
|
S LIN=$P(LIN," ",2,999),IND("LCC")=1
|
||||||
|
I LIN="" D E^XINDX1(42) Q ;Blank line ;p110
|
||||||
|
S I=0 ;Watch the scope of I, counts dots
|
||||||
|
I " ."[$E(LIN) D S X=$L($E(LIN,1,I),".")-1,LIN=$E(LIN,I,999)
|
||||||
|
. F I=1:1:245 Q:". "'[$E(LIN,I)
|
||||||
|
. Q
|
||||||
|
;check dots against Do level IND("DO"), IND("DOL")=dot level
|
||||||
|
D:'I&$G(IND("DO1")) E^XINDX1(51) S IND("DO1")=0 S:'I IND("DO")=0
|
||||||
|
I I D:X>IND("DO") E^XINDX1(51) S (IND("DO"),IND("DOL"))=X
|
||||||
|
;Count Comment lines, skip ;; lines
|
||||||
|
I $E(LIN)=";",$E(LIN,2)'=";" S IND("SZC")=IND("SZC")+$L(LIN) ;p110
|
||||||
|
;Process commands on line.
|
||||||
|
EE I LIN="" D ^XINDX2 Q
|
||||||
|
S COM=$E(LIN),GK="",ARG=""
|
||||||
|
I COM=";" S LIN="" G EE ;p110
|
||||||
|
I COM=" " S ERR=$S(LIN?1." ":13,1:0),LIN=$S(ERR:"",1:$E(LIN,2,999)) D:ERR ^XINDX1 G EE
|
||||||
|
D SEP
|
||||||
|
S CM=$P(ARG,":",1),POST=$P(ARG,":",2,999),IND("COM")=IND("COM")_$C(9)_COM,ERR=48
|
||||||
|
D:ARG[":"&(POST']"") ^XINDX1 S:POST]"" GRB=GRB_$C(9)_POST,IND("COM")=IND("COM")_":"
|
||||||
|
;SAC now allows lowercase commands
|
||||||
|
I CM?.E1L.E S CM=$$CASE^XINDX52(CM),COM=$E(CM) ;I IND("LCC") S IND("LCC")=0 D E^XINDX1(47)
|
||||||
|
I CM="" D E^XINDX1(21) G EE ;Missing command
|
||||||
|
S CX=$G(IND("CMD",CM)) I CX="" D G:CX="" EE
|
||||||
|
. I $E(CM)="Z" S CX="^Z" Q ;Proccess Z commands
|
||||||
|
. D E^XINDX1(1) S LIN="" Q
|
||||||
|
S CX=$P(CX,"^",2,9)
|
||||||
|
D SEP I '$L(LIN),CH=" " D E^XINDX1(13) ;trailing space
|
||||||
|
I ARG="","CGJMORSUWX"[COM S ERR=49 G ^XINDX1
|
||||||
|
I CX>0 D E^XINDX1(CX) S CX=""
|
||||||
|
D:$L(CX) @CX S:ARG'="" GRB=GRB_$C(9)_ARG G EE
|
||||||
|
B S ERR=25 G ^XINDX1
|
||||||
|
C S ERR=29 G ^XINDX1
|
||||||
|
D G DG1^XINDX4
|
||||||
|
E Q:ARG="" S ERR=7 G ^XINDX1
|
||||||
|
F G:ARG]"" FR^XINDX4 S IND("F")=1 Q
|
||||||
|
G G DG^XINDX4
|
||||||
|
H Q:ARG'="" S ERR=32 G ^XINDX1
|
||||||
|
J S ERR=36,ARG="" G ^XINDX1
|
||||||
|
K S ERR=$S(ARG?1"(".E:22,ARG?." ":23,1:0) D:ERR ^XINDX1
|
||||||
|
G KL^XINDX3
|
||||||
|
L G LO^XINDX4
|
||||||
|
M G S^XINDX3
|
||||||
|
N G NE^XINDX3
|
||||||
|
O S ERR=34 D ^XINDX1,O^XINDX3 Q
|
||||||
|
Q Q:ARG="" G Q^XINDX4
|
||||||
|
R S RDTIME=0 G RD^XINDX3
|
||||||
|
S G S^XINDX3
|
||||||
|
TR Q ;What to process. p110
|
||||||
|
U S ARG=$P(ARG,":") Q
|
||||||
|
V S ARG="",ERR=20 G ^XINDX1
|
||||||
|
W G WR^XINDX4
|
||||||
|
X G XE^XINDX4
|
||||||
|
Z S ERR=2 D ^XINDX1 G ZC^XINDX4
|
||||||
|
;
|
||||||
|
;Save off items from line.
|
||||||
|
ST S R=LAB_$S(LABO:"+"_LABO,1:"")
|
||||||
|
;Local variable, Global, Marked Items, Naked global, Internal ref, eXternal ref., Tag ref.
|
||||||
|
S LOC="" F S LOC=$O(V(LOC)),S="" Q:LOC="" F S S=$O(V(LOC,S)) Q:S="" D SET
|
||||||
|
S ^UTILITY($J,1,RTN,"COM",TXT)=IND("COM")
|
||||||
|
Q
|
||||||
|
;
|
||||||
|
SET I V(LOC,S)]"" F %="!","~" I V(LOC,S)[%,$G(^UTILITY($J,1,RTN,LOC,S))'[% S ^(S)=$G(^(S))_%
|
||||||
|
S %=0
|
||||||
|
SE2 S ARG=$G(^UTILITY($J,1,RTN,LOC,S,%)) I $L(ARG)>230 S %=%+1 G SE2
|
||||||
|
S ^UTILITY($J,1,RTN,LOC,S,%)=ARG_R_V(LOC,S)_","
|
||||||
|
Q
|
||||||
|
;
|
||||||
|
POSTRTN ;Do more overall checking
|
||||||
|
N V,E,T,T1,T2
|
||||||
|
S T="" ;Check for missing Labels
|
||||||
|
F S T=$O(^UTILITY($J,1,RTN,"I",T)),T2=T Q:T="" S T1=$G(^(T,0)) D
|
||||||
|
. Q:$E(T2,1,2)="@("
|
||||||
|
. S:$E(T2,1,2)="$$" T2=$E(T2,3,99)
|
||||||
|
. I T2]"",'$D(^UTILITY($J,1,RTN,"T",$P(T2,"+",1))) D
|
||||||
|
. . F I=1:1:$L(T1,",")-1 S LAB=$P(T1,",",I),LABO=+$P(LAB,"+",2),LAB=$P(LAB,"+"),E=14,E(1)=T D E^XINDX1(.E)
|
||||||
|
. . Q
|
||||||
|
. Q
|
||||||
|
S LAB="",LABO=0 ;Check for valid label names
|
||||||
|
I 'INDLC F S LAB=$O(^UTILITY($J,1,RTN,"T",LAB)) Q:LAB="" D
|
||||||
|
. I '$$VA^XINDX2(LAB) D E^XINDX1(55) Q
|
||||||
|
. D:'$$VT^XINDX2(LAB) E^XINDX1(37)
|
||||||
|
. Q
|
||||||
|
S LAB="",LABO=0 ;Check for valid variable names.
|
||||||
|
F S LAB=$O(^UTILITY($J,1,RTN,"L",LAB)) Q:LAB="" D
|
||||||
|
. D VLNF^XINDX3($P(LAB,"("))
|
||||||
|
. Q
|
||||||
|
Q
|
||||||
|
;
|
||||||
|
QUICK ;Quick, Just get a routine an print the results
|
||||||
|
D QUICK^XINDX6()
|
||||||
|
Q
|
|
@ -0,0 +1,2 @@
|
||||||
|
packages:${CMake_BINARY_DIR}/Testing/MumpsCoverage/VistA-FOIA/Packages
|
||||||
|
coverage_dir:${CMake_SOURCE_DIR}/Tests/MumpsCoverage
|
|
@ -0,0 +1,2 @@
|
||||||
|
packages:${CMake_BINARY_DIR}/Testing/MumpsCoverage/VistA-FOIA/Packages
|
||||||
|
coverage_dir:${CMake_SOURCE_DIR}/Tests/MumpsCoverage
|
27
bootstrap
27
bootstrap
|
@ -449,6 +449,12 @@ cmake_escape ()
|
||||||
echo $1 | sed "s/ /\\\\ /g"
|
echo $1 | sed "s/ /\\\\ /g"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# Strip prefix from argument
|
||||||
|
cmake_arg ()
|
||||||
|
{
|
||||||
|
echo "$1" | sed "s/^${2-[^=]*=}//"
|
||||||
|
}
|
||||||
|
|
||||||
# Write message to the log
|
# Write message to the log
|
||||||
cmake_log ()
|
cmake_log ()
|
||||||
{
|
{
|
||||||
|
@ -533,21 +539,24 @@ cmake_ccache_enabled=
|
||||||
cmake_prefix_dir="${cmake_default_prefix}"
|
cmake_prefix_dir="${cmake_default_prefix}"
|
||||||
while test $# != 0; do
|
while test $# != 0; do
|
||||||
case "$1" in
|
case "$1" in
|
||||||
--prefix=*) cmake_prefix_dir=`cmake_fix_slashes "${1#*=}"` ;;
|
--prefix=*) dir=`cmake_arg "$1"`
|
||||||
--parallel=*) cmake_parallel_make="${1#*=}" ;;
|
cmake_prefix_dir=`cmake_fix_slashes "$dir"` ;;
|
||||||
--datadir=*) cmake_data_dir="${1#*=}" ;;
|
--parallel=*) cmake_parallel_make=`cmake_arg "$1"` ;;
|
||||||
--docdir=*) cmake_doc_dir="${1#*=}" ;;
|
--datadir=*) cmake_data_dir=`cmake_arg "$1"` ;;
|
||||||
--mandir=*) cmake_man_dir="${1#*=}" ;;
|
--docdir=*) cmake_doc_dir=`cmake_arg "$1"` ;;
|
||||||
--init=*) cmake_init_file="${1#*=}" ;;
|
--mandir=*) cmake_man_dir=`cmake_arg "$1"` ;;
|
||||||
|
--init=*) cmake_init_file=`cmake_arg "$1"` ;;
|
||||||
--system-libs) cmake_bootstrap_system_libs="${cmake_bootstrap_system_libs} -DCMAKE_USE_SYSTEM_LIBRARIES=1" ;;
|
--system-libs) cmake_bootstrap_system_libs="${cmake_bootstrap_system_libs} -DCMAKE_USE_SYSTEM_LIBRARIES=1" ;;
|
||||||
--no-system-libs) cmake_bootstrap_system_libs="${cmake_bootstrap_system_libs} -DCMAKE_USE_SYSTEM_LIBRARIES=0" ;;
|
--no-system-libs) cmake_bootstrap_system_libs="${cmake_bootstrap_system_libs} -DCMAKE_USE_SYSTEM_LIBRARIES=0" ;;
|
||||||
--system-bzip2|--system-curl|--system-expat|--system-libarchive|--system-zlib)
|
--system-bzip2|--system-curl|--system-expat|--system-libarchive|--system-zlib)
|
||||||
cmake_bootstrap_system_libs="${cmake_bootstrap_system_libs} -DCMAKE_USE_SYSTEM_LIBRARY_`cmake_toupper ${1#--system-}`=1" ;;
|
lib=`cmake_arg "$1" "--system-"`
|
||||||
|
cmake_bootstrap_system_libs="${cmake_bootstrap_system_libs} -DCMAKE_USE_SYSTEM_LIBRARY_`cmake_toupper $lib`=1" ;;
|
||||||
--no-system-bzip2|--no-system-curl|--no-system-expat|--no-system-libarchive|--no-system-zlib)
|
--no-system-bzip2|--no-system-curl|--no-system-expat|--no-system-libarchive|--no-system-zlib)
|
||||||
cmake_bootstrap_system_libs="${cmake_bootstrap_system_libs} -DCMAKE_USE_SYSTEM_LIBRARY_`cmake_toupper ${1#--no-system-}`=0" ;;
|
lib=`cmake_arg "$1" "--no-system-"`
|
||||||
|
cmake_bootstrap_system_libs="${cmake_bootstrap_system_libs} -DCMAKE_USE_SYSTEM_LIBRARY_`cmake_toupper $lib`=0" ;;
|
||||||
--qt-gui) cmake_bootstrap_qt_gui="1" ;;
|
--qt-gui) cmake_bootstrap_qt_gui="1" ;;
|
||||||
--no-qt-gui) cmake_bootstrap_qt_gui="0" ;;
|
--no-qt-gui) cmake_bootstrap_qt_gui="0" ;;
|
||||||
--qt-qmake=*) cmake_bootstrap_qt_qmake="${1#*=}" ;;
|
--qt-qmake=*) cmake_bootstrap_qt_qmake=`cmake_arg "$1"` ;;
|
||||||
--help) cmake_usage ;;
|
--help) cmake_usage ;;
|
||||||
--version) cmake_version_display ; exit 2 ;;
|
--version) cmake_version_display ; exit 2 ;;
|
||||||
--verbose) cmake_verbose=TRUE ;;
|
--verbose) cmake_verbose=TRUE ;;
|
||||||
|
|
Loading…
Reference in New Issue