On Fri, Mar 13, 2009 at 1:39 PM, Alexander Neundorf
<[email protected]> wrote:
> On Friday 13 March 2009, John Drescher wrote:
>> Is there a way to have cmake automatically create empty missing source
>> files instead of failing?
>
> No, there is not.
>
>> Basically I when I need to add new files I add new entries to my
>> CMakeLists.txt file then I have to go to the shell and touch on each
>> file I add so that cmake will not fail to regenerate the project.
>
> Maybe you can write a macro which helps you with that. Like
> MY_ADD_EXECUTABLE(), which takes the same arguments as the normal
> ADD_EXECUTABLE(), but before handing them all over to ADD_EXECUTABLE(), check
> if each file exists and if it doesn't, create it using FILE(WRITE ...).
> But then you may get problems with files generated via ADD_CUSTOM_COMMAND().
> I would not recommend this.
>

Thanks, that sounds better than ADD_CUSTOM_COMMAND with a script to
check existence and create if needed.

John
_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake

Reply via email to