MantisBT - CMake | |||||
View Issue Details | |||||
ID | Project | Category | View Status | Date Submitted | Last Update |
0015906 | CMake | CMake | public | 2016-01-09 12:37 | 2016-06-10 14:31 |
Reporter | Jan Henke | ||||
Assigned To | Kitware Robot | ||||
Priority | normal | Severity | major | Reproducibility | always |
Status | closed | Resolution | moved | ||
Platform | OS | Windows | OS Version | 10 | |
Product Version | CMake 3.4.1 | ||||
Target Version | Fixed in Version | ||||
Summary | 0015906: With Microsoft Visual Studio CMake should use the C++ compiler for C files, if C standard >= C99 is set | ||||
Description | The Mircosoft Visual Studio C compiler only supports ISO 9899:1989 (aka C89). Newer C features are only implemented in the C++ compiler and only for the subset of C, which is part of the C++ standard (see for reference: http://herbsutter.com/2012/05/03/reader-qa-what-about-vc-and-c99/ [^]) Since a few versions CMake provides a way to specify the features or standard for your application. Thus if the requested standard level is C99 or above, or any of the features introduced in C99 or above, CMake should use the C++ compiler for C files. To quote from above web site: "We recommend that C developers use the C++ compiler to compile C code (using /TP if the file is named something.c). This is the best choice for using Visual C++ to compile C code." Please change the generator for Visual Studio solutions accordingly. That way we can use modern C feature with CMake and the Visual Studio compilers. | ||||
Steps To Reproduce | |||||
Additional Information | |||||
Tags | No tags attached. | ||||
Relationships | |||||
Attached Files | |||||
Issue History | |||||
Date Modified | Username | Field | Change | ||
2016-01-09 12:37 | Jan Henke | New Issue | |||
2016-06-10 14:29 | Kitware Robot | Note Added: 0042909 | |||
2016-06-10 14:29 | Kitware Robot | Status | new => resolved | ||
2016-06-10 14:29 | Kitware Robot | Resolution | open => moved | ||
2016-06-10 14:29 | Kitware Robot | Assigned To | => Kitware Robot | ||
2016-06-10 14:31 | Kitware Robot | Status | resolved => closed |
Notes | |||||
|
|||||
|
|