From c148803a575ed1c3639123190b1d6a5d31578f34 Mon Sep 17 00:00:00 2001 From: Brad King Date: Thu, 2 Jun 2016 10:01:12 -0400 Subject: CMakeDetermineSystem: Load platform-specific helper modules Once CMAKE_SYSTEM_NAME is known, load a platform-specific Platform/-Determine module in order to enable custom determination of the other settings needed for the CMakeSystem module (e.g. CMAKE_SYSTEM_PROCESSOR). Also add a hook in Modules/CMakeSystem.cmake.in to allow platform-specific information to be saved. --- Modules/CMakeDetermineSystem.cmake | 1 + Modules/CMakeSystem.cmake.in | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/Modules/CMakeDetermineSystem.cmake b/Modules/CMakeDetermineSystem.cmake index d9f7579..f7a32b7 100644 --- a/Modules/CMakeDetermineSystem.cmake +++ b/Modules/CMakeDetermineSystem.cmake @@ -131,6 +131,7 @@ else() set(PRESET_CMAKE_SYSTEM_NAME FALSE) endif() +include(Platform/${CMAKE_SYSTEM_NAME}-Determine OPTIONAL) macro(ADJUST_CMAKE_SYSTEM_VARIABLES _PREFIX) if(NOT ${_PREFIX}_NAME) diff --git a/Modules/CMakeSystem.cmake.in b/Modules/CMakeSystem.cmake.in index 70c98d5..ef8aaa0 100644 --- a/Modules/CMakeSystem.cmake.in +++ b/Modules/CMakeSystem.cmake.in @@ -9,7 +9,7 @@ set(CMAKE_SYSTEM "@CMAKE_SYSTEM@") set(CMAKE_SYSTEM_NAME "@CMAKE_SYSTEM_NAME@") set(CMAKE_SYSTEM_VERSION "@CMAKE_SYSTEM_VERSION@") set(CMAKE_SYSTEM_PROCESSOR "@CMAKE_SYSTEM_PROCESSOR@") - +@CMAKE_SYSTEM_CUSTOM_CODE@ set(CMAKE_CROSSCOMPILING "@CMAKE_CROSSCOMPILING@") set(CMAKE_SYSTEM_LOADED 1) -- cgit v0.12