Skip to content

Commit 63cce45

Browse files
authored
Merge pull request #1179 from jimklimov/distfix
A few fixes to recently added travis dist and shadow compile supports
2 parents 408d071 + fe8e9f9 commit 63cce45

File tree

2 files changed

+80
-48
lines changed

2 files changed

+80
-48
lines changed

zproject_autotools.gsl

Lines changed: 19 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1198,26 +1198,30 @@ AS_IF([test "x$enable_Werror" = "xyes" || test "x$enable_Werror" = "xauto"],
11981198
[AS_IF([test -n "$CC"],[AS_IF([$CC --version 2>&1 | grep 'Free Software Foundation' > /dev/null && test "x$GCC" = "xyes"],
11991199
[AC_MSG_NOTICE([Enabling pedantic errors for GNU C])
12001200
CFLAGS="$CFLAGS -pedantic -Wall -Werror -Werror=format-security"],
1201-
[AC_MSG_NOTICE([Not enabling pedantic errors: compiler not supported by this recipe (not GNU C)])
1202-
AS_IF([test "x$enable_Werror" = "xyes"], [AC_MSG_ERROR([--enable-Werror=yes was requested and can not be satisfied for C: $CC])])
1203-
])])
1201+
[AS_IF([$CC --version 2>&1 | grep 'clang version' > /dev/null],
1202+
[AC_MSG_NOTICE([Enabling pedantic errors for clang C])
1203+
CFLAGS="$CFLAGS -pedantic -Wall -Werror -Werror=format-security"],
1204+
[AC_MSG_NOTICE([Not enabling pedantic errors: compiler not supported by this recipe (not GNU or clang C)])
1205+
AS_IF([test "x$enable_Werror" = "xyes"], [AC_MSG_ERROR([--enable-Werror=yes was requested and can not be satisfied for C: $CC])])
1206+
])])])
12041207
AS_IF([test -n "$CXX"],[AS_IF([$CXX --version 2>&1 | grep 'Free Software Foundation' > /dev/null && test "x$GCC" = "xyes"],
12051208
[AC_MSG_NOTICE([Enabling pedantic errors for GNU C++])
12061209
CXXFLAGS="$CXXFLAGS -pedantic -Wall -Werror -Werror=format-security"],
1207-
[AC_MSG_NOTICE([Not enabling pedantic errors: compiler not supported by this recipe (not GNU C++)])
1208-
AS_IF([test "x$enable_Werror" = "xyes"], [AC_MSG_ERROR([--enable-Werror=yes was requested and can not be satisfied for C++: $CXX])])
1209-
])])
1210+
[AS_IF([$CXX --version 2>&1 | grep 'clang version' > /dev/null],
1211+
[AC_MSG_NOTICE([Enabling pedantic errors for clang C++])
1212+
CXXFLAGS="$CXXFLAGS -pedantic -Wall -Werror -Werror=format-security"],
1213+
[AC_MSG_NOTICE([Not enabling pedantic errors: compiler not supported by this recipe (not GNU or clang C++)])
1214+
AS_IF([test "x$enable_Werror" = "xyes"], [AC_MSG_ERROR([--enable-Werror=yes was requested and can not be satisfied for C++: $CXX])])
1215+
])])])
12101216
AS_IF([test -n "$CPP"],[AS_IF([$CPP --version 2>&1 | grep 'Free Software Foundation' > /dev/null && test "x$GCC" = "xyes"],
12111217
[AC_MSG_NOTICE([Enabling pedantic errors for GNU CPP preprocessor])
1212-
.if project.use_cxx
1213-
CPPFLAGS="$CPPFLAGS -pedantic -Werror -Wall"
1214-
.else
1215-
CPPFLAGS="$CPPFLAGS -pedantic -Werror -Wall -Wc++-compat"
1216-
.endif
1217-
],
1218-
[AC_MSG_NOTICE([Not enabling pedantic errors: preprocessor not supported by this recipe (not GNU CPP)])
1219-
AS_IF([test "x$enable_Werror" = "xyes"], [AC_MSG_ERROR([--enable-Werror=yes was requested and can not be satisfied for CPP: $CPP])])
1220-
])])
1218+
CPPFLAGS="$CPPFLAGS -pedantic -Werror -Wall -Wc++-compat"],
1219+
[AS_IF([$CXX --version 2>&1 | grep 'clang version' > /dev/null],
1220+
[AC_MSG_NOTICE([Enabling pedantic errors for clang CPP preprocessor])
1221+
CPPFLAGS="$CPPFLAGS -pedantic -Werror -Wall -Wc++-compat"],
1222+
[AC_MSG_NOTICE([Not enabling pedantic errors: preprocessor not supported by this recipe (not GNU or clang CPP)])
1223+
AS_IF([test "x$enable_Werror" = "xyes"], [AC_MSG_ERROR([--enable-Werror=yes was requested and can not be satisfied for CPP: $CPP])])
1224+
])])])
12211225
])
12221226

12231227
.if project.use_cxx_gcc_4_9

zproject_travis.gsl

Lines changed: 61 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -331,64 +331,88 @@ matrix:
331331
.if (defined (project.travis_shadow_clang) & !(project.travis_shadow_clang ?= 0)) | (defined (project.travis_shadow_gcc) & !(project.travis_shadow_gcc ?= 0))
332332
# Shadow-compilation setups below inspired by https://docs.travis-ci.com/user/languages/cpp/
333333
.endif
334-
.if defined (project.travis_shadow_clang) & !(project.travis_shadow_clang ?= 0)
334+
. if defined (project.travis_shadow_clang) & !(project.travis_shadow_clang ?= 0)
335335
- env: BUILD_TYPE=default-Werror MATRIX_EVAL="CC=clang-5.0 && CXX=clang++-5.0"
336336
os: linux
337-
.if (project.travis_dist ?<> "")
337+
. if (project.travis_dist ?<> "")
338338
dist: $(project.travis_dist)
339-
.endif
339+
. else
340+
dist: xenial
341+
. endif
340342
addons:
341343
apt:
342344
sources:
343-
- llvm-toolchain-trusty-5.0
344-
.if (pkg_src_zeromq_dist ?<> "")
345+
. if (project.travis_dist ?<> "")
346+
- llvm-toolchain-$(project.travis_dist)-5.0
347+
. else
348+
- llvm-toolchain-xenial-5.0
349+
. endif
350+
. if (pkg_src_zeromq_dist ?<> "")
345351
- *$(pkg_src_zeromq_dist)
346-
.endif
352+
. endif
347353
packages:
348354
- *pkg_deps_common
349355
- clang-5.0
350356
- env: BUILD_TYPE=default-Werror MATRIX_EVAL="CC=clang-4.0 && CXX=clang++-4.0"
351357
os: linux
352-
.if (project.travis_dist ?<> "")
358+
. if (project.travis_dist ?<> "")
353359
dist: $(project.travis_dist)
354-
.endif
360+
. else
361+
dist: xenial
362+
. endif
355363
addons:
356364
apt:
357365
sources:
358-
- llvm-toolchain-trusty-4.0
359-
.if (pkg_src_zeromq_dist ?<> "")
366+
. if (project.travis_dist ?<> "")
367+
- llvm-toolchain-$(project.travis_dist)-4.0
368+
. else
369+
- llvm-toolchain-xenial-4.0
370+
. endif
371+
. if (pkg_src_zeromq_dist ?<> "")
360372
- *$(pkg_src_zeromq_dist)
361-
.endif
373+
. endif
362374
packages:
363375
- *pkg_deps_common
364376
- clang-4.0
365377
- env: BUILD_TYPE=default-Werror MATRIX_EVAL="CC=clang-3.9 && CXX=clang++-3.9"
366378
os: linux
367-
.if (project.travis_dist ?<> "")
379+
. if (project.travis_dist ?<> "")
368380
dist: $(project.travis_dist)
369-
.endif
381+
. else
382+
dist: xenial
383+
. endif
370384
addons:
371385
apt:
372386
sources:
373-
- llvm-toolchain-trusty-3.9
374-
.if (pkg_src_zeromq_dist ?<> "")
387+
. if (project.travis_dist ?<> "")
388+
- llvm-toolchain-$(project.travis_dist)-3.9
389+
. else
390+
- llvm-toolchain-xenial-3.9
391+
. endif
392+
. if (pkg_src_zeromq_dist ?<> "")
375393
- *$(pkg_src_zeromq_dist)
376-
.endif
394+
. endif
377395
packages:
378396
- *pkg_deps_common
379397
- clang-3.9
380398
- env: BUILD_TYPE=default-Werror MATRIX_EVAL="CC=clang-3.8 && CXX=clang++-3.8"
381399
os: linux
382-
.if (project.travis_dist ?<> "")
400+
. if (project.travis_dist ?<> "")
383401
dist: $(project.travis_dist)
384-
.endif
402+
. else
403+
dist: xenial
404+
. endif
385405
addons:
386406
apt:
387407
sources:
388-
- llvm-toolchain-trusty-3.8
389-
.if (pkg_src_zeromq_dist ?<> "")
408+
. if (project.travis_dist ?<> "")
409+
- llvm-toolchain-$(project.travis_dist)-3.8
410+
. else
411+
- llvm-toolchain-xenial-3.8
412+
. endif
413+
. if (pkg_src_zeromq_dist ?<> "")
390414
- *$(pkg_src_zeromq_dist)
391-
.endif
415+
. endif
392416
packages:
393417
- *pkg_deps_common
394418
- clang-3.8
@@ -412,50 +436,52 @@ matrix:
412436
- g++-4.9
413437
- gcc-4.9
414438
. endif
439+
. if !defined(project.travis_dist) | (project.travis_dist ?<> "xenial")
415440
- env: BUILD_TYPE=default-Werror MATRIX_EVAL="CC=gcc-5 && CXX=g++-5"
416441
os: linux
417-
.if (project.travis_dist ?<> "")
442+
. if (project.travis_dist ?<> "")
418443
dist: $(project.travis_dist)
419-
.endif
444+
. endif
420445
addons:
421446
apt:
422447
sources:
423448
- ubuntu-toolchain-r-test
424-
.if (pkg_src_zeromq_dist ?<> "")
449+
. if (pkg_src_zeromq_dist ?<> "")
425450
- *$(pkg_src_zeromq_dist)
426-
.endif
451+
. endif
427452
packages:
428453
- *pkg_deps_common
429454
- g++-5
430455
- gcc-5
456+
. endif
431457
- env: BUILD_TYPE=default-Werror MATRIX_EVAL="CC=gcc-6 && CXX=g++-6"
432458
os: linux
433-
.if (project.travis_dist ?<> "")
459+
. if (project.travis_dist ?<> "")
434460
dist: $(project.travis_dist)
435-
.endif
461+
. endif
436462
addons:
437463
apt:
438464
sources:
439465
- ubuntu-toolchain-r-test
440-
.if (pkg_src_zeromq_dist ?<> "")
466+
. if (pkg_src_zeromq_dist ?<> "")
441467
- *$(pkg_src_zeromq_dist)
442-
.endif
468+
. endif
443469
packages:
444470
- *pkg_deps_common
445471
- g++-6
446472
- gcc-6
447473
- env: BUILD_TYPE=default-Werror MATRIX_EVAL="CC=gcc-7 && CXX=g++-7"
448474
os: linux
449-
.if (project.travis_dist ?<> "")
475+
. if (project.travis_dist ?<> "")
450476
dist: $(project.travis_dist)
451-
.endif
477+
. endif
452478
addons:
453479
apt:
454480
sources:
455481
- ubuntu-toolchain-r-test
456-
.if (pkg_src_zeromq_dist ?<> "")
482+
. if (pkg_src_zeromq_dist ?<> "")
457483
- *$(pkg_src_zeromq_dist)
458-
.endif
484+
. endif
459485
packages:
460486
- *pkg_deps_common
461487
- g++-7
@@ -505,7 +531,9 @@ matrix:
505531
. if !(use_cxx_gcc_4_9 ?= 1)
506532
- env: BUILD_TYPE=default-Werror MATRIX_EVAL="CC=gcc-4.9 && CXX=g++-4.9"
507533
. endif
534+
. if !defined(project.travis_dist) | (project.travis_dist ?<> "xenial")
508535
- env: BUILD_TYPE=default-Werror MATRIX_EVAL="CC=gcc-5 && CXX=g++-5"
536+
. endif
509537
- env: BUILD_TYPE=default-Werror MATRIX_EVAL="CC=gcc-6 && CXX=g++-6"
510538
- env: BUILD_TYPE=default-Werror MATRIX_EVAL="CC=gcc-7 && CXX=g++-7"
511539
. endif

0 commit comments

Comments
 (0)