summaryrefslogtreecommitdiffstats
path: root/Modules/CMakeSystemWithToolchainFile.cmake.in
diff options
context:
space:
mode:
Diffstat (limited to 'Modules/CMakeSystemWithToolchainFile.cmake.in')
-rw-r--r--Modules/CMakeSystemWithToolchainFile.cmake.in11
1 files changed, 11 insertions, 0 deletions
diff --git a/Modules/CMakeSystemWithToolchainFile.cmake.in b/Modules/CMakeSystemWithToolchainFile.cmake.in
new file mode 100644
index 0000000..b86a810
--- /dev/null
+++ b/Modules/CMakeSystemWithToolchainFile.cmake.in
@@ -0,0 +1,11 @@
+
+INCLUDE("@CMAKE_TOOLCHAIN_FILE@")
+
+# set CMAKE_SYSTEM to the CMAKE_SYSTEM_NAME
+SET(CMAKE_SYSTEM ${CMAKE_SYSTEM_NAME})
+# if there is a CMAKE_SYSTEM_VERSION then add a -${CMAKE_SYSTEM_VERSION}
+IF(CMAKE_SYSTEM_VERSION)
+ SET(CMAKE_SYSTEM ${CMAKE_SYSTEM}-${CMAKE_SYSTEM_VERSION})
+ENDIF(CMAKE_SYSTEM_VERSION)
+
+SET(CMAKE_SYSTEM_LOADED 1)