Skip to content

Commit

Permalink
merge with develop
Browse files Browse the repository at this point in the history
  • Loading branch information
badaix committed Oct 7, 2019
1 parent 2e5ee01 commit 23d1a4a
Show file tree
Hide file tree
Showing 5 changed files with 833 additions and 792 deletions.
20 changes: 20 additions & 0 deletions .clang-format
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
AccessModifierOffset: '-4'
AllowShortBlocksOnASingleLine: 'false'
AllowShortCaseLabelsOnASingleLine: 'false'
AllowShortFunctionsOnASingleLine: None
AllowShortIfStatementsOnASingleLine: 'false'
AllowShortLoopsOnASingleLine: 'false'
AlwaysBreakTemplateDeclarations: 'true'
BreakBeforeBraces: Allman
ColumnLimit: '160'
IndentCaseLabels: 'true'
IndentWidth: '4'
Language: Cpp
MaxEmptyLinesToKeep: '3'
PenaltyBreakComment: '100000'
PointerAlignment: Left
Standard: Cpp11
UseTab: Never

...
121 changes: 114 additions & 7 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,23 +1,130 @@
language: cpp
compiler:
- gcc
dist: trusty
sudo: false

matrix:
include:
# build on ubuntu
- os: linux
sudo: required
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- build-essential cmake
- g++-4.9
env:
- MATRIX_EVAL="CC=gcc-4.9 && CXX=g++-4.9"

- os: linux
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- g++-5
env:
- MATRIX_EVAL="CC=gcc-5 && CXX=g++-5"

- os: linux
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- g++-6
env:
- MATRIX_EVAL="CC=gcc-6 && CXX=g++-6"

- os: linux
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- g++-7
env:
- MATRIX_EVAL="CC=gcc-7 && CXX=g++-7"

# works on Precise and Trusty
- os: linux
addons:
apt:
sources:
- ubuntu-toolchain-r-test
- llvm-toolchain-precise-3.6
packages:
- clang-3.6
env:
- MATRIX_EVAL="CC=clang-3.6 && CXX=clang++-3.6"

# works on Precise and Trusty
- os: linux
addons:
apt:
sources:
- ubuntu-toolchain-r-test
- llvm-toolchain-precise-3.7
packages:
- clang-3.7
env:
- MATRIX_EVAL="CC=clang-3.7 && CXX=clang++-3.7"

# works on Precise and Trusty
- os: linux
addons:
apt:
sources:
- ubuntu-toolchain-r-test
- llvm-toolchain-precise-3.8
packages:
- clang-3.8
env:
- MATRIX_EVAL="CC=clang-3.8 && CXX=clang++-3.8"

# works on Trusty
- os: linux
addons:
apt:
sources:
- llvm-toolchain-trusty-3.9
packages:
- clang-3.9
env:
- MATRIX_EVAL="CC=clang-3.9 && CXX=clang++-3.9"

# works on Trusty
- os: linux
addons:
apt:
sources:
- llvm-toolchain-trusty-4.0
packages:
- clang-4.0
env:
- MATRIX_EVAL="CC=clang-4.0 && CXX=clang++-4.0"

# works on Trusty
- os: linux
addons:
apt:
sources:
- llvm-toolchain-trusty-5.0
packages:
- clang-5.0
env:
- MATRIX_EVAL="CC=clang-5.0 && CXX=clang++-5.0"

# build on osx
- os: osx
osx_image: xcode9.1
- os: osx
osx_image: xcode8

- os: osx
osx_image: xcode9.1

before_install:
- eval "${MATRIX_EVAL}"

script:
- mkdir build
- cd build
- cmake .. && make
- cmake .. && make && ./aixlog_example
4 changes: 2 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@
# \_/\_/(__)(_/\_)\____/ \__/ \___/

# This file is part of aixlog
# Copyright (C) 2017-2018 Johannes Pohl
# Copyright (C) 2017-2019 Johannes Pohl

# This software may be modified and distributed under the terms
# of the MIT license. See the LICENSE file for details.

cmake_minimum_required(VERSION 3.0.0)

project(aixlog VERSION 1.2.1 LANGUAGES CXX)
project(aixlog VERSION 1.2.2 LANGUAGES CXX)
set(PROJECT_DESCRIPTION "Header-only C++ logging library")
set(PROJECT_URL "https://github.com/badaix/aixlog")

Expand Down
5 changes: 4 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,16 @@ TARGET = aixlog_example
SHELL = /bin/bash

CXX = /usr/bin/g++
CXXFLAGS = -Wall -O3 -std=c++11 -Iinclude
CXXFLAGS = -Wall -Wpedantic -O3 -std=c++11 -Iinclude

OBJ = aixlog_example.o
BIN = aixlog_example

all: $(TARGET)

reformat:
clang-format -i include/aixlog.hpp

$(TARGET): $(OBJ)
$(CXX) $(CXXFLAGS) -o $(BIN) $(OBJ) $(LDFLAGS)
strip $(BIN)
Expand Down
Loading

0 comments on commit 23d1a4a

Please sign in to comment.