[cmake-developers] Generating information for C++ tools in cmake (patch)

Manuel Klimek klimek at google.com
Mon Apr 25 13:22:07 EDT 2011


On Mon, Apr 25, 2011 at 9:16 AM, Brad King <brad.king at kitware.com> wrote:
> On 04/25/2011 12:06 PM, Manuel Klimek wrote:
>> On Mon, Apr 25, 2011 at 8:59 AM, Brad King <brad.king at kitware.com> wrote:
>>> On 04/25/2011 11:54 AM, Manuel Klimek wrote:
>>>> Is just putting IF(UNIX) ... around all the stuff enough for that?
>>>
>>> It's not just the test.  The C++ implementation cannot handle all
>>> generators.  It should be taught to run only for generators where it
>>> is known to work.  Perhaps it can check a value set by each platform
>>> module.
>>
>> Ah, ok, I was thinking putting it around the exporting of the flag, so
>> that you can only switch it on on supported platforms
>
> That approach may work.  It is up to the platform modules to present
> the option when it can be implemented.  If that is just a few conditions
> around a single place then great.
>
>> - as far as I
>> can tell, the code still works on other platforms, the database is
>> just not enough, right?
>
> The main problem is that some of the generators write syntax that is
> specific to the make tool (e.g. NMake, Borland) directly into the
> command line.  That syntax confuses any tool that wants to read it
> from the database.

Ok, I added
IF(CMAKE_GENERATOR MATCHES "Unix Makefiles")
to guard the export of the option, and
IF(UNIX)
to guard the execution of the test...

Unfortunately I don't have non-unix systems to test on at the moment...

I also reexported all my other patches rebased on current master head.

Cheers,
/Manuel
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-refactor-flags-and-defines.patch
Type: text/x-patch
Size: 6636 bytes
Desc: not available
URL: <http://public.kitware.com/pipermail/cmake-developers/attachments/20110425/4144f5b7/attachment-0012.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0002-cache-flags-and-defines.patch
Type: text/x-patch
Size: 5995 bytes
Desc: not available
URL: <http://public.kitware.com/pipermail/cmake-developers/attachments/20110425/4144f5b7/attachment-0013.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0003-implement-cxx-command-output.patch
Type: text/x-patch
Size: 5514 bytes
Desc: not available
URL: <http://public.kitware.com/pipermail/cmake-developers/attachments/20110425/4144f5b7/attachment-0014.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0004-make-compile-command-output-optional.patch
Type: text/x-patch
Size: 2305 bytes
Desc: not available
URL: <http://public.kitware.com/pipermail/cmake-developers/attachments/20110425/4144f5b7/attachment-0015.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0005-Adds-a-test-for-the-compile-command-line-output.patch
Type: text/x-patch
Size: 7720 bytes
Desc: not available
URL: <http://public.kitware.com/pipermail/cmake-developers/attachments/20110425/4144f5b7/attachment-0016.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0006-Only-offer-the-compile-command-output-feature-on-uni.patch
Type: text/x-patch
Size: 1818 bytes
Desc: not available
URL: <http://public.kitware.com/pipermail/cmake-developers/attachments/20110425/4144f5b7/attachment-0017.bin>


More information about the cmake-developers mailing list