01-14-2020, 02:43 PM
(This post was last modified: 01-14-2020, 02:45 PM by Seadragon91.)
(desktop)AMD Ryzen 7 3700X 8-Core (16 Threads), 3.6 GHz; 16 GiB RAM; Win10
MSVC 2019:
CMake: 1m 35s
Built: 1m 17s
(WSL-debian)GCC/G++-8.3:
CMaked: 36s
Built: 1m 18s
Corrected the linux shell script:
MSVC 2019:
CMake: 1m 35s
Built: 1m 17s
(WSL-debian)GCC/G++-8.3:
CMaked: 36s
Built: 1m 18s
Corrected the linux shell script:
- cmake --build used only one core, added j-flag and nproc to use all cores
- Changed time output to e.g. 14:30:25
- Added missing brackets, script would exit after git clone
Code:
#!/usr/bin/env bash
echo \'Started: `date +%H:%M:%S`\' > time.log
echo \'Cloning from git...\'
mkdir Cuberite
cd Cuberite
git clone --recurse-submodules https://github.com/cuberite/cuberite . || (echo \'An error occurred, timings are invalid\' && exit 1)
echo \'Cloned: `date +%H:%M:%S`\' >> ../time.log
echo \'Running CMake...\'
mkdir VS
cd VS
cmake -DBUILD_TOOLS=1 -DSELF_TEST=1 .. || (echo \'An error occurred, timings are invalid\' && exit 1)
echo \'CMaked: `date +%H:%M:%S`\' >> ../../time.log
echo \'Building...\'
cmake --build . -j $(nproc) || (echo \'An error occurred, timings are invalid\' && exit 1)
cd ../..
echo \'Built: `date +%H:%M:%S`\' >> time.log
echo \'All done successfully\'
sleep 5