This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake".
The branch, next has been updated via 72fe00a8ad204742de4ad5c9c5948df6851b0f6b (commit) via b3cf739e2c784fbd6c8a93c1ac91bd4bcea5acbf (commit) via c5762cf58c70f82479586e3938a85e60f9474a6c (commit) from 2e15ab29663c455d665340f29db59f9db38065b1 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=72fe00a8ad204742de4ad5c9c5948df6851b0f6b commit 72fe00a8ad204742de4ad5c9c5948df6851b0f6b Merge: 2e15ab2 b3cf739 Author: David Cole <david.c...@kitware.com> AuthorDate: Wed Nov 10 09:15:37 2010 -0500 Commit: CMake Topic Stage <kwro...@kitware.com> CommitDate: Wed Nov 10 09:15:37 2010 -0500 Merge topic 'fix-FOLDER-plus-include_external_msproject' into next b3cf739 Honor FOLDER on include_external_msproject targets (#11436) c5762cf KWSys Nightly Date Stamp http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=b3cf739e2c784fbd6c8a93c1ac91bd4bcea5acbf commit b3cf739e2c784fbd6c8a93c1ac91bd4bcea5acbf Author: David Cole <david.c...@kitware.com> AuthorDate: Wed Nov 10 09:06:09 2010 -0500 Commit: David Cole <david.c...@kitware.com> CommitDate: Wed Nov 10 09:06:09 2010 -0500 Honor FOLDER on include_external_msproject targets (#11436) Add FOLDER property usage to the VSExternalInclude test and inspect results manually to verify behavior. Thanks to Jens Auer for the bug report. diff --git a/Source/cmGlobalVisualStudio7Generator.cxx b/Source/cmGlobalVisualStudio7Generator.cxx index 2b9e5ba..45d6a74 100644 --- a/Source/cmGlobalVisualStudio7Generator.cxx +++ b/Source/cmGlobalVisualStudio7Generator.cxx @@ -279,6 +279,8 @@ void cmGlobalVisualStudio7Generator::WriteTargetsToSolution( projectTargets.begin(); tt != projectTargets.end(); ++tt) { cmTarget* target = *tt; + bool written = false; + // handle external vc project files const char* expath = target->GetProperty("EXTERNAL_MSPROJECT"); if(expath) @@ -287,6 +289,7 @@ void cmGlobalVisualStudio7Generator::WriteTargetsToSolution( std::string location = expath; this->WriteExternalProject(fout, project.c_str(), location.c_str(), target->GetUtilities()); + written = true; } else { @@ -300,47 +303,48 @@ void cmGlobalVisualStudio7Generator::WriteTargetsToSolution( cmLocalGenerator::START_OUTPUT); this->WriteProject(fout, vcprojName, dir.c_str(), *target); + written = true; + } + } - // Create "solution folder" information from FOLDER target property - // - if (this->UseFolderProperty()) + // Create "solution folder" information from FOLDER target property + // + if (written && this->UseFolderProperty()) + { + const char *targetFolder = target->GetProperty("FOLDER"); + if (targetFolder) + { + std::vector<cmsys::String> tokens = + cmSystemTools::SplitString(targetFolder, '/', false); + + std::string cumulativePath = ""; + + for(std::vector<cmsys::String>::iterator iter = tokens.begin(); + iter != tokens.end(); ++iter) { - const char *targetFolder = target->GetProperty("FOLDER"); - if (targetFolder) + if(!iter->size()) { - std::vector<cmsys::String> tokens = - cmSystemTools::SplitString(targetFolder, '/', false); - - std::string cumulativePath = ""; - - for(std::vector<cmsys::String>::iterator iter = tokens.begin(); - iter != tokens.end(); ++iter) - { - if(!iter->size()) - { - continue; - } - - if (cumulativePath.empty()) - { - cumulativePath = "CMAKE_FOLDER_GUID_" + *iter; - } - else - { - VisualStudioFolders[cumulativePath].insert( - cumulativePath + "/" + *iter); - - cumulativePath = cumulativePath + "/" + *iter; - } - - this->CreateGUID(cumulativePath.c_str()); - } - - if (!cumulativePath.empty()) - { - VisualStudioFolders[cumulativePath].insert(target->GetName()); - } + continue; } + + if (cumulativePath.empty()) + { + cumulativePath = "CMAKE_FOLDER_GUID_" + *iter; + } + else + { + VisualStudioFolders[cumulativePath].insert( + cumulativePath + "/" + *iter); + + cumulativePath = cumulativePath + "/" + *iter; + } + + this->CreateGUID(cumulativePath.c_str()); + } + + if (!cumulativePath.empty()) + { + VisualStudioFolders[cumulativePath].insert(target->GetName()); } } } diff --git a/Tests/VSExternalInclude/CMakeLists.txt b/Tests/VSExternalInclude/CMakeLists.txt index 931e636..1e68968 100644 --- a/Tests/VSExternalInclude/CMakeLists.txt +++ b/Tests/VSExternalInclude/CMakeLists.txt @@ -50,3 +50,11 @@ IF(MSVC10) ADD_DEPENDENCIES(VSExternalInclude lib1) ENDIF() +# Interaction testing between the FOLDER target property and +# INCLUDE_EXTERNAL_MSPROJECT targets: +set_target_properties(VSExternalInclude PROPERTIES FOLDER folder1/folder2) +set_target_properties(lib1 PROPERTIES FOLDER folder1/folder2) +set_target_properties(lib2 PROPERTIES FOLDER folder1/folder2) +add_custom_target(EmptyCustomTarget) +set_target_properties(EmptyCustomTarget PROPERTIES FOLDER folder1/folder2) +set_property(GLOBAL PROPERTY USE_FOLDERS ON) ----------------------------------------------------------------------- Summary of changes: Source/cmGlobalVisualStudio7Generator.cxx | 78 +++++++++++++++-------------- Source/kwsys/kwsysDateStamp.cmake | 2 +- Tests/VSExternalInclude/CMakeLists.txt | 8 +++ 3 files changed, 50 insertions(+), 38 deletions(-) hooks/post-receive -- CMake _______________________________________________ Cmake-commits mailing list Cmake-commits@cmake.org http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-commits