MantisBT - CMake | |||||
View Issue Details | |||||
ID | Project | Category | View Status | Date Submitted | Last Update |
0015355 | CMake | CMake | public | 2015-01-15 15:25 | 2015-06-01 08:38 |
Reporter | Laurent Demailly | ||||
Assigned To | Stephen Kelly | ||||
Priority | normal | Severity | major | Reproducibility | always |
Status | closed | Resolution | fixed | ||
Platform | Apple Mac | OS | OS X | OS Version | 10.4.10 |
Product Version | CMake 3.1 | ||||
Target Version | CMake 3.2 | Fixed in Version | CMake 3.2 | ||
Summary | 0015355: cmake 3.1 doesn't know how to select CMAKE_CXX_STANDARD 11 on Mac OS | ||||
Description | I have a very simple CMakeLists.txt – am using cmake 3.1 to be able to easily request C++ 11 – it works fine on ubuntu but not on MacOS with Xcode 6 and command line tools installed: $ cat CMakeLists.txt cmake_minimum_required(VERSION 3.1) project("Test1" C CXX) # We need C++ 11 set(CMAKE_CXX_STANDARD 11) set(CMAKE_CXX_STANDARD_REQUIRED on) file(WRITE test1.cpp "int main(int argc, char** argv) {auto x=argc; return x;}") add_executable(test1 test1.cpp) $ cmake31 . -- The C compiler identification is AppleClang 6.0.0.6000056 -- The CXX compiler identification is AppleClang 6.0.0.6000056 -- Check for working C compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -- Check for working C compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -- works -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Check for working CXX compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++ -- Check for working CXX compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++ -- works -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Configuring done CMake Error in CMakeLists.txt: Target "test1" requires the language dialect "CXX11" (with compiler extensions), but CMake does not know the compile flags to use to enable it. This is with CXX=/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++ CXXFLAGS="-std=c++11" But same without that | ||||
Steps To Reproduce | cmake_minimum_required(VERSION 3.1) project("Test1" C CXX) # We need C++ 11 set(CMAKE_CXX_STANDARD 11) set(CMAKE_CXX_STANDARD_REQUIRED on) file(WRITE test1.cpp "int main(int argc, char** argv) {auto x=argc; return x;}") add_executable(test1 test1.cpp) | ||||
Additional Information | |||||
Tags | No tags attached. | ||||
Relationships | |||||
Attached Files | |||||
Issue History | |||||
Date Modified | Username | Field | Change | ||
2015-01-15 15:25 | Laurent Demailly | New Issue | |||
2015-01-15 15:35 | Brad King | Note Added: 0037707 | |||
2015-01-15 15:35 | Brad King | Status | new => acknowledged | ||
2015-01-15 15:35 | Brad King | Target Version | => CMake 3.2 | ||
2015-01-16 19:38 | Laurent Demailly | Note Added: 0037726 | |||
2015-01-17 12:28 | Brad King | Note Added: 0037730 | |||
2015-01-17 12:28 | Brad King | Assigned To | => Stephen Kelly | ||
2015-01-17 12:28 | Brad King | Status | acknowledged => resolved | ||
2015-01-17 12:28 | Brad King | Resolution | open => fixed | ||
2015-01-17 12:28 | Brad King | Fixed in Version | => CMake 3.2 | ||
2015-01-19 17:00 | Laurent Demailly | Note Added: 0037750 | |||
2015-06-01 08:38 | Robert Maynard | Note Added: 0038847 | |||
2015-06-01 08:38 | Robert Maynard | Status | resolved => closed |
Notes | |||||
|
|||||
|
|
||||
|
|||||
|
|
||||
|
|||||
|
|
||||
|
|||||
|
|
||||
|
|||||
|
|