Commit c8ad252
[rocprofiler-register] Fix compilation with system fmt/glog (#1243)
rocprofiler-register provides options to build with system glog and fmt: `-DROCPROFILER_REGISTER_BUILD_GLOG=OFF -DROCPROFILER_REGISTER_BUILD_FMT=OFF`.
However these options don't work, because attempt to call
```cmake
find_package(glog REQUIRED)
...
find_package(fmt REQUIRED)
```
in the **nested** `external/CMakeLists.txt` does not expose glog and fmt to the **parent** `CMakeLists.txt`.
To make projects visible, the easiest way is to add `GLOBAL`:
```cmake
find_package(glog REQUIRED GLOBAL)
...
find_package(fmt REQUIRED GLOBAL)
```
GLOBAL modifier requires CMake >= 3.24, which was not required in
ROCm/rocm-systems, but ROCm/rocm-libraries already requires 3.25,
so this change should be safe.
Closes #1242.
Co-authored-by: Afzal Patel <122491982+afzpatel@users.noreply.github.com>1 parent 7818815 commit c8ad252
File tree
2 files changed
+3
-3
lines changed- projects/rocprofiler-register
- external
2 files changed
+3
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
21 | | - | |
| 21 | + | |
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
| |||
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
36 | | - | |
| 36 | + | |
37 | 37 | | |
0 commit comments