mirror of
https://github.com/minetest/minetest.git
synced 2024-11-30 11:33:44 +01:00
eb52a149a0
Test case: ``` $ cmake . -DRUN_IN_PLACE=TRUE -DCMAKE_BUILD_TYPE=Release -DBUILD_SERVER=TRUE -DENABLE_TOUCH=FALSE minetest minetestserver W/o LTO: 13M 7.3M W/ LTO: 11M 5.9M difference: 15% 19% ``` Also fixes various compiler warnings resulting from compilation using LTO. --------- Signed-off-by: David Heidelberg <david@ixit.cz>
12 lines
289 B
Bash
Executable File
12 lines
289 B
Bash
Executable File
#!/bin/bash -e
|
|
|
|
cmake -B build \
|
|
-DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE:-Debug} \
|
|
-DENABLE_LTO=FALSE \
|
|
-DRUN_IN_PLACE=TRUE \
|
|
-DENABLE_GETTEXT=${CMAKE_ENABLE_GETTEXT:-TRUE} \
|
|
-DBUILD_SERVER=${CMAKE_BUILD_SERVER:-TRUE} \
|
|
${CMAKE_FLAGS}
|
|
|
|
cmake --build build --parallel $(($(nproc) + 1))
|