Commit edb2472
authored
[UR][CMake] Fix OpenCL target error on rebuild (#19740)
The problem was `OpenCL_FOUND` was getting set to `TRUE` on the second
invocation of the module because `find_package` was finding the
`FetchContent` clone in `SOURCE_TREE/build/__deps`.
We use `OpenCL_FOUND` to specifically refer to external system-wide
installs, so use `NO_CMAKE_PACKAGE_REGISTRY` to make sure we don't find
FetchContent clones.
Also not related to the fix here but re-order `FetchContent_Declare`
`FetchContent_GetProperties`, the `Declare` should come first and we
`MakeAvailable` should not be inside the `if`, we only check if it's
populated to print the message.
Closes: intel/llvm#19737
Signed-off-by: Sarnie, Nick <nick.sarnie@intel.com>1 parent dc8068f commit edb2472
1 file changed
Lines changed: 14 additions & 13 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
20 | | - | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
21 | 24 | | |
22 | 25 | | |
23 | 26 | | |
| |||
48 | 51 | | |
49 | 52 | | |
50 | 53 | | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
51 | 58 | | |
52 | 59 | | |
53 | 60 | | |
54 | 61 | | |
55 | | - | |
56 | | - | |
57 | | - | |
58 | | - | |
59 | | - | |
60 | 62 | | |
| 63 | + | |
61 | 64 | | |
62 | 65 | | |
63 | 66 | | |
| |||
68 | 71 | | |
69 | 72 | | |
70 | 73 | | |
71 | | - | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
72 | 78 | | |
73 | 79 | | |
74 | 80 | | |
75 | | - | |
76 | | - | |
77 | | - | |
78 | | - | |
79 | | - | |
80 | | - | |
81 | 81 | | |
| 82 | + | |
82 | 83 | | |
83 | 84 | | |
84 | 85 | | |
| |||
0 commit comments