diff options
author | Brad King <brad.king@kitware.com> | 2014-08-22 14:37:55 (GMT) |
---|---|---|
committer | CMake Topic Stage <kwrobot@kitware.com> | 2014-08-22 14:37:55 (GMT) |
commit | 8c30014982345567b80ec0dad6bd9eb40dfda505 (patch) | |
tree | eb404629813faddbcafa301d87d10151a94e03cc /Tests | |
parent | b4d3e7a7b0b4b9bdff55249633d902a35f26c02a (diff) | |
parent | cbd1d42b34bf83ca24de1b98c5963a2941206300 (diff) | |
download | CMake-8c30014982345567b80ec0dad6bd9eb40dfda505.zip CMake-8c30014982345567b80ec0dad6bd9eb40dfda505.tar.gz CMake-8c30014982345567b80ec0dad6bd9eb40dfda505.tar.bz2 |
Merge topic 'vs-masm'
cbd1d42b Help: Add notes for topic 'vs-masm'
0f8522a6 VS: Add MASM support to VS 8 and 9 (#8170, #14984)
a43f4400 VS: Move internal MasmEnabled member up to VS 7 generator
df3b007d VS: Add test for MASM support
e8727449 VS: Populate MASM tool build settings in .vcxproj files
0271a5f9 VS: Manually fix MASM flag table entries
1d662e48 VS: Generate MASM flag tables from MSBuild tool files
4f6940df VS: Fix ASM_MASM support in VS >= 10
d7866c52 ASM_MASM: Fix selection of ml64
0374abdb ASM_MASM: Add preprocessor definitions to compile lines
5b0a46e1 ASM_MASM: Do not require compiler to be a full path
802dbe52 cmLocalVisualStudio7Generator: Rename local 'lang' var
Diffstat (limited to 'Tests')
-rw-r--r-- | Tests/CMakeLists.txt | 8 | ||||
-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 |
5 files changed, 31 insertions, 0 deletions
diff --git a/Tests/CMakeLists.txt b/Tests/CMakeLists.txt index 89debc5..f51a934 100644 --- a/Tests/CMakeLists.txt +++ b/Tests/CMakeLists.txt @@ -1679,6 +1679,14 @@ ${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 [67]( |$)" + AND (NOT CMAKE_GENERATOR MATCHES "Visual Studio [89]( |$)" + OR CMAKE_SIZEOF_VOID_P EQUAL 4) + ) + ADD_TEST_MACRO(VSMASM VSMASM) + endif() + if(${CMAKE_GENERATOR} MATCHES "Visual Studio") if(NOT MSVC60) ADD_TEST_MACRO(SBCS SBCS) diff --git a/Tests/VSMASM/CMakeLists.txt b/Tests/VSMASM/CMakeLists.txt new file mode 100644 index 0000000..f2570a3 --- /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 0000000..51cb969 --- /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 0000000..e8ba5dc --- /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 0000000..570ba16 --- /dev/null +++ b/Tests/VSMASM/main.c @@ -0,0 +1,2 @@ +extern int foo(void); +int main(void) { return foo(); } |