simplified some components
This commit is contained in:
parent
4a1399aecb
commit
b7caf6b38f
@ -19,14 +19,9 @@ if(NOT OS_FSFW)
|
||||
set(OS_FSFW host CACHE STRING "OS for the FSFW.")
|
||||
endif()
|
||||
|
||||
# Perform steps like loading toolchain files where applicable.
|
||||
include(${CMAKE_SCRIPT_PATH}/PreProjectConfig.cmake)
|
||||
pre_project_config()
|
||||
|
||||
# Project Name
|
||||
project(fsfw-example-hosted C CXX)
|
||||
|
||||
|
||||
################################################################################
|
||||
# Pre-Sources preparation
|
||||
################################################################################
|
||||
@ -42,17 +37,10 @@ set(LIB_FSFW_HAL_NAME fsfw_hal)
|
||||
|
||||
# Set path names
|
||||
set(FSFW_PATH fsfw)
|
||||
set(MISSION_PATH mission)
|
||||
set(COMMON_PATH example_common)
|
||||
set(TEST_PATH test)
|
||||
set(LWIP_PATH lwip)
|
||||
set(LIB_FSFW_HAL_PATH fsfw_hal)
|
||||
|
||||
# Analyse different OS and architecture/target options, determine BSP_PATH,
|
||||
# display information about compiler etc.
|
||||
include (${CMAKE_SCRIPT_PATH}/HardwareOsPreConfig.cmake)
|
||||
pre_source_hw_os_config()
|
||||
|
||||
set(BSP_PATH "bsp_hosted")
|
||||
set(COMMON_CONFIG_PATH "${COMMON_PATH}/config")
|
||||
set(FSFW_CONFIG_PATH "${BSP_PATH}/fsfwconfig")
|
||||
set(FSFW_ADDITIONAL_INC_PATHS
|
||||
@ -82,6 +70,18 @@ elseif(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC")
|
||||
add_compile_definitions(NOMINMAX)
|
||||
endif()
|
||||
|
||||
if(${OS_FSFW} STREQUAL linux)
|
||||
find_package(Threads REQUIRED)
|
||||
# Hosted
|
||||
else()
|
||||
|
||||
if(WIN32)
|
||||
elseif(UNIX)
|
||||
find_package(Threads REQUIRED)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
|
||||
################################################################################
|
||||
# Executable and Sources
|
||||
################################################################################
|
||||
@ -95,7 +95,6 @@ if(LIB_OS_NAME)
|
||||
endif()
|
||||
add_subdirectory(${BSP_PATH})
|
||||
add_subdirectory(${FSFW_PATH})
|
||||
add_subdirectory(${MISSION_PATH})
|
||||
add_subdirectory(${COMMON_PATH})
|
||||
|
||||
################################################################################
|
||||
@ -147,9 +146,6 @@ target_compile_options(${TARGET_NAME} PRIVATE
|
||||
${WARNING_FLAGS}
|
||||
)
|
||||
|
||||
include(${CMAKE_SCRIPT_PATH}/HardwareOsPostConfig.cmake)
|
||||
post_source_hw_os_config()
|
||||
|
||||
if(NOT CMAKE_SIZE)
|
||||
set(CMAKE_SIZE size)
|
||||
if(WIN32)
|
||||
|
@ -1,24 +0,0 @@
|
||||
function(post_source_hw_os_config)
|
||||
|
||||
set(C_FLAGS "" CACHE INTERNAL "C flags")
|
||||
|
||||
set(C_DEFS "" CACHE INTERNAL "C Defines")
|
||||
|
||||
set(CXX_FLAGS ${C_FLAGS})
|
||||
set(CXX_DEFS ${C_DEFS})
|
||||
|
||||
if(CMAKE_VERBOSE)
|
||||
message(STATUS "C Flags: ${C_FLAGS}")
|
||||
message(STATUS "CXX Flags: ${CXX_FLAGS}")
|
||||
message(STATUS "C Defs: ${C_DEFS}")
|
||||
message(STATUS "CXX Defs: ${CXX_DEFS}")
|
||||
endif()
|
||||
|
||||
# Generator expression. Can be used to set different C, CXX and ASM flags.
|
||||
target_compile_options(${TARGET_NAME} PRIVATE
|
||||
$<$<COMPILE_LANGUAGE:C>:${C_DEFS} ${C_FLAGS}>
|
||||
$<$<COMPILE_LANGUAGE:CXX>:${CXX_DEFS} ${CXX_FLAGS}>
|
||||
$<$<COMPILE_LANGUAGE:ASM>:${ASM_FLAGS}>
|
||||
)
|
||||
|
||||
endfunction()
|
@ -1,16 +0,0 @@
|
||||
function(pre_source_hw_os_config)
|
||||
|
||||
if(${OS_FSFW} STREQUAL linux)
|
||||
find_package(Threads REQUIRED)
|
||||
# Hosted
|
||||
else()
|
||||
set(BSP_PATH "bsp_hosted")
|
||||
if(WIN32)
|
||||
elseif(UNIX)
|
||||
find_package(Threads REQUIRED)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
set(BSP_PATH ${BSP_PATH} PARENT_SCOPE)
|
||||
|
||||
endfunction()
|
@ -1 +1 @@
|
||||
Subproject commit 2755045be11cc8c91fd24f0939a37b9b2e8fa862
|
||||
Subproject commit f8bf44893cfe330c87ecbcf3899e767c7422c75d
|
2
fsfw
2
fsfw
@ -1 +1 @@
|
||||
Subproject commit 2f511523cb71e00b4669db002b171d626a63fddf
|
||||
Subproject commit 145dd33fb1e467ef7370ccd44671a91d96c60e26
|
Loading…
Reference in New Issue
Block a user