Skip to content

Latest commit

 

History

History
108 lines (81 loc) · 2.43 KB

README.md

File metadata and controls

108 lines (81 loc) · 2.43 KB

Examples

Set up a CMakeUserPresets.json and ensure conan is configured.

You may wish to add presets to build in Release mode. Add something like the following to your CMakeUserPresets.json:

{
  ...
  "configurePresets": [
    ...
    {
      "name": "rel",
      "binaryDir": "${sourceDir}/build/rel",
      "inherits": ["conan"],
      "generator": "Unix Makefiles",
      "cacheVariables": {
        "CMAKE_BUILD_TYPE": "Release"
      }
    }
  ],
  "buildPresets": [
    ...
    {
      "name": "rel",
      "configurePreset": "rel",
      "configuration": "Release",
      "jobs": "<num threads>"
    }
  ]
}

For MacOS, replace "Unix Makefiles" with "Xcode".

Note

Examples require additional dependencies to the main library. As such, it is required to supply -o examples=True to the conan install command.

Refer to HACKING for further configuration options.

Unix

Run all examples using one of the following methods from the project root directory.

For Debug:

conan install . -b missing -s build_type=Debug -o examples=True
cmake --preset=dev
cmake --build --preset=dev -t run-examples

For Release:

conan install . -b missing -o examples=True
cmake --preset=rel
cmake --build --preset=rel -t run-examples

If an existing build exists, you may need to run:

cmake --preset=rel -DBUILD_EXAMPLES=ON

To run an individual example, execute:

cmake --build --preset=rel -t run_<example_name>

where example_name is the example filename without the extension (eg. mobilenet_v3_small).

Android

Ensure adb is configured and a device with USB debugging enabled is connected.

An android conan profile is required to build for Android. To use the android profile provided with this repo, run

conan config install profiles -tf profiles

from the project root directory.

Using the above presets, run all examples using the following steps from the project root directory:

conan install . -b missing -pr android -o examples=True
cmake --preset=rel
cmake --build --preset=rel -t run-examples

To run an individual example, execute:

cmake --build --preset=rel -t run_<example_name>

where example_name is the example filename without the extension (eg. mobilenet_v3_small).

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy