# PLATFORM\_ID vs. WIN32 vs. CMAKE\_SYSTEM\_NAME

**URL:** https://discourse.cmake.org/t/platform-id-vs-win32-vs-cmake-system-name/1226
**Category:** Code
**Created:** [May 17, 2020, 6:54am UTC](https://discourse.cmake.org/t/platform-id-vs-win32-vs-cmake-system-name/1226 "2020-05-17T06:54:54Z")
**Posts on this page:** 1
**Showing post:** 2

<div class="post-metadata">

### Author: ![ben.boeckel](https://discourse.cmake.org/letter_avatar_proxy/v4/letter/b/ea5d25/32.png) [@ben.boeckel](https://discourse.cmake.org/u/ben.boeckel)
#### Post date: [May 18, 2020, 12:09pm UTC](https://discourse.cmake.org/t/platform-id-vs-win32-vs-cmake-system-name/1226/2 "2020-05-18T12:09:38Z")

</div>

The `WIN32`, `APPLE`, `UNIX`, etc. variables are “soft” deprecated due to this. We’ll never actually get them removed in the wider ecosystem, so they mean what they mean with all the conflations and ambiguities they come with. `CMAKE_SYSTEM_NAME` is what I’d use in CMake code, `PLATFORM_ID` is needed in generator expressions. A bit unfortunate about the naming difference if there isn’t some other difference, but I guess that needs documented if so?

---

_[View the full topic](https://discourse.cmake.org/t/platform-id-vs-win32-vs-cmake-system-name/1226)._
