diff options
author | Brad King <brad.king@kitware.com> | 2010-10-05 19:31:49 (GMT) |
---|---|---|
committer | CMake Topic Stage <kwrobot@kitware.com> | 2010-10-05 19:31:49 (GMT) |
commit | dacc47853d39fe55aadf9fc25a2e63b12ab0bbe9 (patch) | |
tree | 5056112d7c09e1ffc3491767cd61f7a1591a133f /Source/cmGlobalVisualStudio7Generator.cxx | |
parent | 51047564bfefc793677c2de2bfc53d018fc28096 (diff) | |
parent | fd3249e11afeb38284ee8e2012134de4d410c92b (diff) | |
download | CMake-dacc47853d39fe55aadf9fc25a2e63b12ab0bbe9.zip CMake-dacc47853d39fe55aadf9fc25a2e63b12ab0bbe9.tar.gz CMake-dacc47853d39fe55aadf9fc25a2e63b12ab0bbe9.tar.bz2 |
Merge topic 'vs-project-groups'
fd3249e New USE_FOLDERS property OFF by default. (#3796)
Diffstat (limited to 'Source/cmGlobalVisualStudio7Generator.cxx')
-rw-r--r-- | Source/cmGlobalVisualStudio7Generator.cxx | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/Source/cmGlobalVisualStudio7Generator.cxx b/Source/cmGlobalVisualStudio7Generator.cxx index 751dc24..2b9e5ba 100644 --- a/Source/cmGlobalVisualStudio7Generator.cxx +++ b/Source/cmGlobalVisualStudio7Generator.cxx @@ -323,7 +323,7 @@ void cmGlobalVisualStudio7Generator::WriteTargetsToSolution( if (cumulativePath.empty()) { - cumulativePath = *iter; + cumulativePath = "CMAKE_FOLDER_GUID_" + *iter; } else { @@ -431,14 +431,22 @@ void cmGlobalVisualStudio7Generator //---------------------------------------------------------------------------- void cmGlobalVisualStudio7Generator::WriteFolders(std::ostream& fout) { + const char *prefix = "CMAKE_FOLDER_GUID_"; + const std::string::size_type skip_prefix = strlen(prefix); std::string guidProjectTypeFolder = "2150E333-8FDC-42A3-9474-1A3956D46DE8"; for(std::map<std::string,std::set<std::string> >::iterator iter = VisualStudioFolders.begin(); iter != VisualStudioFolders.end(); ++iter) { std::string fullName = iter->first; std::string guid = this->GetGUID(fullName.c_str()); - std::string nameOnly = cmSystemTools::GetFilenameName(fullName); + cmSystemTools::ReplaceString(fullName, "/", "\\"); + if (cmSystemTools::StringStartsWith(fullName.c_str(), prefix)) + { + fullName = fullName.substr(skip_prefix); + } + + std::string nameOnly = cmSystemTools::GetFilenameName(fullName); fout << "Project(\"{" << guidProjectTypeFolder << "}\") = \"" << |