Skip to content

Commit 04d4ccb

Browse files
authored
Merge pull request #137 from saxbophone/develop
v0.21.1
2 parents e7160d5 + 5666d7d commit 04d4ccb

File tree

3 files changed

+27
-12
lines changed

3 files changed

+27
-12
lines changed

.travis.yml

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,21 @@
11
language: c
2+
# Ubuntu 14.04 Trusty support
3+
sudo: required
4+
dist: trusty
25
# build matrix with both OSes and Compilers
36
os:
47
- linux
58
- osx
69
compiler:
710
- clang
8-
# commenting out gcc until installing GCC v5.x+ actually works on Travis CI
9-
# - gcc
11+
- gcc
1012
# different C Standard versions - test on C99 and C11
1113
env:
12-
- LIBSAXBOSPIRAL_C_STANDARD=99
13-
- LIBSAXBOSPIRAL_C_STANDARD=11
14-
# exclude gcc on osx as this always points to clang
14+
matrix:
15+
- LIBSAXBOSPIRAL_C_STANDARD=99
16+
- LIBSAXBOSPIRAL_C_STANDARD=11
1517
matrix:
18+
# exclude gcc on osx as this always points to clang
1619
exclude:
1720
- os: osx
1821
compiler: gcc
@@ -22,18 +25,22 @@ addons:
2225
apt:
2326
sources:
2427
- george-edison55-precise-backports # cmake 3.2.3 / doxygen 1.8.3
28+
# add PPAs with more up-to-date toolchains
29+
- ubuntu-toolchain-r-test
2530
packages:
2631
- cmake
2732
- cmake-data
28-
# commenting out gcc until installing GCC v5.x+ actually works on Travis CI
2933
# want gcc 5.x as 4.x gives incorrect warnings
30-
# - gcc-5
34+
- gcc-5
3135
# branches safelist
3236
branches:
3337
only:
3438
- master
3539
- develop
3640
- /^test\/.*$/
41+
install:
42+
# override $CC to use gcc-5
43+
- if [ "$CC" = "gcc" ]; then export CC="gcc-5"; fi
3744
before_script:
3845
- cmake .
3946
script:

CMakeLists.txt

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,12 @@
2323
# begin basic metadata
2424
cmake_minimum_required(VERSION 3.0)
2525

26-
project(libsaxbospiral VERSION 0.21.0 LANGUAGES C)
26+
project(libsaxbospiral VERSION 0.21.1 LANGUAGES C)
2727

28-
# set default C standard to use (C99)
29-
set(SAXBOSPIRAL_C_STANDARD "99")
28+
# set default C standard to use (C99) if not already set
29+
if(NOT DEFINED SAXBOSPIRAL_C_STANDARD)
30+
set(SAXBOSPIRAL_C_STANDARD "99")
31+
endif()
3032
# if env variable LIBSAXBOSPIRAL_C_STANDARD is set and valid, override version
3133
if(DEFINED ENV{LIBSAXBOSPIRAL_C_STANDARD})
3234
# not a very robust regex but ok for most purposes

README.md

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,11 +61,17 @@ cmake -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=ON .
6161
make
6262
```
6363

64-
The above builds in C99 mode by default. The standard to use is controlled by the `LIBSAXBOSPIRAL_C_STANDARD` environment variable.
64+
The above builds in C99 mode by default. The standard to use can be controlled by the `SAXBOSPIRAL_C_STANDARD` CMake variable or by the `LIBSAXBOSPIRAL_C_STANDARD` environment variable.
6565

66-
You can build in C11 mode if you want with the following:
66+
You can build in C11 mode if you want with either of the following:
6767

6868
```sh
69+
# using CMake variable
70+
cmake -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=ON -DSAXBOSPIRAL_C_STANDARD=11 .
71+
```
72+
73+
```sh
74+
# using environment variable
6975
LIBSAXBOSPIRAL_C_STANDARD=11 cmake -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=ON .
7076
```
7177

0 commit comments

Comments
 (0)