Add toolchain directory with cmake toolchain files used to find compilers and set C++ versions The following configurations are build on Windows using appveyor service: - enable MSVC 2015 SDK 8.1 - enable MSVC 2015 - enable MSVC 2017 - enable MSVC 2017 c++17 - enable mingw-cxx11 - enable mingw-gnuxx11 - enable mingw-cxx17 The following configurations are build on Linux using travis service: - enable Ubuntu 14.04 amd64/i386, C++11 - enable Ubuntu 16.04 amd64/i386, C++11 - enable Ubuntu 18.04 amd64 C++98, C++11, GNU++11, C++17 - enable mingw-w64 on Ubuntu 18.04 amd64, C++11, GNU++11, C++17 The tests for cross compiled mingw windows binaries are run using wine64
19 lines
550 B
Bash
Executable File
19 lines
550 B
Bash
Executable File
#!/bin/bash
|
|
set -e
|
|
set -x
|
|
|
|
uname -a
|
|
|
|
cmake -H. -B_build_${TOOLCHAIN} -DCMAKE_TOOLCHAIN_FILE="${PWD}/toolchains/${TOOLCHAIN}.cmake"
|
|
cmake --build _build_${TOOLCHAIN} -- -j4
|
|
|
|
if [ "$RUN_TESTS" = true ]; then
|
|
case "$TOOLCHAIN" in linux-mingw*)
|
|
echo "copy runtime libraries needed for tests into build directory"
|
|
cp /usr/x86_64-w64-mingw32/lib/libwinpthread-1.dll /usr/lib/gcc/x86_64-w64-mingw32/7.3-win32/{libstdc++-6.dll,libgcc_s_seh-1.dll} _build_${TOOLCHAIN}
|
|
esac
|
|
CTEST_OUTPUT_ON_FAILURE=1 cmake --build _build_${TOOLCHAIN} --target test
|
|
fi
|
|
|
|
|