MantisBT - CMake
View Issue Details
0010040CMakeCMakepublic2009-12-11 18:232011-04-04 12:00
sis 
David Cole 
normalmajoralways
closedduplicate 
CMake-2-8 
CMake 2.8.4CMake 2.8.3 
0010040: VS2010 generator does not handle project names containing periods ('.')
Problem: Define a CMAKE script describing a project named e.g. "aaa.bbb.ccc". In the generated VS2010 project, the part "bbb.ccc" is removed from the target name.

Cause: The behaviour is caused by code in the function "cmVisualStudio10TargetGenerator::WritePathAndIncrementalLinkOptions" in "cmVisualStudio10TargetGenerator.cxx" which generates the "TargetName" attribute of the VS2010 project file.

Possible fix: Replacing the single call to "GetFilenameWithoutExtension" with a call to "GetFilenameWithoutLastExtension" fixes the problem.
No tags attached.
duplicate of 0010611closed David Cole VS2010 generator doesn't handle executable names with periods. 
related to 0010639closed David Cole Generating Visual Studio 2010 targets with a dot in its name fails 
related to 0009163closed Brad King A way to set different output paths for MSVC Debug/Release configurations 
related to 0010276closed Bill Hoffman PREFIX "..\" hack does not work for VisualStudio 10.0 any more 
Issue History
2009-12-11 18:23sisNew Issue
2010-11-11 17:39Daniel BarberNote Added: 0023190
2010-11-19 10:08Daniel BarberNote Edited: 0023190bug_revision_view_page.php?bugnote_id=23190#r14
2010-12-14 17:11David ColeAssigned To => David Cole
2010-12-14 17:11David ColeStatusnew => assigned
2010-12-14 18:56David ColeRelationship addedrelated to 0010611
2010-12-14 18:56David ColeRelationship addedrelated to 0010639
2010-12-14 18:57David ColeNote Added: 0024120
2010-12-17 07:35David ColeTarget Version => CMake 2.8.4
2010-12-17 12:39Brad KingNote Added: 0024238
2010-12-17 12:40Brad KingRelationship addedrelated to 0009163
2010-12-17 12:49David ColeNote Added: 0024239
2010-12-17 12:52David ColeNote Added: 0024240
2010-12-17 12:52David ColeRelationship replacedduplicate of 0010611
2010-12-17 12:52David ColeStatusassigned => resolved
2010-12-17 12:52David ColeFixed in Version => CMake 2.8.3
2010-12-17 12:52David ColeResolutionopen => duplicate
2010-12-17 12:59David ColeRelationship addedrelated to 0010276
2011-04-04 12:00David ColeNote Added: 0026069
2011-04-04 12:00David ColeStatusresolved => closed

Notes
(0023190)
Daniel Barber   
2010-11-11 17:39   
(edited on: 2010-11-19 10:08)
My problem may be related to this in VS2010. The target name is not being set correctly when I try to add periods to make it a relative output name. For example:

set_target_properties(${t_name} PROPERTIES OUTPUT_NAME ../${t_name})

Will result in the name being just ${t_name}. I'm running version 2.8.3 on Windows 7. I need this to work so that the output files will be in the correct directory (not the Debug/Release folders VS creates). If I manually set the target name to ../${t_name} in VS2010 using the GUI it works, so I know this can be done. This works in 2008 and with UNIX Makefiles just fine.

(0024120)
David Cole   
2010-12-14 18:57   
Keeping this one open, because the note ( http://public.kitware.com/Bug/view.php?id=10040#c23190 [^] ) indicates a regression in behavior -- needs further investigation before closing as a duplicate report.
(0024238)
Brad King   
2010-12-17 12:39   
This was never supported for VS 2010 so it is not a regression.

CMake 2.8.2 introduced a real solution to the use case:

http://www.cmake.org/cmake/help/cmake-2-8-docs.html#prop_tgt:ARCHIVE_OUTPUT_DIRECTORY_CONFIG [^]
http://www.cmake.org/cmake/help/cmake-2-8-docs.html#prop_tgt:LIBRARY_OUTPUT_DIRECTORY_CONFIG [^]
http://www.cmake.org/cmake/help/cmake-2-8-docs.html#prop_tgt:RUNTIME_OUTPUT_DIRECTORY_CONFIG [^]
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=74c59a74 [^]
(0024239)
David Cole   
2010-12-17 12:49   
Daniel Barber, I'm going to mark this bug as resolved because the main issue reported here is already fixed in CMake 2.8.3. Please see Brad's note ( http://public.kitware.com/Bug/view.php?id=10040#c24238 [^] ) about how to use the new per-config output directory properties to achieve your goal in a different (but expected and supported by the CMake developers) way...

Thanks.
(0024240)
David Cole   
2010-12-17 12:52   
This was fixed when its duplicate was fixed ... in the CMake 2.8.3 release.
(0026069)
David Cole   
2011-04-04 12:00   
Closing resolved issues that have not been updated in more than 3 months.