MantisBT - CMake
View Issue Details
0013075CMakeCMakepublic2012-03-29 17:262016-06-10 14:31
Stephen Schiffli 
Bill Hoffman 
highmajoralways
closedmoved 
WindowsWindows 7
CMake 2.8.7 
 
0013075: AddCustomCommandToCreateObject receives linker language instead of source language
Hi, Assume you have 2 languages AA and BB

SET(CMAKE_AA_COMPILE_OBJECT "${AA} -o \"<OBJECT>\" \"<SOURCE>\"")
SET(CMAKE_AA_LINK_EXECUTABLE "${AA_LINK} \"<OBJECTS>\" -o \"<TARGET>\"")

SET(CMAKE_BB_COMPILE_OBJECT "${BB} <FLAGS> -o \"<OBJECT>\" \"<SOURCE>\"")
SET(CMAKE_BB_LINK_EXECUTABLE "${BB_LINK} \"<OBJECTS>\" -o \"<TARGET>\"")

set_source_files_properties(file.aa PROPERTIES LANGUAGE AA)
set_source_files_properties(file.bb PROPERTIES LANGUAGE BB)

add_executable(demo
    file.aa
    file.bb
    )
set_target_properties(demo PROPERTIES LINKER_LANGUAGE AA)

It will now try to compile file.bb with the AA compiler.

I'm generating to Visual Studio 2010

When cmLocalGenerator::AddBuildTargetRule calls this->AddCustomCommandToCreateObject it passes it llang (linker language) for the second parameter. In AddCustomCommandToCreateObject its expecting the lang argument to be the compiler language.
No tags attached.
duplicate of 0002086closed Bill Hoffman Visual stuido sends c++ flags to c code 
related to 0013076closed Bill Hoffman Slashes are removed from include path when using visual studio 2010 generator 
Issue History
2012-03-29 17:26Stephen SchiffliNew Issue
2012-03-30 09:56Brad KingAssigned To => Bill Hoffman
2012-03-30 09:56Brad KingStatusnew => backlog
2012-03-30 09:57Brad KingRelationship addedrelated to 0013076
2015-02-26 03:39Stephen KellyRelationship addedduplicate of 0002086
2016-06-10 14:28Kitware RobotNote Added: 0042014
2016-06-10 14:28Kitware RobotStatusbacklog => resolved
2016-06-10 14:28Kitware RobotResolutionopen => moved
2016-06-10 14:31Kitware RobotStatusresolved => closed

Notes
(0042014)
Kitware Robot   
2016-06-10 14:28   
Resolving issue as `moved`.

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.