MantisBT - CMake
View Issue Details
0013406CMakeCMakepublic2012-07-16 03:502016-06-10 14:31
Magne Sjaastad 
Kitware Robot 
normalminoralways
closedmoved 
WindowsWindows7
 
 
0013406: Absolute path when generating VS 2010 project files does not work
NOTE: This bugreport applies to version 2.8.9-rc1

When generating VS 2010 project files a relative path is used.

Version 2.8.8 works as expected
No tags attached.
related to 0012570closed Brad King VS10 property pages for single source file gone 
Issue History
2012-07-16 03:50Magne SjaastadNew Issue
2012-07-16 09:06Brad KingRelationship addedrelated to 0012570
2012-07-16 09:07Brad KingNote Added: 0030050
2012-07-16 09:11Magne SjaastadNote Added: 0030051
2012-07-16 09:14Brad KingNote Added: 0030052
2012-07-16 09:30Magne SjaastadNote Added: 0030054
2012-07-16 09:44Brad KingNote Added: 0030055
2012-07-16 10:04Magne SjaastadNote Added: 0030056
2012-07-16 10:39Brad KingNote Added: 0030057
2012-07-16 10:39Brad KingSeveritymajor => minor
2012-07-16 10:39Brad KingStatusnew => backlog
2016-06-10 14:28Kitware RobotNote Added: 0042089
2016-06-10 14:28Kitware RobotStatusbacklog => resolved
2016-06-10 14:28Kitware RobotResolutionopen => moved
2016-06-10 14:28Kitware RobotAssigned To => Kitware Robot
2016-06-10 14:31Kitware RobotStatusresolved => closed

Notes
(0030050)
Brad King   
2012-07-16 09:07   
I don't understand the description. You say that absolute paths do not work but that relative paths are generated. What is "expected"?

See issue 0012570.
(0030051)
Magne Sjaastad   
2012-07-16 09:11   
When executing CMake the following is produced by 2.8.9-rc1
<ClCompile Include="..\..\..\pfRoot\myFolder"

2.8.8 produces the expected result which is
<ClCompile Include="c:\pfRoot\myFolder"
(0030052)
Brad King   
2012-07-16 09:14   
Re 0013406:0030051: As discussed in 0007259:0012570 VS 10 does not display the property pages when absolute paths are used. We intentionally changed it to relative paths whenever possible to avoid this bug in VS. See commit

 http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=d931ce9f [^]

What do you mean by "does not work" with respect to relative paths? That they are not absolute paths? Does the build fail?
(0030054)
Magne Sjaastad   
2012-07-16 09:30   
We are using a source controlled VS project file (myProjectEdit.vcxproj) for editing our source code (this file is located in the same folder as the source code). CMake is launched from 'Configuration Properties->NMake->Build Command Line' with content 'msbuild C:\cmakebuild\myProject\myProject.sln'. The CMake-generated project is created correctly and builds correctly. If a compilation error occurs, this CMake-generated project navigates to the correct source code file.

When launched from our editing project, the relative path in the CMake-generated project will not match the structure of the source code on disk. The editing project fails to locate the source file containing the compilation error.
(0030055)
Brad King   
2012-07-16 09:44   
The path is relative to the location of the .vcxproj file, and VS interprets it correctly when loading the project. Clicking on error messages in the VS output window works as expected.

What is your "editing project"?
(0030056)
Magne Sjaastad   
2012-07-16 10:04   
Our editing project is a separate VS project file manually maintained and has nothing to do with the CMake generated VS project file. This project file has source control bindings (which is not possible in a CMake generated project file)

The only link between the two projects is through 'Configuration Properties->NMake->Build Command Line'
(0030057)
Brad King   
2012-07-16 10:39   
IMO this is not an officially supported use case. Our documentation does not promise anything about the structure or paths in generated build systems. The generated build files work as intended.

Issue 0012570 means we cannot generate absolute paths by default. I suppose it could be made an option, like CMAKE_VS_USE_ABSOLUTE_PATHS. Moving to backlog awaiting a contributor with time to implement and set up testing for such an option.
(0042089)
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.