MantisBT - CMake
View Issue Details
0015012CMakeDocumentationpublic2014-07-10 07:092016-06-10 14:31
Philipp Möller 
Kitware Robot 
normalminoralways
closedmoved 
CMake 3.0 
 
0015012: Generator expressions provide PLATFORM_ID but its values are not documented
http://www.cmake.org/cmake/help/v3.0/manual/cmake-generator-expressions.7.html [^] documents PLATFORM_ID, but does not mention the possible values the variable could have.

I suppose the corresponding variable is CMAKE_<LANG>_PLATFORM_ID http://www.cmake.org/cmake/help/v3.0/variable/CMAKE_LANG_PLATFORM_ID.html [^] but is documented as internal.

Removing PLATFORM_ID from generator expressions would be a step backwards since it would remove an important use case, documentation CMAKE_<LAND>_PLATFORM_ID seems the right direction.

In general the generator expression documentation could be more explicit about the corresponding variables.
None.
No tags attached.
related to 0015015closed  Bug 0015012 documents the platform Id now but there is no platform I'd for wince defined. 
patch platform_id_doc.patch (1,286) 2014-07-10 10:23
https://public.kitware.com/Bug/file/5188/platform_id_doc.patch
Issue History
2014-07-10 07:09Philipp MöllerNew Issue
2014-07-10 10:04Brad KingDescription Updatedbug_revision_view_page.php?rev_id=1516#r1516
2014-07-10 10:07Brad KingNote Added: 0036335
2014-07-10 10:23Philipp MöllerFile Added: platform_id_doc.patch
2014-07-10 10:24Philipp MöllerNote Added: 0036337
2014-07-10 10:47Brad KingNote Added: 0036339
2014-07-10 10:47Brad KingAssigned To => Brad King
2014-07-10 10:47Brad KingStatusnew => assigned
2014-07-10 10:47Brad KingTarget Version => CMake 3.1
2014-07-10 10:55Brad KingNote Added: 0036340
2014-07-10 12:57Brad KingStatusassigned => resolved
2014-07-10 12:57Brad KingResolutionopen => fixed
2014-07-10 12:57Brad KingFixed in Version => CMake 3.1
2014-07-10 16:14Brad KingRelationship addedrelated to 0015015
2014-07-14 09:25Brad KingNote Added: 0036363
2014-07-14 09:25Brad KingStatusresolved => feedback
2014-07-14 09:25Brad KingResolutionfixed => reopened
2014-07-14 09:26Brad KingStatusfeedback => assigned
2014-07-14 09:26Brad KingResolutionreopened => open
2014-07-14 09:26Brad KingFixed in VersionCMake 3.1 =>
2014-07-14 09:35Brad KingNote Added: 0036365
2014-07-14 09:35Brad KingNote Added: 0036366
2014-07-14 18:28Philipp MöllerNote Added: 0036382
2014-07-15 09:15Brad KingNote Added: 0036394
2014-10-03 09:20Brad KingAssigned ToBrad King =>
2014-10-03 09:20Brad KingStatusassigned => backlog
2014-10-03 09:20Brad KingTarget VersionCMake 3.1 =>
2016-06-10 14:29Kitware RobotNote Added: 0042582
2016-06-10 14:29Kitware RobotStatusbacklog => resolved
2016-06-10 14:29Kitware RobotResolutionopen => moved
2016-06-10 14:29Kitware RobotAssigned To => Kitware Robot
2016-06-10 14:31Kitware RobotStatusresolved => closed

Notes
(0036335)
Brad King   
2014-07-10 10:07   
CMAKE_<LANG>_COMPILER_ID was also once documented as only for internal use. After it was stable for a long time then we added the list of values to the documentation and made official. I think the same point has been reached for CMAKE_<LANG>_PLATFORM_ID too.

Meanwhile, one can see the possible IDs in "# define PLATFORM_ID" lines here:

http://cmake.org/gitweb?p=cmake.git;a=blob;f=Modules/CMakePlatformId.h.in;hb=v3.0.0 [^]
(0036337)
Philipp Möller   
2014-07-10 10:24   
I attached a patch that documents the variable and adds a hint for anyone who might change CMakePlatformId.h.in.
(0036339)
Brad King   
2014-07-10 10:47   
Re 0015012:0036337: Thanks. Applied with minor tweaks and sorted names:

 Help: Document possible values of CMAKE_<LANG>_PLATFORM_ID
 http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=d2f68588 [^]
(0036340)
Brad King   
2014-07-10 10:55   
Another fix:

 Help: Link to variables corresponding to id and version expressions
 http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=108b62ba [^]
(0036363)
Brad King   
2014-07-14 09:25   
Oops. PLATFORM_ID is actually the CMAKE_SYSTEM_NAME:

http://cmake.org/gitweb?p=cmake.git;a=blob;f=Source/cmGeneratorExpressionEvaluator.cxx;hb=v3.0.0#l574 [^]

not CMAKE_<LANG>_PLATFORM_ID.
(0036365)
Brad King   
2014-07-14 09:35   
I reverted the patch in 0015012:0036339 and revised the patch in 0015012:0036340 as:

 Help: Link to variables corresponding to id and version expressions
 http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=5690a963 [^]
(0036366)
Brad King   
2014-07-14 09:35   
Re 0015012:0036337: It looks like we should document the CMAKE_SYSTEM_NAME values instead.
(0036382)
Philipp Möller   
2014-07-14 18:28   
Ouch, that is confusing. It might be a good idea to deprecate PLATFORM_ID in generator expressions with a policy and introduce SYSTEM_NAME instead. Alternatively the code could be changed so that in a generator expression PLATFORM_ID actually refers to the CMAKE_<LANG>_PLATFORM_ID variable.

In general, the overlap between those to variables is really confusing. It seems that PLATFORM_ID is much more precise and predicatable, since the value is controlled CMakePlatformId.h.in. Although I don't see why it could be different for any <LANG>. A more general resolution might be appropriate.
(0036394)
Brad King   
2014-07-15 09:15   
Re 0015012:0036382: I think PLATFORM_ID is a better name than CMAKE_SYSTEM_NAME for what it means. Changing either name now will be even more confusing IMO. The docs of PLATFORM_ID now refer to CMAKE_SYSTEM_NAME. CMAKE_SYSTEM_NAME is predictable because the entire Modules/Platform/<SystemName>-<CompilerId>-<Lang>.cmake infrastructure depends on it for supported platforms.

CMAKE_<LANG>_PLATFORM_ID is still an internal variable that is not used for much. We might be able to deprecate it.
(0042582)
Kitware Robot   
2016-06-10 14:29   
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.