[CMake] Request for better documentation of TRY_COMPILE

Brandon J. Van Every bvanevery at gmail.com
Thu Mar 1 22:18:39 EST 2007


Alan W. Irwin wrote:
>
> I think that documentation needs to be expanded by roughly a factor of 
> three
> to make it consistent with the size of the documentation of the second 
> form
> of try_compile which is well documented from my perspective.  I certainly
> did not "get" the above terse documentation when I first read it.

I didn't either.  Once upon a time it caused me to completely miss the 
purpose of TRY_COMPILE and instead try to use EXECUTE_PROCESS.  
Nowadays, when I run into under-documentation, I file it as a "Content" 
bug in the bug tracker.  I've had 3 of those pending for awhile now.  
That and 2 documentation related feature requests.

>
> Due to the current terse documentation of the first form of try_compile I
> missed the implications of its infinite flexibility so instead I replaced
> the usual TRY_COMPILE test of a compiler that is part of all language
> support with an EXECUTE_PROCESS test of gnatmake.

Fools think alike!  Oh no, heavens, that's "genius minds run the same 
channel."  :-)  EXECUTE_PROCESS is an incorrect solution because it 
compiles in CMake's shell environment, not your compiler's build 
environment.  If those items are one and the same, you are merely lucky.


Cheers,
Brandon Van Every



More information about the CMake mailing list