MantisBT - CMake | |||||
View Issue Details | |||||
ID | Project | Category | View Status | Date Submitted | Last Update |
0012639 | CMake | CMake | public | 2011-12-23 17:42 | 2011-12-24 14:18 |
Reporter | Pau Garcia i Quiles | ||||
Assigned To | Bill Hoffman | ||||
Priority | normal | Severity | block | Reproducibility | always |
Status | closed | Resolution | no change required | ||
Platform | MSVC2010SP1 | OS | Windows | OS Version | 7 SP1 64-bit |
Product Version | CMake 2.8.6 | ||||
Target Version | Fixed in Version | ||||
Summary | 0012639: CXX_FLAGS is not set unless a project asks for C++ | ||||
Description | Visual C++ 2010 does not support C99 yet and it seems it will be a long time before MSVC supports it. For now, the usual work-around is to build the project as C++. I'd like to build as C if using mingw, and as C++ if using MSVC. As Bill and others suggested, I'm using set_source_files_properties(<SRCS> PROPERTIES LANGUAGE CXX). Problem is the configure step works fine but the generation step fails because CXX_FLAGS have not been set. Work-around: include a dummy project that just sets "project(dummy CXX)" so that C++ flags are registered. See this thread for more details: http://www.cmake.org/pipermail/cmake/2011-December/048222.html [^] | ||||
Steps To Reproduce | See attached minimal tests cases: - fails - passes (using workaround) | ||||
Additional Information | The proper solution is to look for CXX_FLAGS if any source file has a property involving C++ language. | ||||
Tags | No tags attached. | ||||
Relationships | |||||
Attached Files | cmakecxx.7z (531) 2011-12-23 17:42 https://public.kitware.com/Bug/file/4150/cmakecxx.7z | ||||
Issue History | |||||
Date Modified | Username | Field | Change | ||
2011-12-23 17:42 | Pau Garcia i Quiles | New Issue | |||
2011-12-23 17:42 | Pau Garcia i Quiles | File Added: cmakecxx.7z | |||
2011-12-24 11:50 | Pau Garcia i Quiles | Note Added: 0028072 | |||
2011-12-24 14:18 | Bill Hoffman | Status | new => closed | ||
2011-12-24 14:18 | Bill Hoffman | Assigned To | => Bill Hoffman | ||
2011-12-24 14:18 | Bill Hoffman | Resolution | open => no change required |
Notes | |||||
|
|||||
|
|