Skip to content

Commit f1f1e0e

Browse files
committed
Add TOOLCHAIN variables
1 parent a0237ae commit f1f1e0e

2 files changed

Lines changed: 21 additions & 6 deletions

File tree

.travis.yml

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,19 @@ addons:
1111
- python3
1212

1313
env:
14-
- CONFIG=Debug
15-
- CONFIG=Release
14+
- TOOLCHAIN=libcxx CONFIG=Debug
15+
- TOOLCHAIN=libcxx CONFIG=Release
16+
- TOOLCHAIN=clang-libstdcxx CONFIG=Debug
17+
- TOOLCHAIN=clang-libstdcxx CONFIG=Release
18+
- TOOLCHAIN=gcc CONFIG=Debug
19+
- TOOLCHAIN=gcc CONFIG=Release
20+
21+
matrix:
22+
exclude:
23+
- os: linux
24+
env: TOOLCHAIN=libcxx CONFIG=Debug
25+
- os: linux
26+
env: TOOLCHAIN=libcxx CONFIG=Release
1627

1728
install:
1829
- ./install-deps.sh
@@ -25,7 +36,7 @@ install:
2536
- python3 --version
2637

2738
script:
28-
- build.py --verbose --pack TGZ --config ${CONFIG}
39+
- build.py --verbose --pack TGZ --config ${CONFIG} --toolchain ${TOOLCHAIN}
2940

3041
before_deploy:
3142
- export FILE_TO_UPLOAD=$(ls _builds/*/Foo-*.tar.gz)

CMakeLists.txt

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,13 @@ set(CPACK_PACKAGE_VERSION_MAJOR ${major_ver})
2222
set(CPACK_PACKAGE_VERSION_MINOR ${minor_ver})
2323
set(CPACK_PACKAGE_VERSION_PATCH ${patch_ver})
2424

25-
string(COMPARE EQUAL "$ENV{CONFIG}" "Debug" debug_build)
26-
if(travis_deploy AND debug_build)
27-
set(CPACK_PACKAGE_NAME "${PROJECT_NAME}-Debug")
25+
if(travis_deploy)
26+
string(COMPARE EQUAL "$ENV{CONFIG}" "Debug" debug_build)
27+
if(debug_build)
28+
set(CPACK_PACKAGE_NAME "${PROJECT_NAME}-$ENV{TOOLCHAIN}-Debug")
29+
else()
30+
set(CPACK_PACKAGE_NAME "${PROJECT_NAME}-$ENV{TOOLCHAIN}")
31+
endif()
2832
endif()
2933

3034
include(CPack)

0 commit comments

Comments
 (0)