[cmake-developers] COMPILE_FEATURES, Mac and non-Apple clang versions

Robert Maynard robert.maynard at kitware.com
Tue Jan 3 10:36:54 EST 2017


The minimum cmake version of each project controls the default state
of the policies. So for policy 25 you need a minimum of CMake 3.0.

This is partially a moot point, because compiler feature detection was
added in CMake 3.0, so if you are expecting that feature to exist you
should be requiring CMake 3.0.

On Tue, Jan 3, 2017 at 10:26 AM, René J.V. Bertin <rjvbertin at gmail.com> wrote:
> On Tuesday January 3 2017 10:02:44 Robert Maynard wrote:
>
> Hi,
>
> Thanks for the sample CMake file!
>
> It appears indeed that the policy defaulting to OLD is the culprit here: setting it to NEW at an appropriate location (and throwing out build.dir/CMake*) makes detection work properly. Surprised me a bit TBH; a casual read (and unburdened with prior knowledge) of the CMP0025 doc seems to suggest that the opposite would happen.
>
> That almost begs the question what you're waiting for to make the new setting the default. :)
> Maybe there's a way to toggle it locally, so that it doesn't have to be set in every project that may need to be built with a non-Apple clang version?
>
> Cheers,
> René Bertin
>
>>The problem that was reported in that other thread was due to having
>>policy CMP0025 set to a false value, once that policy was enabled
>>compiler detection worked properly.
>>
>>I would make sure the same isn't happening for you.
>>
>>I have attached a simple CMakeList.txt file you can use to determine
>>if potentially you are seeing the same policy issue.
>>
>>
>>
>>On Tue, Jan 3, 2017 at 9:21 AM, René J.V. Bertin <rjvbertin at gmail.com> wrote:
>>> Hi,
>>>
>>> I just had a run-in with a CMake file from Qt5 in a project I've been building with a locally built Clang 3.9 version, affectionately called clang-mp-3.9 . I got the cryptic message
>>>
>>>  CMake Error in src/platformtheme/CMakeLists.txt:
>>>    No known features for CXX compiler
>>>
>>>    "Clang"
>>>
>>>    version 3.9.0.
>>>
>>>
>>> Would you consider adding support for non-Apple clang versions on Mac too, and who would best request that, a Qt dev who considers the cxx_decltype test crucial, or the 1st user for whom that breaks his builds (i.e. me)?
>>>
>>> I see this has already come up for HB:
>>> https://cmake.org/pipermail/cmake/2016-December/064719.html
>>>
>>>
>>> Thanks,
>>> René Bertin
>>> --
>>>
>>> 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-developers
>


More information about the cmake-developers mailing list