MantisBT - CMake
View Issue Details
0007867CMakeCTestpublic2008-10-28 04:392016-06-10 14:30
Rolf Eike Beer 
Kitware Robot 
normalminoralways
closedmoved 
CMake-2-6 
 
0007867: "Compiler Name" and "Compiler Version" are always unknown
CTest does not write compiler information into it's test result files so CDash always shows them as unknown.
No tags attached.
Issue History
2008-10-28 04:39Rolf Eike BeerNew Issue
2008-11-08 17:32Bill HoffmanStatusnew => assigned
2008-11-08 17:32Bill HoffmanAssigned To => Julien Jomier
2008-11-08 17:34Bill HoffmanNote Added: 0014070
2010-01-22 08:31Rolf Eike BeerNote Added: 0019265
2010-05-17 04:56Rolf Eike BeerNote Added: 0020757
2010-08-31 11:15David ColeNote Added: 0022018
2010-12-08 10:36David ColeAssigned ToJulien Jomier => David Cole
2011-02-03 17:20David ColeAssigned ToDavid Cole =>
2011-02-03 17:20David ColeStatusassigned => acknowledged
2011-02-09 13:39David ColeStatusacknowledged => backlog
2012-09-12 15:59Rolf Eike BeerNote Added: 0031020
2012-09-12 17:04David ColeNote Added: 0031022
2014-12-16 17:53Sean McBrideNote Added: 0037472
2016-06-10 14:27Kitware RobotNote Added: 0041458
2016-06-10 14:27Kitware RobotStatusbacklog => resolved
2016-06-10 14:27Kitware RobotResolutionopen => moved
2016-06-10 14:27Kitware RobotAssigned To => Kitware Robot
2016-06-10 14:30Kitware RobotStatusresolved => closed

Notes
(0014070)
Bill Hoffman   
2008-11-08 17:34   
ctest does not know the compiler or compiler version. That is something cmake knows. ctest could configure a project that used several different compilers. This information needs to come out of the build maybe... I am not sure how we can get it to CDash.
(0019265)
Rolf Eike Beer   
2010-01-22 08:31   
In CMake 2.8.0 the compiler name is set to the path of the compiler binary. At the beginning of the configuration CMake prints like "The C compiler identification is MSVC" or "... GNU", that's the information I would expect here. And for the version it's what "gcc --version" or the first line of "cl.exe" spits out.
(0020757)
Rolf Eike Beer   
2010-05-17 04:56   
This could come e.g. from Modules/Platform/Windows-cl.cmake

If you run cl.exe without any arguments you get something like this in the first line:

Microsoft (R) C/C++ Optimizing Compiler Version 16.00.30319.01 for x64

Everything before the "Version" should be put into "Compiler Name", everything else into "Compiler Version". Shouldn't be too hard to put it in e.g. CMAKE_COMPILER_NAME_STRING and CMAKE_COMPILER_VERSION_STRING.

The same could then go also to a gcc/g++ module and parse the first line of "gcc --version". There the split is the space after the first closing brace, everything before is name (e.g. "g++ (GCC)", "g++ (Gentoo 4.3.4 p1.0, pie-10.1.5)", or "g++ (SUSE Linux)" which are the three version I have at hand), everything else is the version.
(0022018)
David Cole   
2010-08-31 11:15   
We will not be addressing this for the upcoming CMake 2.8.3 release.
(0031020)
Rolf Eike Beer   
2012-09-12 15:59   
CMake has all the knowledge by now. So how do we get this into CTest and it's XML?
(0031022)
David Cole   
2012-09-12 17:04   
Site name and BuildName are communicated from CMake to CTest via the configured file DartConfiguration.tcl (which is not for Dart anymore, and it is also not tcl, but that's a separate issue...)

I would imagine the easiest way to do this would be to add entries in there (if they're not already there) that are configured based on the new variables and then add code into ctest that reads/writes those values into the appropriate XML files that are sent to CDash.

Bill's point from the earlier note is still valid, though ("ctest could configure a project that used several different compilers"), and CDash does not deal with the possibility of multiple values being sent in these fields.

We could set them to the one compiler used by the top level project, though, and that would probably be what 90%+ of users would expect.
(0037472)
Sean McBride   
2014-12-16 17:53   
Just wanted to +1 this issue. :)

As this hasn't been fixed in 6 years, another solution is to just remove from CDash this display entirely.
(0041458)
Kitware Robot   
2016-06-10 14:27   
Resolving issue as `moved`.

This issue tracker is no longer used. Further discussion of this issue may take place in the current CMake Issues page linked in the banner at the top of this page.