mirror of
https://github.com/reactos/CMake.git
synced 2024-11-24 12:09:48 +00:00
VS: Add test for MASM support
It is now expected to work with VS >= 10 and MSVC >= 13.1.
This commit is contained in:
parent
e872744990
commit
df3b007d7f
@ -1679,6 +1679,11 @@ ${CMake_BINARY_DIR}/bin/cmake -DDIR=dev -P ${CMake_SOURCE_DIR}/Utilities/Release
|
||||
list(APPEND TEST_BUILD_DIRS "${CMake_BINARY_DIR}/Tests/MFC")
|
||||
endif()
|
||||
|
||||
if(MSVC AND NOT MSVC_VERSION LESS 1310
|
||||
AND NOT CMAKE_GENERATOR MATCHES "Visual Studio [6789]( |$)")
|
||||
ADD_TEST_MACRO(VSMASM VSMASM)
|
||||
endif()
|
||||
|
||||
if(${CMAKE_GENERATOR} MATCHES "Visual Studio")
|
||||
if(NOT MSVC60)
|
||||
ADD_TEST_MACRO(SBCS SBCS)
|
||||
|
10
Tests/VSMASM/CMakeLists.txt
Normal file
10
Tests/VSMASM/CMakeLists.txt
Normal file
@ -0,0 +1,10 @@
|
||||
cmake_minimum_required(VERSION 2.8.12)
|
||||
project(VSMASM C ASM_MASM)
|
||||
if(CMAKE_SIZEOF_VOID_P EQUAL 8)
|
||||
add_definitions(-DTESTx64)
|
||||
else()
|
||||
add_definitions(-DTESTi386)
|
||||
set(CMAKE_ASM_MASM_FLAGS "${CMAKE_ASM_MASM_FLAGS} /safeseh")
|
||||
endif()
|
||||
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/include)
|
||||
add_executable(VSMASM main.c foo.asm)
|
7
Tests/VSMASM/foo.asm
Normal file
7
Tests/VSMASM/foo.asm
Normal file
@ -0,0 +1,7 @@
|
||||
ifndef TESTx64
|
||||
.386
|
||||
.model flat, c
|
||||
endif
|
||||
.code
|
||||
include <foo-proc.asm>
|
||||
end
|
4
Tests/VSMASM/include/foo-proc.asm
Normal file
4
Tests/VSMASM/include/foo-proc.asm
Normal file
@ -0,0 +1,4 @@
|
||||
foo proc public
|
||||
mov eax,0
|
||||
ret
|
||||
foo endp
|
2
Tests/VSMASM/main.c
Normal file
2
Tests/VSMASM/main.c
Normal file
@ -0,0 +1,2 @@
|
||||
extern int foo(void);
|
||||
int main(void) { return foo(); }
|
Loading…
Reference in New Issue
Block a user