"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "Modules/FindGit.cmake" between
cmake-3.13.4.tar.gz and cmake-3.14.0-rc1.tar.gz

About: CMake is a cross-platform build system designed to build, test and package software. Release candidate.

FindGit.cmake  (cmake-3.13.4):FindGit.cmake  (cmake-3.14.0-rc1)
# Distributed under the OSI-approved BSD 3-Clause License. See accompanying # Distributed under the OSI-approved BSD 3-Clause License. See accompanying
# file Copyright.txt or https://cmake.org/licensing for details. # file Copyright.txt or https://cmake.org/licensing for details.
#.rst: #[=======================================================================[.rst:
# FindGit FindGit
# ------- -------
#
# The module defines the following variables: The module defines the following ``IMPORTED`` targets (when
# :prop_gbl:`CMAKE_ROLE` is ``PROJECT``):
# ``GIT_EXECUTABLE``
# Path to Git command-line client. ``Git::Git``
# ``Git_FOUND``, ``GIT_FOUND`` Executable of the Git command-line client.
# True if the Git command-line client was found.
# ``GIT_VERSION_STRING`` The module defines the following variables:
# The version of Git found.
# ``GIT_EXECUTABLE``
# Example usage: Path to Git command-line client.
# ``Git_FOUND``, ``GIT_FOUND``
# .. code-block:: cmake True if the Git command-line client was found.
# ``GIT_VERSION_STRING``
# find_package(Git) The version of Git found.
# if(Git_FOUND)
# message("Git found: ${GIT_EXECUTABLE}") Example usage:
# endif()
.. code-block:: cmake
find_package(Git)
if(Git_FOUND)
message("Git found: ${GIT_EXECUTABLE}")
endif()
#]=======================================================================]
# Look for 'git' or 'eg' (easy git) # Look for 'git' or 'eg' (easy git)
# #
set(git_names git eg) set(git_names git eg)
# Prefer .cmd variants on Windows unless running in a Makefile # Prefer .cmd variants on Windows unless running in a Makefile
# in the MSYS shell. # in the MSYS shell.
# #
if(CMAKE_HOST_WIN32) if(CMAKE_HOST_WIN32)
if(NOT CMAKE_GENERATOR MATCHES "MSYS") if(NOT CMAKE_GENERATOR MATCHES "MSYS")
skipping to change at line 80 skipping to change at line 87
if(GIT_EXECUTABLE) if(GIT_EXECUTABLE)
execute_process(COMMAND ${GIT_EXECUTABLE} --version execute_process(COMMAND ${GIT_EXECUTABLE} --version
OUTPUT_VARIABLE git_version OUTPUT_VARIABLE git_version
ERROR_QUIET ERROR_QUIET
OUTPUT_STRIP_TRAILING_WHITESPACE) OUTPUT_STRIP_TRAILING_WHITESPACE)
if (git_version MATCHES "^git version [0-9]") if (git_version MATCHES "^git version [0-9]")
string(REPLACE "git version " "" GIT_VERSION_STRING "${git_version}") string(REPLACE "git version " "" GIT_VERSION_STRING "${git_version}")
endif() endif()
unset(git_version) unset(git_version)
get_property(_findgit_role GLOBAL PROPERTY CMAKE_ROLE)
if(_findgit_role STREQUAL "PROJECT" AND NOT TARGET Git::Git)
add_executable(Git::Git IMPORTED)
set_property(TARGET Git::Git PROPERTY IMPORTED_LOCATION "${GIT_EXECUTABLE}")
endif()
endif() endif()
include(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake) include(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake)
find_package_handle_standard_args(Git find_package_handle_standard_args(Git
REQUIRED_VARS GIT_EXECUTABLE REQUIRED_VARS GIT_EXECUTABLE
VERSION_VAR GIT_VERSION_STRING) VERSION_VAR GIT_VERSION_STRING)
 End of changes. 2 change blocks. 
21 lines changed or deleted 34 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)