From 0dbe9d92043fda71787c9a3ebea5f9300814909a Mon Sep 17 00:00:00 2001 From: Kristofer Berggren Date: Sat, 1 Jun 2024 17:07:48 +0800 Subject: [PATCH] fix cmake warnings and mac ci install --- CMakeLists.txt | 2 +- ext/backward-cpp/CMakeLists.txt | 2 +- make.sh | 8 ++++++-- src/heapusage | 6 +++--- src/heapusage.1 | 4 ++-- 5 files changed, 13 insertions(+), 9 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index d062266..8e3c146 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,5 +1,5 @@ # Project -cmake_minimum_required(VERSION 3.0 FATAL_ERROR) +cmake_minimum_required(VERSION 3.14...3.22 FATAL_ERROR) project(heapusage VERSION 1.0 LANGUAGES C CXX) set(COMMON_FLAGS "-funwind-tables -g -Wall -Wextra -Wpedantic -Wshadow \ diff --git a/ext/backward-cpp/CMakeLists.txt b/ext/backward-cpp/CMakeLists.txt index 6fdaef4..ae36316 100644 --- a/ext/backward-cpp/CMakeLists.txt +++ b/ext/backward-cpp/CMakeLists.txt @@ -20,7 +20,7 @@ # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE # SOFTWARE. -cmake_minimum_required(VERSION 3.0) +cmake_minimum_required(VERSION 3.14...3.22 FATAL_ERROR) project(backward CXX) # Introduce variables: diff --git a/make.sh b/make.sh index 5b9c4ad..67fb1ee 100755 --- a/make.sh +++ b/make.sh @@ -2,7 +2,7 @@ # make.sh # -# Copyright (C) 2020 Kristofer Berggren +# Copyright (C) 2020-2024 Kristofer Berggren # All rights reserved. # # See LICENSE for redistribution information. @@ -116,7 +116,11 @@ if [[ "${INSTALL}" == "1" ]]; then if [ "${OS}" == "Linux" ]; then cd build && sudo make install && cd .. || exiterr "install failed (linux), exiting." elif [ "${OS}" == "Darwin" ]; then - cd build && make install && cd .. || exiterr "install failed (mac), exiting." + GHSUDO="" + if [[ "${GITHUB_ACTIONS}" == "true" ]]; then + GHSUDO="sudo" + fi + cd build && ${GHSUDO} make install && cd .. || exiterr "install failed (mac), exiting." else exiterr "install failed (unsupported os ${OS}), exiting." fi diff --git a/src/heapusage b/src/heapusage index fa56122..2ed4994 100755 --- a/src/heapusage +++ b/src/heapusage @@ -1,6 +1,6 @@ #!/usr/bin/env bash -# Copyright (C) 2017-2023 Kristofer Berggren +# Copyright (C) 2017-2024 Kristofer Berggren # All rights reserved. # # heapusage is distributed under the BSD 3-Clause license, see LICENSE for details. @@ -46,9 +46,9 @@ showusage() showversion() { - echo "heapusage v2.07" + echo "heapusage v2.08" echo "" - echo "Copyright (C) 2017-2023 Kristofer Berggren" + echo "Copyright (C) 2017-2024 Kristofer Berggren" echo "" echo "heapusage is distributed under the BSD 3-Clause license." echo "" diff --git a/src/heapusage.1 b/src/heapusage.1 index 8f2aab1..af1794a 100644 --- a/src/heapusage.1 +++ b/src/heapusage.1 @@ -1,5 +1,5 @@ .\" DO NOT MODIFY THIS FILE! It was generated by help2man. -.TH HEAPUSAGE "1" "June 2023" "heapusage v2.07" "User Commands" +.TH HEAPUSAGE "1" "June 2024" "heapusage v2.08" "User Commands" .SH NAME heapusage \- find memory leaks in applications .SH SYNOPSIS @@ -72,6 +72,6 @@ Written by Kristofer Berggren .SH "REPORTING BUGS" Report bugs at https://github.com/d99kris/heapusage .SH COPYRIGHT -Copyright \(co 2017\-2023 Kristofer Berggren +Copyright \(co 2017\-2024 Kristofer Berggren .PP heapusage is distributed under the BSD 3\-Clause license.