2009-10-02 01:21:28 +04:00
|
|
|
|
|
|
|
#=============================================================================
|
|
|
|
# Copyright 2007-2009 Kitware, Inc.
|
|
|
|
#
|
|
|
|
# Distributed under the OSI-approved BSD License (the "License");
|
|
|
|
# see accompanying file Copyright.txt for details.
|
|
|
|
#
|
|
|
|
# This software is distributed WITHOUT ANY WARRANTY; without even the
|
|
|
|
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
|
|
|
# See the License for more information.
|
|
|
|
#=============================================================================
|
|
|
|
# (To distributed this file outside of CMake, substitute the full
|
|
|
|
# License text for the above reference.)
|
|
|
|
|
2007-06-28 17:14:27 +04:00
|
|
|
MESSAGE(STATUS "Loaded CMakeASM${ASM_DIALECT}Information - ASM${ASM_DIALECT} support is still experimental, please report issues")
|
|
|
|
|
|
|
|
IF(UNIX)
|
|
|
|
SET(CMAKE_ASM${ASM_DIALECT}_OUTPUT_EXTENSION .o)
|
|
|
|
ELSE(UNIX)
|
|
|
|
SET(CMAKE_ASM${ASM_DIALECT}_OUTPUT_EXTENSION .obj)
|
|
|
|
ENDIF(UNIX)
|
|
|
|
|
2007-07-11 21:39:51 +04:00
|
|
|
SET(CMAKE_INCLUDE_FLAG_ASM${ASM_DIALECT} "-I") # -I
|
2008-10-15 00:07:11 +04:00
|
|
|
SET(CMAKE_BASE_NAME)
|
2007-06-28 17:14:27 +04:00
|
|
|
GET_FILENAME_COMPONENT(CMAKE_BASE_NAME "${CMAKE_ASM${ASM_DIALECT}_COMPILER}" NAME_WE)
|
|
|
|
|
|
|
|
IF("${CMAKE_BASE_NAME}" STREQUAL "as")
|
|
|
|
SET(CMAKE_BASE_NAME gas)
|
|
|
|
ENDIF("${CMAKE_BASE_NAME}" STREQUAL "as")
|
|
|
|
|
|
|
|
INCLUDE(Platform/${CMAKE_BASE_NAME} OPTIONAL)
|
|
|
|
|
2007-07-11 21:39:51 +04:00
|
|
|
IF(CMAKE_SYSTEM_PROCESSOR)
|
|
|
|
INCLUDE(Platform/${CMAKE_SYSTEM_NAME}-${CMAKE_BASE_NAME}-${CMAKE_SYSTEM_PROCESSOR} OPTIONAL RESULT_VARIABLE _INCLUDED_FILE)
|
|
|
|
ENDIF(CMAKE_SYSTEM_PROCESSOR)
|
|
|
|
IF(NOT _INCLUDED_FILE)
|
|
|
|
INCLUDE(Platform/${CMAKE_SYSTEM_NAME}-${CMAKE_C_COMPILER_ID}-ASM-${CMAKE_SYSTEM_PROCESSOR} OPTIONAL)
|
|
|
|
ENDIF(NOT _INCLUDED_FILE)
|
|
|
|
|
|
|
|
INCLUDE(Platform/${CMAKE_SYSTEM_NAME}-${CMAKE_BASE_NAME} OPTIONAL RESULT_VARIABLE _INCLUDED_FILE)
|
|
|
|
IF(NOT _INCLUDED_FILE)
|
|
|
|
INCLUDE(Platform/${CMAKE_SYSTEM_NAME}-${CMAKE_C_COMPILER_ID}-ASM OPTIONAL)
|
|
|
|
ENDIF(NOT _INCLUDED_FILE)
|
2007-06-28 17:14:27 +04:00
|
|
|
|
2009-02-27 21:08:05 +03:00
|
|
|
IF(NOT CMAKE_ASM${ASM_DIALECT}_SOURCE_FILE_EXTENSIONS)
|
|
|
|
SET(CMAKE_ASM${ASM_DIALECT}_SOURCE_FILE_EXTENSIONS s;S;asm)
|
|
|
|
ENDIF(NOT CMAKE_ASM${ASM_DIALECT}_SOURCE_FILE_EXTENSIONS)
|
2007-06-28 17:14:27 +04:00
|
|
|
|
|
|
|
IF(NOT CMAKE_ASM${ASM_DIALECT}_COMPILE_OBJECT)
|
|
|
|
SET(CMAKE_ASM${ASM_DIALECT}_COMPILE_OBJECT "<CMAKE_ASM${ASM_DIALECT}_COMPILER> <FLAGS> -o <OBJECT> <SOURCE>")
|
|
|
|
ENDIF(NOT CMAKE_ASM${ASM_DIALECT}_COMPILE_OBJECT)
|
|
|
|
|
|
|
|
IF(NOT CMAKE_ASM${ASM_DIALECT}_CREATE_STATIC_LIBRARY)
|
2008-03-04 04:24:18 +03:00
|
|
|
SET(CMAKE_ASM${ASM_DIALECT}_CREATE_STATIC_LIBRARY
|
2007-06-28 17:14:27 +04:00
|
|
|
"<CMAKE_AR> cr <TARGET> <LINK_FLAGS> <OBJECTS> "
|
|
|
|
"<CMAKE_RANLIB> <TARGET> ")
|
|
|
|
ENDIF(NOT CMAKE_ASM${ASM_DIALECT}_CREATE_STATIC_LIBRARY)
|
|
|
|
|
|
|
|
IF(NOT CMAKE_ASM${ASM_DIALECT}_LINK_EXECUTABLE)
|
|
|
|
SET(CMAKE_ASM${ASM_DIALECT}_LINK_EXECUTABLE
|
|
|
|
"<CMAKE_LINKER> <FLAGS> <CMAKE_ASM${ASM_DIALECT}_LINK_FLAGS> <LINK_FLAGS> <OBJECTS> -o <TARGET> <LINK_LIBRARIES>")
|
|
|
|
ENDIF(NOT CMAKE_ASM${ASM_DIALECT}_LINK_EXECUTABLE)
|
|
|
|
|
|
|
|
# to be done
|
|
|
|
IF(NOT CMAKE_ASM${ASM_DIALECT}_CREATE_SHARED_LIBRARY)
|
|
|
|
SET(CMAKE_ASM${ASM_DIALECT}_CREATE_SHARED_LIBRARY)
|
|
|
|
ENDIF(NOT CMAKE_ASM${ASM_DIALECT}_CREATE_SHARED_LIBRARY)
|
|
|
|
|
|
|
|
IF(NOT CMAKE_ASM${ASM_DIALECT}_CREATE_SHARED_MODULE)
|
|
|
|
SET(CMAKE_ASM${ASM_DIALECT}_CREATE_SHARED_MODULE)
|
|
|
|
ENDIF(NOT CMAKE_ASM${ASM_DIALECT}_CREATE_SHARED_MODULE)
|
|
|
|
|
|
|
|
|
|
|
|
SET(CMAKE_ASM${ASM_DIALECT}_INFOMATION_LOADED 1)
|
|
|
|
|