I propose to consider the option of using variables declared in the CMakeLists.txt file in C ++ code.
To begin with, what is it for? For example, you want to specify the version of the program and some other auxiliary information that is set during the assembly of the program, but at the same time you want to use this information in your C ++ code? Is it possible to do this? For example, to make it look like the image shows.