From b19130ecab6d6731916834da30db02f5f1bc5838 Mon Sep 17 00:00:00 2001 From: Sander Vrijders Date: Thu, 10 Aug 2017 14:52:39 +0200 Subject: build: Simplify GitVersionGen This simplifies the macro GitVersionGen so that it doesn't need to rely on the sort executable. --- cmake/GitVersionGen.cmake | 7 ------- 1 file changed, 7 deletions(-) (limited to 'cmake') diff --git a/cmake/GitVersionGen.cmake b/cmake/GitVersionGen.cmake index 718ec8a3..916572ff 100644 --- a/cmake/GitVersionGen.cmake +++ b/cmake/GitVersionGen.cmake @@ -5,12 +5,6 @@ macro(git_version_gen) message(FATAL_ERROR "This is not a git repository") endif () - find_program(SORT "sort") - mark_as_advanced(SORT) - if (${SORT} STREQUAL "") - message(FATAL_ERROR "Cannot find the sort executable") - endif () - find_program(TAIL "tail") mark_as_advanced(TAIL) if (${TAIL} STREQUAL "") @@ -19,7 +13,6 @@ macro(git_version_gen) execute_process( COMMAND ${GIT_EXECUTABLE} tag -l -n0 - COMMAND ${SORT} -V COMMAND ${TAIL} -n 1 WORKING_DIRECTORY ${CMAKE_SOURCE_DIR} OUTPUT_VARIABLE _git_tag -- cgit v1.2.3