-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
关于反射生成代码的一点建议 #426
Labels
enhancement
New feature or request
Comments
需要解析的代码可能会频繁修改,因此也需要重新解析生成代码。 |
Closed
了解了,关于“检测待解析的文件是否更改”cmake是可以做到的,不过我还没有尝试过。 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
目前是使用一个 custom target 完成的,并且添加了 runtime 对此的依赖:
Piccolo/engine/source/precompile/precompile.cmake
Line 40 in 65379de
这样做会导致在写引擎的时候无论是用cmake项目还是生成出ide来使用,都会在编译时运行一遍 parser 生成出所需代码(_generated),并且runtime中依赖codegen出来的那些文件都会由于_generated被重新生成而重新编译。
如果不考虑像ue那样给客户使用也添加反射功能,可以把 codegen 单独写成一个批处理命令,例如在cmake中使用 execute_process 替代 add_custom_target,这样就把 parser 从编译时给提前到了 cmake 构建时运行,可以有效缩短编译时间。
The text was updated successfully, but these errors were encountered: