some tweaks

This commit is contained in:
Robin Müller 2021-07-13 18:58:54 +02:00
parent e58e3f1cb5
commit bed32bc947
No known key found for this signature in database
GPG Key ID: 71B58F8A3CDFA9AC
3 changed files with 9 additions and 11 deletions

View File

@ -15,8 +15,8 @@ cmake_minimum_required(VERSION 3.13)
set(CMAKE_SCRIPT_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake")
if(NOT OS_FSFW)
set(OS_FSFW host CACHE STRING "OS for the FSFW.")
if(NOT FSFW_OSAL)
set(FSFW_OSAL host CACHE STRING "OS for the FSFW.")
endif()
# Project Name
@ -70,7 +70,7 @@ elseif(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC")
add_compile_definitions(NOMINMAX)
endif()
if(${OS_FSFW} STREQUAL linux)
if(FSFW_OSAL MATCHES linux)
find_package(Threads REQUIRED)
# Hosted
else()
@ -128,11 +128,9 @@ if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
)
# Removed unused sections.
if(NOT ${OS_FSFW} MATCHES rtems)
target_link_options(${TARGET_NAME} PRIVATE
"-Wl,--gc-sections"
)
endif()
target_link_options(${TARGET_NAME} PRIVATE
"-Wl,--gc-sections"
)
elseif(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC")
endif()
@ -161,7 +159,7 @@ endif()
string(CONCAT POST_BUILD_COMMENT
"Build directory: ${CMAKE_BINARY_DIR}\n"
"Target OSAL: ${OS_FSFW}\n"
"Target OSAL: ${FSFW_OSAL}\n"
"Target Build Type: ${CMAKE_BUILD_TYPE}\n"
"${TARGET_STRING}"
)

View File

@ -101,7 +101,7 @@ def main():
print(f"Navigating into build directory: {build_path}")
os.chdir(cmake_build_folder)
cmake_command = f"cmake {generator_cmake_arg} -DOS_FSFW=\"{cmake_fsfw_osal}\" " \
cmake_command = f"cmake {generator_cmake_arg} -DFSFW_OSAL=\"{cmake_fsfw_osal}\" " \
f"-DCMAKE_BUILD_TYPE=\"{cmake_build_type}\" {cmake_target_cfg_cmd} " \
f"{define_string} {source_location}"
# Remove redundant spaces

2
fsfw

@ -1 +1 @@
Subproject commit 8189435b94b65e432b06dad930f6da8d38173e14
Subproject commit 3a9add82fe56b4b75b0079b48c094e6c4f778c42