[CMake] Error because of MSVC_RUNTIME_LIBRARY value

Денис Смирнов smirnov.d.p.1997 at gmail.com
Fri Oct 11 09:06:15 EDT 2019


*Here is my root CMakeLists.txt file:*
cmake_minimum_required(VERSION 3.15)

cmake_policy(SET CMP0091 NEW)
project(test_masm)

set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>")

add_subdirectory(src)

*Here is the src/CMakeLists.txt file:*
enable_language(ASM_MASM)
add_executable(test_executable main.asm)

*src/main.asm is empty.*

After run cmake.exe I get error "*MSVC_RUNTIME_LIBRARY value
'MultiThreadedDebug' not known for this ASM_MASM compiler*".

*Here is the full listing:*
cmake.exe -G "Visual Studio 16 2019" -A x64 ..
-- The C compiler identification is MSVC 19.22.27905.0
-- The CXX compiler identification is MSVC 19.22.27905.0
-- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual
Studio/2019/Community/VC/Tools/MSVC/14.22.27905/bin/Hostx64/x64/cl.exe
-- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual
Studio/2019/Community/VC/Tools/MSVC/14.22.27905/bin/Hostx64/x64/cl.exe --
works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual
Studio/2019/Community/VC/Tools/MSVC/14.22.27905/bin/Hostx64/x64/cl.exe
-- Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual
Studio/2019/Community/VC/Tools/MSVC/14.22.27905/bin/Hostx64/x64/cl.exe --
works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- The ASM_MASM compiler identification is MSVC
-- Found assembler: C:/Program Files (x86)/Microsoft Visual
Studio/2019/Community/VC/Tools/MSVC/14.22.27905/bin/Hostx64/x64/ml64.exe
-- Configuring done
CMake Error in src/CMakeLists.txt:
  MSVC_RUNTIME_LIBRARY value 'MultiThreadedDebug' not known for this
ASM_MASM
  compiler.
-- Generating done
CMake Generate step failed.  Build files cannot be regenerated correctly.

Can someone please tell me if I am doing something wrong or it's a bug?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://cmake.org/pipermail/cmake/attachments/20191011/3a6534cc/attachment.html>


More information about the CMake mailing list