diff --git a/CMakeLists.txt b/CMakeLists.txt index 2b8da2f34..92606b942 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -3,6 +3,7 @@ cmake_minimum_required(VERSION 3.1.0) # Threads::Threads is needed project(fastfetch) option(BUILD_TESTS "Build test programs" OFF) +option(BUILD_DEBUG "Build with debug symbols" OFF) execute_process( COMMAND git rev-list --count HEAD @@ -26,6 +27,10 @@ if(BUILD_TESTS) set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -march=native -mtune=native -pipe -fno-plt -Wconversion -Wpedantic") endif(BUILD_TESTS) +if(BUILD_DEBUG) + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -g") +endif(BUILD_DEBUG) + configure_file(src/fastfetch_config.h.in fastfetch_config.h) set(THREADS_PREFER_PTHREAD_FLAG ON) diff --git a/src/fastfetch.c b/src/fastfetch.c index bf057b6ca..900cc0568 100644 --- a/src/fastfetch.c +++ b/src/fastfetch.c @@ -409,7 +409,7 @@ static inline void printCommandHelp(const char* command) { constructAndPrintCommandHelpFormat("gpu", "{2} {3}", 3, "GPU vendor", - "GPU vendor pretty" + "GPU vendor pretty", "GPU name" ); }