[cmake-developers] FindBoost.cmake Clang support

Brad King brad.king at kitware.com
Mon Mar 14 10:58:07 EDT 2016


On 03/12/2016 12:42 PM, Manu Sánchez wrote:
> I'm reaching you to ask about Clang support in the FindBoost.cmake script.
[snip]
>     if(CMAKE_CXX_COMPILER_ID MATCHES "Clang")
>         execute_process(COMMAND ${CMAKE_CXX_COMPILER} --version OUTPUT_VARIABLE out)

Thanks.  Rather than running the compiler you should be able to get the
version from CMAKE_CXX_COMPILER_VERSION.  Please revise the logic
accordingly.

Actually it looks like current uses of _Boost_COMPILER_DUMPVERSION
could be refactored to use CMAKE_CXX_COMPILER_VERSION too.

Thanks,
-Brad



More information about the cmake-developers mailing list