View Issue Details Jump to Notes ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0010611CMakeCMakepublic2010-04-25 22:082010-11-09 22:57
ReporterJarl Lindrud 
Assigned ToDavid Cole 
PrioritynormalSeveritymajorReproducibilityalways
StatusclosedResolutionfixed 
PlatformOSOS Version
Product VersionCMake-2-8 
Target VersionCMake 2.8.3Fixed in VersionCMake 2.8.3 
Summary0010611: VS2010 generator doesn't handle executable names with periods.
DescriptionThe following CMakeLists.txt file:

PROJECT(AAA)
ADD_LIBRARY(AAA.BBB.CCC SHARED File1.cpp)

, when built with VS2010, will produce the executable AAA.dll, rather than AAA.BBB.CCC.dll.

I'm using cmake 2.8.1. I've tried the VS2008 generator and it does not have this problem.
TagsNo tags attached.
Attached Files

 Relationships
has duplicate 0011207closedDavid Cole CMake 2.8 does not generate output target name properly for VS 2010 generator. 
has duplicate 0010639closedDavid Cole Generating Visual Studio 2010 targets with a dot in its name fails 
has duplicate 0010040closedDavid Cole VS2010 generator does not handle project names containing periods ('.') 

  Notes
(0020397)
Daniel Emminizer (reporter)
2010-04-26 06:38

I have experienced similar problems. The problem appears to be in cmVisualStudio10TargetGenerator.cxx. In cmVisualStudio10TargetGenerator::WritePathAndIncrementalLinkOptions(), the </TargetName> line should be changed to something like:

    *this->BuildFileStream << cmSystemTools::GetFilenameWithoutLastExtension(
      targetNameFull.c_str())
                           << "</TargetName>\n";


Additionally, the VS2010 generator is not saving the Project Name property either. This can be fixed by updating cmVisualStudio10TargetGenerator::Generate():

  (*this->BuildFileStream) << this->Platform << "</Platform>\n";
  // Begin Changes: Save <ProjectName>
  this->WriteString("<ProjectName>", 2);
  const char* projLabel = this->Target->GetProperty("PROJECT_LABEL");
  if(!projLabel)
    (*this->BuildFileStream) << this->Name << "</ProjectName>\n";
  else
    (*this->BuildFileStream) << projLabel << "</ProjectName>\n";
  // End Changes
  this->WriteString("</PropertyGroup>\n", 1);


Hope this helps.
(0022102)
d3x0r (reporter)
2010-09-07 07:20

Fixes in 'next' branch do not fix

   add_library( basename-sub-something-group SHARED whatever.c )
   SET_TARGET_PROPERTIES( bag-msg-core-server PROPERTIES
                  SUFFIX ""
                  PREFIX ""
   )

extension remains '.dll' instead of being blank.

(maybe instead of overriding all the internal parts 'targetname' 'targetfilename' etc, could just override the output path.
(0022139)
Bill Hoffman (manager)
2010-09-08 14:21

So, we are generating the files correctly:
    <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">basename-sub-something-group</TargetName>
      <TargetExt Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"></TargetExt>
      <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>


However, it seems that VS 2010 is not handling this correctly. Can you via the IDE GUI create a basename-sub-something-group.vcxproj file that does what you want?
(0022166)
David Cole (manager)
2010-09-09 16:56

This is fixed in CMake 'next' as of this commit:
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=e79e412e70cb439354df589d83d3878c4dbe62fc [^]

Thanks, Daniel, for noticing the absence of the PROJECT_LABEL property.
(0022167)
David Cole (manager)
2010-09-09 17:07

Bill and d3x0r,

As a work-around for the VS2010 problem with an *empty* suffix property, it appears you can say:
  SUFFIX "."

to force creation of an extensionless dll in VS 2010...

I have not verified whether or not this works with previous visual studio versions... but at least you can workaround it for now. (And if you must, you could conditionalize using "." for VS 2010 only...)

 Issue History
Date Modified Username Field Change
2010-04-25 22:08 Jarl Lindrud New Issue
2010-04-26 06:38 Daniel Emminizer Note Added: 0020397
2010-08-31 17:12 David Cole Status new => assigned
2010-08-31 17:12 David Cole Assigned To => David Cole
2010-08-31 17:58 David Cole Target Version => CMake 2.8.3
2010-09-06 11:16 David Cole Relationship added has duplicate 0011207
2010-09-07 07:20 d3x0r Note Added: 0022102
2010-09-08 14:21 Bill Hoffman Note Added: 0022139
2010-09-09 16:56 David Cole Note Added: 0022166
2010-09-09 16:56 David Cole Status assigned => resolved
2010-09-09 16:56 David Cole Resolution open => fixed
2010-09-09 17:07 David Cole Note Added: 0022167
2010-10-06 14:14 David Cole Fixed in Version => CMake 2.8.3
2010-11-09 22:57 Philip Lowman Status resolved => closed
2010-12-14 18:55 David Cole Relationship added has duplicate 0010639
2010-12-14 18:56 David Cole Relationship added related to 0010040
2010-12-17 12:52 David Cole Relationship replaced has duplicate 0010040


Copyright © 2000 - 2018 MantisBT Team