Added conditional flags.
This commit is contained in:
parent
1b56915de9
commit
60adf36386
|
@ -122,6 +122,15 @@ set(TARGET_INCLUDES
|
||||||
set(TARGET_LIBS
|
set(TARGET_LIBS
|
||||||
)
|
)
|
||||||
|
|
||||||
|
# Conditional flags
|
||||||
|
set(CMAKE_C_FLAGS_DEBUG "-DDEBUG -Og -g")
|
||||||
|
set(CMAKE_CXX_FLAGS_DEBUG "-DDEBUG -Og -g")
|
||||||
|
set(CMAKE_ASM_FLAGS_DEBUG "-DDEBUG -Og -g")
|
||||||
|
|
||||||
|
set(CMAKE_C_FLAGS_RELEASE "-DNDEBUG -O2")
|
||||||
|
set(CMAKE_CXX_FLAGS_RELEASE "-DNDEBUG -O2")
|
||||||
|
set(CMAKE_ASM_FLAGS_RELEASE "-DNDEBUG -O2")
|
||||||
|
|
||||||
# Final compiler flags
|
# Final compiler flags
|
||||||
set(CMAKE_C_FLAGS "${TARGET_CFLAGS_HARDWARE} ${TARGET_CFLAGS_EXTRA} ${TARGET_CFLGAGS_DEBUG} -Wall -fdata-sections -ffunction-sections -ffreestanding -fno-builtin")
|
set(CMAKE_C_FLAGS "${TARGET_CFLAGS_HARDWARE} ${TARGET_CFLAGS_EXTRA} ${TARGET_CFLGAGS_DEBUG} -Wall -fdata-sections -ffunction-sections -ffreestanding -fno-builtin")
|
||||||
set(CMAKE_CXX_FLAGS "${CMAKE_C_FLAGS} ${TARGET_CXXFLAGS_EXTRA}")
|
set(CMAKE_CXX_FLAGS "${CMAKE_C_FLAGS} ${TARGET_CXXFLAGS_EXTRA}")
|
||||||
|
|
Loading…
Reference in New Issue