[CMake] Bug in SLN generation

David Cole DLRdave at aol.com
Tue Jan 6 10:36:33 EST 2015


No, with the wrapper script technique, you'd have to train all your
developers to run the wrapper script whenever any "CMake stuff"
changes...


On Tue, Jan 6, 2015 at 8:39 AM, Petr Kmoch <petr.kmoch at gmail.com> wrote:
> On Tue, Jan 6, 2015 at 2:29 PM, David Cole <DLRdave at aol.com> wrote:
>>
>> Two ways to do this occur to me:
>>
>> (1) wrap cmake with a two-line script that your project developers use:
>>     @call cmake -G "Visual Studio 12 2013"
>>     @call post-cmake.cmd
>
>
> Would this work with re-runs triggered by CMake itself (e.g. by ZERO_CHECK)?
>
>>
>>
>> (2) do a file(WRITE ...) unconditionally somewhere in your
>> CMakeLists.txt file, and then introduce a custom command that depends
>> on that file, and a custom target for that command to live in, and
>> then make all your other targets depend on that one. That way, the
>> first thing that happens in a build is your "post-CMake" step. (this
>> one will be a weird interactive experience in Visual Studio, though,
>> if your custom command modifies the sln/vcxproj files...)
>>
>> Perhaps neither is "ideal," but either technique should be able to
>> help you until an ideal solution can be implemented.
>>
>>
>> HTH,
>> David C.
>>
>>
>> On Tue, Jan 6, 2015 at 2:50 AM, Petr Kmoch <petr.kmoch at gmail.com> wrote:
>> > Hi Scott.
>> >
>> > To file a bug, use the Mantis tracker at http://public.kitware.com/Bug/
>> >
>> > As for running custom processing post-generation, there is no way hook
>> > this,
>> > and a request for it was explicitly declined:
>> > http://public.kitware.com/Bug/view.php?id=13020
>> >
>> > Petr
>> >
>> > On Mon, Jan 5, 2015 at 8:53 PM, Scott Aron Bloom
>> > <scott.bloom at onshorecs.com>
>> > wrote:
>> >>
>> >> I have found a bug in SLN generation when the property USE_FOLDERS  is
>> >> set
>> >> to on.
>> >>
>> >>
>> >> The order of the folders, and vcprojects added to the folders is not
>> >> sorted.  It is sorted correctly if USE_FOLDERS is not set.
>> >>
>> >>
>> >>
>> >> I have two questions, first, what is the appropriate mechanism for
>> >> filing
>> >> a bug? I will create a trivial testcase to show the issue.
>> >>
>> >>
>> >>
>> >> Second, in the meantime I have a way to fix the sln file, as a post
>> >> process after its generated.  What type of rule could I add to the
>> >> CMakeLists.txt file to run after the sln has been generated/updated by
>> >> cmake?
>> >>
>> >> Scott
>
>


More information about the CMake mailing list