CMake Autogeneration of files missing (Visual Studio build eror)

I am trying to build a Visual studio solution (*.sln) generated by CMake using CMakeLists.txt as input.
I ran the command cmake -Ax64 -G"Visual Studio 15" -H%SRC_FOLDER% -B%SRC_FOLDER%/.build in order to generate the solution file. (SRC_FOLDER is env variable for the folder containing source files) CMake is successfully generating (except a warning Policy CMP0144 is not set) the sln solution file. But when I build the solution in VS following errors are shown. My CMake version is 3.27.0-rc1

12>Automatic MOC and UIC for target …
8>
8>AutoGen error
8>-------------
8>Info error in info file
8>"D:/XL/XLTool/.build/RajPlugin/CMakeFiles/…_autogen.dir/AutogenInfo.json":
8>The header file “SRC:/.build/RajPlugin/IIceRajPerf.h” does not exist.

I understand this file IIceRajPerf.h should be auto generated by CMake. It is not happening.

Previously there was no build issues. Now after few days of gap, when unzipped the branch from the Github and then ran CMake it is showing this error. Spend almost 3-4 days to figure out this. No outcome. When I compared the current build folder structure with the old build folder, I found many auto generated files are not seen.

Help required to resolve this issue.

More information is needed:

  • What version(s) of CMake have you tried? Is this something that may have changed “after a few days of gap”?
  • Can you strip it down and provide a small test case that can be tested? You may find some bit that changes in the project to affect the behavior in doing this as well.

CMake I tried with both 3.27.0-rc1 and 3.27.0-rc3 with no change in results.

When CMake is executed, a build folder is generated. It contains the auto generated folders. Bin folder contained within the Build folder has Visual studio solution file. But when I build the sln, the errors are generating. The errors are due to missing QT UI Files (Widget.cpp and Widget.h). Autogenerated QT Files.

By the way, my know I am not sure who is generating QT ui files (CMake or Visual Studio).

Also Is there a possibility of security issue (Permission denied) for autogenerating the QT UI Files.