Skip to content

Missing DEPENDS causes strange error #5236

@timcanham

Description

@timcanham
F´ Version 4.x
Affected Component

Problem Description

If a module CMakeLists.txt has an empty DEPENDS section in the register_fprime_library function call, the fprime-util generate step will emit a bizarre error:

CMake Error at lib/fprime/cmake/utilities.cmake:788 (message):
   ----------------------------------------
   F Prime/CMake target 'TRUE' not available to deployment 'SomeDeployment'. 'TRUE' must:
       1. Must be defined somewhere in the F Prime project
       2. Must be defined before 'SomeDeployment' deployment (register_fprime_deployment)
   'TRUE' is undefined, or included via `add_fprime_subdirectory` after `register_fprime_deployment`. in:
       /home/tcanham/source/SomeDirectory/Something/CMakeLists.txt
   ----------------------------------------

Call Stack (most recent call first):
  lib/fprime/cmake/utilities.cmake:737 (fprime_cmake_clear_message)
  lib/fprime/cmake/target/target.cmake:75 (fprime_cmake_fatal_error)
  lib/fprime/cmake/target/target.cmake:136 (check_unknown_links)
  lib/fprime/cmake/target/target.cmake:181 (setup_single_target)
  lib/fprime/cmake/API.cmake:161 (setup_module_targets)
  lib/fprime/cmake/API.cmake:346 (fprime_attach_custom_targets)
  SomeDeploymentDirectory/CMakeLists.txt:19 (register_fprime_deployment)

(Fake directories and names were inserted into the error text)

Context / Environment

Execute fprime-util version-check and share the output.

Operating System: Linux
CPU Architecture: x86_64
Platform: Linux-5.15.133.1-microsoft-standard-WSL2-x86_64-with-glibc2.39
Python version: 3.12.3
CMake version: 3.26.0
Pip version: 26.1.1
Pip packages:
    fprime-tools==4.2.1
    fprime-gds==4.2.1
    fprime-fpp==3.2.0
Project submodules:
    https://github.com/nasa/fprime.git @ v4.2.2

How to Reproduce

  1. Take any module directory with no DEPENDS in the register_fprime_library
  2. Add DEPENDS with no string
  3. Run fprime-util generate

Expected Behavior

It would be nice to have an error that is more informative like "Empty DEPENDS, dummy!"

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    Status
    Backlog

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions