test in c++ 98, 03 and 11 mode

This commit is contained in:
Mario Werner 2016-02-07 18:32:23 +01:00
parent 6a79a3279b
commit 27a1b787c8
2 changed files with 13 additions and 10 deletions

View File

@ -13,9 +13,9 @@ env:
6pxmyzLHSn1ZR7OX5rfPvwM3tOyZ3H0= 6pxmyzLHSn1ZR7OX5rfPvwM3tOyZ3H0=
matrix: matrix:
- BUILD=Doc - BUILD=Doc
- BUILD=Debug STANDARD=98
- BUILD=Debug STANDARD=11 - BUILD=Debug STANDARD=11
- BUILD=Release STANDARD=98 - BUILD=Release STANDARD=98
- BUILD=Release STANDARD=03
- BUILD=Release STANDARD=11 - BUILD=Release STANDARD=11
matrix: matrix:

View File

@ -93,6 +93,14 @@ if cppStandard == '98':
'-DFMT_DOC=OFF', '-DFMT_DOC=OFF',
'-DFMT_PEDANTIC=ON', '-DFMT_PEDANTIC=ON',
srcDir]) srcDir])
if cppStandard == '03':
check_call(['cmake', '-DCMAKE_INSTALL_PREFIX='+installDir,
'-DCMAKE_BUILD_TYPE=' + build,
'-DCMAKE_CXX_FLAGS=-std=c++03',
'-DFMT_USE_CPP11=OFF',
'-DFMT_DOC=OFF',
'-DFMT_PEDANTIC=ON',
srcDir])
else: else:
# default configuration # default configuration
check_call(['cmake', '-DCMAKE_INSTALL_PREFIX='+installDir, check_call(['cmake', '-DCMAKE_INSTALL_PREFIX='+installDir,
@ -118,13 +126,8 @@ check_call(['make', 'install'])
# test installation # test installation
makedirs_if_not_exist(buildDir_test) makedirs_if_not_exist(buildDir_test)
os.chdir(buildDir_test) os.chdir(buildDir_test)
if cppStandard == '98': check_call(['cmake', '-DCMAKE_INSTALL_PREFIX='+installDir,
check_call(['cmake', '-DCMAKE_INSTALL_PREFIX='+installDir, '-DCMAKE_BUILD_TYPE=' + build,
'-DCMAKE_BUILD_TYPE=' + build, '-DCMAKE_CXX_FLAGS=-std=c++' + cppStandard,
'-DCMAKE_CXX_FLAGS=-std=c++98', srcDir_test])
srcDir_test])
else:
check_call(['cmake', '-DCMAKE_INSTALL_PREFIX='+installDir,
'-DCMAKE_BUILD_TYPE=' + build,
srcDir_test])
check_call(['make', '-j4']) check_call(['make', '-j4'])