[cmake-developers] [CMake 0013075]: AddCustomCommandToCreateObject receives linker language instead of source language

Mantis Bug Tracker mantis at public.kitware.com
Thu Mar 29 17:26:50 EDT 2012


The following issue has been SUBMITTED. 
====================================================================== 
http://public.kitware.com/Bug/view.php?id=13075 
====================================================================== 
Reported By:                Stephen Schiffli
Assigned To:                
====================================================================== 
Project:                    CMake
Issue ID:                   13075
Category:                   CMake
Reproducibility:            always
Severity:                   major
Priority:                   high
Status:                     new
====================================================================== 
Date Submitted:             2012-03-29 23:26 WAST
Last Modified:              2012-03-29 23:26 WAST
====================================================================== 
Summary:                    AddCustomCommandToCreateObject receives linker
language instead of source language
Description: 
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.

Additional Information: 
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.
====================================================================== 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2012-03-29 23:26 Stephen SchiffliNew Issue                                    
======================================================================




More information about the cmake-developers mailing list