Merge pull request 'improved options' (#359) from eive/fsfw:eive/shadow-local-warning into development
Reviewed-on: fsfw/fsfw#359
This commit is contained in:
commit
7310d2b5fe
@ -1,5 +1,10 @@
|
|||||||
cmake_minimum_required(VERSION 3.13)
|
cmake_minimum_required(VERSION 3.13)
|
||||||
|
|
||||||
|
option(FSFW_WARNING_SHADOW_LOCAL_GCC "Enable -Wshadow=local warning in GCC" ON)
|
||||||
|
# Options to exclude parts of the FSFW from compilation.
|
||||||
|
option(FSFW_USE_RMAP "Compile with RMAP" ON)
|
||||||
|
option(FSFW_USE_DATALINKLAYER "Compile with Data Link Layer" ON)
|
||||||
|
|
||||||
set(LIB_FSFW_NAME fsfw)
|
set(LIB_FSFW_NAME fsfw)
|
||||||
add_library(${LIB_FSFW_NAME})
|
add_library(${LIB_FSFW_NAME})
|
||||||
|
|
||||||
@ -40,10 +45,6 @@ endif()
|
|||||||
|
|
||||||
message(STATUS "Compiling FSFW for the ${OS_FSFW_NAME} operating system.")
|
message(STATUS "Compiling FSFW for the ${OS_FSFW_NAME} operating system.")
|
||||||
|
|
||||||
# Options to exclude parts of the FSFW from compilation.
|
|
||||||
option(FSFW_USE_RMAP "Compile with RMAP" ON)
|
|
||||||
option(FSFW_USE_DATALINKLAYER "Compile with Data Link Layer" ON)
|
|
||||||
|
|
||||||
add_subdirectory(action)
|
add_subdirectory(action)
|
||||||
add_subdirectory(container)
|
add_subdirectory(container)
|
||||||
add_subdirectory(controller)
|
add_subdirectory(controller)
|
||||||
@ -111,17 +112,13 @@ if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
|
|||||||
set(FSFW_WARNING_FLAGS
|
set(FSFW_WARNING_FLAGS
|
||||||
-Wall
|
-Wall
|
||||||
-Wextra
|
-Wextra
|
||||||
-Wshadow=local
|
|
||||||
-Wimplicit-fallthrough=1
|
-Wimplicit-fallthrough=1
|
||||||
-Wno-unused-parameter
|
-Wno-unused-parameter
|
||||||
-Wno-psabi
|
-Wno-psabi
|
||||||
)
|
)
|
||||||
|
|
||||||
if(NOT DEFINED WARNING_SHADOW_LOCAL)
|
|
||||||
option(WARNING_SHADOW_LOCAL "Show shadows declarations warning." ON)
|
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(WARNING_SHADOW_LOCAL)
|
if(FSFW_WARNING_SHADOW_LOCAL_GCC)
|
||||||
list(APPEND WARNING_FLAGS "-Wshadow=local")
|
list(APPEND WARNING_FLAGS "-Wshadow=local")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user