MantisBT - CMake
View Issue Details
0016030CMakeCMakepublic2016-03-22 12:102016-06-10 14:21
Gregor Jasny 
Gregor Jasny 
normalminoralways
closedfixed 
CMake 3.4 
CMake 3.5.2CMake 3.5.2 
0016030: CMAKE_ASM_NASM_COMPILE_OBJECT lacks <INCLUDES>
Starting with CMake 3.4 the ASM_NASM language does not pass forward include_directories(XYZ) to the nasm compiler line.

output of the test case:
-- <CMAKE_ASM_NASM_COMPILER> <FLAGS> -f elf64 -o <OBJECT> <SOURCE>
[ 66%] Building ASM_NASM object CMakeFiles/vpxCodec.dir/foo.asm.o
/usr/bin/yasm   -f elf64 -o CMakeFiles/vpxCodec.dir/foo.asm.o /uhome/gjasny/src/cmake-yasm-bug/foo.asm




As far as I can see <INCLUDES> is missing for other assemblers as well.
cmake_minimum_required(VERSION 3.3 FATAL_ERROR)

project(Foo)

find_program(COLYASM_EXECUTABLE NAMES yasm)
set(CMAKE_ASM_NASM_COMPILER ${COLYASM_EXECUTABLE})
enable_language(ASM_NASM)

include_directories(build/x86_64-linux-gcc)

add_library(vpxCodec STATIC bar.cpp foo.asm)

message(STATUS "${CMAKE_ASM_NASM_COMPILE_OBJECT}")
No tags attached.
Issue History
2016-03-22 12:10Gregor JasnyNew Issue
2016-03-25 18:15Gregor JasnyAssigned To => Gregor Jasny
2016-03-25 18:15Gregor JasnyStatusnew => assigned
2016-03-31 12:51Gregor JasnyNote Added: 0040778
2016-03-31 12:52Gregor JasnyNote Added: 0040779
2016-03-31 13:23Brad KingNote Added: 0040782
2016-03-31 13:26Brad KingStatusassigned => resolved
2016-03-31 13:26Brad KingResolutionopen => fixed
2016-03-31 13:26Brad KingFixed in Version => CMake 3.5.2
2016-03-31 13:26Brad KingTarget Version => CMake 3.5.2
2016-06-10 14:21Kitware RobotNote Added: 0041207
2016-06-10 14:21Kitware RobotStatusresolved => closed

Notes
(0040778)
Gregor Jasny   
2016-03-31 12:51   
topic asm-includes got merged into master with 90f24f016e93d18f6a244b39fd21c68355bdbe48
(0040779)
Gregor Jasny   
2016-03-31 12:52   
Brad, this is a regression introduced with 3.4. Could you please merge into release?
(0040782)
Brad King   
2016-03-31 13:23   
I've backported the commit as:

 ASM: Add missing <INCLUDES> placeholder for "compile" rules
 https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=677c091b [^]

and queued it for merge to 'release' for 3.5.2.
(0041207)
Kitware Robot   
2016-06-10 14:21   
This issue tracker is no longer used. Further discussion of this issue may take place in the current CMake Issues page linked in the banner at the top of this page.