[prev in list] [next in list] [prev in thread] [next in thread] 

List:       cmake
Subject:    [CMake] assembly on windows
From:       Tiago Macarios <tiagomacarios () gmail ! com>
Date:       2017-03-30 4:59:45
Message-ID: CAKLVFYFUCJ_wmH_TLcKXcNMX0m=kL2KhPG0H=nnaPu7K3gs4Lg () mail ! gmail ! com
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


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

[Attachment #5 (text/html)]

<div dir="ltr">Hi,<div><br></div><div>Is there a simple way to get a Visual Studio + \
assembly project on windows?</div><div><br></div><div>This seems to work on \
Linux:</div><div><br></div><div><div>cmake_minimum_required(VERSION \
3.7)</div><div>project(assembler C ASM)</div><div>set_source_files_properties(hello.s \
PROPERTIES COMPILE_FLAGS &quot;-x \
assembler-with-cpp&quot;)</div><div>add_executable(hello \
hello.s)</div></div><div><br></div><div>What would be the windows version of the \
above?</div><div><br></div><div>If I naively try the code above on Windows I get the \
following output:</div><div><br></div><div><div>-- Building for: Visual Studio 15 \
2017</div><div>-- The C compiler identification is MSVC 19.10.25017.0</div><div>-- \
The ASM compiler identification is MSVC</div><div>-- Found assembler: C:/Program \
Files (x86)/Microsoft Visual \
Studio/2017/Enterprise/VC/Tools/MSVC/14.10.25017/bin/HostX86/x86/cl.exe</div><div>-- \
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</div><div>-- \
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</div><div>-- Detecting C compiler ABI info</div><div>-- Detecting C compiler \
ABI info - done</div><div>-- Warning: Did not find file \
Compiler/MSVC-ASM</div><div>-- Configuring done</div><div>-- Generating \
done</div><div>-- Build files have been written to: \
C:/Users/Mac/test/cmake/build</div></div><div><br></div><div>and build \
fails</div><div><br></div><div>Thanks!</div><div>Mac</div></div>



-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: \
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more information \
on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at \
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake



[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic