[Cmake-commits] [cmake-commits] hoffman committed cmVisualStudio10TargetGenerator.cxx 1.20 1.21
cmake-commits at cmake.org
cmake-commits at cmake.org
Wed Oct 21 21:30:44 EDT 2009
Update of /cvsroot/CMake/CMake/Source
In directory public:/mounts/ram/cvs-serv20500
Modified Files:
cmVisualStudio10TargetGenerator.cxx
Log Message:
Fix for bugs #9756, #9690 and #9755, header files were not included, and link_directories we incorrect
Index: cmVisualStudio10TargetGenerator.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmVisualStudio10TargetGenerator.cxx,v
retrieving revision 1.20
retrieving revision 1.21
diff -C 2 -d -r1.20 -r1.21
*** cmVisualStudio10TargetGenerator.cxx 20 Oct 2009 20:38:37 -0000 1.20
--- cmVisualStudio10TargetGenerator.cxx 22 Oct 2009 01:30:41 -0000 1.21
***************
*** 376,379 ****
--- 376,380 ----
std::vector<cmSourceFile*> customBuild;
std::vector<cmSourceFile*> none;
+ std::vector<cmSourceFile*> headers;
for(std::vector<cmSourceFile*>::const_iterator s = classes.begin();
***************
*** 385,389 ****
this->Makefile->FindSourceGroup(source.c_str(), sourceGroups);
groupsUsed.insert(&sourceGroup);
! const char* lang = sf->GetLanguage();
if(!lang)
{
--- 386,393 ----
this->Makefile->FindSourceGroup(source.c_str(), sourceGroups);
groupsUsed.insert(&sourceGroup);
! const char* lang = sf->GetLanguage();
! bool header = (*s)->GetPropertyAsBool("HEADER_FILE_ONLY")
! || this->GlobalGenerator->IgnoreFile
! ((*s)->GetExtension().c_str());
if(!lang)
{
***************
*** 398,401 ****
--- 402,409 ----
customBuild.push_back(sf);
}
+ else if(header)
+ {
+ headers.push_back(sf);
+ }
else
{
***************
*** 420,423 ****
--- 428,432 ----
0);
this->WriteGroupSources("ClCompile", clCompile, sourceGroups);
+ this->WriteGroupSources("ClInclude", headers, sourceGroups);
this->WriteGroupSources("CustomBuild", customBuild, sourceGroups);
***************
*** 533,543 ****
// if it is not a custom command then add it as a c/c++ file,
// TODO: need to check for idl or rc
! if(!(*source)->GetCustomCommand()
! && !(*source)->GetPropertyAsBool("HEADER_FILE_ONLY")
! && !this->GlobalGenerator->IgnoreFile
! ((*source)->GetExtension().c_str()))
{
const char* lang = (*source)->GetLanguage();
! if(lang && (strcmp(lang, "C") == 0 || strcmp(lang, "CXX") ==0))
{
std::string sourceFile = (*source)->GetFullPath();
--- 542,552 ----
// if it is not a custom command then add it as a c/c++ file,
// TODO: need to check for idl or rc
! if(!(*source)->GetCustomCommand())
{
+ bool header = (*source)->GetPropertyAsBool("HEADER_FILE_ONLY")
+ || this->GlobalGenerator->IgnoreFile
+ ((*source)->GetExtension().c_str());
const char* lang = (*source)->GetLanguage();
! if(header || lang && (strcmp(lang, "C") == 0 || strcmp(lang, "CXX") ==0))
{
std::string sourceFile = (*source)->GetFullPath();
***************
*** 547,551 ****
this->ConvertToWindowsSlash(sourceFile);
// output the source file
! this->WriteString("<ClCompile Include=\"", 2);
(*this->BuildFileStream ) << sourceFile << "\"";
// ouput any flags specific to this source file
--- 556,567 ----
this->ConvertToWindowsSlash(sourceFile);
// output the source file
! if(header)
! {
! this->WriteString("<ClInclude Include=\"", 2);
! }
! else
! {
! this->WriteString("<ClCompile Include=\"", 2);
! }
(*this->BuildFileStream ) << sourceFile << "\"";
// ouput any flags specific to this source file
***************
*** 1081,1089 ****
linkDirs += sep;
linkDirs += *d;
linkDirs += sep;
// next path with configuration type Debug, Release, etc
linkDirs += *d;
linkDirs += "/$(Configuration)";
! sep = ";";
}
linkDirs += "%(AdditionalLibraryDirectories)";
--- 1097,1106 ----
linkDirs += sep;
linkDirs += *d;
+ sep = ";";
linkDirs += sep;
// next path with configuration type Debug, Release, etc
linkDirs += *d;
linkDirs += "/$(Configuration)";
! linkDirs += sep;
}
linkDirs += "%(AdditionalLibraryDirectories)";
More information about the Cmake-commits
mailing list