File tree Expand file tree Collapse file tree 1 file changed +5
-0
lines changed Expand file tree Collapse file tree 1 file changed +5
-0
lines changed Original file line number Diff line number Diff line change @@ -91,6 +91,7 @@ option(SET_TWEAK "Add tweak to project version" ON) # This is set to off by gith
9191option (IS_MUSL "Build with musl libc"  OFF ) # Used by Github Actions 
9292option (INSTALL_LICENSE "Install license into /usr/share/licenses"  ON )
9393option (ENABLE_EMBEDDED_PCIIDS "Embed pci.ids into fastfetch, requires `python`"  OFF )
94+ option (ENABLE_FRAME_POINTERS "Build fastfetch with frame pointers"  OFF ) # For Fedora/Ubuntu/Arch Linux packagers 
9495
9596set (BINARY_LINK_TYPE_OPTIONS dlopen dynamic static )
9697set (BINARY_LINK_TYPE dlopen CACHE  STRING  "How to link fastfetch" )
@@ -138,6 +139,10 @@ set(WARNING_FLAGS "-Wall -Wextra -Wconversion -Werror=uninitialized -Werror=retu
138139set (CMAKE_C_STANDARD 11)
139140set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS}  ${WARNING_FLAGS}  -Werror=incompatible-pointer-types -Werror=implicit-function-declaration -Werror=int-conversion" )
140141
142+ if (LINUX AND  ENABLE_FRAME_POINTERS AND  NOT  CMAKE_BUILD_TYPE  STREQUAL  "Debug" )
143+     set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS}  -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer" )
144+ endif ()
145+ 
141146if (WIN32  OR  ENABLE_DIRECTX_HEADERS)
142147    enable_language (CXX)
143148    set (CMAKE_CXX_STANDARD 17)
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments