code_coverage icon indicating copy to clipboard operation
code_coverage copied to clipboard

New circular dependency after 7c273b33a31617b969717298815611185c580716 (#43)

Open jmk0 opened this issue 2 years ago • 1 comments

Following the instructions in the readme, I find I still get circular dependencies in cmake. I can prevent it by commenting out the DEPENDS ${Coverage_DEPENDENCIES} line in the _cleanup_cpp custom target definition, but I'm not sure if this has any adverse effects. It's worth noting I don't have any C++ code in my ROS modules.

CMake Error: The inter-target dependency graph contains the following strongly connected component (cycle):
  "tests" of type UTILITY
    depends on "my_scratch_coverage_report_cleanup_cpp" (strong)
    depends on "svc_ex_coverage_report_cleanup_cpp" (strong)
  "_run_tests_my_scratch" of type UTILITY
    depends on "_run_tests_my_scratch_rostest" (strong)
  "_run_tests_my_scratch_rostest" of type UTILITY
    depends on "_run_tests_my_scratch_rostest_test_test_scratcher.launch" (strong)
  "_run_tests_my_scratch_rostest_test_test_scratcher.launch" of type UTILITY
    depends on "tests" (strong)
  "my_scratch_coverage_report_cleanup_cpp" of type UTILITY
    depends on "_run_tests_my_scratch" (strong)
  "svc_ex_coverage_report_cleanup_cpp" of type UTILITY
    depends on "_run_tests_svc_ex" (strong)
  "_run_tests_svc_ex" of type UTILITY
    depends on "_run_tests_svc_ex_rostest" (strong)
  "_run_tests_svc_ex_rostest" of type UTILITY
    depends on "_run_tests_svc_ex_rostest_test_test_svc_ex.launch" (strong)
  "_run_tests_svc_ex_rostest_test_test_svc_ex.launch" of type UTILITY
    depends on "tests" (strong)
At least one of these targets is not a STATIC_LIBRARY.  Cyclic dependencies are allowed only among static libraries.
CMake Generate step failed.  Build files cannot be regenerated correctly.
make: *** [Makefile:894: cmake_check_build_system] Error 1
Invoking "make cmake_check_build_system" failed

jmk0 avatar Nov 09 '23 21:11 jmk0

I'm facing the same issue, it looks to appear in more recent versions of CMake. cmake 3.16.3 (ubuntu 20.04) -> no issue cmake 3.28.3 (ubuntu 24.04) -> cyclic dependency issue

mikaelarguedas avatar Apr 30 '24 10:04 mikaelarguedas