mirror of
https://github.com/fastfetch-cli/fastfetch.git
synced 2026-09-13 02:42:09 +02:00
run.sh: add env to build as debug
This commit is contained in:
@@ -70,6 +70,8 @@ if(NOT CMAKE_BUILD_TYPE)
|
||||
set(CMAKE_BUILD_TYPE Release)
|
||||
endif()
|
||||
|
||||
message(STATUS "Build type: ${CMAKE_BUILD_TYPE}")
|
||||
|
||||
set(CMAKE_C_STANDARD 11)
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wextra -Wconversion")
|
||||
|
||||
|
||||
@@ -1,19 +1,21 @@
|
||||
#!/usr/bin/env sh
|
||||
|
||||
# make the script exit if any of the commands fail,
|
||||
# making fastfetch not run if the build failed.
|
||||
set -e
|
||||
|
||||
mkdir -p build/
|
||||
cd build/
|
||||
cmake ..
|
||||
|
||||
if [ "$OSTYPE" == "linux-gnu" ]; then
|
||||
cmake_build_extra_args="-j$(nproc)"
|
||||
else
|
||||
cmake_build_extra_args=""
|
||||
if [ -z "${CMAKE_BUILD_TYPE}" ]; then
|
||||
CMAKE_BUILD_TYPE=Release
|
||||
fi
|
||||
cmake --build . --target fastfetch ${cmake_build_extra_args}
|
||||
cmake "-DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}" ..
|
||||
|
||||
if [ -z "$OSTYPE" ] || [ "$OSTYPE" = "linux-gnu" ]; then
|
||||
cmake_build_args="-j$(nproc)"
|
||||
else
|
||||
cmake_build_args=""
|
||||
fi
|
||||
cmake --build . --target fastfetch ${cmake_build_args}
|
||||
|
||||
export LSAN_OPTIONS=suppressions=../tests/lsan.supp
|
||||
./fastfetch "$@"
|
||||
|
||||
Reference in New Issue
Block a user