MantisBT - CMake
View Issue Details
0013076CMakeCMakepublic2012-03-29 17:382016-06-10 14:31
Stephen Schiffli 
Bill Hoffman 
normalmajoralways
closedmoved 
WindowsWindows 7
CMake 2.8.7 
 
0013076: Slashes are removed from include path when using visual studio 2010 generator
I am using find_program to locate a cross compiler

find_program(AA NAMES aa DOC "my custom compiler")

SET(CMAKE_AA_COMPILE_OBJECT "${AA} <FLAGS> -o \"<OBJECT>\" \"<SOURCE>\"")

set_source_files_properties(file.aa PROPERTIES LANGUAGE AA)

add_executable(demo
    file.aa
    )

The generated command looks something like:
C:\compiler\bin\aa.exe -s -other-flag -IC:contentinclude -o file.o file.aa

It should be:
C:\compiler\bin\aa.exe -s -other-flag -IC:\content\include -o file.o file.aa


The function cmSystemTools::ParseArguments only check the beginning of the command string to determine if its windows or not. In my case it says its not windows because the path generated by find_program(AA ...) puts in backslashes and its at the front of the command string. But the include_directories(${CMAKE_CURRENT_SOURCE_DIR}/include) call puts in forward slashes in the include path, which are later ignored further down in the ParseArguments function.
No tags attached.
related to 0013075closed Bill Hoffman AddCustomCommandToCreateObject receives linker language instead of source language 
Issue History
2012-03-29 17:38Stephen SchiffliNew Issue
2012-03-30 09:57Brad KingAssigned To => Bill Hoffman
2012-03-30 09:57Brad KingStatusnew => backlog
2012-03-30 09:57Brad KingRelationship addedrelated to 0013075
2016-06-10 14:28Kitware RobotNote Added: 0042015
2016-06-10 14:28Kitware RobotStatusbacklog => resolved
2016-06-10 14:28Kitware RobotResolutionopen => moved
2016-06-10 14:31Kitware RobotStatusresolved => closed

Notes
(0042015)
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.