Proper luajit testing

This commit is contained in:
ThePhD 2016-02-25 08:28:07 -05:00
parent 3f6de17856
commit 994095636c
3 changed files with 15 additions and 11 deletions

View File

@ -22,4 +22,4 @@ before_install:
script: script:
- ./bootstrap.py --ci --lua-lib=lua5.2 --cxx=$CXX && ninja - ./bootstrap.py --ci --lua-lib=lua5.2 --cxx=$CXX && ninja
- ./bootstrap.py --ci --lua-lib=lua5.1 --cxx=$CXX && ninja - ./bootstrap.py --ci --lua-lib=luajit --cxx=$CXX && ninja

View File

@ -57,12 +57,12 @@ For maximum ease of use, a script called `single.py` is provided. You can run th
## Supported Compilers ## Supported Compilers
Sol makes use of C++11/14 features. GCC 4.7 and Clang 3.3 or higher should be able to compile without problems. However, the Sol makes use of C++11/14 features. GCC 4.9 and Clang 3.4 or higher should be able to compile without problems. However, the
officially supported compilers are: officially supported and CI-tested compilers are:
- GCC 4.8.0+ - GCC 4.9.0+
- Clang 3.4+ - Clang 3.5+
- Visual Studio 2015 Community (Visual C++ 14.0) and above - Visual Studio 2015 Community (Visual C++ 14.0) and above (tested manually)
## Caveats ## Caveats

View File

@ -41,8 +41,8 @@ parser.add_argument('--debug', action='store_true', help='compile with debug fla
parser.add_argument('--cxx', metavar='<compiler>', help='compiler name to use (default: env.CXX=%s)' % cxx, default=cxx) parser.add_argument('--cxx', metavar='<compiler>', help='compiler name to use (default: env.CXX=%s)' % cxx, default=cxx)
parser.add_argument('--ci', action='store_true', help=argparse.SUPPRESS) parser.add_argument('--ci', action='store_true', help=argparse.SUPPRESS)
parser.add_argument('--testing', action='store_true', help=argparse.SUPPRESS) parser.add_argument('--testing', action='store_true', help=argparse.SUPPRESS)
parser.add_argument('--lua-lib', help='lua library name (without the lib on *nix)', default='lua') parser.add_argument('--lua-lib', help='lua library name (without the lib on *nix).', default='lua')
parser.add_argument('--lua-dir', metavar='<dir>', help='directory lua is in with include and lib subdirectories') parser.add_argument('--lua-dir', metavar='<dir>', help='directory lua is in with include and lib subdirectories', default='./lua-5.3.2')
parser.add_argument('--install-dir', metavar='<dir>', help='directory to install the headers to', default=install_dir); parser.add_argument('--install-dir', metavar='<dir>', help='directory to install the headers to', default=install_dir);
parser.epilog = """In order to install sol, administrative privileges might be required. parser.epilog = """In order to install sol, administrative privileges might be required.
Note that installation is done through the 'ninja install' command. To uninstall, the Note that installation is done through the 'ninja install' command. To uninstall, the
@ -52,7 +52,7 @@ system is {}""".format(install_dir)
args = parser.parse_args() args = parser.parse_args()
# general variables # general variables
include = [ '.', os.path.join('Catch', 'include')] include = [ '.', './include', os.path.join('Catch', 'include')]
depends = [] depends = []
cxxflags = [ '-Wall', '-Wextra', '-pedantic', '-pedantic-errors', '-std=c++14' ] cxxflags = [ '-Wall', '-Wextra', '-pedantic', '-pedantic-errors', '-std=c++14' ]
ldflags = [] ldflags = []
@ -88,9 +88,13 @@ if args.ci:
ldflags.extend(library_includes(['lib'])) ldflags.extend(library_includes(['lib']))
include.extend(['./include']) include.extend(['./include'])
if args.lua_lib: if args.lua_lib:
include.extend(['/usr/include/' + args.lua_lib]) if args.lualib == 'luajit':
include.extend(['/usr/include/luajit-2.0'])
ldflags.extend(libraries(['luajit-5.1']))
else:
include.extend(['/usr/include/' + args.lua_lib])
else: else:
include.extend(['/usr/include/lua-5.3', '/usr/include/lua-5.2', '/usr/include/lua-5.1']) include.extend(['/usr/include/lua-5.3', '/usr/include/lua-5.2', '/usr/include/lua-5.1', '/usr/include/luajit-2.0'])
if args.testing: if args.testing:
cxxflags.append('-Wmissing-declarations') cxxflags.append('-Wmissing-declarations')