Skip to content

Add CMake integration steps and all devs' deps to README #1423

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jul 10, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 24 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,9 @@ For development and contributions:
- cmake-format-0.6 (can be installed with `python -m pip install cmake-format==0.6.13`)
- black (can be installed with `python -m pip install black==24.3.0`)

> **Note**: All devs dependencies are defined in `third-party/requirements.txt`
> and can be installed, for example: `pip install -r third_party/requirements.txt`.

For building tests and multithreaded benchmarks:

- C++ compiler with C++17 support
Expand Down Expand Up @@ -398,6 +401,27 @@ an issue or a Pull Request, please read [Contribution Guide](./CONTRIBUTING.md).
To enable logging in UMF source files please follow the guide in the
[web documentation](https://oneapi-src.github.io/unified-memory-framework/introduction.html#logging).

## CMake integration

Integration of UMF into another project via CMake's
[FetchContent](https://cmake.org/cmake/help/latest/module/FetchContent.html),
is possible with:

```cmake
include(FetchContent)

FetchContent_Declare(
unified-memory-framework
GIT_REPOSITORY https://github.com/oneapi-src/unified-memory-framework.git
GIT_TAG main # This will pull the latest (potentially unstable) changes from the main branch
)
FetchContent_MakeAvailable(unified-memory-framework)

add_executable(some_example some_example.cpp)
target_include_directories(some_example PRIVATE ${unified-memory-framework_SOURCE_DIR}/include)
target_link_libraries(some_example PRIVATE umf::umf umf::headers)
```

## Notices

The contents of this repository may have been developed with support from one or more Intel-operated generative artificial intelligence solutions.
3 changes: 2 additions & 1 deletion third_party/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
# Python requirements modules
# Formatting the source code
bandit==1.8.6
black==24.3.0
clang-format==15.0.7
cmake-format==0.6.13
# Linting the source code
bandit==1.8.6
# Tests
packaging==25.0
# Generating HTML documentation
Expand Down