From cadfa941621cef85205622d6af0f87648d2a31c7 Mon Sep 17 00:00:00 2001 From: nightwalker-87 <15526941+Nightwalker-87@users.noreply.github.com> Date: Sun, 12 Apr 2020 18:26:46 +0200 Subject: [PATCH] General Project Update - Updated travis CI build configuration - Updated project references - Minor formatting fixes --- .travis.yml | 109 ++++++++++++++++++++++++++++++++------- CMakeLists.txt | 18 ++++--- README.md | 10 ++-- cmake/cpack_config.cmake | 3 +- 4 files changed, 106 insertions(+), 34 deletions(-) diff --git a/.travis.yml b/.travis.yml index d88bf10..0798887 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,25 +1,96 @@ - -compiler: - - gcc - - clang - language: c -os: - - linux - - osx +matrix: + include: + ### 64-bit builds ### + - os: linux + arch: x64 + compiler: gcc-5 + addons: + apt: + sources: ['ubuntu-toolchain-r-test'] + packages: ['gcc-5', 'libusb-1.0.0-dev'] + - os: linux + arch: x64 + compiler: gcc-7 + addons: + apt: + sources: ['ubuntu-toolchain-r-test'] + packages: ['gcc-7', 'libusb-1.0.0-dev'] + - os: linux + arch: x64 + compiler: gcc-9 + addons: + apt: + sources: ['ubuntu-toolchain-r-test'] + packages: ['gcc-9', 'libusb-1.0.0-dev'] + - os: linux + arch: x64 + compiler: clang-3.7 + addons: + apt: + sources: ['ubuntu-toolchain-r-test', 'llvm-toolchain-xenial-3.7'] + packages: ['clang-3.7', 'libusb-1.0.0-dev'] + - os: linux + arch: x64 + compiler: clang-6.0 + addons: + apt: + sources: ['ubuntu-toolchain-r-test', 'llvm-toolchain-bionic-6.0'] + packages: ['clang-6.0', 'libusb-1.0.0-dev'] -addons: - apt: - sources: - - sourceline: 'ppa:ubuntu-toolchain-r/test' - packages: - - clang - - g++-6 - - gcc-6 - - libusb-1.0.0-dev - - p7zip - - mingw-w64 + ### 32-bit builds ### + - os: linux + arch: x86 + compiler: gcc-5 + addons: + apt: + sources: ['ubuntu-toolchain-r-test'] + packages: ['gcc-5', 'libusb-1.0.0-dev'] + - os: linux + arch: x86 + compiler: gcc-6 + addons: + apt: + sources: ['ubuntu-toolchain-r-test'] + packages: ['gcc-6', 'libusb-1.0.0-dev'] + - os: linux + arch: x86 + compiler: gcc-7 + addons: + apt: + sources: ['ubuntu-toolchain-r-test'] + packages: ['gcc-7', 'libusb-1.0.0-dev'] + - os: linux + arch: x86 + compiler: clang-3.7 + addons: + apt: + sources: ['ubuntu-toolchain-r-test', 'llvm-toolchain-xenial-3.7'] + packages: ['clang-3.7', 'libusb-1.0.0-dev'] + - os: linux + arch: x86 + compiler: clang-6.0 + addons: + apt: + sources: ['ubuntu-toolchain-r-test', 'llvm-toolchain-bionic-6.0'] + packages: ['clang-6.0', 'libusb-1.0.0-dev'] + + ### macOS ### + - os: osx + compiler: gcc + addons: + homebrew: + packages: + - libusb + - gcc + - os: osx + compiler: clang + addons: + homebrew: + packages: + - libusb + - clang script: - git fetch --tags diff --git a/CMakeLists.txt b/CMakeLists.txt index 1f0b464..8a282f5 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -17,12 +17,12 @@ if (IS_DIRECTORY ${LIB_INSTALL_DIR}) set(STLINK_LIBRARY_PATH "${LIB_INSTALL_DIR}") else () set(LIB_INSTALL_DIR "lib" CACHE PATH "Main library directory") - set(STLINK_LIBRARY_PATH "${CMAKE_INSTALL_PREFIX}/${LIB_INSTALL_DIR}" ) + set(STLINK_LIBRARY_PATH "${CMAKE_INSTALL_PREFIX}/${LIB_INSTALL_DIR}") endif () if (IS_DIRECTORY ${INCLUDE_INSTALL_DIR}) set(INCLUDE_INSTALL_DIR ${INCLUDE_INSTALL_DIR} CACHE PATH "Main include directory") - set(STLINK_INCLUDE_PATH "${INCLUDE_INSTALL_DIR}" ) + set(STLINK_INCLUDE_PATH "${INCLUDE_INSTALL_DIR}") else () set(INCLUDE_INSTALL_DIR "include" CACHE PATH "Main include directory") set(STLINK_INCLUDE_PATH "${CMAKE_INSTALL_PREFIX}/${INCLUDE_INSTALL_DIR}") @@ -148,7 +148,7 @@ set_target_properties( VERSION ${STLINK_SHARED_VERSION} ) -# Link shared library with apple OS libraries +# Link shared library with Apple macOS libraries if (APPLE) find_library(ObjC objc) find_library(CoreFoundation CoreFoundation) @@ -178,9 +178,9 @@ add_library( ${STLINK_LIB_STATIC} STATIC ${STLINK_HEADERS} # header files for ide projects generated by cmake ${STLINK_SOURCE} -) + ) -# Link shared library with apple OS libraries +# Link shared library with Apple macOS libraries if (APPLE) find_library(ObjC objc) find_library(CoreFoundation CoreFoundation) @@ -257,7 +257,9 @@ if (NOT TARGET uninstall) "${CMAKE_CURRENT_SOURCE_DIR}/cmake_uninstall.cmake.in" "${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake" IMMEDIATE @ONLY - ) - add_custom_target(uninstall - COMMAND ${CMAKE_COMMAND} -P ${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake) + ) + add_custom_target( + uninstall COMMAND ${CMAKE_COMMAND} + -P ${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake + ) endif () diff --git a/README.md b/README.md index e6de34d..29d1ef7 100644 --- a/README.md +++ b/README.md @@ -2,11 +2,11 @@ Open source version of the STMicroelectronics STlink Tools ========================================================== [![BSD licensed](https://img.shields.io/badge/license-BSD-blue.svg)](https://raw.githubusercontent.com/hyperium/hyper/master/LICENSE) -[![GitHub release](https://img.shields.io/github/release/texane/stlink.svg)](https://github.com/texane/stlink/releases/latest) -[![GitHub commits](https://img.shields.io/github/commits-since/texane/stlink/v1.6.0.svg)](https://github.com/texane/stlink/releases/master) -[![Downloads](https://img.shields.io/github/downloads/texane/stlink/total.svg)](https://github.com/texane/stlink/releases) -[![Linux Status](https://img.shields.io/travis/texane/stlink/master.svg?label=linux)](https://travis-ci.org/texane/stlink) -[![macOS Status](https://img.shields.io/travis/texane/stlink/master.svg?label=osx)](https://travis-ci.org/texane/stlink) +[![GitHub release](https://img.shields.io/github/release/texane/stlink.svg)](https://github.com/stlink-org/stlink/releases/latest) +[![GitHub commits](https://img.shields.io/github/commits-since/texane/stlink/v1.6.0.svg)](https://github.com/stlink-org/stlink/releases/master) +[![Downloads](https://img.shields.io/github/downloads/texane/stlink/total.svg)](https://github.com/stlink-org/stlink/releases) +[![Linux Status](https://img.shields.io/travis/texane/stlink/master.svg?label=linux)](https://travis-ci.org/stlink-org/stlink) +[![macOS Status](https://img.shields.io/travis/texane/stlink/master.svg?label=osx)](https://travis-ci.org/stlink-org/stlink) Recent new features and bugfixes can be found in the [Changelog](CHANGELOG.md) of this software project. diff --git a/cmake/cpack_config.cmake b/cmake/cpack_config.cmake index 72a98a8..b8d4be1 100644 --- a/cmake/cpack_config.cmake +++ b/cmake/cpack_config.cmake @@ -16,12 +16,11 @@ elseif (WIN32) elseif (${CMAKE_SYSTEM_NAME} STREQUAL "Linux" AND EXISTS "/etc/debian_version") message(STATUS "Debian-based Linux OS detected") set(CPACK_GENERATOR "DEB") - if ("${CMAKE_SYSTEM_PROCESSOR}" STREQUAL "x86_64") set(CPACK_PACKAGE_FILE_NAME "${CPACK_PACKAGE_NAME}-${PROJECT_VERSION}-amd64" ) endif() - set(CPACK_DEBIAN_PACKAGE_HOMEPAGE "https://github.com/texane/stlink") + set(CPACK_DEBIAN_PACKAGE_HOMEPAGE "https://github.com/stlink-org/stlink") set(CPACK_DEBIAN_PACKAGE_MAINTAINER "Luca Boccassi") set(CPACK_PACKAGE_CONTACT "bluca@debian.org") set(CPACK_DEBIAN_PACKAGE_DESCRIPTION "STM32 STlink programmer tools")