diff options
Diffstat (limited to 'Modules')
-rw-r--r-- | Modules/CMakeASM_MARMASMInformation.cmake | 20 | ||||
-rw-r--r-- | Modules/CMakeDetermineASM_MARMASMCompiler.cmake | 18 | ||||
-rw-r--r-- | Modules/CMakeTestASM_MARMASMCompiler.cmake | 13 |
3 files changed, 51 insertions, 0 deletions
diff --git a/Modules/CMakeASM_MARMASMInformation.cmake b/Modules/CMakeASM_MARMASMInformation.cmake new file mode 100644 index 0000000..ac81097 --- /dev/null +++ b/Modules/CMakeASM_MARMASMInformation.cmake @@ -0,0 +1,20 @@ +# Distributed under the OSI-approved BSD 3-Clause License. See accompanying +# file Copyright.txt or https://cmake.org/licensing for details. + + +# support for the MS ARM assembler, marmasm and marmasm64 + +set(ASM_DIALECT "_MARMASM") + +set(CMAKE_ASM${ASM_DIALECT}_SOURCE_FILE_EXTENSIONS asm) + +set(CMAKE_ASM${ASM_DIALECT}_COMPILE_OBJECT "<CMAKE_ASM${ASM_DIALECT}_COMPILER> <DEFINES> <INCLUDES> <FLAGS> -o <OBJECT> <SOURCE>") + +# The ASM_MARMASM compiler id for this compiler is "MSVC", so fill out the runtime library table. +set(CMAKE_ASM${ASM_DIALECT}_COMPILE_OPTIONS_MSVC_RUNTIME_LIBRARY_MultiThreaded "") +set(CMAKE_ASM${ASM_DIALECT}_COMPILE_OPTIONS_MSVC_RUNTIME_LIBRARY_MultiThreadedDLL "") +set(CMAKE_ASM${ASM_DIALECT}_COMPILE_OPTIONS_MSVC_RUNTIME_LIBRARY_MultiThreadedDebug "") +set(CMAKE_ASM${ASM_DIALECT}_COMPILE_OPTIONS_MSVC_RUNTIME_LIBRARY_MultiThreadedDebugDLL "") + +include(CMakeASMInformation) +set(ASM_DIALECT) diff --git a/Modules/CMakeDetermineASM_MARMASMCompiler.cmake b/Modules/CMakeDetermineASM_MARMASMCompiler.cmake new file mode 100644 index 0000000..26714dd --- /dev/null +++ b/Modules/CMakeDetermineASM_MARMASMCompiler.cmake @@ -0,0 +1,18 @@ +# Distributed under the OSI-approved BSD 3-Clause License. See accompanying +# file Copyright.txt or https://cmake.org/licensing for details. + + +# Find the MS ARM assembler (marmasm or marmasm64) + +set(ASM_DIALECT "_MARMASM") + +# if we are using the 64bit cl compiler, assume we also want the 64bit assembler +if(";${CMAKE_VS_PLATFORM_NAME};${CMAKE_C_COMPILER_ARCHITECTURE_ID};${CMAKE_CXX_COMPILER_ARCHITECTURE_ID};" + MATCHES ";(ARM64);") + set(CMAKE_ASM${ASM_DIALECT}_COMPILER_INIT armasm64) +else() + set(CMAKE_ASM${ASM_DIALECT}_COMPILER_INIT armasm) +endif() + +include(CMakeDetermineASMCompiler) +set(ASM_DIALECT) diff --git a/Modules/CMakeTestASM_MARMASMCompiler.cmake b/Modules/CMakeTestASM_MARMASMCompiler.cmake new file mode 100644 index 0000000..a6de04c --- /dev/null +++ b/Modules/CMakeTestASM_MARMASMCompiler.cmake @@ -0,0 +1,13 @@ +# Distributed under the OSI-approved BSD 3-Clause License. See accompanying +# file Copyright.txt or https://cmake.org/licensing for details. + + +# This file is used by EnableLanguage in cmGlobalGenerator to +# determine that the selected ASM_MARMASM "compiler" (should be marmasm or marmasm64) +# 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. + +set(ASM_DIALECT "_MARMASM") +include(CMakeTestASMCompiler) +set(ASM_DIALECT) |