[cmake-developers] [CMake 0013076]: Slashes are removed from include path when using visual studio 2010 generator
Mantis Bug Tracker
mantis at public.kitware.com
Thu Mar 29 17:38:25 EDT 2012
The following issue has been SUBMITTED.
======================================================================
http://public.kitware.com/Bug/view.php?id=13076
======================================================================
Reported By: Stephen Schiffli
Assigned To:
======================================================================
Project: CMake
Issue ID: 13076
Category: CMake
Reproducibility: always
Severity: major
Priority: normal
Status: new
======================================================================
Date Submitted: 2012-03-29 23:38 WAST
Last Modified: 2012-03-29 23:38 WAST
======================================================================
Summary: Slashes are removed from include path when using
visual studio 2010 generator
Description:
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
Additional Information:
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.
======================================================================
Issue History
Date Modified Username Field Change
======================================================================
2012-03-29 23:38 Stephen SchiffliNew Issue
======================================================================
More information about the cmake-developers
mailing list