diff options
Diffstat (limited to 'Tests/VSMASM')
-rw-r--r-- | Tests/VSMASM/CMakeLists.txt | 10 | ||||
-rw-r--r-- | Tests/VSMASM/foo.asm | 7 | ||||
-rw-r--r-- | Tests/VSMASM/include/foo-proc.asm | 4 | ||||
-rw-r--r-- | Tests/VSMASM/main.c | 2 |
4 files changed, 23 insertions, 0 deletions
diff --git a/Tests/VSMASM/CMakeLists.txt b/Tests/VSMASM/CMakeLists.txt new file mode 100644 index 0000000000..f2570a3091 --- /dev/null +++ b/Tests/VSMASM/CMakeLists.txt @@ -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) diff --git a/Tests/VSMASM/foo.asm b/Tests/VSMASM/foo.asm new file mode 100644 index 0000000000..51cb969314 --- /dev/null +++ b/Tests/VSMASM/foo.asm @@ -0,0 +1,7 @@ +ifndef TESTx64 +.386 +.model flat, c +endif +.code +include <foo-proc.asm> +end diff --git a/Tests/VSMASM/include/foo-proc.asm b/Tests/VSMASM/include/foo-proc.asm new file mode 100644 index 0000000000..e8ba5dcb44 --- /dev/null +++ b/Tests/VSMASM/include/foo-proc.asm @@ -0,0 +1,4 @@ +foo proc public + mov eax,0 + ret +foo endp diff --git a/Tests/VSMASM/main.c b/Tests/VSMASM/main.c new file mode 100644 index 0000000000..570ba161b3 --- /dev/null +++ b/Tests/VSMASM/main.c @@ -0,0 +1,2 @@ +extern int foo(void); +int main(void) { return foo(); } |