2017-12-30 10:44:04 +08:00
|
|
|
if [ "$LLVM_VERSION" ]
|
|
|
|
then
|
|
|
|
build_type=-DCMAKE_CXX_COMPILER\=clang++ -DCMAKE_C_COMPILER\=clang;
|
|
|
|
elif [ "$GCC_VERSION" ]
|
|
|
|
then
|
|
|
|
build_type=-DCMAKE_CXX_COMPILER\=g++ -DCMAKE_C_COMPILER\=gcc;
|
|
|
|
else
|
|
|
|
build_type=-DCMAKE_CXX_COMPILER\=g++ -DCMAKE_C_COMPILER\=gcc;
|
|
|
|
fi
|
|
|
|
|
2017-12-30 07:47:48 +08:00
|
|
|
cd build-sol2
|
|
|
|
cd Debug
|
2017-12-30 10:44:04 +08:00
|
|
|
cmake ../../sol2 -G Ninja -DCMAKE_BUILD_TYPE=Debug $build_type -DLUA_VERSION="${LUA_VERSION}" -DBUILD_LUA=ON -DBUILD_LUA_AS_DLL=OFF -DTESTS=ON -DEXAMPLES=ON -DSINGLE=ON -DTESTS_EXAMPLES=ON -DTESTS_SINGLE=ON
|
2017-12-30 07:47:48 +08:00
|
|
|
cmake --build . --config Debug
|
|
|
|
ctest -C Debug
|
|
|
|
cd ..
|
|
|
|
|
|
|
|
cd Release
|
2017-12-30 10:44:04 +08:00
|
|
|
cmake ../../sol2 -G Ninja -DCMAKE_BUILD_TYPE=Release $build_type -DLUA_VERSION="${LUA_VERSION}" -DBUILD_LUA=ON -DBUILD_LUA_AS_DLL=OFF -DTESTS=ON -DEXAMPLES=ON -DSINGLE=ON -DTESTS_EXAMPLES=ON -DTESTS_SINGLE=ON
|
2017-12-30 07:47:48 +08:00
|
|
|
cmake --build . --config Release
|
|
|
|
ctest -C Release
|
|
|
|
cd ..
|