summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile.am1
-rw-r--r--cmake/FindGit.cmake45
-rw-r--r--cmake/VersionViaGit.cmake6
3 files changed, 4 insertions, 48 deletions
diff --git a/Makefile.am b/Makefile.am
index 93765555..962c14ca 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -120,7 +120,6 @@ CMAKE_FILES = \
cmake/CodeCoverage.cmake \
cmake/COPYING-CMAKE-SCRIPTS \
cmake/Copyright.txt \
- cmake/FindGit.cmake \
cmake/LibeventConfig.cmake.in \
cmake/LibeventConfigVersion.cmake.in \
cmake/Macros.cmake \
diff --git a/cmake/FindGit.cmake b/cmake/FindGit.cmake
deleted file mode 100644
index 2abbfe4e..00000000
--- a/cmake/FindGit.cmake
+++ /dev/null
@@ -1,45 +0,0 @@
-# The module defines the following variables:
-# GIT_EXECUTABLE - path to git command line client
-# GIT_FOUND - true if the command line client was found
-# Example usage:
-# find_package(Git)
-# if(GIT_FOUND)
-# message("git found: ${GIT_EXECUTABLE}")
-# endif()
-
-#=============================================================================
-# Copyright 2010 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.
-#=============================================================================
-# (To distributed this file outside of CMake, substitute the full
-# License text for the above reference.)
-
-# Look for 'git' or 'eg' (easy git)
-set(git_names git eg)
-
-# Prefer .cmd variants on Windows unless running in a Makefile
-# in the MSYS shell.
-if(WIN32)
- if(NOT CMAKE_GENERATOR MATCHES "MSYS")
- set(git_names git.cmd git eg.cmd eg)
- endif()
-endif()
-
-find_program(GIT_EXECUTABLE
- NAMES ${git_names}
- DOC "git command line client")
-
-mark_as_advanced(GIT_EXECUTABLE)
-
-# Handle the QUIETLY and REQUIRED arguments and set GIT_FOUND to TRUE if
-# all listed variables are TRUE
-
-include(FindPackageHandleStandardArgs)
-find_package_handle_standard_args(Git DEFAULT_MSG GIT_EXECUTABLE)
-
diff --git a/cmake/VersionViaGit.cmake b/cmake/VersionViaGit.cmake
index a014c8a3..aedf1657 100644
--- a/cmake/VersionViaGit.cmake
+++ b/cmake/VersionViaGit.cmake
@@ -31,7 +31,7 @@ macro(event_fuzzy_version_from_git)
if (GIT_FOUND)
execute_process(
COMMAND
- ${GIT_EXECUTABLE} describe --abbrev=0
+ ${GIT_EXECUTABLE} describe --abbrev=0 --always
WORKING_DIRECTORY
${PROJECT_SOURCE_DIR}
RESULT_VARIABLE
@@ -42,7 +42,9 @@ macro(event_fuzzy_version_from_git)
)
string(REGEX REPLACE "[\\._-]" ";" VERSION_LIST "${GITVERSION}")
- list(LENGTH VERSION_LIST VERSION_LIST_LENGTH)
+ if(VERSION_LIST)
+ list(LENGTH VERSION_LIST VERSION_LIST_LENGTH)
+ endif()
if ((GITRET EQUAL 0) AND (VERSION_LIST_LENGTH EQUAL 5))
list(GET VERSION_LIST 1 _MAJOR)