This is the last part. And we can remove the python script.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
I'm sorry, this dropped off my radar. The only question I have here is about the createPythonInit.py script. If we're moving stuff to cmake, I am wondering if we shouldn't move that thing too? It doesn't look like the code is doing anything which would be hard to replicate in cmake. WDYT ?
I didn't find a good way to generate file using cmake at build time... Did I miss something?
The closest way I see is to create a new .cmake script with file(WRITE ...) in it. And invoke cmake to run this new script at build time. But that doesn't seem much better than this simple python script.
In my opinion, python is better than cmake for string processing. As long as we don't reinvent too many cmake functionality in python, it is not a problem to have a small python script...
Right. I see what you mean.
But... does this have to happen at build time? Since the list of files is already known at configuration time, you should be able to generate the files in the "cmake" step (but still leave the copying for the build step, so that any changes to the files are reflected in rebuilds).
(I'm not insisting on that -- I think that the current patch is already much better than what we had before. If you think that the python script is better than that, feel free to say so.)
That could be done... Except that the path of these files can be determined at build time, at least for multi-configuration generators. So we may need to write them to a temporary path at configuration time, and copy them to the right Debug / Release directory at build time.
Yea let's use python for now... ๐