Assert that the repo directory is named executorch
#6480
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
executorchand namednot-executorch: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-executorchit failed with the error:Also tested with the instructions at 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.