<div dir="ltr">Hi,<div><br></div><div>I am planning to develop a python generator of <span class="">CMakeLists</span>.<span class="">txt</span> file for easier integration in an already existing tool. This approach is different from the others approaches consisting in binding the <span class="">CMake</span> language in a foreign languages. <span class="">Lua</span>, Javascript and Python have already been tried without success to my knowledge. Generating <span class="">CMakeLists</span>.<span class="">txt</span> files seems a simpler approach to me since the <span class="">CMake</span> language is very stable and it keeps the two projects separated. Finally it reaches the same goal since the idea behind binding <span class="">CMake</span> in a foreign language is too gain a more general purpose and feature full language with a larger standard library.</div>

<div><br></div><div>To assist in such a task the <span class="">CMake</span> language could provide a command similar to the #line directive found in the C-<span class="">pre</span>-processor. Changing the <span class="">filename</span> and line number in the <span class="">CMakeLists</span>.<span class="">txt</span> file would make the generator able to transparently run <span class="">CMake</span> behind the scene while the errors reported by <span class="">CMake</span> would still refer to the generator input file written by the user.</div>

<div><br></div><div>The last time I checked I could not find such a feature in <span class="">CMake</span>. I am realizing that since version 3 is still under development it might be a good occasion to show up and mention it here. I think that it is not a big change to <span class="">CMake</span> and that it should not overload the maintenance process. I hope it is not too late for such a proposal since the 5th candidate has just been released.   </div>

<div><div><br></div><div>Best regards,</div><div><br></div>-- <br>Nicolas <span class="">Desprès</span><br>
</div></div>