apache / celix

Apache Celix is a framework for C and C++14 to develop dynamic modular software applications using component and in-process service-oriented programming.
https://celix.apache.org/
Apache License 2.0
160 stars 85 forks source link

hotfix/Add project prefix to avoid conflict #617

Closed PengZheng closed 11 months ago

PengZheng commented 11 months ago

If a downstream project uses CelixConfig.cmake as a template, it might provide a config file like the following:

get_filename_component(REL_INSTALL_DIR "${CMAKE_CURRENT_LIST_FILE}" PATH)
get_filename_component(REL_INSTALL_DIR "${REL_INSTALL_DIR}" PATH)
get_filename_component(REL_INSTALL_DIR "${REL_INSTALL_DIR}" PATH)
get_filename_component(REL_INSTALL_DIR "${REL_INSTALL_DIR}" PATH)

find_dependency(Celix)

include(${REL_INSTALL_DIR}/share/celix/cmake/CelixTargets.cmake)

Then REL_INSTALL_DIR will mess with the one used by CelixConfig.cmake, leading to mysterious errors. This PR solves this by adding project specific prefix to REL_INSTALL_DIR.

codecov-commenter commented 11 months ago

Codecov Report

Merging #617 (8e6a786) into master (4c24ebf) will increase coverage by 0.02%. The diff coverage is n/a.

:exclamation: Current head 8e6a786 differs from pull request most recent head fc022b3. Consider uploading reports for the commit fc022b3 to get more accurate results

@@            Coverage Diff             @@
##           master     #617      +/-   ##
==========================================
+ Coverage   79.72%   79.75%   +0.02%     
==========================================
  Files         259      259              
  Lines       34681    34681              
==========================================
+ Hits        27651    27661      +10     
+ Misses       7030     7020      -10     

see 3 files with indirect coverage changes

:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more