Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update/resurrect the add_unit_test_lib/add_unit_test_exe functions #1207

Closed
jphickey opened this issue Mar 4, 2021 · 1 comment · Fixed by #1210
Closed

Update/resurrect the add_unit_test_lib/add_unit_test_exe functions #1207

jphickey opened this issue Mar 4, 2021 · 1 comment · Fixed by #1210
Assignees
Milestone

Comments

@jphickey
Copy link
Contributor

jphickey commented Mar 4, 2021

Is your feature request related to a problem? Please describe.
Currently the arch_build.cmake functions provide a routine to easily define a CFE app: add_cfe_app() . This makes it easy for app developers to create an app target that uses all the right compiler definitions, include dirs and link/interfaces libraries. Furthermore, having this wrapper in CFE helped future-proof so that apps didn't need to change this call when #972 was implemented.

The problem is that we didn't employ the same tactic for unit tests. For these, all the special logic for adding flags/includes is basically put into the CMakeLists.txt in each app where the UT targets are defined.

Describe the solution you'd like
The arch_build.cmake does have a add_unit_test_lib and add_unit_test_exe function that was originally intended for this purpose, but these were never really used. We should implement the basic UT logic here and change sample app/lib to use them.

Additional context
Currently, the sample_lib/sample_app unit tests break when merging with #1203 because of the different paths and the transition toward interface libraries. Rather than just updating these UT builds to work again, using these functions would help avoid this issue in the future.

Requester Info
Joseph Hickey, Vantage Systems, Inc.

@jphickey jphickey self-assigned this Mar 4, 2021
@skliper
Copy link
Contributor

skliper commented Mar 4, 2021

@ejtimmon - would help apps

@skliper skliper added this to the 7.0.0 milestone Mar 4, 2021
jphickey added a commit to jphickey/cFE that referenced this issue Mar 4, 2021
Adds the following functions to simplify tracking of dependencies
and use of interface libraries provided by CFE.

The goal is to reduce/eliminate the need to directly specify any
include paths or compile definitions for dependencies, relying
on target properties to do this instead.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants