Add an option to disable MASM
authorMichel Zou <xantares09@hotmail.com>
Thu, 22 Oct 2020 21:29:35 +0000 (23:29 +0200)
committerLenny Komow <lenny@lunarg.com>
Fri, 30 Oct 2020 17:38:59 +0000 (11:38 -0600)
MASM generally goes with msvc, but it is not necessarily available with MinGW.

BUILD.md
loader/CMakeLists.txt

index 8ccf7907ab703d19ab1b606df3eba84d8a8dd4d2..098ce88c03eb9fe3fad8598732ecb577a9e02e7b 100644 (file)
--- a/BUILD.md
+++ b/BUILD.md
@@ -174,6 +174,7 @@ on/off options currently supported by this repository:
 | BUILD_WSI_DIRECTFB_SUPPORT | Linux | `OFF` | Build the loader with the DirectFB entry points enabled. Without this, the DirectFB headers should not be needed, but the extension `VK_EXT_directfb_surface` won't be available. |
 | ENABLE_WIN10_ONECORE | Windows | `OFF` | Link the loader to the [OneCore](https://msdn.microsoft.com/en-us/library/windows/desktop/mt654039.aspx) umbrella library, instead of the standard Win32 ones. |
 | USE_CCACHE | Linux | `OFF` | Enable caching with the CCache program. |
+| USE_MASM | Windows | `ON` | Controls whether to build assembly files with MS assembler, else fallback to C code |
 | BUILD_STATIC_LOADER | macOS | `OFF` | This allows the loader to be built as a static library on macOS. Not tested, use at your own risk. |
 
 The following is a table of all string options currently supported by this repository:
index d86e25b2661fa390cdd6739e8d3b8ff1788f6a7c..6983c93c295adba300b62473e20253da996c1379 100644 (file)
@@ -147,7 +147,10 @@ if(WIN32)
             endif()
         endif()
     endif()
-    enable_language(ASM_MASM)
+    option(USE_MASM "Use MASM" ON)
+    if (USE_MASM)
+      enable_language(ASM_MASM)
+    endif ()
     if(CMAKE_ASM_MASM_COMPILER_WORKS OR JWASM_FOUND)
         if(MINGW)
             set(CMAKE_ASM_MASM_FLAGS ${CMAKE_ASM_MASM_FLAGS} ${JWASM_FLAGS})