View Issue Details Jump to Notes ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0015012CMakeDocumentationpublic2014-07-10 07:092016-06-10 14:31
ReporterPhilipp Möller 
Assigned ToKitware Robot 
PrioritynormalSeverityminorReproducibilityalways
StatusclosedResolutionmoved 
PlatformOSOS Version
Product VersionCMake 3.0 
Target VersionFixed in Version 
Summary0015012: Generator expressions provide PLATFORM_ID but its values are not documented
Descriptionhttp://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.
Steps To ReproduceNone.
TagsNo tags attached.
Attached Filespatch file icon platform_id_doc.patch [^] (1,286 bytes) 2014-07-10 10:23 [Show Content]

 Relationships
related to 0015015closed Bug 0015012 documents the platform Id now but there is no platform I'd for wince defined. 

  Notes
(0036335)
Brad King (manager)
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 (reporter)
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 (manager)
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 (manager)
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 (manager)
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 (manager)
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 (manager)
2014-07-14 09:35

Re 0015012:0036337: It looks like we should document the CMAKE_SYSTEM_NAME values instead.
(0036382)
Philipp Möller (reporter)
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 (manager)
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 (administrator)
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.

 Issue History
Date Modified Username Field Change
2014-07-10 07:09 Philipp Möller New Issue
2014-07-10 10:04 Brad King Description Updated
2014-07-10 10:07 Brad King Note Added: 0036335
2014-07-10 10:23 Philipp Möller File Added: platform_id_doc.patch
2014-07-10 10:24 Philipp Möller Note Added: 0036337
2014-07-10 10:47 Brad King Note Added: 0036339
2014-07-10 10:47 Brad King Assigned To => Brad King
2014-07-10 10:47 Brad King Status new => assigned
2014-07-10 10:47 Brad King Target Version => CMake 3.1
2014-07-10 10:55 Brad King Note Added: 0036340
2014-07-10 12:57 Brad King Status assigned => resolved
2014-07-10 12:57 Brad King Resolution open => fixed
2014-07-10 12:57 Brad King Fixed in Version => CMake 3.1
2014-07-10 16:14 Brad King Relationship added related to 0015015
2014-07-14 09:25 Brad King Note Added: 0036363
2014-07-14 09:25 Brad King Status resolved => feedback
2014-07-14 09:25 Brad King Resolution fixed => reopened
2014-07-14 09:26 Brad King Status feedback => assigned
2014-07-14 09:26 Brad King Resolution reopened => open
2014-07-14 09:26 Brad King Fixed in Version CMake 3.1 =>
2014-07-14 09:35 Brad King Note Added: 0036365
2014-07-14 09:35 Brad King Note Added: 0036366
2014-07-14 18:28 Philipp Möller Note Added: 0036382
2014-07-15 09:15 Brad King Note Added: 0036394
2014-10-03 09:20 Brad King Assigned To Brad King =>
2014-10-03 09:20 Brad King Status assigned => backlog
2014-10-03 09:20 Brad King Target Version CMake 3.1 =>
2016-06-10 14:29 Kitware Robot Note Added: 0042582
2016-06-10 14:29 Kitware Robot Status backlog => 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


Copyright © 2000 - 2018 MantisBT Team