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.
This commit is contained in:
parent
c5762cf58c
commit
b3cf739e2c
@ -279,6 +279,8 @@ void cmGlobalVisualStudio7Generator::WriteTargetsToSolution(
|
|||||||
projectTargets.begin(); tt != projectTargets.end(); ++tt)
|
projectTargets.begin(); tt != projectTargets.end(); ++tt)
|
||||||
{
|
{
|
||||||
cmTarget* target = *tt;
|
cmTarget* target = *tt;
|
||||||
|
bool written = false;
|
||||||
|
|
||||||
// handle external vc project files
|
// handle external vc project files
|
||||||
const char* expath = target->GetProperty("EXTERNAL_MSPROJECT");
|
const char* expath = target->GetProperty("EXTERNAL_MSPROJECT");
|
||||||
if(expath)
|
if(expath)
|
||||||
@ -287,6 +289,7 @@ void cmGlobalVisualStudio7Generator::WriteTargetsToSolution(
|
|||||||
std::string location = expath;
|
std::string location = expath;
|
||||||
this->WriteExternalProject(fout, project.c_str(),
|
this->WriteExternalProject(fout, project.c_str(),
|
||||||
location.c_str(), target->GetUtilities());
|
location.c_str(), target->GetUtilities());
|
||||||
|
written = true;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -300,10 +303,13 @@ void cmGlobalVisualStudio7Generator::WriteTargetsToSolution(
|
|||||||
cmLocalGenerator::START_OUTPUT);
|
cmLocalGenerator::START_OUTPUT);
|
||||||
this->WriteProject(fout, vcprojName, dir.c_str(),
|
this->WriteProject(fout, vcprojName, dir.c_str(),
|
||||||
*target);
|
*target);
|
||||||
|
written = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Create "solution folder" information from FOLDER target property
|
// Create "solution folder" information from FOLDER target property
|
||||||
//
|
//
|
||||||
if (this->UseFolderProperty())
|
if (written && this->UseFolderProperty())
|
||||||
{
|
{
|
||||||
const char *targetFolder = target->GetProperty("FOLDER");
|
const char *targetFolder = target->GetProperty("FOLDER");
|
||||||
if (targetFolder)
|
if (targetFolder)
|
||||||
@ -344,8 +350,6 @@ void cmGlobalVisualStudio7Generator::WriteTargetsToSolution(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void cmGlobalVisualStudio7Generator::WriteTargetDepends(
|
void cmGlobalVisualStudio7Generator::WriteTargetDepends(
|
||||||
|
@ -50,3 +50,11 @@ IF(MSVC10)
|
|||||||
ADD_DEPENDENCIES(VSExternalInclude lib1)
|
ADD_DEPENDENCIES(VSExternalInclude lib1)
|
||||||
ENDIF()
|
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)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user