summaryrefslogtreecommitdiffstats
path: root/Tests
diff options
context:
space:
mode:
authorIlia K <ki.stfu@gmail.com>2022-10-14 11:24:47 (GMT)
committerBrad King <brad.king@kitware.com>2022-11-09 15:22:46 (GMT)
commit3166547cf6d62217d3142a18e3aae3fc84e49b24 (patch)
tree245e1a41fcb57ed5f4bd6794609b865ef7caa4dd /Tests
parentce4babb5669b9fcd8ff3d34c109eeca598144ce4 (diff)
downloadCMake-3166547cf6d62217d3142a18e3aae3fc84e49b24.zip
CMake-3166547cf6d62217d3142a18e3aae3fc84e49b24.tar.gz
CMake-3166547cf6d62217d3142a18e3aae3fc84e49b24.tar.bz2
ASM_MARMASM: Add support for Microsoft ARM assembler language
https://learn.microsoft.com/en-us/cpp/assembler/arm/arm-assembler-reference Fixes: #23999
Diffstat (limited to 'Tests')
-rw-r--r--Tests/CMakeLists.txt6
-rw-r--r--Tests/VSMARMASM/CMakeLists.txt3
-rw-r--r--Tests/VSMARMASM/foo.asm10
-rw-r--r--Tests/VSMARMASM/main.c5
4 files changed, 24 insertions, 0 deletions
diff --git a/Tests/CMakeLists.txt b/Tests/CMakeLists.txt
index 030f4f6..d4ef7ee 100644
--- a/Tests/CMakeLists.txt
+++ b/Tests/CMakeLists.txt
@@ -2161,6 +2161,12 @@ if(BUILD_TESTING)
list(APPEND TEST_BUILD_DIRS "${CMake_BINARY_DIR}/Tests/MFC")
endif()
+ if(MSVC AND NOT MSVC_VERSION LESS 1700
+ AND (CMAKE_C_COMPILER_ARCHITECTURE_ID STREQUAL "ARM64")
+ )
+ ADD_TEST_MACRO(VSMARMASM VSMARMASM)
+ endif()
+
if(MSVC AND NOT MSVC_VERSION LESS 1310
AND (NOT CMAKE_GENERATOR MATCHES "Visual Studio 9 "
OR CMAKE_SIZEOF_VOID_P EQUAL 4)
diff --git a/Tests/VSMARMASM/CMakeLists.txt b/Tests/VSMARMASM/CMakeLists.txt
new file mode 100644
index 0000000..eb1bfdb
--- /dev/null
+++ b/Tests/VSMARMASM/CMakeLists.txt
@@ -0,0 +1,3 @@
+cmake_minimum_required(VERSION 2.8.12)
+project(VSMARMASM C ASM_MARMASM)
+add_executable(VSMARMASM main.c foo.asm)
diff --git a/Tests/VSMARMASM/foo.asm b/Tests/VSMARMASM/foo.asm
new file mode 100644
index 0000000..e5b2775
--- /dev/null
+++ b/Tests/VSMARMASM/foo.asm
@@ -0,0 +1,10 @@
+ AREA |.text|, CODE
+
+ EXPORT foo
+
+foo PROC
+ mov w0, #0
+ ret
+ ENDP
+
+ END
diff --git a/Tests/VSMARMASM/main.c b/Tests/VSMARMASM/main.c
new file mode 100644
index 0000000..18ddb78
--- /dev/null
+++ b/Tests/VSMARMASM/main.c
@@ -0,0 +1,5 @@
+extern int foo(void);
+int main(void)
+{
+ return foo();
+}