-
Notifications
You must be signed in to change notification settings - Fork 8
Python support, some quick-fixes #2
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
base: master
Are you sure you want to change the base?
Conversation
python/CMakeProject.py
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Э, зачем все это пееписывать на питон?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
А затем, что у меня Vim собран с питоном, но без перла. Да и с перлом в Винде тяжко, а работать на ней иногда приходится.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Возвращаясь к разговору о переписанных на питон функциях. Переписал src_files и header_files на VimL. В принципе избавился от внешних зависимостей. Получилось вот что.
function s:cmake_project_find_files()
let currentdir = getcwd() . '/' . g:cmake_project_build_dir
let dependencies = globpath(currentdir, "**/DependInfo.cmake")
let internals = globpath(currentdir, "**/depend.internal")
let result = []
for depend in split(dependencies)
if filereadable(depend)
for line in readfile(depend)
let filename = matchlist(line, '\(^\s\+"\)\([[:graph:]]\+[.c|.cpp|.cc]\)"')
if len(filename) > 1 && strlen(filename[2])
call add(result, filename[2])
endif
endfor
endif
endfor
for internal in split(internals)
if filereadable(internal)
for line in readfile(internal)
let filename = matchlist(line, '\(^\s\+\)\([[:graph:]]\+[.h|.hh|.hpp]\)')
if len(filename) >1 && strlen(filename[2]) && match(getcwd(), filename[2]) != -1
call add(result, filename[2])
endif
endfor
endif
endfor
return result
endfunction
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ужас какой 👍
Думаю алгоритм поиска файлов переписать. То что сейчас ui файлы и cmake, CMakeLists.txt файлы не добавляет в проект
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
А можешь тогда питоно код убрать с проекта чтобы я смержнул?
Python support, some quick-fixes.