Skip to content

Build fails with SAM3_BUILD_TESTS=ON and SAM3_METAL=OFF #13

@erectbranch

Description

@erectbranch

Thanks for maintaining this project.

The project builds successfully with the default options, but as soon as I turned cmake .. -DSAM3_METAL=OFF -DSAM3_BUILD_TESTS=ON they broke.

// The build fails with the following errors:
tests/test_metal_block_stage_compare.cpp:153:10: error: 'copy_n' is not a member of 'std'; did you mean 'copy'?
tests/test_metal_vit.cpp:107:33: error: 'strtok' was not declared in this scope; did you mean 'strtoq'?

Adding the missing standard library headers fixes the build:

  • test_metal_block_stage_compare.cpp<algorithm> (std::copy_n)
  • test_metal_vit.cpp<cstring> (strtok)
  • test_mem_enc.cpp, test_text_enc_cat.cpp, test_video_text.cpp, test_metal_conv_transpose_2d_stress.cpp, test_vit.cpp<algorithm> (std::min / std::max)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions