From 0800544eb1820ba5698f18343b544a507d74fa72 Mon Sep 17 00:00:00 2001 From: Joseph Hickey Date: Fri, 12 Mar 2021 13:23:07 -0500 Subject: [PATCH 1/2] HOTFIX 20210312, updates to work with older CMake Certain operations in the recent baseline were dependent on a recent version of CMake. In particular object libraries cannot be used in the intended way in the older versions. This adds workarounds for those cases. Tested against CMake versions 3.5.1, 3.10.2, and 3.16.3. --- CMakeLists.txt | 1 + fsw/mcp750-vxworks/CMakeLists.txt | 11 +++++++++-- fsw/pc-linux/CMakeLists.txt | 8 ++++++-- fsw/pc-rtems/CMakeLists.txt | 12 ++++++++++-- fsw/shared/CMakeLists.txt | 8 ++++++-- 5 files changed, 32 insertions(+), 8 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index a7765f0e..5482b0ae 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -21,6 +21,7 @@ target_compile_definitions(psp_module_api INTERFACE target_include_directories(psp_module_api INTERFACE fsw/inc # public API fsw/shared/inc # all PSP shared headers + fsw/${CFE_PSP_TARGETNAME}/inc # all impl headers ${CFE_SOURCE_DIR}/cmake/target/inc # for sysconfig $ # use headers from OSAL ) diff --git a/fsw/mcp750-vxworks/CMakeLists.txt b/fsw/mcp750-vxworks/CMakeLists.txt index 1cfb39ec..1b6972fa 100644 --- a/fsw/mcp750-vxworks/CMakeLists.txt +++ b/fsw/mcp750-vxworks/CMakeLists.txt @@ -18,5 +18,12 @@ add_library(psp-${CFE_PSP_TARGETNAME}-impl OBJECT src/cfe_psp_timer.c src/cfe_psp_watchdog.c ) -target_include_directories(psp-${CFE_PSP_TARGETNAME}-impl PRIVATE inc) -target_link_libraries(psp-${CFE_PSP_TARGETNAME}-impl PRIVATE psp_module_api) +target_compile_definitions(psp-${CFE_SYSTEM_PSPNAME}-impl PRIVATE + $ +) + +target_include_directories(psp-${CFE_PSP_TARGETNAME}-impl PRIVATE + inc + $ +) + diff --git a/fsw/pc-linux/CMakeLists.txt b/fsw/pc-linux/CMakeLists.txt index 19344b36..5918683d 100644 --- a/fsw/pc-linux/CMakeLists.txt +++ b/fsw/pc-linux/CMakeLists.txt @@ -23,7 +23,11 @@ add_library(psp-${CFE_PSP_TARGETNAME}-impl OBJECT # Code outside the pc-linux PSP should _not_ depend on this. target_compile_definitions(psp-${CFE_SYSTEM_PSPNAME}-impl PRIVATE _GNU_SOURCE + $ +) + +target_include_directories(psp-${CFE_PSP_TARGETNAME}-impl PRIVATE + inc + $ ) -target_include_directories(psp-${CFE_PSP_TARGETNAME}-impl PRIVATE inc) -target_link_libraries(psp-${CFE_PSP_TARGETNAME}-impl PRIVATE psp_module_api) diff --git a/fsw/pc-rtems/CMakeLists.txt b/fsw/pc-rtems/CMakeLists.txt index fb736cf0..4d55fffc 100644 --- a/fsw/pc-rtems/CMakeLists.txt +++ b/fsw/pc-rtems/CMakeLists.txt @@ -18,6 +18,14 @@ add_library(psp-${CFE_PSP_TARGETNAME}-impl OBJECT src/cfe_psp_timer.c src/cfe_psp_watchdog.c ) -target_include_directories(psp-${CFE_PSP_TARGETNAME}-impl PRIVATE inc) -target_link_libraries(psp-${CFE_PSP_TARGETNAME}-impl PRIVATE psp_module_api) + +target_compile_definitions(psp-${CFE_SYSTEM_PSPNAME}-impl PRIVATE + $ +) + +target_include_directories(psp-${CFE_PSP_TARGETNAME}-impl PRIVATE + inc + $ +) + diff --git a/fsw/shared/CMakeLists.txt b/fsw/shared/CMakeLists.txt index 0f9ab127..05806af0 100644 --- a/fsw/shared/CMakeLists.txt +++ b/fsw/shared/CMakeLists.txt @@ -23,7 +23,11 @@ add_library(psp-${CFE_PSP_TARGETNAME}-shared OBJECT src/cfe_psp_ram.c ) +target_compile_definitions(psp-${CFE_SYSTEM_PSPNAME}-shared PRIVATE + $ +) + target_include_directories(psp-${CFE_PSP_TARGETNAME}-shared PRIVATE - $ + $ ) -target_link_libraries(psp-${CFE_PSP_TARGETNAME}-shared PRIVATE psp_module_api) + From 10c8b390cfe3c135ef2f6b825f5597239ffdf4a3 Mon Sep 17 00:00:00 2001 From: Jacob Hageman Date: Fri, 12 Mar 2021 13:57:09 -0500 Subject: [PATCH 2/2] IC 20210312, Update readme and version --- README.md | 7 ++++++- fsw/mcp750-vxworks/inc/psp_version.h | 2 +- fsw/pc-linux/inc/psp_version.h | 2 +- fsw/pc-rtems/inc/psp_version.h | 2 +- 4 files changed, 9 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 1da825a0..4d0f2dca 100644 --- a/README.md +++ b/README.md @@ -9,7 +9,12 @@ This is a collection of APIs abstracting platform specific functionality to be l ## Version History -### Development Build: 1.5.0-rc1+dev76 +### Development Build: v1.5.0-rc1+dev80 + +- HOTFIX 20210312, updates to work with older CMake +- See + +### Development Build: v1.5.0-rc1+dev76 - Fix #246, remove unused code. - Fix #254, use CMake to publish interface details diff --git a/fsw/mcp750-vxworks/inc/psp_version.h b/fsw/mcp750-vxworks/inc/psp_version.h index d48abdbb..81a169df 100644 --- a/fsw/mcp750-vxworks/inc/psp_version.h +++ b/fsw/mcp750-vxworks/inc/psp_version.h @@ -29,7 +29,7 @@ /* * Development Build Macro Definitions */ -#define CFE_PSP_IMPL_BUILD_NUMBER 76 +#define CFE_PSP_IMPL_BUILD_NUMBER 80 #define CFE_PSP_IMPL_BUILD_BASELINE "v1.5.0-rc1" /* diff --git a/fsw/pc-linux/inc/psp_version.h b/fsw/pc-linux/inc/psp_version.h index 3c73e607..ec0ced14 100644 --- a/fsw/pc-linux/inc/psp_version.h +++ b/fsw/pc-linux/inc/psp_version.h @@ -29,7 +29,7 @@ /* * Development Build Macro Definitions */ -#define CFE_PSP_IMPL_BUILD_NUMBER 76 +#define CFE_PSP_IMPL_BUILD_NUMBER 80 #define CFE_PSP_IMPL_BUILD_BASELINE "v1.5.0-rc1" /* diff --git a/fsw/pc-rtems/inc/psp_version.h b/fsw/pc-rtems/inc/psp_version.h index 09c40e4d..376e4efc 100644 --- a/fsw/pc-rtems/inc/psp_version.h +++ b/fsw/pc-rtems/inc/psp_version.h @@ -29,7 +29,7 @@ /* * Development Build Macro Definitions */ -#define CFE_PSP_IMPL_BUILD_NUMBER 76 +#define CFE_PSP_IMPL_BUILD_NUMBER 80 #define CFE_PSP_IMPL_BUILD_BASELINE "v1.5.0-rc1" /*