[cmake-developers] [PATCH] FindBoost does not detect absence of header file

Roger Leigh rleigh at codelibre.net
Fri May 13 13:38:58 EDT 2016


On 13/05/2016 14:36, Brad King wrote:
> On 05/12/2016 03:49 PM, Roger Leigh wrote:
>> I have made the suggested changes above where this was possible, and
>> merged the boost-component-headers branch into next for testing.
>
> Thanks.  It looks pretty good, but there is one problem:
>
>> +    find_path(Boost_${UPPERCOMPONENT}_HEADER
>> +      NAMES         ${Boost_${UPPERCOMPONENT}_HEADER_NAME}
>> +      HINTS         ${Boost_INCLUDE_DIR}
>
> This leaves a bunch of Boost_${UPPERCOMPONENT}_HEADER values in
> the cache.  The names look public, and they are publicly visible.
> We should not expose this implementation detail.
>
> Also, the find_path() approach means it might find the header somewhere
> other than Boost_INCLUDE_DIR.  If it is not there, we cannot be confident
> that it will match the library found.
>
> Can the check use just if(EXISTS) instead?

Dear Brad,

Thanks for looking over this.  We could definitely use if(EXISTS).  I've 
pushed a change which does this.


Regards,
Roger


More information about the cmake-developers mailing list