diff options
author | Guillaume Solignac <gsoligna@cisco.com> | 2021-09-28 15:01:26 +0200 |
---|---|---|
committer | Beno�t Ganne <bganne@cisco.com> | 2022-03-02 10:54:56 +0000 |
commit | 08bd44bce59d79c71e5b39db9e28cb34a65434ca (patch) | |
tree | 73f8639dd3cc6a32c678922c71dd0b4dbe01dcd7 /src/cmake/library.cmake | |
parent | 5981319a77fc3cd597193554333b34a8e12d622d (diff) |
build: fix missing dependency for library
When building a VPP library out of tree using add_vpp_library, the build
sometimes fails because the library API files are not necessarily
generated before compiling this library.
This is fixed by adding the lib API files as dependencies of the
lib compilation.
Type: fix
Signed-off-by: Guillaume Solignac <gsoligna@cisco.com>
Change-Id: I69dffaecbfd547f10115504494a47358c4624258
Diffstat (limited to 'src/cmake/library.cmake')
-rw-r--r-- | src/cmake/library.cmake | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/cmake/library.cmake b/src/cmake/library.cmake index fbb2c68f218..ad4adfcabc4 100644 --- a/src/cmake/library.cmake +++ b/src/cmake/library.cmake @@ -80,6 +80,10 @@ macro(add_vpp_library lib) add_dependencies(${lo} api_headers) endif() + if(VPP_EXTERNAL_PROJECT AND ARG_API_FILES) + add_dependencies(${lo} ${lib}_api_headers) + endif() + if(ARG_DEPENDS) add_dependencies(${lo} ${ARG_DEPENDS}) endif() |