Closed ldeng-ustc closed 11 months ago
Hey thanks for the input! I've also been bugged by this, but decided to not bother as it would introduce extra complexity without not adding long term benefits. Also in an actual project, you would expect the project name to be hardcoded in multiple places instead of being encoded in a generic variable name.
The main project name (
Greeter
) is currently used across multiple files. So it requires modifications in all these files to use this template, which can be time-consuming and error-prone.I suggest defining the main project name in a separate file. This way, any changes to the name would only need to be made in one place, reducing potential errors and increasing efficiency.
for example, we can create a new file
info.cmake
:And then, include this file in other files:
Then, one can start its own projects with changing only one
Greeter
.I write a demo in this branch, but I haven’t updated the documentation. If this suggestion is accepted, I can submit a PR.