From 6ecb2e7a903dcc2b67d541c383f6c4c4d0707315 Mon Sep 17 00:00:00 2001 From: Justin Figueroa Date: Tue, 6 Dec 2022 11:19:52 -0500 Subject: [PATCH] Fix #32, Move interface definition files to inc --- CMakeLists.txt | 8 ++++---- fsw/{src => inc}/hk_events.h | 0 fsw/{src => inc}/hk_msg.h | 0 fsw/{src => inc}/hk_msgdefs.h | 0 fsw/{platform_inc => inc}/hk_msgids.h | 0 fsw/{mission_inc => inc}/hk_perfids.h | 0 fsw/{platform_inc => inc}/hk_platform_cfg.h | 0 fsw/{src => inc}/hk_tbldefs.h | 0 unit-test/CMakeLists.txt | 4 +++- 9 files changed, 7 insertions(+), 5 deletions(-) rename fsw/{src => inc}/hk_events.h (100%) rename fsw/{src => inc}/hk_msg.h (100%) rename fsw/{src => inc}/hk_msgdefs.h (100%) rename fsw/{platform_inc => inc}/hk_msgids.h (100%) rename fsw/{mission_inc => inc}/hk_perfids.h (100%) rename fsw/{platform_inc => inc}/hk_platform_cfg.h (100%) rename fsw/{src => inc}/hk_tbldefs.h (100%) diff --git a/CMakeLists.txt b/CMakeLists.txt index 0341ff6..1ad38a1 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,9 +1,5 @@ project(CFS_HK C) -include_directories(fsw/src) -include_directories(fsw/mission_inc) -include_directories(fsw/platform_inc) - set(APP_SRC_FILES fsw/src/hk_app.c fsw/src/hk_utils.c @@ -12,6 +8,10 @@ set(APP_SRC_FILES # Create the app module add_cfe_app(hk ${APP_SRC_FILES}) +# This permits direct access to public headers in the fsw/inc and fsw/src directories +target_include_directories(hk PUBLIC fsw/inc) +target_include_directories(hk PUBLIC fsw/src) + set(APP_TABLE_FILES fsw/tables/hk_cpy_tbl.c ) diff --git a/fsw/src/hk_events.h b/fsw/inc/hk_events.h similarity index 100% rename from fsw/src/hk_events.h rename to fsw/inc/hk_events.h diff --git a/fsw/src/hk_msg.h b/fsw/inc/hk_msg.h similarity index 100% rename from fsw/src/hk_msg.h rename to fsw/inc/hk_msg.h diff --git a/fsw/src/hk_msgdefs.h b/fsw/inc/hk_msgdefs.h similarity index 100% rename from fsw/src/hk_msgdefs.h rename to fsw/inc/hk_msgdefs.h diff --git a/fsw/platform_inc/hk_msgids.h b/fsw/inc/hk_msgids.h similarity index 100% rename from fsw/platform_inc/hk_msgids.h rename to fsw/inc/hk_msgids.h diff --git a/fsw/mission_inc/hk_perfids.h b/fsw/inc/hk_perfids.h similarity index 100% rename from fsw/mission_inc/hk_perfids.h rename to fsw/inc/hk_perfids.h diff --git a/fsw/platform_inc/hk_platform_cfg.h b/fsw/inc/hk_platform_cfg.h similarity index 100% rename from fsw/platform_inc/hk_platform_cfg.h rename to fsw/inc/hk_platform_cfg.h diff --git a/fsw/src/hk_tbldefs.h b/fsw/inc/hk_tbldefs.h similarity index 100% rename from fsw/src/hk_tbldefs.h rename to fsw/inc/hk_tbldefs.h diff --git a/unit-test/CMakeLists.txt b/unit-test/CMakeLists.txt index 66ef92c..3d31c10 100644 --- a/unit-test/CMakeLists.txt +++ b/unit-test/CMakeLists.txt @@ -16,8 +16,10 @@ add_cfe_coverage_stubs("hk_internal" # Link with the cfe core stubs and unit test assert libs target_link_libraries(coverage-hk_internal-stubs ut_core_api_stubs ut_assert) -# Include and expose unit test utilities includes +# Include and expose unit test utilities, fsw/inc, and fsw/src includes target_include_directories(coverage-hk_internal-stubs PUBLIC utilities) +target_include_directories(coverage-hk_internal-stubs PUBLIC ../fsw/inc) +target_include_directories(coverage-hk_internal-stubs PUBLIC ../fsw/src) # Generate a dedicated "testrunner" executable for each test file # Accomplish this by cycling through all the app's source files, there must be