[CMake] Bug in SLN generation

David Cole DLRdave at aol.com
Tue Jan 6 08:29:57 EST 2015


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

(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
>>
>>
>> --
>>
>> Powered by www.kitware.com
>>
>> Please keep messages on-topic and check the CMake FAQ at:
>> http://www.cmake.org/Wiki/CMake_FAQ
>>
>> Kitware offers various services to support the CMake community. For more
>> information on each offering, please visit:
>>
>> CMake Support: http://cmake.org/cmake/help/support.html
>> CMake Consulting: http://cmake.org/cmake/help/consulting.html
>> CMake Training Courses: http://cmake.org/cmake/help/training.html
>>
>> Visit other Kitware open-source projects at
>> http://www.kitware.com/opensource/opensource.html
>>
>> Follow this link to subscribe/unsubscribe:
>> http://public.kitware.com/mailman/listinfo/cmake
>
>
>
> --
>
> Powered by www.kitware.com
>
> Please keep messages on-topic and check the CMake FAQ at:
> http://www.cmake.org/Wiki/CMake_FAQ
>
> Kitware offers various services to support the CMake community. For more
> information on each offering, please visit:
>
> CMake Support: http://cmake.org/cmake/help/support.html
> CMake Consulting: http://cmake.org/cmake/help/consulting.html
> CMake Training Courses: http://cmake.org/cmake/help/training.html
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Follow this link to subscribe/unsubscribe:
> http://public.kitware.com/mailman/listinfo/cmake


More information about the CMake mailing list