Compare commits

..

3 Commits

Author SHA1 Message Date
Lars Melchior
f8d4e959bb abort when nested (bugfix) (#94)
* abort when nested (bugfix)

* update error message

* update error message
2019-10-25 20:52:22 +02:00
Lars Melchior
4c7aa36dff Update README.md 2019-10-25 16:01:47 +02:00
Lars Melchior
3a4516265c Add GitHub workflows (#93)
* add mac workflow

* rename and add windows and ubuntu workflows

* update tests

* update tests

* update travis
2019-10-24 18:14:58 +02:00
7 changed files with 66 additions and 7 deletions

16
.github/workflows/macos.yml vendored Normal file
View File

@@ -0,0 +1,16 @@
name: MacOS
on: [push]
jobs:
build:
runs-on: macOS-10.14
steps:
- uses: actions/checkout@v1
- name: run tests
run: |
cmake -Htest -Bbuild/test
cmake --build build/test --target test-verbose

23
.github/workflows/ubuntu.yml vendored Normal file
View File

@@ -0,0 +1,23 @@
name: Ubuntu
on: [push]
jobs:
build:
runs-on: ubuntu-18.04
steps:
- uses: actions/checkout@v1
- name: install updates
run: |
wget -O cmake.sh https://cmake.org/files/v3.14/cmake-3.14.0-Linux-x86_64.sh
sudo sh cmake.sh --skip-license --exclude-subdir --prefix=/usr/local
export PATH=/usr/local/bin:$PATH
cmake --version
- name: run tests
run: |
cmake -Htest -Bbuild/test
cmake --build build/test --target test-verbose

16
.github/workflows/windows.yml vendored Normal file
View File

@@ -0,0 +1,16 @@
name: Windows
on: [push]
jobs:
build:
runs-on: windows-2019
steps:
- uses: actions/checkout@v1
- name: run tests
run: |
cmake -Htest -Bbuild/test
cmake --build build/test --target test-verbose

View File

@@ -45,6 +45,6 @@ before_install:
script:
# unit tests
- cmake -Htest -Bbuild/test
- CTEST_OUTPUT_ON_FAILURE=1 cmake --build build/test --target test
- cmake --build build/test --target test-verbose
# build examples
- python3 examples/build_all.py

View File

@@ -1,4 +1,7 @@
[![Build Status](https://travis-ci.com/TheLartians/CPM.cmake.svg?branch=master)](https://travis-ci.com/TheLartians/CPM.cmake)
[![Actions Status](https://github.com/TheLartians/CPM.cmake/workflows/MacOS/badge.svg)](https://github.com/TheLartians/CPM.cmake/actions)
[![Actions Status](https://github.com/TheLartians/CPM.cmake/workflows/Windows/badge.svg)](https://github.com/TheLartians/CPM.cmake/actions)
[![Actions Status](https://github.com/TheLartians/CPM.cmake/workflows/Ubuntu/badge.svg)](https://github.com/TheLartians/CPM.cmake/actions)
<p align="center">
<img src="./logo/CPM.png" height="100" />
@@ -104,8 +107,8 @@ Dependencies using CPM will automatically use the updated script of the outermos
- **First version used** In diamond-shaped dependency graphs (e.g. `A` depends on `C`@1.1 and `B`, which itself depends on `C`@1.2 the first added dependency will be used (in this case `C`@1.1). In this case, B requires a newer version of `C` than `A`, so CPM will emit a warning. This can be resolved by adding a new version of the dependency in the outermost project.
For projects with more complex needs and where an extra setup step doesn't matter, it may be worth to check out an external C++ package manager such as [vcpkg](https://github.com/microsoft/vcpkg), [conan](https://conan.io) or [hunter](https://github.com/ruslo/hunter).
Dependencies added with `CPMFindPackages` should work with external package managers.
This can also be enabled for all CPM dependencies by enabling [`CPM_USE_LOCAL_PACKAGES`](#cpmuselocalpackages).
Dependencies added with `CPMFindPackage` should work with external package managers.
Additionally, the option [`CPM_USE_LOCAL_PACKAGES`](#cpmuselocalpackages) will enable `find_package` for all CPM dependencies.
## Options

View File

@@ -28,17 +28,18 @@
cmake_minimum_required(VERSION 3.14 FATAL_ERROR)
set(CURRENT_CPM_VERSION 0.15)
set(CURRENT_CPM_VERSION 0.15.1)
if(CPM_DIRECTORY)
if(NOT ${CPM_DIRECTORY} MATCHES ${CMAKE_CURRENT_LIST_DIR})
if (${CPM_VERSION} VERSION_LESS ${CURRENT_CPM_VERSION})
message(AUTHOR_WARNING "${CPM_INDENT} \
A dependency is using a more recent CPM (${NEW_CPM_VERSION}) than the current project (${CPM_VERSION}). \
A dependency is using a more recent CPM version (${CURRENT_CPM_VERSION}) than the current project (${CPM_VERSION}). \
It is recommended to upgrade CPM to the most recent version. \
See https://github.com/TheLartians/CPM for more information."
See https://github.com/TheLartians/CPM.cmake for more information."
)
endif()
return()
endif()
endif()

View File

@@ -14,4 +14,4 @@ foreach(test ${tests})
)
endforeach()
add_custom_target(test-verbose COMMAND ${CMAKE_CTEST_COMMAND} --verbose)
add_custom_target(test-verbose COMMAND ${CMAKE_CTEST_COMMAND} -C Debug --verbose)