create generic OBSW by default and copy to unique
Some checks failed
EIVE/eive-obsw/pipeline/head There was a failure building this commit

This commit is contained in:
Robin Müller 2022-05-06 16:43:12 +02:00
parent cc25489e75
commit 08dc8630d6
No known key found for this signature in database
GPG Key ID: 11D4952C8CCEF814
2 changed files with 13 additions and 5 deletions

View File

@ -275,11 +275,8 @@ add_library(${LIB_EIVE_MISSION})
# Add main executable # Add main executable
add_executable(${OBSW_NAME}) add_executable(${OBSW_NAME})
if(EIVE_CREATE_UNIQUE_OBSW_BIN)
set(OBSW_BIN_NAME ${CMAKE_PROJECT_NAME}-$ENV{USERNAME})
else()
set(OBSW_BIN_NAME ${CMAKE_PROJECT_NAME}) set(OBSW_BIN_NAME ${CMAKE_PROJECT_NAME})
endif()
set_target_properties(${OBSW_NAME} PROPERTIES OUTPUT_NAME ${OBSW_BIN_NAME}) set_target_properties(${OBSW_NAME} PROPERTIES OUTPUT_NAME ${OBSW_BIN_NAME})
# Watchdog # Watchdog

View File

@ -33,6 +33,10 @@ add_compile_options(
set(STRIPPED_OBSW_NAME ${CMAKE_PROJECT_NAME}-stripped) set(STRIPPED_OBSW_NAME ${CMAKE_PROJECT_NAME}-stripped)
set(STRIPPED_WATCHDOG_NAME eive-watchdog-stripped) set(STRIPPED_WATCHDOG_NAME eive-watchdog-stripped)
if(EIVE_CREATE_UNIQUE_OBSW_BIN)
set(UNIQUE_OBSW_BIN_NAME ${OBSW_BIN_NAME}-$ENV{USERNAME})
endif()
add_custom_command( add_custom_command(
TARGET ${OBSW_NAME} TARGET ${OBSW_NAME}
POST_BUILD POST_BUILD
@ -41,6 +45,13 @@ add_custom_command(
COMMENT "Generating stripped executable ${STRIPPED_OBSW_NAME}.." COMMENT "Generating stripped executable ${STRIPPED_OBSW_NAME}.."
) )
add_custom_command(
TARGET ${OBSW_NAME}
POST_BUILD
COMMAND ${CMAKE_COMMAND} copy
${CMAKE_CURRENT_BINARY_DIR}/${OBSW_BIN_NAME}
${CMAKE_CURRENT_BINARY_DIR}/${UNIQUE_OBSW_BIN_NAME})
add_custom_command( add_custom_command(
TARGET ${WATCHDOG_NAME} TARGET ${WATCHDOG_NAME}
POST_BUILD POST_BUILD