MantisBT - CMake |
View Issue Details |
|
ID | Project | Category | View Status | Date Submitted | Last Update |
0009042 | CMake | CMakeSetup | public | 2009-05-17 18:15 | 2010-12-14 18:49 |
|
Reporter | Guy Volckaert | |
Assigned To | David Cole | |
Priority | normal | Severity | minor | Reproducibility | always |
Status | closed | Resolution | fixed | |
Platform | | OS | | OS Version | |
Product Version | CMake-2-6 | |
Target Version | | Fixed in Version | | |
|
Summary | 0009042: Relative Path for VC++ 8.0*.pdb file |
Description | Hi all,
I noticed that eventhough the CMAKE_USE_RELATIVE_PATH is set to ON, the Program Database File name (*.pdb) in the *.vcproj still uses an absolute path.
However, all other paths in the *.vcproj seem to use relative paths.
Regards, |
Steps To Reproduce | |
Additional Information | |
Tags | No tags attached. |
Relationships | related to | 0011899 | closed | Brad King | Put compiler's program database files into intermediate directory rather than output one for VS 2005 | related to | 0010370 | closed | Kitware Robot | CMAKE_USE_RELATIVE_PATHS doesn't apply to ProgramDataBaseFileName in .vcproj files |
|
Attached Files | pdb_relativepath.patch (1,587) 2009-12-19 19:02 https://public.kitware.com/Bug/file/2734/pdb_relativepath.patch cmLocalVisualStudio7Generator.cxx (70,325) 2009-12-19 19:02 https://public.kitware.com/Bug/file/2735/cmLocalVisualStudio7Generator.cxx cmake.zip (1,036,001) 2009-12-19 19:14 https://public.kitware.com/Bug/file/2736/cmake.zip BulletPhysicsEffect.zip (1,395,635) 2009-12-23 11:51 https://public.kitware.com/Bug/file/2741/BulletPhysicsEffect.zip |
|
Issue History |
Date Modified | Username | Field | Change |
2009-05-17 18:15 | Guy Volckaert | New Issue | |
2009-09-14 12:45 | Bill Hoffman | Note Added: 0017438 | |
2009-09-14 12:45 | Bill Hoffman | Status | new => assigned |
2009-09-14 12:45 | Bill Hoffman | Assigned To | => Bill Hoffman |
2009-12-19 17:53 | erwincoumans | Note Added: 0018953 | |
2009-12-19 19:02 | erwincoumans | File Added: pdb_relativepath.patch | |
2009-12-19 19:02 | erwincoumans | File Added: cmLocalVisualStudio7Generator.cxx | |
2009-12-19 19:06 | erwincoumans | Note Added: 0018954 | |
2009-12-19 19:09 | erwincoumans | Note Added: 0018955 | |
2009-12-19 19:14 | erwincoumans | File Added: cmake.zip | |
2009-12-21 10:55 | Bill Hoffman | Assigned To | Bill Hoffman => |
2009-12-21 10:56 | Bill Hoffman | Assigned To | => David Cole |
2009-12-22 12:02 | David Cole | Note Added: 0018977 | |
2009-12-23 00:22 | erwincoumans | Note Added: 0018983 | |
2009-12-23 10:15 | Bill Hoffman | Note Added: 0018985 | |
2009-12-23 11:49 | erwincoumans | Note Added: 0018987 | |
2009-12-23 11:51 | erwincoumans | File Added: BulletPhysicsEffect.zip | |
2009-12-23 12:00 | erwincoumans | Note Edited: 0018987 | |
2009-12-23 12:01 | erwincoumans | Note Edited: 0018987 | |
2009-12-23 12:03 | erwincoumans | Note Edited: 0018987 | |
2009-12-23 12:05 | erwincoumans | Note Edited: 0018987 | |
2009-12-23 12:07 | erwincoumans | Note Edited: 0018987 | |
2009-12-23 12:09 | erwincoumans | Note Edited: 0018987 | |
2009-12-23 12:11 | erwincoumans | Note Edited: 0018987 | |
2009-12-23 12:21 | erwincoumans | Note Edited: 0018987 | |
2009-12-23 14:18 | David Cole | Note Added: 0018990 | |
2009-12-23 14:18 | David Cole | Status | assigned => resolved |
2009-12-23 14:18 | David Cole | Resolution | open => fixed |
2009-12-24 11:43 | David Cole | Status | resolved => feedback |
2009-12-24 11:43 | David Cole | Resolution | fixed => reopened |
2009-12-24 11:45 | David Cole | Note Added: 0018994 | |
2009-12-24 11:45 | David Cole | Status | feedback => resolved |
2009-12-24 11:45 | David Cole | Resolution | reopened => fixed |
2010-12-14 18:49 | David Cole | Note Added: 0024052 | |
2010-12-14 18:49 | David Cole | Status | resolved => closed |
2011-02-28 09:11 | Brad King | Relationship added | related to 0011899 |
2011-02-28 09:18 | Brad King | Relationship added | related to 0010370 |
Notes |
|
(0017438)
|
Bill Hoffman
|
2009-09-14 12:45
|
|
Relative path is not really supported any more... |
|
|
(0018953)
|
erwincoumans
|
2009-12-19 17:53
|
|
>> Relative path is not really supported any more...
Not supported anymore?
An important use case of cmake is for projects to ship auto-generated projectfiles that don't require cmake to be installed. (using CMAKE_SUPPRESS_REGENERATION and CMAKE_USE_RELATIVE_PATHS).
What is the issue of just fixing this .pdb bug ignoring this CMAKE_USE_RELATIVE_PATHS? |
|
|
(0018954)
|
erwincoumans
|
2009-12-19 19:06
|
|
Attached is a patch for relative pdb files when using CMAKE_USE_RELATIVE_PATHS
It seems to work fine, and visual studio builds the project fine, when moving the project directory (no custom build steps or other fancy stuff).
Can you please consider applying this patch?
Thanks a lot,
Erwin |
|
|
(0018955)
|
erwincoumans
|
2009-12-19 19:09
|
|
|
|
(0018977)
|
David Cole
|
2009-12-22 12:02
|
|
I would like to apply this patch, but I have a question first......
tmpname is declared/defined but never used. Is it supposed to be used as the "ProgramDataBaseFile" value?
Does everything still work as you expect it to if you use tmpname in place of the existing "ProgramDataBaseFile" value?
Are there really no other problems with generated Visual Studio files using CMAKE_SUPPRESS_REGENERATION and CMAKE_USE_RELATIVE_PATHS...? Common wisdom on the CMake mailing list would seem to indicate that it doesn't work as most people expect it to work -- perhaps in your case you avoid those issues by not having complexities in your project files?
Thanks,
David |
|
|
(0018983)
|
erwincoumans
|
2009-12-23 00:22
|
|
Please remove tmpname, I found out that ConvertToXMLOutputPathSingle already deals with the relative name.
>>Are there really no other problems with generated Visual Studio files using
>>CMAKE_SUPPRESS_REGENERATION and CMAKE_USE_RELATIVE_PATHS...?
>>Common wisdom on the CMake mailing list
I wonder if that is wisdom or plain reluctance :-)
There are no problem here, the generated projectfiles are portable. If I need more complex projectfiles that break portability, I might just fix them and submit a new patch, ok?
Hope you can apply the patch soon,
Thanks,
Erwin |
|
|
(0018985)
|
Bill Hoffman
|
2009-12-23 10:15
|
|
There are custom command sequences that will not work without cmake being installed on the target machine. If cmake -E commands are used in the project, it will not work as well. That is what the ZERO_TARGET does, it runs cmake, and sometimes it needs to for the build to even work. In addition if the project uses find_library, find_package, or other try compile type things, the system introspection would not always work on the other machine. Anyway, glad it works for you, but for a general CMake project it will never work because of the system discovery and build time use of cmake by many projects. |
|
|
(0018987)
|
erwincoumans
|
2009-12-23 11:49
(edited on: 2009-12-23 12:21) |
|
I understand the limitations and I can live with those restrictions.
I avoid all those issues in my Bullet Physics Library project and the Microsoft Visual Studio project files don't require system discovery, no build time use of cmake, no custom build steps, no system introspection, no 'install', and including all external dependencies the library needs. I'm doing the same for an Irrlicht and Ogre graphics project. I'll attach a Windows project with cmake pre-generated msvc projectfiles, so you can verify it all works (in msvc/9 folder). Attached BulletPhysicsEffects.zip is a small test project that is Windows only, not our regular Bullet library.
Luckily I focus on physics simulation and mainly use OpenGL, so I don't require advanced build steps. If I were to require Cg (which I don't), I would rather use the NVidia environment variables on Windows ($(CG_LIB_PATH) and $(CG_INC_PATH) on Windows, instead of FindCg for those pre-generated projectfiles.
Of course I still include the option for users to use cmake, and I ship with cross-platform CMakeList.txt files.
In particular for Windows and Mac OSX I want to ship project files that work out-of-the-box without requiring cmake to be installed, because that makes it easiest for most of the users/developers of my software (90% are Windows users using Microsoft Visual Studio). For the last 5 years I used jam+msvcgen for this, but I plan on switching to cmake for project generation. Note that our Bullet physics library ships with several build systems (autotools/cmake/jam/pre-generated msvc projectfiles).
In fact, Google developed a new build system (Gyp) primarily (but not exclusively) to have those features. Personally I prefer cmake over Gyp and premake, the only drawback of cmake is that projectfile templates are in C/C++ code, I rather would have them customizable.
Anyway, CMAKE_SUPPRESS_REGENERATION and CMAKE_USE_RELATIVE_PATH lets me do that, so with applied patch I'm happy.
|
|
|
(0018990)
|
David Cole
|
2009-12-23 14:18
|
|
Fixed in CVS HEAD of CMake.
cvs commit -m "Fix issue 0009042 - use relative path for pdb file name when CMAKE_USE_RELATIVE_PATHS is on."
/cvsroot/CMake/CMake/Source/cmLocalVisualStudio7Generator.cxx,v <-- cmLocalVisualStudio7Generator.cxx
new revision: 1.259; previous revision: 1.258 |
|
|
(0018994)
|
David Cole
|
2009-12-24 11:45
|
|
Really fixed this time in CVS HEAD of CMake. (Yesterday's commit caused several failing tests on the VS 7, 8 and 9 dashboards because it did not handle double-quoted path names dues to spaces in the name...)
cvs commit -m "Fix issue 0009042 - correctly this time. Fix failing tests on VS 7, 8 and 9 dashboards. Use ConvertToXMLOutputPathSingle instead of ConvertToOptionallyRelativeOutputPath to handle spaces in the path and double quoting properly. Related to commit trying to fix issue 0009042 from yesterday."
/cvsroot/CMake/CMake/Source/cmLocalVisualStudio7Generator.cxx,v <-- cmLocalVisualStudio7Generator.cxx
new revision: 1.260; previous revision: 1.259 |
|
|
(0024052)
|
David Cole
|
2010-12-14 18:49
|
|
Closing bugs that have been resolved for more than 3 months without any further updates. |
|