Skip to content

Integration build cannot configure — eos and eBoot define colliding CMake target names #85

Description

@srpatcha

ebuild integration ("Build all EoS packages together") adds eos and eBoot
to one CMake project. Both define test targets with the same names, and CMake
refuses duplicates:

CMake Error at eBoot/tests/CMakeLists.txt:10 (add_executable):
  add_executable cannot create target "test_crypto" because another target
  with the same name already exists.  The existing target is an executable
  created in source directory "eos/tests".  See documentation for policy
  CMP0002 for more details.

CMake Error at eBoot/tests/CMakeLists.txt:50 (add_executable):
  add_executable cannot create target "test_multicore" because another target
  with the same name already exists.  The existing target is an executable
  created in source directory "eos/tests".

-- Configuring incomplete, errors occurred!

The colliding pairs:

target eos eBoot
test_crypto tests/CMakeLists.txt:52 tests/CMakeLists.txt:10
test_multicore tests/CMakeLists.txt:42 tests/CMakeLists.txt:50

Both are on master in both repositories — this is not specific to any open
branch.

Effect

The integration build cannot configure at all whenever tests are enabled, which
is the configuration it exists to exercise. Each repository's own build is fine,
because the collision only appears when the two are composed — which is
precisely what ebuild integration is for. So the one build that checks the
repositories work together is the only one that cannot run.

Why it surfaced now

EoSim's ecosystem runner reported ebuild cmake FAIL — cmake configure failed.
cmake -S . -B build in ebuild succeeds on its own; the failure only appears
under the runner because it configures with tests on.

Fix

Namespace the test target names per repository — eboot_test_crypto /
eos_test_crypto, or the CMake-idiomatic form of prefixing with the project
name. The add_test(NAME ...) labels can stay as they are if the ctest output
should keep reading the same way, since the collision is between target names,
not test names.

Two names collide today. Nothing prevents a third: both repositories will keep
adding tests, and the next overlap fails the same way with the same
"individually green, broken together" signature. A prefix applied to all of them
closes the class rather than the two instances.

Filing here because this is where the composition happens, but the rename lands
in eos and eBoot.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions