-
Notifications
You must be signed in to change notification settings - Fork 10
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
If leaf directories don't contain CMakeLists.txt, M-x cmake-project-mode fails #3
Comments
This was intentional to prevent non-CMake-based projects that happen to be nested in a CMake-based source tree (third-party dependencies for instance) from being treated as CMake projects. Perhaps I should add some way to override the normal rules. I'm not sure exactly how that would work yet. |
In that case allowed suffixes as a custom var might work. Tell me if you're swamped and would really rather I tried to work out a Sent from a tablet...
|
I am a pretty swamped, but patch writing is not the holdup yet. First we need to work out what we would actually like the behaviour to be. Can you explain a bit more about setting allowed suffixes? How would they contribute? |
I also suffer from this. My project structure is something like:
On startup I get:
What exactly is the reason to return nil when CMakeLists.txt is not in a leaf path?
I think a saner alternative would be to check if a CMakeLists.txt is found below the next .hg, .git or .svn. You could also check for typical project root dir structures. Doesn't projectile have functionality to deal with this? Consider this patch?:
|
Since (cmake-project--upward-find-last-file "CMakeLists.txt") returns nil
cmake-project-find-root-directory errors out on file-name-as-directory(nil)
e.g. in our source we have a directory with CMakeLists.txt, which contains ./src and ./include where the code lives (I don't like that either :))
I'll be thinking about a fix...
Thanks
The text was updated successfully, but these errors were encountered: