File tree 3 files changed +12
-13
lines changed
3 files changed +12
-13
lines changed Original file line number Diff line number Diff line change @@ -34,7 +34,7 @@ if(NOT ${BUILD_TESTS})
34
34
get_filename_component (LINKER_SCRIPT linker/stm32f407vgt.ld ABSOLUTE )
35
35
36
36
if (${CMAKE_CXX_COMPILER_ID} STREQUAL "GNU" )
37
- set (W_FLAGS -Wall -Wextra -Wcast-align -Wunused -Woverloaded-virtual -Wpedantic - Wconversion -Wsign-conversion -Wmisleading-indentation -Wduplicated-cond -Wduplicated-branches -Wlogical-op -Wnull-dereference -Wuseless-cast -Wold-style-cast -Wredundant-decls -Wundef -Wno-unused)
37
+ set (W_FLAGS -Wpedantic - Wall -Wextra -Wcast-align -Wunused -Wconversion -Wsign-conversion -Wmisleading-indentation -Wduplicated-cond -Wduplicated-branches -Wlogical-op -Wnull-dereference -Wuseless-cast -Wold-style-cast -Wredundant-decls -Wundef -Wno-unused -Wsuggest-final-types -Wsuggest-override -Woverloaded-virtual )
38
38
endif ()
39
39
40
40
# add libraries
46
46
project (${application_name} C CXX)
47
47
48
48
if (${CMAKE_CXX_COMPILER_ID} STREQUAL "GNU" )
49
- set (W_FLAGS -Wall -Wextra -Wcast-align -Wunused -Woverloaded-virtual -Wpedantic -Wconversion -Wsign-conversion -Wmisleading-indentation -Wduplicated-cond -Wduplicated-branches -Wlogical-op -Wnull-dereference -Wuseless-cast)
50
49
if (${ENABLE_COVERAGE} )
51
50
set (TEST_FLAGS --coverage)
52
51
set (CMAKE_CXX_OUTPUT_EXTENSION_REPLACE 1)
Original file line number Diff line number Diff line change @@ -5,10 +5,10 @@ set(CMAKE_CXX_COMPILER g++-7)
5
5
set (CMAKE_TRY_COMPILE_TARGET_TYPE STATIC_LIBRARY)
6
6
7
7
# compiler: language specific flags
8
- set (CMAKE_C_FLAGS "--coverage -fno-builtin -Wall - fdata-sections -ffunction-sections -g -ggdb " CACHE INTERNAL "c compiler flags" )
9
- set (CMAKE_C_FLAGS_DEBUG "" CACHE INTERNAL "c compiler flags: Debug" )
10
- set (CMAKE_C_FLAGS_RELEASE "" CACHE INTERNAL "c compiler flags: Release" )
8
+ set (CMAKE_C_FLAGS "--coverage -fno-builtin -fdata-sections -ffunction-sections" CACHE INTERNAL "c compiler flags" )
9
+ set (CMAKE_C_FLAGS_DEBUG "-Og -g " CACHE INTERNAL "c compiler flags: Debug" )
10
+ set (CMAKE_C_FLAGS_RELEASE "-Os " CACHE INTERNAL "c compiler flags: Release" )
11
11
12
- set (CMAKE_CXX_FLAGS "--coverage -fno-rtti -fno-exceptions -fno-builtin -Wall - fdata-sections -ffunction-sections -g -ggdb " CACHE INTERNAL "cxx compiler flags" )
13
- set (CMAKE_CXX_FLAGS_DEBUG "" CACHE INTERNAL "cxx compiler flags: Debug" )
14
- set (CMAKE_CXX_FLAGS_RELEASE "" CACHE INTERNAL "cxx compiler flags: Release" )
12
+ set (CMAKE_CXX_FLAGS "--coverage -fno-rtti -fno-exceptions -fno-builtin -fdata-sections -ffunction-sections" CACHE INTERNAL "cxx compiler flags" )
13
+ set (CMAKE_CXX_FLAGS_DEBUG "-Og -g " CACHE INTERNAL "cxx compiler flags: Debug" )
14
+ set (CMAKE_CXX_FLAGS_RELEASE "-Os " CACHE INTERNAL "cxx compiler flags: Release" )
Original file line number Diff line number Diff line change @@ -16,16 +16,16 @@ set(CMAKE_TRY_COMPILE_TARGET_TYPE STATIC_LIBRARY)
16
16
set (CORE_FLAGS "-mthumb -mcpu=cortex-m4 -mlittle-endian -mfpu=fpv4-sp-d16 -mfloat-abi=hard -mthumb-interwork --specs=nano.specs --specs=nosys.specs" )
17
17
18
18
# compiler: language specific flags
19
- set (CMAKE_C_FLAGS "${CORE_FLAGS} -fno-builtin -Wall - fdata-sections -ffunction-sections" CACHE INTERNAL "c compiler flags" )
20
- set (CMAKE_C_FLAGS_DEBUG "-O0 -g3 -ggdb " CACHE INTERNAL "c compiler flags: Debug" )
19
+ set (CMAKE_C_FLAGS "${CORE_FLAGS} -fno-builtin -fdata-sections -ffunction-sections" CACHE INTERNAL "c compiler flags" )
20
+ set (CMAKE_C_FLAGS_DEBUG "-Og -g " CACHE INTERNAL "c compiler flags: Debug" )
21
21
set (CMAKE_C_FLAGS_RELEASE "-Os" CACHE INTERNAL "c compiler flags: Release" )
22
22
23
- set (CMAKE_CXX_FLAGS "${CORE_FLAGS} -fno-rtti -fno-exceptions -fno-builtin -Wall - fdata-sections -ffunction-sections" CACHE INTERNAL "cxx compiler flags" )
24
- set (CMAKE_CXX_FLAGS_DEBUG "-O0 -g3 -ggdb " CACHE INTERNAL "cxx compiler flags: Debug" )
23
+ set (CMAKE_CXX_FLAGS "${CORE_FLAGS} -fno-rtti -fno-exceptions -fno-builtin -fdata-sections -ffunction-sections" CACHE INTERNAL "cxx compiler flags" )
24
+ set (CMAKE_CXX_FLAGS_DEBUG "-Og -g " CACHE INTERNAL "cxx compiler flags: Debug" )
25
25
set (CMAKE_CXX_FLAGS_RELEASE "-Os" CACHE INTERNAL "cxx compiler flags: Release" )
26
26
27
27
set (CMAKE_ASM_FLAGS "${CORE_FLAGS} -D__USES_CXX" CACHE INTERNAL "asm compiler flags" )
28
- set (CMAKE_ASM_FLAGS_DEBUG "-O0 -g3 -ggdb " CACHE INTERNAL "asm compiler flags: Debug" )
28
+ set (CMAKE_ASM_FLAGS_DEBUG "-Og -g " CACHE INTERNAL "asm compiler flags: Debug" )
29
29
set (CMAKE_ASM_FLAGS_RELEASE "-Os" CACHE INTERNAL "asm compiler flags: Release" )
30
30
31
31
# search for programs in the build host directories
You can’t perform that action at this time.
0 commit comments