Skip to content
This repository was archived by the owner on Apr 19, 2023. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
61 changes: 48 additions & 13 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,24 +1,59 @@
dist: bionic
sudo: false
language: cpp

addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- gcc-snapshot
- doxygen

install:
- pip install --user conan cmake

jobs:
include:
- os: osx
compiler: gcc
osx_image: xcode11.2 # includes gcc-9 by default
env:
# Conan is at: ${HOME}/Library/Python/2.7/bin: we need this in the path
- PATH="${HOME}/Library/Python/2.7/bin:${PATH}"
- GCC_VER="9"
- MATRIX_EVAL="CC=gcc-${GCC_VER} && CXX=g++-${GCC_VER}"
after_script:
- bash <(curl -s https://codecov.io/bash) -x /usr/bin/gcov-${GCC_VER}
- os: osx
compiler: clang
osx_image: xcode11.2
env:
- PATH="${HOME}/Library/Python/2.7/bin:${PATH}"
- MATRIX_EVAL=""
- os: linux
dist: bionic
compiler: gcc
env:
- GCC_VER="9"
- MATRIX_EVAL="CC=gcc-${GCC_VER} && CXX=g++-${GCC_VER}"

addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
# I couldn't get ${GCC_VER} in here successfully
- gcc-9
- g++-9
- doxygen
after_script:
- bash <(curl -s https://codecov.io/bash) -x /usr/bin/gcov-${GCC_VER}
- os: linux
dist: bionic
compiler: clang
env:
- MATRIX_EVAL="CC=clang && CXX=clang++"
addons: { apt: { packages: ['doxygen'] } }


before_script:
- eval "${MATRIX_EVAL}"

script:
- CXX=/usr/bin/gcc-10 CC=/usr/bin/g++-10 cmake -D ENABLE_COVERAGE:BOOL=TRUE .
- cmake --build . -- -j2
- cmake -D ENABLE_COVERAGE:BOOL=TRUE .
- cmake --build . -- -j2
- ctest -j2
- bash <(curl -s https://codecov.io/bash) -x /usr/bin/gcov-5



14 changes: 9 additions & 5 deletions appveyor.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,19 @@
image:
- Visual Studio 2017
- Visual Studio 2019
clone_folder: c:\projects\source
build_script:
- cmd: >-
mkdir build

cd build

cmake c:\projects\source -G "Visual Studio 15"

cmake --build . --config "Debug"

pip install --user conan

set PATH=%PATH%;C:\Users\appveyor\AppData\Roaming\Python\Scripts

cmake c:\projects\source -G "Visual Studio 16 2019" -DCMAKE_BUILD_TYPE:STRING=Release

cmake --build . --config "Release"

test_script:
- cmd: ctest -C Debug
Expand Down
2 changes: 1 addition & 1 deletion cmake/CompilerWarnings.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ function(set_project_warnings project_name)

if(MSVC)
set(PROJECT_WARNINGS ${MSVC_WARNINGS})
elseif(CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
elseif(CMAKE_CXX_COMPILER_ID MATCHES ".*Clang")
set(PROJECT_WARNINGS ${CLANG_WARNINGS})
else()
set(PROJECT_WARNINGS ${GCC_WARNINGS})
Expand Down
2 changes: 1 addition & 1 deletion cmake/Conan.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ conan_cmake_run(
${CONAN_EXTRA_REQUIRES}
catch2/2.11.0
docopt.cpp/0.6.2
fmt/6.0.0
fmt/6.1.2
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks like a strange thing to change, but the Mac build consistently fails when fmt is set to 6.0.0. It also fails on my Fedora box. Updating fmt to 6.1.2 appears to correct the issue.

See this issue for reference: lefticus/cpp_weekly_game_project#3

spdlog/1.5.0
OPTIONS
${CONAN_EXTRA_OPTIONS}
Expand Down
4 changes: 2 additions & 2 deletions cmake/Sanitizers.cmake
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
function(enable_sanitizers project_name)

if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU" OR CMAKE_CXX_COMPILER_ID STREQUAL
"Clang")
if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU" OR CMAKE_CXX_COMPILER_ID MATCHES
".*Clang")
option(ENABLE_COVERAGE "Enable coverage reporting for gcc/clang" FALSE)

if(ENABLE_COVERAGE)
Expand Down
1 change: 1 addition & 0 deletions test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ endif()

add_library(catch_main STATIC catch_main.cpp)
target_link_libraries(catch_main PUBLIC CONAN_PKG::catch2)
target_link_libraries(catch_main PRIVATE project_options)

add_executable(tests tests.cpp)
target_link_libraries(tests PRIVATE project_warnings project_options
Expand Down