From fe0c1f69ecc5c2ded6f7f37f9dc7997b745e5ed6 Mon Sep 17 00:00:00 2001 From: Radovan Bast Date: Fri, 18 Nov 2016 18:25:02 +0100 Subject: [PATCH] generate_git_info_header always has to be called with explicit args --- modules/git_info/git_info.cmake | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/modules/git_info/git_info.cmake b/modules/git_info/git_info.cmake index cc292e5..6520c5a 100644 --- a/modules/git_info/git_info.cmake +++ b/modules/git_info/git_info.cmake @@ -13,18 +13,9 @@ get_filename_component(_current_dir ${CMAKE_CURRENT_LIST_FILE} PATH) -function(generate_git_info_header) +function(generate_git_info_header _header_location _header_name) # _header_location: where the Git info header file should be generated # _header_name: the Git info header name, complete with extension (.h, .hpp, .hxx or whatever) - if(${ARGC} EQUAL 2) - set(_header_location ${ARGV0}) - set(_header_name ${ARGV1}) - elseif(${ARGC} EQUAL 0) - set(_header_location ${PROJECT_BINARY_DIR}) - set(_header_name git_info.h) - else() - message(FATAL_ERROR "generate_git_info_header function accepts either two or no arguments") - endif() find_package(Git) set(_git_last_commit_hash "unknown")