Skip to content

Commit

Permalink
Merge pull request #96 from toeb/devel
Browse files Browse the repository at this point in the history
Dependency Management v1 Complete
  • Loading branch information
toeb committed Mar 11, 2015
2 parents 54be823 + 460de2d commit bc82762
Show file tree
Hide file tree
Showing 581 changed files with 12,690 additions and 3,796 deletions.
37 changes: 24 additions & 13 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,15 @@ matrix:
allow_failures:
- os: osx
env:
global:
global:
- CMAKEPP_TEST_EXECUTE_PARALLEL="true"
# github api token and secret
secure: "fWQnD0UqfX9SfctAu7lAnUJ4V5brp8UqdmPxQ67MlbmR5GAXQK9yezeQEsOnDCbihM6H/WTkonR920+B14fOb1NO0RSY39yHzjZG6B4tM6ZJwRW0CAlgFzlCqdwyL//7EhfKnxmWqflsA8oY+ihuZsj8P9ZtQSpNWENlu0Cl324="
secure: "i9rwJYZa6VDCpjXFaJoUggdn12mC1WB2zb9zaFP57VocTyL37Kpt3btXb9De5VQEJbyVKG2b9zlts20dEqvvruXBBuhWi+15VICT1yqq3zDQt25EPPDXw+AcB58dG+0icY1VKklWXR2Qxms4x/EZSN4TDNUp6LZgh+ACWlE1SRU="
# GITHUB_DEVEL_TOKEN_ID=<hidden>
- secure: "fWQnD0UqfX9SfctAu7lAnUJ4V5brp8UqdmPxQ67MlbmR5GAXQK9yezeQEsOnDCbihM6H/WTkonR920+B14fOb1NO0RSY39yHzjZG6B4tM6ZJwRW0CAlgFzlCqdwyL//7EhfKnxmWqflsA8oY+ihuZsj8P9ZtQSpNWENlu0Cl324="
# GITHUB_DEVEL_TOKEN_SECRET=<hidden>
- secure: "i9rwJYZa6VDCpjXFaJoUggdn12mC1WB2zb9zaFP57VocTyL37Kpt3btXb9De5VQEJbyVKG2b9zlts20dEqvvruXBBuhWi+15VICT1yqq3zDQt25EPPDXw+AcB58dG+0icY1VKklWXR2Qxms4x/EZSN4TDNUp6LZgh+ACWlE1SRU="
# BII_PASSWORD=<hidden>
- secure: "iRtdWDDNUAlA1H9nAblf+P/RWhGlygYtLf9bGV9MGQh55M0CgW4GRvIx8ErjTtXwkXgGtS0HxtRvgrvh8H/Wp3stqoqW2OSX0x+a3zlNmkwWv9TA827qD3O5mmNobZeK/m0iDUxq/7AsKNHBW4gliNOSQ9DcXLOxpRYrpo0mrVo="
matrix:
- CMAKE_DIR="v3.1" CMAKE_VERSION="3.1.2"
- CMAKE_DIR="v3.0" CMAKE_VERSION="3.0.1"
Expand Down Expand Up @@ -53,19 +58,25 @@ install:
script:
- cmake -P build/script.cmake

after_success: "cmake -P build/after_success.cmake"
after_success:
- "cmake -P build/after_success.cmake"
- bii user toeb -p $BII_PASSWORD
- bii publish toeb/cmakepp --tag STABLE
after_failure: "cmake -P build/after_failure.cmake"
after_script: "cmake -P build/after_script.cmake"

branches:
only:
- master
- devel
deploy:
- provider: biicode
user: toeb
password:
secure: "FbBmlMqDcpJ0rJ12I/H8CWwPnVe44zsGuL+5h+16JjZBQU8+TUizaw/Wns3OnQXzvvdeyzUvypGrnq0g7t+MFareWZ+rYVHRNibjsx5OxubvcgM6+fbXAu8G2f4bXHZPun5IMf8+1OCg8ETEQ/kEHtDDVOFO24Gb49N9Td3chgQ="
skip_cleanup: true
on:
tags: true
all_branches: true
# - provider: biicode
# user: toeb
# password:
# secure: "FbBmlMqDcpJ0rJ12I/H8CWwPnVe44zsGuL+5h+16JjZBQU8+TUizaw/Wns3OnQXzvvdeyzUvypGrnq0g7t+MFareWZ+rYVHRNibjsx5OxubvcgM6+fbXAu8G2f4bXHZPun5IMf8+1OCg8ETEQ/kEHtDDVOFO24Gb49N9Td3chgQ="
# skip_cleanup: true
# on:
# tags: true
# all_branches: true
- provider: releases
api_key:
secure: Y8fO6kLjCkPHi7qa1tkv9kVKvoEe/VsRO9gY8LFFsBliKFD1DC/+Sf1l5ij3SGawFduzCWWk4O62lEVawEnUhOqHFb+D6+SExVzF5QvkgSvnp6BkpyosvCn0/FXBy4tt4KZyLSJ3CzqLvDnD99d7vouHyxiLZy4JSTjmlnklkAo=
Expand Down
50 changes: 33 additions & 17 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

## A CMake Enhancement Suite
[![Travis branch](https://img.shields.io/travis/toeb/cmakepp/master.svg)](https://travis-ci.org/toeb/cmakepp)
[![Appveyor branch](https://img.shields.io/appveyor/ci/toeb/cmakepp.svg)](https://ci.appveyor.com/project/toeb/cmakepp)
[![GitHub stars](https://img.shields.io/github/stars/toeb/cmakepp.svg?)](https://github.com/toeb/cmakepp/stargazers)
[![GitHub forks](https://img.shields.io/github/forks/toeb/cmakepp.svg)](https://github.com/toeb/cmakepp/network)
[![GitHub issues](https://img.shields.io/github/issues/toeb/cmakepp.svg)](https://github.com/toeb/cmakepp/issues)
Expand All @@ -19,6 +20,7 @@ Look through the files in the package. Most functions will be commented and the
`cmakepp` has a lot of different functions. I tried to subdivide them into some meaningful sections.


* [Buildserver](cmake/buildserver/README.md)
* [Creating Checksums](cmake/checksum/README.md)
* [Collections](cmake/collections/README.md)
* [Date/Time](cmake/datetime/README.md)
Expand Down Expand Up @@ -55,14 +57,12 @@ I have developed some samples to show off `cmakepp`'s capabilities. Here you can



* [Including `cmakepp` and pulling `eigen` library ](samples/01-include-cmakepp-pull-eigen/README.md)
* [Including `cmakepp` in `CMakeLists.txt`](samples/02-include-cmakepp-in-CMakeLists/README.md)
* [Compiling a simple progam by including `cmakepp` and pulling `eigen` library ](samples/01-include-cmakepp-pull-eigen/README.md)
* [Including and using `cmakepp` in `CMakeLists.txt`](samples/02-include-cmakepp-in-CMakeLists/README.md)
* [Downloading and Including `cmakepp` in a `CMakeLists.txt`](samples/03-download-include-cmakepp-in-CMakeLists/README.md)
* [Creating a Compressed Package](samples/04-create-simple-compressed-package/README.md)
* [Creating and Installing a Package with an Install Hook](samples/05-create-install-simple-package-with-install-script/README.md)
* [Installing and Using Projects with vanilla `CMake`](samples/06-vanilla-cmake-project-with-install/README.md)
* [Adding Boost to you `CMake` project](samples/07-adding-boost-by-package-manager/README.md)
* [Download, Build and Use `jsoncpp`](samples/09-download-build-use-jsoncpp/README.md)



Expand All @@ -81,7 +81,7 @@ You have multiple options to install `cmakepp` the only prerequisite for all opt
* Clone the repository and include `cmakepp.cmake` in your `CMakeLists.txt` (or other cmake script)


## <a href="install_console"></a> Install by Console
## <a name="install_console"></a> Install by Console

For ease of use I provide you with simple copy paste code for your console of choice. These scripts download the `install.cmake` file and execute it. This file in turn downloads `cmakepp` and adds itself to your os (creating aliases and setting a environment variable - which allow you to use [icmake](#icmake) and [cmakepp cli](#cmake_cli) from the console).

Expand Down Expand Up @@ -116,7 +116,7 @@ endif()
include("cmakepp.cmake")
```

## <a href="install_aliases"></a> Manually setting up aliases
## <a name="install_aliases"></a> Manually setting up aliases


```
Expand Down Expand Up @@ -177,7 +177,7 @@ I am a bit a hypocrit. I am trying to adhere to these rules though:
# Implementation Notes


## <a name="formalisms"></a> Formalisms
## Formalisms

**Note**: *This section is incomplete but will give you an idea how I formally define data and functions.*

Expand All @@ -186,22 +186,38 @@ To describe cmake functions I use formalisms which I found most useful they shou

* `@` denotes character data
* `<string> ::= "\""@"\""` denotes a string literal
* `<regex> ::= /<string>/` denotes a regular expression (as cmake defines it)
* `<identifier> ::= /[a-zA-Z0-9_-]+/` denotes a identifier which can be used for definitions
* `<datatype> ::= "<" "any"|"bool"|"number"|""|"void"|""|<structured data> <?"...">">"` denotes a datatype the elipses denotes that multiple values in array form are described else the datatype can be `any`, `bool`, `number`, `<structured data>` etc..
* `<regex> ::= "/" <string> "/"` denotes a regular expression which needs to match
* `<identifier> ::= /[a-zA-Z_][a-zA-Z0-9_]*/` denotes a identifier which can be used for definitions
* `<datatype> ::= "<" "any"|"bool"|"number"|""|"void"|""|<structured data> <?"...">">"` denotes a datatype. the elipses denotes that multiple values in array form are described else the datatype can be `any`, `bool`, `number`, `<structured data>` etc..
* `<named definition> ::= "<"<identifier>">"`
* `<definition> ::= "<"<?"?"><identifier>|<identifier>":"<datatype>|<datatype>>">"` denotes a possibly name piece of data. this is used in signatures and object descriptions e.g. `generate_greeting(<firstname:<string>> <?lastname:<string>>):<string>` specifies a function which which takes a required parameter called `first_name` which is of type `string` and an optional parameter called `lastname` which is of type `string` and returns a `string`
* `<structured data> ::= "{"<? <named definition> ...>"}"`
* `<void>` primitve which stand for nothing
* `<definition> ::= "<" "?"? <identifier>"&"?|<identifier>"&"?":"<datatype>|<datatype>> ("=" ">"` denotes a possibly named piece of data. this is used in signatures and object descriptions e.g. `generate_greeting(<firstname:<string>> <?lastname:<string>>)-><string>` specifies a function which which takes a required parameter called `first_name` which is of type `string` and an optional parameter called `lastname` which is of type `string` and returns a `string`
- `&` indicates that the identifier is a reference - a variable exists with the name passed in the named identifier
- `?` indicates optionality (no need to specify the value)
- `= indicates the default value which is used when the specified value is not specified
* `<structured data> ::= "{"<keyvalue:(<named definition>|(<identifier>":"<datatype>))...>|"}"` the structured date is sometimes multiline
- `{ <name:<string>> <age:<int>> }`
- `{ name:<string> age:<int>}`
- `{ name:<string> address:{ street:<string> area_code:<string>} age:<int>}`
- `{ <<group:<string>>:<users:<string...>> ...> }` describes a map which contains keys of type string which identify a group and associated values which are a string list representing users
* `<void>` primitive which stands for nothing
* `<null> ::= ""` primitive which is truely empty (a string of length `0`)
* `<falseish>:"false"|""|"no"` cmake's false values (list incomplete)
* `<trueish>: !<falseish>`
* `<bool> ::= "true":"false"` indicates a well defined true or false value
* `<boolish> ::= <trueish>|<falsish>|<bool>`
* `<any> ::= <string>|<number>|<structured data>|<bool>|<void>`
* `<named function parameter>`
* `<value identifier> ::= /a-zA-Z0-9_-/+`
* `<named function parameter>::= "<"|"["<value identifier> (<definition>="<any>")?"]"|">"` specifies a named function parameter. a `value identifier` without a `definition` causes the named function parameter to be a flag a boolean is derived which is `true` if the flag exists, else `false`.
- `[--my-flag]` a flag
- `[--depth <n:int>]` a optional value
- `<--depth <n:int>>` a required value
* `<function parameter> ::= <definition>|<named function parameter>`
* `<function definition> `
* ... @todo
* `<function definition> ::= ("["<scope inheritance>"]")?"("<function parameter...>")" "->" <function parameter>("," <side effects>)?`
- `(<any>)-><bool>` a function expecting a single `<any>` element and returning a `<bool>`
- `(<any...>)-><string...>` a function taking a variable amount of any and returning a list of strings
- `[<depth:int>](<node:<any>>)-><node...>` a function taking a variable node of type `<any>` which returns a list of `<node>` expects a variable `depth` to be defined in parent scope which needs to be a integer
- `...`



## <a name="return"></a>Returning values
Expand Down Expand Up @@ -272,7 +288,7 @@ This is possible by overwriting CMakes default return() function with a macro. I
"Host":"httpbin.org",
"User-Agent":"curl/7.16.1"
},
"origin":"87.157.218.55",
"origin":"79.240.213.196",
"url":"http://httpbin.org/get?key=value"
}

Expand Down
46 changes: 34 additions & 12 deletions README.md.in
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

## A CMake Enhancement Suite
[![Travis branch](https://img.shields.io/travis/toeb/cmakepp/master.svg)](https://travis-ci.org/toeb/cmakepp)
[![Appveyor branch](https://img.shields.io/appveyor/ci/toeb/cmakepp.svg)](https://ci.appveyor.com/project/toeb/cmakepp)
[![GitHub stars](https://img.shields.io/github/stars/toeb/cmakepp.svg?)](https://github.com/toeb/cmakepp/stargazers)
[![GitHub forks](https://img.shields.io/github/forks/toeb/cmakepp.svg)](https://github.com/toeb/cmakepp/network)
[![GitHub issues](https://img.shields.io/github/issues/toeb/cmakepp.svg)](https://github.com/toeb/cmakepp/issues)
Expand Down Expand Up @@ -30,7 +31,7 @@ You have multiple options to install `cmakepp` the only prerequisite for all opt
* Clone the repository and include `cmakepp.cmake` in your `CMakeLists.txt` (or other cmake script)


## <a href="install_console"></a> Install by Console
## <a name="install_console"></a> Install by Console

For ease of use I provide you with simple copy paste code for your console of choice. These scripts download the `install.cmake` file and execute it. This file in turn downloads `cmakepp` and adds itself to your os (creating aliases and setting a environment variable - which allow you to use [icmake](#icmake) and [cmakepp cli](#cmake_cli) from the console).

Expand Down Expand Up @@ -69,7 +70,7 @@ endif()
include("cmakepp.cmake")
```

## <a href="install_aliases"></a> Manually setting up aliases
## <a name="install_aliases"></a> Manually setting up aliases


```
Expand Down Expand Up @@ -105,6 +106,11 @@ If you want to help to develope `cmakepp` or want to develope `CMake` scripts wh
* `cmakepp template run` will execute a `cmakepp` template file of which the filename ends with `.in` (see [templating](#))
* you can open the `cmakepp.sublime-project` and modify the build system.

# Developement Process

I have two persistant branches: `master` and `devel`. Then there are an arbitrary amount of volatile branches which are used to develope features / remote store developements. The `master` branch is only merged from `devel` and always is always stable - ie the build server determines that all tests were successfull. The `devel` branch is also built build servers but may sometime be in the failed state. The volatile branches are just used to develop and are not built - as to not clutter up the build servers with uneccessary builds.


# Contributing

I would be very happy If you choose to contribute to `cmakepp`. You can open any issue on github and I will try to reply as soon as possible. I care about any feature you want implemented, bug you want squashed, or modification.
Expand All @@ -130,7 +136,7 @@ I am a bit a hypocrit. I am trying to adhere to these rules though:
# Implementation Notes


## <a name="formalisms"></a> Formalisms
## Formalisms

**Note**: *This section is incomplete but will give you an idea how I formally define data and functions.*

Expand All @@ -139,22 +145,38 @@ To describe cmake functions I use formalisms which I found most useful they shou

* `@@` denotes character data
* `<string> ::= "\""@@"\""` denotes a string literal
* `<regex> ::= /<string>/` denotes a regular expression (as cmake defines it)
* `<identifier> ::= /[a-zA-Z0-9_-]+/` denotes a identifier which can be used for definitions
* `<datatype> ::= "<" "any"|"bool"|"number"|""|"void"|""|<structured data> <?"...">">"` denotes a datatype the elipses denotes that multiple values in array form are described else the datatype can be `any`, `bool`, `number`, `<structured data>` etc..
* `<regex> ::= "/" <string> "/"` denotes a regular expression which needs to match
* `<identifier> ::= /[a-zA-Z_][a-zA-Z0-9_]*/` denotes a identifier which can be used for definitions
* `<datatype> ::= "<" "any"|"bool"|"number"|""|"void"|""|<structured data> <?"...">">"` denotes a datatype. the elipses denotes that multiple values in array form are described else the datatype can be `any`, `bool`, `number`, `<structured data>` etc..
* `<named definition> ::= "<"<identifier>">"`
* `<definition> ::= "<"<?"?"><identifier>|<identifier>":"<datatype>|<datatype>>">"` denotes a possibly name piece of data. this is used in signatures and object descriptions e.g. `generate_greeting(<firstname:<string>> <?lastname:<string>>):<string>` specifies a function which which takes a required parameter called `first_name` which is of type `string` and an optional parameter called `lastname` which is of type `string` and returns a `string`
* `<structured data> ::= "{"<? <named definition> ...>"}"`
* `<void>` primitve which stand for nothing
* `<definition> ::= "<" "?"? <identifier>"&"?|<identifier>"&"?":"<datatype>|<datatype>> ("=" @)? ">"` denotes a possibly named piece of data. this is used in signatures and object descriptions e.g. `generate_greeting(<firstname:<string>> <?lastname:<string>>)-><string>` specifies a function which which takes a required parameter called `first_name` which is of type `string` and an optional parameter called `lastname` which is of type `string` and returns a `string`
- `&` indicates that the identifier is a reference - a variable exists with the name passed in the named identifier
- `?` indicates optionality (no need to specify the value)
- `= @` indicates the default value which is used when the specified value is not specified
* `<structured data> ::= "{"<keyvalue:(<named definition>|(<identifier>":"<datatype>))...>|"}"` the structured date is sometimes multiline
- `{ <name:<string>> <age:<int>> }`
- `{ name:<string> age:<int>}`
- `{ name:<string> address:{ street:<string> area_code:<string>} age:<int>}`
- `{ <<group:<string>>:<users:<string...>> ...> }` describes a map which contains keys of type string which identify a group and associated values which are a string list representing users
* `<void>` primitive which stands for nothing
* `<null> ::= ""` primitive which is truely empty (a string of length `0`)
* `<falseish>:"false"|""|"no"` cmake's false values (list incomplete)
* `<trueish>: !<falseish>`
* `<bool> ::= "true":"false"` indicates a well defined true or false value
* `<boolish> ::= <trueish>|<falsish>|<bool>`
* `<any> ::= <string>|<number>|<structured data>|<bool>|<void>`
* `<named function parameter>`
* `<value identifier> ::= /a-zA-Z0-9_-/+`
* `<named function parameter>::= "<"|"["<value identifier> (<definition>="<any>")?"]"|">"` specifies a named function parameter. a `value identifier` without a `definition` causes the named function parameter to be a flag a boolean is derived which is `true` if the flag exists, else `false`.
- `[--my-flag]` a flag
- `[--depth <n:int>]` a optional value
- `<--depth <n:int>>` a required value
* `<function parameter> ::= <definition>|<named function parameter>`
* `<function definition> `
* ... @@todo
* `<function definition> ::= ("["<scope inheritance>"]")?"("<function parameter...>")" "->" <function parameter>("," <side effects>)?`
- `(<any>)-><bool>` a function expecting a single `<any>` element and returning a `<bool>`
- `(<any...>)-><string...>` a function taking a variable amount of any and returning a list of strings
- `[<depth:int>](<node:<any>>)-><node...>` a function taking a variable node of type `<any>` which returns a list of `<node>` expects a variable `depth` to be defined in parent scope which needs to be a integer
- `...`



## <a name="return"></a>Returning values
Expand Down
14 changes: 14 additions & 0 deletions appveyor.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
version: 0.0.7-build{build}+appveyor
init:
- ps: >-
cinst cmake
cmake --version
environment:
GITHUB_DEVEL_TOKEN_SECRET:
secure: I8c75OvMZF8ftesTtzMGMUq6HKjYVQGH6i8dZnqPIw7hNGDBRcLKVonkNx5xPs5e
GITHUB_DEVEL_TOKEN_ID:
secure: 0vOTPwzzwTN7gcI9p+HW1OXK9TgJRYGqRf2Svw2WZCE=
build: off
test_script:
- ps: cmake -P build/script.cmake
11 changes: 10 additions & 1 deletion build/script.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,13 @@ include("${CMAKE_CURRENT_LIST_DIR}/../cmakepp.cmake")


## execute all tests in test directory
test_execute_glob("${CMAKE_CURRENT_LIST_DIR}/../tests/**.cmake" --recurse)
if("$ENV{CMAKEPP_TEST_EXECUTE_PARALLEL}_" STREQUAL "true_" )
test_execute_glob_parallel("${CMAKE_CURRENT_LIST_DIR}/../tests/**.cmake" --recurse --no-status)
else()
test_execute_glob("${CMAKE_CURRENT_LIST_DIR}/../tests/**.cmake" --recurse)
endif()

## beep three times to indicate end of testrun...
#beep()
#beep()
#beep()
1 change: 1 addition & 0 deletions cmake/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
`cmakepp` has a lot of different functions. I tried to subdivide them into some meaningful sections.


* [Buildserver](buildserver/README.md)
* [Creating Checksums](checksum/README.md)
* [Collections](collections/README.md)
* [Date/Time](datetime/README.md)
Expand Down
Loading

0 comments on commit bc82762

Please sign in to comment.