MantisBT - CMake |
View Issue Details |
|
ID | Project | Category | View Status | Date Submitted | Last Update |
0010693 | CMake | CMake | public | 2010-05-09 11:41 | 2012-08-15 09:34 |
|
Reporter | Modestas Vainius | |
Assigned To | Brad King | |
Priority | normal | Severity | feature | Reproducibility | N/A |
Status | closed | Resolution | fixed | |
Platform | amd64 | OS | Debian GNU/Linux | OS Version | sid |
Product Version | CMake-2-8 | |
Target Version | | Fixed in Version | | |
|
Summary | 0010693: Support detection of CLang compiler |
Description | Pasted from original report at http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=560693 [^] :
Cmake currently reports Clang compiler as GCC (what is not that bad as
they are in most cases compatible), however it would be great if it
would also provide way to distinguish these two compiler without
introducing this check in every CMakeLists.txt where it is needed.
The compiler can be detected by looking for __clang__ define, what
should be done before probing for GCC, because Clang defines most
symbols GCC does.
|
Steps To Reproduce | |
Additional Information | Read full Debian bug log for a bit more information. |
Tags | No tags attached. |
Relationships | related to | 0013473 | closed | Brad King | ASM compiler identification for Clang missing |
|
Attached Files | 0001-Recognize-CLang-C-and-C-compilers.patch (2,688) 2010-05-11 13:54 https://public.kitware.com/Bug/file/3105/0001-Recognize-CLang-C-and-C-compilers.patch |
|
Issue History |
Date Modified | Username | Field | Change |
2010-05-09 11:41 | Modestas Vainius | New Issue | |
2010-05-10 15:47 | Bill Hoffman | Status | new => assigned |
2010-05-10 15:47 | Bill Hoffman | Assigned To | => Brad King |
2010-05-11 13:54 | Brad King | File Added: 0001-Recognize-CLang-C-and-C-compilers.patch | |
2010-05-11 13:55 | Brad King | Note Added: 0020713 | |
2010-05-11 15:57 | Modestas Vainius | Note Added: 0020714 | |
2010-05-17 17:37 | Modestas Vainius | Note Added: 0020769 | |
2010-05-17 17:55 | Brad King | Note Added: 0020770 | |
2011-10-06 15:42 | rubenvb | Note Added: 0027545 | |
2011-10-06 16:22 | Brad King | Note Added: 0027546 | |
2011-10-06 16:22 | Brad King | Status | assigned => resolved |
2011-10-06 16:22 | Brad King | Resolution | open => fixed |
2012-03-06 08:37 | David Cole | Note Added: 0028821 | |
2012-03-06 08:37 | David Cole | Status | resolved => closed |
2012-08-15 09:34 | Brad King | Relationship added | related to 0013473 |
Notes |
|
(0020713)
|
Brad King
|
2010-05-11 13:55
|
|
Please relay the attached patch to the original reporter for testing. |
|
|
(0020714)
|
Modestas Vainius
|
2010-05-11 15:57
|
|
Done. Will get back to you once reporter replies. |
|
|
(0020769)
|
Modestas Vainius
|
2010-05-17 17:37
|
|
|
|
(0020770)
|
Brad King
|
2010-05-17 17:55
|
|
|
|
(0027545)
|
rubenvb
|
2011-10-06 15:42
|
|
This problem is present in another form on Windows. On Windows you can build Clang as a MinGW/GCC replacement or in conjunction with MSVC. Currently CMake thinks Clang == MSVC, even when specifying -G"MinGW Makefiles" and produces .obj files and tries to link to .lib files.
I believe Clang differentiates MSVC/GCC compatibility through it's triple:
*-*-mingw32 is GCC-like (.a and .o files)
*-*-win32 is MSVC-like (.lib and .obj files)
I cannot build Clang with (MinGW)Clang with CMake because of this, which is a pity... |
|
|
(0027546)
|
Brad King
|
2011-10-06 16:22
|
|
CMake has supported Clang for a while. The original issue is resolved.
Re 0010693:0027545: Please open a new issue for Clang on MinGW. Thanks. |
|
|
(0028821)
|
David Cole
|
2012-03-06 08:37
|
|
Closing resolved issues that have not been updated in more than 4 months. |
|