You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The CMake linking directive in arch_build.cmake uses the "plain" signature (ie, does not use a PRIVATE, PUBLIC, or INTERFACE keyword to specify how a library is used by a target's dependents). Because of this, one cannot use the keyword-style call on a cFS app without triggering a CMake warning. Mixing the plain and keyword styles has been deprecated since CMake 2.8.12. Since cFE specifies a minimum cMake version of 3.5, this should be updated.
As far as I can tell, calling target_link_libraries in an app to link in a static library is necessary, because this is not done as part of add_cfe_app_dependency.
Describe the expected behavior if the bug did not occur.
target_link_libraries directives could be used with keyword signatures in app CMakelists files, and no deprecation warning emitted.
Provide the reproduction steps that someone else can follow to recreate the bug or error on their own.
Create a static library (either manually via CMake or by putting the target name in <CPU>_STATIC_APPLIST and using add_cfe_app.
Add the library as a dependency for an app (either manually via CMake or by using add_cfe_app_dependency)
Try to link it in an app using target_link_libraries(<app_name> <PRIVATE|PUBLIC|INTERFACE> <lib_name>)
Build as usual
If applicable, add code snippets or references to the software.
Provide the system the bug was observed on.
I'm using the cFE v7.0.0-rc4 release https://github.com/nasa/cFE/releases/tag/v7.0.0-rc4, but this is present in main and draco-rc4 at the time of reporting. CMake verison is 3.23.0-rc2.
Provide any additional context if applicable.
See CMake policy CMP0023.
Isaac Rowe, Jacobs contractor to NASA JSC
(edited to provide information requested by contributor guidelines)
The text was updated successfully, but these errors were encountered:
irowebbn
changed the title
add_cfe_app uses deprecated call to target_link_librareis
add_cfe_app uses deprecated call to target_link_libraries
Sep 9, 2022
skliper
added a commit
to skliper/cFE
that referenced
this issue
Sep 9, 2022
cFE/cmake/arch_build.cmake
Line 102 in 9ebdf2e
Describe the issue.
The CMake linking directive in
arch_build.cmake
uses the "plain" signature (ie, does not use aPRIVATE
,PUBLIC
, orINTERFACE
keyword to specify how a library is used by a target's dependents). Because of this, one cannot use the keyword-style call on a cFS app without triggering a CMake warning. Mixing the plain and keyword styles has been deprecated since CMake 2.8.12. Since cFE specifies a minimum cMake version of 3.5, this should be updated.As far as I can tell, calling
target_link_libraries
in an app to link in a static library is necessary, because this is not done as part ofadd_cfe_app_dependency
.Describe the expected behavior if the bug did not occur.
target_link_libraries
directives could be used with keyword signatures in app CMakelists files, and no deprecation warning emitted.Provide the reproduction steps that someone else can follow to recreate the bug or error on their own.
<CPU>_STATIC_APPLIST
and usingadd_cfe_app
.add_cfe_app_dependency
)target_link_libraries(<app_name> <PRIVATE|PUBLIC|INTERFACE> <lib_name>)
If applicable, add code snippets or references to the software.
cFE/cmake/arch_build.cmake
Line 102 in 9ebdf2e
Provide the system the bug was observed on.
I'm using the cFE v7.0.0-rc4 release https://github.com/nasa/cFE/releases/tag/v7.0.0-rc4, but this is present in
main
anddraco-rc4
at the time of reporting. CMake verison is 3.23.0-rc2.Provide any additional context if applicable.
See CMake policy CMP0023.
Isaac Rowe, Jacobs contractor to NASA JSC
(edited to provide information requested by contributor guidelines)
The text was updated successfully, but these errors were encountered: