File: 0001-do-not-disable-optimization.patch

package info (click to toggle)
mlpack 4.6.0-1
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 31,044 kB
  • sloc: cpp: 225,068; python: 1,934; sh: 1,198; lisp: 414; makefile: 85
file content (23 lines) | stat: -rw-r--r-- 829 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
From: "Barak A. Pearlmutter" <barak+git@pearlmutter.net>
Date: Tue, 8 Nov 2022 13:12:10 +0000
Subject: do not disable optimization

Do not disable optimization (-O0) just because debugging is enabled (-g)
---
 CMakeLists.txt | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index a12fed4..8d718e4 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -204,7 +204,8 @@ endif ()
 if (CMAKE_BUILD_TYPE STREQUAL "Debug" OR DEBUG)
   if (NOT MSVC)
     add_definitions(-DDEBUG)
-    set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -ftemplate-backtrace-limit=0")
+    set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g -ftemplate-backtrace-limit=0")
+    set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=c99 -g")
   endif()
 
   # mlpack uses it's own mlpack::backtrace class based on Binary File Descriptor