mirror of
https://gitlab.kitware.com/cmake/cmake.git
synced 2026-09-25 04:09:36 +03:00
Apple: Use CMAKE_EFFECTIVE_SYSTEM_NAME to share compiler info
Apple platforms macOS, iOS, tvOS, and watchOS can all share the same compiler information. Rename `Darwin-*` modules to `Apple-*` and load them all through `CMAKE_EFFECTIVE_SYSTEM_NAME`. This saves duplication of 4 * 21 compiler information modules. Issue: #17870
This commit is contained in:
@@ -11,6 +11,11 @@
|
||||
#
|
||||
# It is useful to share the same aforementioned configuration files and
|
||||
# avoids duplicating them in case of tightly related platforms.
|
||||
#
|
||||
# An example are the platforms supported by Xcode (macOS, iOS, tvOS,
|
||||
# and watchOS). For all of those the CMAKE_EFFECTIVE_SYSTEM_NAME is
|
||||
# set to Apple which results in using
|
||||
# Platfom/Apple-AppleClang-CXX.cmake for the Apple C++ compiler.
|
||||
set(CMAKE_EFFECTIVE_SYSTEM_NAME "${CMAKE_SYSTEM_NAME}")
|
||||
|
||||
include(Platform/${CMAKE_SYSTEM_NAME}-Initialize OPTIONAL)
|
||||
|
||||
Reference in New Issue
Block a user