summaryrefslogtreecommitdiffstats
path: root/Source/cmGlobalVisualStudio7Generator.h
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2014-06-12 14:36:10 (GMT)
committerBrad King <brad.king@kitware.com>2014-06-12 15:14:06 (GMT)
commit790e167718bff5660e9023f627df0413504fb207 (patch)
tree77b8523cd5123ba95064aa3448a74adb00846234 /Source/cmGlobalVisualStudio7Generator.h
parent5fba44cf41312a64b1cc661d4015ba16ac9f2af8 (diff)
downloadCMake-790e167718bff5660e9023f627df0413504fb207.zip
CMake-790e167718bff5660e9023f627df0413504fb207.tar.gz
CMake-790e167718bff5660e9023f627df0413504fb207.tar.bz2
VS: Fix subproject .sln dependencies on custom targets
Each project listed in a .sln must be marked (or not) as part of the "default build" for each configuration. For targets created by the add_custom_target() command we add them to the default build if they are not excluded in some way or if another target depends on them. In the top-level .sln, a custom target is excluded if it is not created with the ALL option to add_custom_target. In subdirectory .sln files, a target may also be excluded if it is not within the directory and is brought into the solution only due to a dependency from another target in the solution. Fix the "IsPartOfDefaultBuild" and "IsDependedOn" methods to check every target to be included in the .sln for a dependency on the custom target. Otherwise transitive dependencies through targets not in the current subdirectory will not be considered. Extend the SubProject test with a custom target to cover this case. Reported-by: William Deurwaarder <William.Deurwaarder@tomtom.com> Reported-by: Dirk Steenpass <dirk.steenpass@gmail.com>
Diffstat (limited to 'Source/cmGlobalVisualStudio7Generator.h')
-rw-r--r--Source/cmGlobalVisualStudio7Generator.h8
1 files changed, 5 insertions, 3 deletions
diff --git a/Source/cmGlobalVisualStudio7Generator.h b/Source/cmGlobalVisualStudio7Generator.h
index 399ec9f..7f55381 100644
--- a/Source/cmGlobalVisualStudio7Generator.h
+++ b/Source/cmGlobalVisualStudio7Generator.h
@@ -164,9 +164,11 @@ protected:
std::string ConvertToSolutionPath(const char* path);
- std::set<std::string> IsPartOfDefaultBuild(const std::string& project,
- cmTarget const* target);
- bool IsDependedOn(const std::string& project, cmTarget const* target);
+ std::set<std::string>
+ IsPartOfDefaultBuild(OrderedTargetDependSet const& projectTargets,
+ cmTarget const* target);
+ bool IsDependedOn(OrderedTargetDependSet const& projectTargets,
+ cmTarget const* target);
std::vector<std::string> Configurations;
std::map<std::string, std::string> GUIDMap;