Skip to content

Commit

Permalink
Merge pull request #17 from karel-burda/develop
Browse files Browse the repository at this point in the history
Develop
  • Loading branch information
karel-burda authored Dec 9, 2018
2 parents d46fbdb + 055282e commit 5434cdb
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 13 deletions.
4 changes: 2 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ matrix:
-Dtest-utils_DIR:PATH=$(pwd)/build/submodules/test-utils
-DCMAKE_BUILD_TYPE:STRING=$BUILD_TYPE
-DCOVERAGE:BOOL=ON
- cmake --build build/tests/unit --target run-all-tests-verbose --config $BUILD_TYPE
- cmake --build build/tests/unit --target run-all-tests-verbose --config $BUILD_TYPE -- -j $(nproc)

- bash <(curl -s https://codecov.io/bash)

Expand Down Expand Up @@ -79,7 +79,7 @@ matrix:
-Dtest-utils_DIR:PATH=$(pwd)/build/submodules/test-utils
-DCMAKE_BUILD_TYPE:STRING=$BUILD_TYPE
-DCOVERAGE:BOOL=ON
- cmake --build build/tests/unit --target run-all-tests-verbose --config $BUILD_TYPE
- cmake --build build/tests/unit --target run-all-tests-verbose --config $BUILD_TYPE -- -j $(sysctl -n hw.ncpu)

- set +e

Expand Down
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
cmake_minimum_required(VERSION 3.8 FATAL_ERROR)

project(function-loader VERSION 1.2.2 LANGUAGES CXX)
project(function-loader VERSION 1.2.3 LANGUAGES CXX)

add_library(${PROJECT_NAME} INTERFACE)

Expand Down
16 changes: 8 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
![Version](https://img.shields.io/badge/version-1.2.2-green.svg)
![Version](https://img.shields.io/badge/version-1.2.3-green.svg)
[![License](https://img.shields.io/badge/license-MIT_License-green.svg?style=flat)](LICENSE)
[![Build Status](https://travis-ci.org/karel-burda/function-loader.svg?branch=develop)](https://travis-ci.org/karel-burda/function-loader)
[![Codecov Status](https://codecov.io/gh/karel-burda/function-loader/branch/develop/graph/badge.svg)](https://codecov.io/gh/karel-burda/function-loader/branch/develop)
Expand Down Expand Up @@ -40,7 +40,7 @@ There are essentially these ways of how to use this package depending on your pr
Call `add_subdirectory(...)` directly in your CMakeLists.txt:

```cmake
add_executable("my-project" main.cpp)
add_executable(my-project main.cpp)
add_subdirectory(<path-to-function-loader>)
# example: add_subdirectory(function-loader ${CMAKE_BINARY_DIR}/function-loader)
Expand All @@ -51,8 +51,8 @@ message(STATUS "Current version of function-loader is: ${function-loader_VERSION
add_library(burda::function-loader ALIAS function-loader)
# this will import search paths, compile definitions and other dependencies of the function-loader as well
target_link_libraries("my-project" function-loader)
# or with private visibility: target_link_libraries("my-project" PRIVATE function-loader)
target_link_libraries(my-project function-loader)
# or with private visibility: target_link_libraries(my-project PRIVATE function-loader)
```

### B) Generate separately
Expand All @@ -68,7 +68,7 @@ This will create automatically generated package configuration file `function-lo
Then you can do this in your CMakeLists.txt:

```cmake
add_executable("my-project" main.cpp)
add_executable(my-project main.cpp)
find_package(function-loader CONFIG PATHS <path-to-binary-dir-of-function-loader>)
# alternatively assuming that the "function-loader_DIR" variable is set: find_package(function-loader CONFIG)
Expand All @@ -77,16 +77,16 @@ find_package(function-loader CONFIG PATHS <path-to-binary-dir-of-function-loader
message(STATUS "Found version of function-loader is: ${function-loader_VERSION}")
# this will import search paths, compile definitions and other dependencies of the function-loader as well
target_link_libraries("my-project" burda::function-loader)
# or with public visibility: target_link_libraries("my-project" PUBLIC burda::function-loader)
target_link_libraries(my-project burda::function-loader)
# or with public visibility: target_link_libraries(my-project PUBLIC burda::function-loader)
```

## 2. Manual Way
Not recommended.

Make sure that the `include` directory is in the search paths.

You also have to set C++11 standard and potentially other settings as well (e.g. linking `libdl` on POSIXes).
You also have to set C++ 11 standard and potentially other settings as well (e.g. linking `libdl` on POSIXes).

# Example
For full use cases, see [main.cpp](example/src/main.cpp) or implementation of unit tests at [tests/unit](tests/unit).
Expand Down
2 changes: 1 addition & 1 deletion submodules/test-utils

0 comments on commit 5434cdb

Please sign in to comment.