cmake/Modules/CMakeTestASMCompiler.cmake

36 lines
1.3 KiB
CMake
Raw Normal View History

2009-10-04 10:30:41 +03: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.
#=============================================================================
2010-11-13 01:00:53 +02:00
# (To distribute this file outside of CMake, substitute the full
2009-10-04 10:30:41 +03:00
# License text for the above reference.)
# This file is used by EnableLanguage in cmGlobalGenerator to
2011-01-16 11:35:12 +01:00
# determine that the selected ASM compiler works.
# For assembler this can only check whether the compiler has been found,
# because otherwise there would have to be a separate assembler source file
# for each assembler on every architecture.
2012-02-18 12:40:36 +02:00
2013-03-16 19:13:01 +02:00
set(_ASM_COMPILER_WORKS 0)
2012-02-18 12:40:36 +02:00
2013-03-16 19:13:01 +02:00
if(CMAKE_ASM${ASM_DIALECT}_COMPILER)
set(_ASM_COMPILER_WORKS 1)
endif()
2012-02-18 12:40:36 +02:00
# when using generic "ASM" support, we must have detected the compiler ID, fail otherwise:
2013-03-16 19:13:01 +02:00
if("ASM${ASM_DIALECT}" STREQUAL "ASM")
if(NOT CMAKE_ASM${ASM_DIALECT}_COMPILER_ID)
set(_ASM_COMPILER_WORKS 0)
endif()
endif()
2012-02-18 12:40:36 +02:00
2013-03-16 19:13:01 +02:00
set(CMAKE_ASM${ASM_DIALECT}_COMPILER_WORKS ${_ASM_COMPILER_WORKS} CACHE INTERNAL "")