[cmake-developers] [CMake 0014962]: Eclipse generator fails with several params to CMAKE_CXX_COMPILER_ARG1
Mantis Bug Tracker
mantis at public.kitware.com
Sun Jun 8 14:23:00 EDT 2014
The following issue has been SUBMITTED.
======================================================================
http://www.cmake.org/Bug/view.php?id=14962
======================================================================
Reported By: Michael Kahane
Assigned To:
======================================================================
Project: CMake
Issue ID: 14962
Category: CMake
Reproducibility: always
Severity: minor
Priority: normal
Status: new
======================================================================
Date Submitted: 2014-06-08 14:23 EDT
Last Modified: 2014-06-08 14:23 EDT
======================================================================
Summary: Eclipse generator fails with several params to
CMAKE_CXX_COMPILER_ARG1
Description:
I'm trying to setup a C++ project in eclipse. The project is using the clang++
compiler and I'm using it in C++11 mode with libc++. To make the Eclipse
generator detect the proper include paths and language I'm setting
CMAKE_CXX_COMPILER_ARG1="-std=c++11 -stdlib=libc+11" on the command line but the
the include paths do not appear in the generated eclipse project. I've also
tried CMAKE_CXX_COMPILER_ARG1=-std=c++11\;-stdlib=libc+11 but the generator
fails with an error in this case.
If I use only one argument to CMAKE_CXX_COMPILER_ARG1 it works. However if I use
CMAKE_CXX_COMPILER_ARG1=-std=c11 it will set the __GXX_EXPERIMENTAL_CXX0X__ flag
but not the include path to libc++ (instead it will set the include paths to
stdlibc++). If I use CMAKE_CXX_COMPILER_ARG1=-stblib=libc+11 it will add
/usr/include/c++/v1 to the include path but not set the
__GXX_EXPERIMENTAL_CXX0X__ flags.
Steps to Reproduce:
You need a setup with clang++ and libc++.
Assuming you have a c++ project in proj_dir make an adjacent build_dir. cd to
the build_dir and:
CC=clang CXX=clang++ cmake -G"Eclipse CDT4 - Unix Makefiles"
-DCMAKE_BUILD_TYPE=Debug -DCMAKE_CXX_COMPILER_ARG1=-std=c++11\;-stdlib=libc++
-DCMAKE_ECLIPSE_VERSION=4.3 ../proj_dir
or
CC=clang CXX=clang++ cmake -G"Eclipse CDT4 - Unix Makefiles"
-DCMAKE_BUILD_TYPE=Debug -DCMAKE_CXX_COMPILER_ARG1="-std=c++11-stdlib=libc++"
-DCMAKE_ECLIPSE_VERSION=4.3 ../proj_dir
======================================================================
Issue History
Date Modified Username Field Change
======================================================================
2014-06-08 14:23 Michael Kahane New Issue
======================================================================
More information about the cmake-developers
mailing list