mirror of
https://github.com/ThePhD/sol2.git
synced 2024-03-22 13:10:44 +08:00
23 lines
820 B
Bash
23 lines
820 B
Bash
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
|
|
|
|
cd build-sol2
|
|
cd Debug
|
|
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
|
|
cmake --build . --config Debug
|
|
ctest -C Debug
|
|
cd ..
|
|
|
|
cd Release
|
|
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
|
|
cmake --build . --config Release
|
|
ctest -C Release
|
|
cd ..
|