STYLE: use a separate source file for generating CMakeSystem.cmake if CMAKE_TOOLCHAIN_FILE is used

Alex
This commit is contained in:
Alexander Neundorf
2007-05-21 11:26:40 -04:00
parent c8dd1caff9
commit 71359f5b9d
5 changed files with 28 additions and 22 deletions

View File

@@ -1,21 +1,6 @@
IF("@CMAKE_TOOLCHAIN_FILE@" STREQUAL "")
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@")
ELSE("@CMAKE_TOOLCHAIN_FILE@" STREQUAL "")
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)
ENDIF("@CMAKE_TOOLCHAIN_FILE@" STREQUAL "")
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@")
SET(CMAKE_SYSTEM_LOADED 1)