MantisBT - CMake
View Issue Details
0011464CMakeCMakepublic2010-11-16 04:132011-01-21 03:29
tyz 
Alex Neundorf 
normalminoralways
closedduplicate 
Windows 764 bit
CMake 2.8.3 
CMake 2.8.4CMake 2.8.4 
0011464: Cannot build asm file on msvs2010
The following code produce an error

-----------------------------
CMakeLists.txt:

project( backtrace ASM )
cmake_minimum_required( VERSION 2.8 )

set( backtrace_SOURCE backtrace_win64.asm )
add_library( backtrace STATIC ${backtrace_SOURCE} )

-----------------------------
CMake GUI output:

CMake Error at C:/Program Files (x86)/CMake 2.8/share/cmake-2.8/Modules/CMakeDetermineASMCompiler.cmake:68 (CMAKE_DETERMINE_COMPILER_ID_VENDOR):
  Unknown CMake command "CMAKE_DETERMINE_COMPILER_ID_VENDOR".
Call Stack (most recent call first):
  CMakeLists.txt:1 (project)

CMake Error: Could not find cmake module file:[project path]/build/CMakeFiles/CMakeASMCompiler.cmake
Configuring incomplete, errors occurred!
No tags attached.
related to 0011536closed Patrick R. Gansterer Can't use assembler files with Visual Studio 10 generator 
Issue History
2010-11-16 04:13tyzNew Issue
2010-11-16 08:53Bill HoffmanNote Added: 0023283
2010-12-03 05:57Joke de BuhrNote Added: 0023689
2010-12-15 12:22David ColeRelationship addedrelated to 0011536
2011-01-12 04:27Emmanuel BlotNote Added: 0024610
2011-01-17 14:22David ColeAssigned To => Alex Neundorf
2011-01-17 14:22David ColeStatusnew => assigned
2011-01-19 18:20RolandSchulzNote Added: 0024946
2011-01-20 13:42Alex NeundorfNote Added: 0024962
2011-01-20 13:42Alex NeundorfStatusassigned => closed
2011-01-20 13:42Alex NeundorfResolutionopen => duplicate
2011-01-20 13:42Alex NeundorfFixed in Version => CMake 2.8.4
2011-01-20 13:42Alex NeundorfTarget Version => CMake 2.8.4

Notes
(0023283)
Bill Hoffman   
2010-11-16 08:53   
I am pretty sure the asm stuff is only working for makefiles. Alex?
(0023689)
Joke de Buhr   
2010-12-03 05:57   
Same problem using linux and nasm as described in [1].

[1] http://www.cmake.org/Wiki/CMake/Assembler [^]
(0024610)
Emmanuel Blot   
2011-01-12 04:27   
Looks like I have a similar issue:

 ENABLE_LANGUAGE (ASM-ATT OPTIONAL)
Triggers the following error, starting at CMake 2.8.3 (worked well up to 2.8.2):

CMake Error at
cmake/Modules/CMakeDetermineASMCompiler.cmake:68
(CMAKE_DETERMINE_COMPILER_ID_VENDOR):
 Unknown CMake command "CMAKE_DETERMINE_COMPILER_ID_VENDOR".
Call Stack (most recent call first):
 cmake/Modules/CMakeDetermineASM-ATTCompiler.cmake:19 (INCLUDE)
 CMakeLists.txt:100 (ENABLE_LANGUAGE)

CMake Error: Error required internal CMake variable not set, cmake may
be not be built correctly.
Missing variable is:
CMAKE_ASM-ATT_COMPILER_ENV_VAR
CMake Error: Could not find cmake module
file:CMakeFiles/CMakeASM-ATTCompiler.cmake
-- Configuring incomplete, errors occurred!
Compilation failed

It seems that adding the following patch fixes the issue:

Index: CMakeDetermineASMCompiler.cmake
===================================================================
--- a/CMakeDetermineASMCompiler.cmake 2010-12-07 23:49:13.000000000 +0100
+++ b/CMakeDetermineASMCompiler.cmake 2010-12-07 23:49:03.000000000 +0100
@@ -65,6 +65,7 @@
  SET(CMAKE_ASM${ASM_DIALECT}_COMPILER_ID_VENDOR_FLAGS_GNU "--version")
  SET(CMAKE_ASM${ASM_DIALECT}_COMPILER_ID_VENDOR_REGEX_GNU "GNU assembler")

+ INCLUDE(${CMAKE_ROOT}/Modules/CMakeDetermineCompilerId.cmake)
  CMAKE_DETERMINE_COMPILER_ID_VENDOR(ASM${ASM_DIALECT})

  IF(CMAKE_ASM${ASM_DIALECT}_COMPILER_ID)
(0024946)
RolandSchulz   
2011-01-19 18:20   
I had the same error under Linux and the patch fixed the problem for me too.
(0024962)
Alex Neundorf   
2011-01-20 13:42   
So this seems to be a duplicate of 0011467, which I fixed already for cmake 2.8.4.

http://cmake.org/gitweb?p=stage/cmake.git;a=commitdiff;h=e3dfbf62fcd54f582057fcec7a7989ac73712e55 [^]

Alex