[cmake-developers] [CMake 0015861]: Configuration with -flto flag failed: CMAKE_CXX_STANDARD_COMPUTED_DEFAULT should be set for AppleClang [3.4 regression]

Mantis Bug Tracker mantis at public.kitware.com
Wed Nov 25 01:04:18 EST 2015


The following issue has been SUBMITTED. 
====================================================================== 
https://public.kitware.com/Bug/view.php?id=15861 
====================================================================== 
Reported By:                Ruslan Baratov
Assigned To:                
====================================================================== 
Project:                    CMake
Issue ID:                   15861
Category:                   CMake
Reproducibility:            always
Severity:                   minor
Priority:                   normal
Status:                     new
====================================================================== 
Date Submitted:             2015-11-25 01:04 EST
Last Modified:              2015-11-25 01:04 EST
====================================================================== 
Summary:                    Configuration with -flto flag failed:
CMAKE_CXX_STANDARD_COMPUTED_DEFAULT should be set for AppleClang [3.4
regression]
Description: 
Not able to configure project with CMAKE_CXX_FLAGS=-flto and
CMAKE_CXX_COMPILER=clang++. Works fine for CMake 3.3.

Steps to Reproduce: 
Example:

> cat CMakeLists.txt 
cmake_minimum_required(VERSION 3.0)
project(Foo)

> cmake --version
cmake version 3.4.0

> /usr/bin/clang++ --version
Apple LLVM version 6.1.0 (clang-602.0.53) (based on LLVM 3.6.0svn)
Target: x86_64-apple-darwin15.0.0
Thread model: posix

> cmake -H. -B_builds -DCMAKE_CXX_COMPILER=/usr/bin/clang++
-DCMAKE_CXX_FLAGS=-flto
...
CMake Error at .../share/cmake-3.4/Modules/Compiler/AppleClang-CXX.cmake:28
(message):
  CMAKE_CXX_STANDARD_COMPUTED_DEFAULT should be set for AppleClang
  (/usr/bin/clang++) version 6.1.0.6020053
====================================================================== 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2015-11-25 01:04 Ruslan Baratov New Issue                                    
======================================================================



More information about the cmake-developers mailing list