View Issue Details Jump to Notes ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0014499CMakeCMakepublic2013-10-21 07:542014-03-05 09:58
Reportermar-na 
Assigned ToBrad King 
PrioritynormalSeverityminorReproducibilityalways
StatusclosedResolutionfixed 
PlatformOSOS Version
Product VersionCMake 2.8.12 
Target VersionCMake 3.0Fixed in VersionCMake 3.0 
Summary0014499: Add support for .NET target framework version for VS 2008
DescriptionI want set the .net target framework for a managed C++ project. I use VS 2008 but cmake currently support the target property VS_DOTNET_TARGET_FRAMEWORK_VERSION only for VS 2010.
TagsNo tags attached.
Attached Filespatch file icon set-target-framework-version-vs2008.patch [^] (2,188 bytes) 2013-10-21 07:58 [Show Content]
patch file icon 0001-VS-Set-.NET-target-framework-version-for-VS-7-9-1449.patch [^] (1,372 bytes) 2013-10-21 09:39 [Show Content]

 Relationships
related to 0014216closedBrad King Add support for .NET target framework version 

  Notes
(0034179)
mar-na (reporter)
2013-10-21 07:59

added patch

It does the same as for VS 2010. Issue 0014216
(0034184)
Brad King (manager)
2013-10-21 09:34

The patch appears to close the element attribute list with ">" twice if the framework version property is set. Why not simply:
diff --git a/Source/cmLocalVisualStudio7Generator.cxx b/Source/cmLocalVisualStudio7Generator.cxx
index f21abc3..30c3d73 100644
--- a/Source/cmLocalVisualStudio7Generator.cxx
+++ b/Source/cmLocalVisualStudio7Generator.cxx
@@ -2050,6 +2050,11 @@ cmLocalVisualStudio7Generator::WriteProjectStart(std::ostream& fout,
     fout << "\tProjectGUID=\"{" << gg->GetGUID(libName) << "}\"\n";
     
}
   this->WriteProjectSCC(fout, target);
+  if(const char* targetFrameworkVersion =
+     target.GetProperty("VS_DOTNET_TARGET_FRAMEWORK_VERSION"))
+    {
+    fout << "\tTargetFrameworkVersion=\"" << targetFrameworkVersion << 
"\"\n";
+    }
   fout << "\tKeyword=\"" << keyword << "\">\n"
        << "\t<Platforms>\n"
        << "\t\t<Platform\n\t\t\tName=\"" << this->PlatformName << 
"\"/>\n"

?
(0034185)
Brad King (manager)
2013-10-21 09:39

Please try 0001-VS-Set-.NET-target-framework-version-for-VS-7-9-1449.patch
(0034195)
mar-na (reporter)
2013-10-21 10:34

Sorry, I uploaded the wrong patch file.

Yes the patch 0001-VS-Set-.NET-target-framework-version-for-VS-7-9-1449 worked. Thank you!
(0034198)
Brad King (manager)
2013-10-21 10:39

Thanks for testing!

http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=0698714c [^]
(0035292)
Robert Maynard (manager)
2014-03-05 09:58

Closing resolved issues that have not been updated in more than 4 months

 Issue History
Date Modified Username Field Change
2013-10-21 07:54 mar-na New Issue
2013-10-21 07:58 mar-na File Added: set-target-framework-version-vs2008.patch
2013-10-21 07:59 mar-na Note Added: 0034179
2013-10-21 08:56 Brad King Relationship added related to 0014216
2013-10-21 09:34 Brad King Note Added: 0034184
2013-10-21 09:39 Brad King File Added: 0001-VS-Set-.NET-target-framework-version-for-VS-7-9-1449.patch
2013-10-21 09:39 Brad King Note Added: 0034185
2013-10-21 10:34 mar-na Note Added: 0034195
2013-10-21 10:39 Brad King Note Added: 0034198
2013-10-21 10:39 Brad King Assigned To => Brad King
2013-10-21 10:39 Brad King Status new => resolved
2013-10-21 10:39 Brad King Resolution open => fixed
2013-10-21 10:39 Brad King Fixed in Version => CMake 3.0
2013-10-21 10:39 Brad King Target Version => CMake 3.0
2014-03-05 09:58 Robert Maynard Note Added: 0035292
2014-03-05 09:58 Robert Maynard Status resolved => closed


Copyright © 2000 - 2018 MantisBT Team