Repository: conan-io/conan

Issue:
[bug] CMAKE_SYSTEM_NAME is set to Macos instead of Darwin when settings.os = Macos
### Environment Details
  * Operating System+version: Linux Mint 20.0
  * Compiler+version: Clang 10.0.0
  * Conan version: 1.29.0
  * Python version: 3.8.2

### Steps to reproduce
Install [osxcross](https://github.com/tpoechtrager/osxcross) on Linux, create a profile with `os=Macos` and attempt to build a CMake-based package such as glfw.

### Logs
CMake complains that it doesn't know `CMAKE_SYSTEM_NAME=Macos`:
```
glfw/3.3.2: Copying sources to build folder
glfw/3.3.2: Building your package in /home/niklas.guertler/.conan/data/glfw/3.3.2/_/_/build/0c813457898f15d49f81cdfc3b93cb779967df65
glfw/3.3.2: Generator cmake created conanbuildinfo.cmake
glfw/3.3.2: Calling build()
-- The C compiler identification is Clang 10.0.0
System is unknown to cmake, create:
Platform/Macos to use this system, please post your config file on discourse.cmake.org so it can be added to cmake
-- Check for working C compiler: /home/niklas.guertler/programs/osxcross/target/bin/x86_64-apple-darwin19-clang
System is unknown to cmake, create:
Platform/Macos to use this system, please post your config file on discourse.cmake.org so it can be added to cmake
-- Check for working C compiler: /home/niklas.guertler/programs/osxcross/target/bin/x86_64-apple-darwin19-clang -- works
-- Detecting C compiler ABI info
System is unknown to cmake, create:
Platform/Macos to use this system, please post your config file on discourse.cmake.org so it can be added to cmake
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Looking for pthread.h
System is unknown to cmake, create:
Platform/Macos to use this system, please post your config file on discourse.cmake.org so it can be added to cmake
-- Looking for pthread.h - found
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
System is unknown to cmake, create:
Platform/Macos to use this system, please post your config file on discourse.cmake.org so it can be added to cmake
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Success
-- Found Threads: TRUE  
CMake Error at CMakeLists.txt:152 (message):
  No supported platform was detected
```
I'd suggest translating the `settins.os` value `Macos` to `Darwin` in the [`cmake_flags.py`](https://github.com/conan-io/conan/blob/develop/conans/client/build/cmake_flags.py#L208) file like this:
```python
definitions["CMAKE_SYSTEM_NAME"] = {"Macos": "Darwin",
    "iOS": "Darwin",
    "tvOS": "Darwin",
    "watchOS": "Darwin",
    "Neutrino": "QNX"}.get(os_, os_)
```
[bug] CMAKE_SYSTEM_NAME is set to Macos instead of Darwin when settings.os = Macos
### Environment Details
  * Operating System+version: Linux Mint 20.0
  * Compiler+version: Clang 10.0.0
  * Conan version: 1.29.0
  * Python version: 3.8.2

### Steps to reproduce
Install [osxcross](https://github.com/tpoechtrager/osxcross) on Linux, create a profile with `os=Macos` and attempt to build a CMake-based package such as glfw.

### Logs
CMake complains that it doesn't know `CMAKE_SYSTEM_NAME=Macos`:
```
glfw/3.3.2: Copying sources to build folder
glfw/3.3.2: Building your package in /home/niklas.guertler/.conan/data/glfw/3.3.2/_/_/build/0c813457898f15d49f81cdfc3b93cb779967df65
glfw/3.3.2: Generator cmake created conanbuildinfo.cmake
glfw/3.3.2: Calling build()
-- The C compiler identification is Clang 10.0.0
System is unknown to cmake, create:
Platform/Macos to use this system, please post your config file on discourse.cmake.org so it can be added to cmake
-- Check for working C compiler: /home/niklas.guertler/programs/osxcross/target/bin/x86_64-apple-darwin19-clang
System is unknown to cmake, create:
Platform/Macos to use this system, please post your config file on discourse.cmake.org so it can be added to cmake
-- Check for working C compiler: /home/niklas.guertler/programs/osxcross/target/bin/x86_64-apple-darwin19-clang -- works
-- Detecting C compiler ABI info
System is unknown to cmake, create:
Platform/Macos to use this system, please post your config file on discourse.cmake.org so it can be added to cmake
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Looking for pthread.h
System is unknown to cmake, create:
Platform/Macos to use this system, please post your config file on discourse.cmake.org so it can be added to cmake
-- Looking for pthread.h - found
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
System is unknown to cmake, create:
Platform/Macos to use this system, please post your config file on discourse.cmake.org so it can be added to cmake
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Success
-- Found Threads: TRUE  
CMake Error at CMakeLists.txt:152 (message):
  No supported platform was detected
```
I'd suggest translating the `settins.os` value `Macos` to `Darwin` in the [`cmake_flags.py`](https://github.com/conan-io/conan/blob/develop/conans/client/build/cmake_flags.py#L208) file like this:
```python
definitions["CMAKE_SYSTEM_NAME"] = {"Macos": "Darwin",
    "iOS": "Darwin",
    "tvOS": "Darwin",
    "watchOS": "Darwin",
    "Neutrino": "QNX"}.get(os_, os_)
```


Discussion:

Resolving patch:
diff --git a/conans/client/build/cmake_flags.py b/conans/client/build/cmake_flags.py
--- a/conans/client/build/cmake_flags.py
+++ b/conans/client/build/cmake_flags.py
@@ -205,7 +205,8 @@ def _cmake_cross_build_defines(self):
             if cross_building(self._conanfile):  # We are cross building
                 if os_ != os_build:
                     if os_:  # the_os is the host (regular setting)
-                        definitions["CMAKE_SYSTEM_NAME"] = {"iOS": "Darwin",
+                        definitions["CMAKE_SYSTEM_NAME"] = {"Macos": "Darwin",
+                                                            "iOS": "Darwin",
                                                             "tvOS": "Darwin",
                                                             "watchOS": "Darwin",
                                                             "Neutrino": "QNX"}.get(os_, os_)


Test patch: