You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Assert that the repo directory is named executorch (#6480)
Our C++ include path assumes that the repo lives in a directory named exactly `executorch`. Users who name it something else run into hard-to-debug issues (see #6475).
Since we require it, add an explicit check and point users to the issue that tracks the fix.
## Test Plan
Tried generating cmake files under a directory named `executorch` and named `not-executorch`:
```
(rm -rf cmake-out \
&& mkdir cmake-out \
&& cd cmake-out \
&& cmake ../)
```
Note that I added a trailing slash just in case CMAKE_CURRENT_SOURCE_DIR included that slash and might confuse `cmake_path()`. (note that CMAKE_CURRENT_SOURCE_DIR does not include the trailing slash in this case)
This command succeeded when the directory is named `executorch`.
Under `not-executorch` it failed with the error:
```
CMake Error at CMakeLists.txt:332 (message):
The ExecuTorch repo must be cloned into a directory named exactly
`executorch`; found `not-executorch`. See
#6475 for progress on a fix for
this restriction.
```
Also tested with the instructions at [pytorch.org/executorch/main/llm/getting-started.html](https://pytorch.org/executorch/main/llm/getting-started.html), where executorch is a sub-repo of the top project. It builds when following the directions, but if I rename the repo to third-party/not-executorch then I see the expected error.
0 commit comments