Skip to content

Commit

Permalink
Changed Release optimization build option -O2 to -Os
Browse files Browse the repository at this point in the history
  • Loading branch information
cristiancristea00 committed Oct 10, 2021
1 parent feb264e commit 6a6a464
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion examples/16x2-Display/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ add_executable(16x2_display main.cpp ../../LCD_I2C.cpp)

# Add program info
pico_set_program_name(16x2_display "Liquid Crystal Display I2C Library - 16x2 LCD Example")
pico_set_program_version(16x2_display "1.0.1")
pico_set_program_version(16x2_display "1.0.2")
pico_set_program_url(16x2_display "https://github.com/cristiancristea00/Pico-I2C-LCD/tree/main/examples/16x2-Display")
pico_set_program_description(16x2_display "Copyright (c) 2021 Cristian Cristea")

Expand Down
2 changes: 1 addition & 1 deletion examples/20x4-Display/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ add_executable(20x4_display main.cpp ../../LCD_I2C.cpp)

# Add program info
pico_set_program_name(20x4_display "Liquid Crystal Display I2C Library - 20x4 LCD Example")
pico_set_program_version(16x2_display "1.0.1")
pico_set_program_version(16x2_display "1.0.2")
pico_set_program_url(20x4_display "https://github.com/cristiancristea00/Pico-I2C-LCD/tree/main/examples/20x4-Display")
pico_set_program_description(20x4_display "Copyright (c) 2021 Cristian Cristea")

Expand Down
4 changes: 2 additions & 2 deletions examples/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ set(CMAKE_CXX_FLAGS_DEBUG "-pipe -g -O0 -Wfatal-errors -Wpedantic -Wall -Wextra
set(CMAKE_C_FLAGS_DEBUG "-pipe -g -O0 -Wfatal-errors -Wpedantic -Wall -Wextra -Wconversion -Wshadow=local -Wdouble-promotion -Wformat=2 -Wformat-overflow=2 -Wformat-nonliteral -Wformat-security -Wformat-truncation=2 -Wnull-dereference -Wimplicit-fallthrough=3 -Wshift-overflow=2 -Wswitch-default -Wunused-parameter -Wunused-const-variable=2 -Wstrict-overflow=4 -Wstringop-overflow=3 -Wsuggest-attribute=pure -Wsuggest-attribute=const -Wsuggest-attribute=noreturn -Wmissing-noreturn -Wsuggest-attribute=malloc -Wsuggest-attribute=format -Wmissing-format-attribute -Wsuggest-attribute=cold -Walloc-zero -Walloca -Wattribute-alias=2 -Wduplicated-branches -Wcast-qual")

# Set Release build compiler arguments
set(CMAKE_CXX_FLAGS_RELEASE "-pipe -O2 -fno-builtin")
set(CMAKE_C_FLAGS_RELEASE "-pipe -O2 -fno-builtin")
set(CMAKE_CXX_FLAGS_RELEASE "-pipe -Os -fno-builtin")
set(CMAKE_C_FLAGS_RELEASE "-pipe -Os -fno-builtin")

# Initialise the Raspberry Pi Pico SDK
pico_sdk_init()
Expand Down

0 comments on commit 6a6a464

Please sign in to comment.