diff --git a/CMakeLists.txt b/CMakeLists.txt --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,11 +1,10 @@ # Copyright (c) 2017 The Bitcoin developers -cmake_minimum_required(VERSION 3.5) +cmake_minimum_required(VERSION 3.12) project(bitcoin-abc VERSION 0.20.4 - # TODO add description and homepage when CMake > 3.12 is enforced. - # DESCRIPTION "Bitcoin ABC is a full node implementation of the Bitcoin Cash protocol." - # HOMEPAGE "https://www.bitcoinabc.org" + DESCRIPTION "Bitcoin ABC is a full node implementation of the Bitcoin Cash protocol." + HOMEPAGE_URL "https://www.bitcoinabc.org" ) # Add path for custom modules diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -187,12 +187,10 @@ if(GIT_RESULT EQUAL 0) set(GIT_LOGS_DIR "${GIT_ROOT}/.git/logs") set(GIT_HEAD_LOGS_FILE "${GIT_LOGS_DIR}/HEAD") - # If the .git/logs/HEAD, create it + # If the .git/logs/HEAD does not exist, create it if(NOT EXISTS "${GIT_HEAD_LOGS_FILE}") - # FIXME No longer needed once cmake > 3.10 get enforced. file(MAKE_DIRECTORY "${GIT_LOGS_DIR}") - # FIXME Replace with file(TOUCH) when cmake > 3.12 get enforced. - file(APPEND "${GIT_HEAD_LOGS_FILE}" "") + file(TOUCH "${GIT_HEAD_LOGS_FILE}") endif() set(${RESULT} "${GIT_HEAD_LOGS_FILE}" PARENT_SCOPE) endif()