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")
|
list(APPEND TEST_BUILD_DIRS "${CMake_BINARY_DIR}/Tests/MFC")
|
||||||
endif()
|
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(${CMAKE_GENERATOR} MATCHES "Visual Studio")
|
||||||
if(NOT MSVC60)
|
if(NOT MSVC60)
|
||||||
ADD_TEST_MACRO(SBCS SBCS)
|
ADD_TEST_MACRO(SBCS SBCS)
|
||||||
|
|
|
@ -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)
|
|
@ -0,0 +1,7 @@
|
||||||
|
ifndef TESTx64
|
||||||
|
.386
|
||||||
|
.model flat, c
|
||||||
|
endif
|
||||||
|
.code
|
||||||
|
include <foo-proc.asm>
|
||||||
|
end
|
|
@ -0,0 +1,4 @@
|
||||||
|
foo proc public
|
||||||
|
mov eax,0
|
||||||
|
ret
|
||||||
|
foo endp
|
|
@ -0,0 +1,2 @@
|
||||||
|
extern int foo(void);
|
||||||
|
int main(void) { return foo(); }
|
Loading…
Reference in New Issue