From bed32bc94765cf711cb34446ef9e35e1161aabcf Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Tue, 13 Jul 2021 18:58:54 +0200 Subject: [PATCH] some tweaks --- CMakeLists.txt | 16 +++++++--------- cmake/scripts/cmake_build_config.py | 2 +- fsfw | 2 +- 3 files changed, 9 insertions(+), 11 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 8a6ec10..63d9ad5 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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}" ) diff --git a/cmake/scripts/cmake_build_config.py b/cmake/scripts/cmake_build_config.py index 6787a1b..2085750 100755 --- a/cmake/scripts/cmake_build_config.py +++ b/cmake/scripts/cmake_build_config.py @@ -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 diff --git a/fsfw b/fsfw index 8189435..3a9add8 160000 --- a/fsfw +++ b/fsfw @@ -1 +1 @@ -Subproject commit 8189435b94b65e432b06dad930f6da8d38173e14 +Subproject commit 3a9add82fe56b4b75b0079b48c094e6c4f778c42