llnl-units provides CMake targets:

    find_package(llnl-units CONFIG REQUIRED)
    target_link_libraries(main PRIVATE llnl-units::units)
