[prev in list] [next in list] [prev in thread] [next in thread] 

List:       cmake
Subject:    Re: [CMake] target_compile_features no known features for CXX compiler for clang 9.0
From:       Brad King <brad.king () kitware ! com>
Date:       2018-03-26 13:55:45
Message-ID: dc2be376-da3f-a148-d818-fb001e8d9e27 () kitware ! com
[Download RAW message or body]

On 03/20/2018 08:52 PM, Rick Mann wrote:
> Xcode (Version 9.2 (9C40b))

That works with CMake 3.11.0-rc4 AFAIK.

> CMake Error at cmake/AddCeresCXX11RequirementsToTarget.cmake:70 \
> (target_compile_features): target_compile_features no known features for CXX \
> compiler 
> "Clang"
> 
> version 9.0.0.9000039.

The compiler id should be AppleClang to work with compiler features,
but that is controlled by policy CMP0025:

  https://cmake.org/cmake/help/v3.11/policy/CMP0025.html

As of Ceres 1.14.0 they are not setting that policy to NEW:

  https://github.com/ceres-solver/ceres-solver/blob/1.14.0/CMakeLists.txt#L32-L40

That is necessary for this code:

  https://github.com/ceres-solver/ceres-solver/blob/1.14.0/cmake/AddCeresCXX11RequirementsToTarget.cmake#L58-L71


to work, since the target_compile_features command expects
behavior as of CMake 3.1 or above.  Typically the command
would only be used after `cmake_minimum_required(VERSION 3.1)`
which would automatically set CMP0025 to NEW.

Ceres is trying to support older CMake versions and so would
need to set the policy manually.

-Brad
-- 

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:
https://cmake.org/mailman/listinfo/cmake


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic