Files
CMake/Tests/RunCMake/project/PlatformVariablesGeneric.cmake
Robert Maynard a8d1b1c06b project: Add test for platform variables with a Generic system
Cover that `UNIX`, `LINUX`, and other host platform variables are not
defined after `project()` when `CMAKE_SYSTEM_NAME` is `Generic`.

Issue: #28200
2026-10-23 13:15:58 -04:00

6 lines
181 B
CMake

foreach(var APPLE UNIX WIN32 CYGWIN MSYS BSD LINUX AIX)
if(DEFINED ${var})
message(SEND_ERROR "${var} is defined as '${${var}}' for a Generic system.")
endif()
endforeach()