[CMake] ENABLE_LANGUAGE(ASM_MASM) does not seem work correctly

Gareth Morgan gareth_morgan77 at hotmail.com
Fri Aug 14 17:22:14 EDT 2009


I'm trying to compile a ASM file using cmake 2.6 (patch 4).  I'm running visual studio 2008, under 64-bit Vista.  Neither Win32 or x64 build work.

I have a simple test app (attached), with a single CPP file and an asm file.  My cmakelists.txt looks like this (I have to include the .asm extension on the asm file or I will get a "cannot find source file" error):

ENABLE_LANGUAGE(ASM_MASM)
PROJECT(AsmTest)

ADD_EXECUTABLE(AsmTest asmtest AsmTestFunc.asm)

On a win32 VS2008 command prompt the cmake step completes correctly, as shown below, and the asm file is added to the project.  But the custom build step for the ASM file is completely empty, so the assembler is never run.
C:\testcode\asmtest\cmake_win32>cmake -G "Visual Studio 9 2008" ..
-- Found assembler: C:/Program Files (x86)/Microsoft Visual Studio 9.0/VC/bin/ml.exe
-- Loaded CMakeASM_MASMInformation - ASM_MASM support is still experimental, please report issues
-- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio 9.0/VC/bin/cl.exe
-- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio 9.0/VC/bin/cl.exe -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio 9.0/VC/bin/cl.exe
-- Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio 9.0/VC/bin/cl.exe -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
CMake Warning (dev) in CMakeLists.txt:
  No cmake_minimum_required command is present.  A line of code such as

    cmake_minimum_required(VERSION 2.6)

  should be added at the top of the file.  The version specified may be lower
  if you wish to support older CMake versions for this project.  For more
  information run "cmake --help-policy CMP0000".
This warning is for project developers.  Use -Wno-dev to suppress it.

-- Configuring done
-- Generating done
-- Build files have been written to: C:/testcode/asmtest/cmake_win32

On a x64 command prompt (using the compiler string -G "Visual Studio 9 2008 Win64"), the result is identical except the cmake command outputs the error message "Assembler not found" (I'm guessing it still looking for ML.EXE instead of ML64.exe ?).

Any ideas ?  If I want to circumvent the cmake ASM system entirely and use set up custom build myself (say associated with .s files), is there a tutorial on how to do this (using add_custom_command I assume ?)




_________________________________________________________________
Windows Live Messenger: Happy 10-Year Anniversary—get free winks and emoticons.
http://clk.atdmt.com/UKM/go/157562755/direct/01/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20090814/14fa1032/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: asmtest.cpp
Type: text/x-c++src
Size: 206 bytes
Desc: not available
URL: <http://www.cmake.org/pipermail/cmake/attachments/20090814/14fa1032/attachment.cpp>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: CMakeLists.txt
URL: <http://www.cmake.org/pipermail/cmake/attachments/20090814/14fa1032/attachment.txt>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: AsmTestFunc.asm
URL: <http://www.cmake.org/pipermail/cmake/attachments/20090814/14fa1032/attachment-0001.txt>


More information about the CMake mailing list