1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42
|
From: Antonio Valentino <antonio.valentino@tiscali.it>
Date: Sun, 3 Dec 2023 15:43:38 +0000
Subject: Fortify
Forwarded: not-needed
---
CMakeLists.txt | 6 ++++++
ltfat_C_kernel/CMakeLists.txt | 4 ++--
2 files changed, 8 insertions(+), 2 deletions(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 0e17dca..1c3c28d 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -4,6 +4,12 @@ cmake_minimum_required( VERSION 2.8.5 )
# Set the project name
project( LTFATPY )
+set(CMAKE_C_FLAGS "$ENV{CPPFLAGS} $ENV{CFLAGS} ${CMAKE_C_FLAGS}")
+set(CMAKE_CXX_FLAGS "$ENV{CPPFLAGS} $ENV{CXXFLAGS} ${CMAKE_CXX_FLAGS}")
+
+message(STATUS "CMAKE_C_FLAGS: ${CMAKE_C_FLAGS}")
+message(STATUS "CMAKE_CXX_FLAGS: ${CMAKE_CXX_FLAGS}")
+
# If the user specifies -DCMAKE_BUILD_TYPE on the command line, take their
# definition and dump it in the cache along with proper documentation,
# otherwise set CMAKE_BUILD_TYPE to Debug prior to calling project()
diff --git a/ltfat_C_kernel/CMakeLists.txt b/ltfat_C_kernel/CMakeLists.txt
index 218fb2d..87dc936 100644
--- a/ltfat_C_kernel/CMakeLists.txt
+++ b/ltfat_C_kernel/CMakeLists.txt
@@ -2,8 +2,8 @@ CMAKE_MINIMUM_REQUIRED(VERSION 2.8.11)
include_directories(${CMAKE_CURRENT_SOURCE_DIR})
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/thirdparty)
-SET(CMAKE_C_FLAGS "-O3 -fPIC")
-SET(CMAKE_EXE_LINKER_FLAGS "-lc -lm")
+SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -O3 -fPIC")
+SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -lc -lm")
set(SRC dgt.c dgt_fac.c dgt_fb.c dgt_multi.c dgt_ola.c dgt_shear.c dgt_walnut.c
dgtreal_fac.c dwilt.c idwilt.c wmdct.c iwmdct.c filterbank.c ifilterbank.c
|