From e95b3fd9bbca94cb5f217847031c9c8f393aee78 Mon Sep 17 00:00:00 2001 From: Gregor Jasny Date: Sun, 1 Apr 2018 22:49:59 +0200 Subject: 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 --- Modules/Platform/Apple-GNU-Fortran.cmake | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 Modules/Platform/Apple-GNU-Fortran.cmake (limited to 'Modules/Platform/Apple-GNU-Fortran.cmake') diff --git a/Modules/Platform/Apple-GNU-Fortran.cmake b/Modules/Platform/Apple-GNU-Fortran.cmake new file mode 100644 index 0000000000..2f53603cbc --- /dev/null +++ b/Modules/Platform/Apple-GNU-Fortran.cmake @@ -0,0 +1,10 @@ +# Distributed under the OSI-approved BSD 3-Clause License. See accompanying +# file Copyright.txt or https://cmake.org/licensing for details. + +include(Platform/Apple-GNU) +__apple_compiler_gnu(Fortran) +cmake_gnu_set_sysroot_flag(Fortran) +cmake_gnu_set_osx_deployment_target_flag(Fortran) + +set(CMAKE_Fortran_OSX_COMPATIBILITY_VERSION_FLAG "-compatibility_version ") +set(CMAKE_Fortran_OSX_CURRENT_VERSION_FLAG "-current_version ") -- cgit v1.2.1