[CMake] assembly on windows

Tiago Macarios tiagomacarios at gmail.com
Thu Mar 30 00:59:45 EDT 2017


Hi,

Is there a simple way to get a Visual Studio + assembly project on windows?

This seems to work on Linux:

cmake_minimum_required(VERSION 3.7)
project(assembler C ASM)
set_source_files_properties(hello.s PROPERTIES COMPILE_FLAGS "-x
assembler-with-cpp")
add_executable(hello hello.s)

What would be the windows version of the above?

If I naively try the code above on Windows I get the following output:

-- Building for: Visual Studio 15 2017
-- The C compiler identification is MSVC 19.10.25017.0
-- The ASM compiler identification is MSVC
-- Found assembler: C:/Program Files (x86)/Microsoft Visual
Studio/2017/Enterprise/VC/Tools/MSVC/14.10.25017/bin/HostX86/x86/cl.exe
-- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual
Studio/2017/Enterprise/VC/Tools/MSVC/14.10.25017/bin/HostX86/x86/cl.exe
-- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual
Studio/2017/Enterprise/VC/Tools/MSVC/14.10.25017/bin/HostX86/x86/cl.exe --
works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Warning: Did not find file Compiler/MSVC-ASM
-- Configuring done
-- Generating done
-- Build files have been written to: C:/Users/Mac/test/cmake/build

and build fails

Thanks!
Mac
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/cmake/attachments/20170329/d17365ee/attachment.html>


More information about the CMake mailing list