add support for building with deprecation bypass

This commit is contained in:
Steve Karg
2023-09-13 16:32:07 -05:00
parent 43db974e50
commit 0cfe83d60b
3 changed files with 66 additions and 0 deletions
+9
View File
@@ -70,6 +70,15 @@ if(NOT CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE Release)
endif()
option(
BACNET_STACK_DEPRECATED_DISABLE
"Disable deprecation compile warnings"
ON)
if(BACNET_STACK_DEPRECATED_DISABLE)
add_definitions(-DBACNET_STACK_DEPRECATED_DISABLE)
endif()
set(CMAKE_CXX_FLAGS "-Wall -Wextra")
set(CMAKE_CXX_FLAGS_DEBUG "-g")
set(CMAKE_CXX_FLAGS_RELEASE "-O3")
+52
View File
@@ -0,0 +1,52 @@
#!/usr/bin/env aptfile
# ^ note the above shebang
# https://github.com/seatgeek/bash-aptfile
# trigger an apt-get update
update
# install core development packages
package "build-essential"
package "cmake"
package "lcov"
package "clang"
package "gcc"
package "libconfig-dev"
package "liblwip-dev"
package "mingw-w64"
# install git and useful tools packages
package "git"
package "gitk"
package "gitg"
# install source code format packages
package "tofrodos"
package "clang-format"
package "sloccount"
# install ARM compiler and debugging tools
package "gcc-arm-none-eabi"
package "binutils-arm-none-eabi"
package "picolibc-arm-none-eabi"
package "gdb-multiarch"
# install AVR compiler and debugging tools
package "gcc-avr"
package "avarice"
package "avr-libc"
package "avrdude"
package "gdb-avr"
package "avrdude-doc"
# install static analysis tools
package "flawfinder"
package "cppcheck"
package "splint"
package "clang-tools"
package "clang-tidy"
package "codespell"
# you can also execute arbitrary bash
echo "🚀 ALL GOOD TO GO"
+5
View File
@@ -108,6 +108,11 @@ BFLAGS += -DBACAPP_CHARACTER_STRING
BFLAGS += -DWRITE_PROPERTY
BFLAGS += -DMAX_ANALOG_VALUES=10
BFLAGS += -DMAX_BINARY_VALUES=10
ifeq (${LEGACY},true)
# disable deprecated function warnings for legacy builds
BFLAGS += -DBACNET_STACK_DEPRECATED_DISABLE
endif
CFLAGS = $(COMMON)
# dead code removal
CFLAGS += -ffunction-sections -fdata-sections