summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2007-11-20 16:18:04 (GMT)
committerBrad King <brad.king@kitware.com>2007-11-20 16:18:04 (GMT)
commitb94530c7b40646be20c1d6f7cd4c1a5cd450b0d7 (patch)
tree7cab7754d796d75e369a41906f7a7a85ae13122a /Source
parenteee575283d75686deeea252ef82baa18c7dfe994 (diff)
downloadCMake-b94530c7b40646be20c1d6f7cd4c1a5cd450b0d7.zip
CMake-b94530c7b40646be20c1d6f7cd4c1a5cd450b0d7.tar.gz
CMake-b94530c7b40646be20c1d6f7cd4c1a5cd450b0d7.tar.bz2
BUG: Need to honor HEADER_FILE_ONLY source file property and exclude the source from the build.
Diffstat (limited to 'Source')
-rw-r--r--Source/cmLocalVisualStudio6Generator.cxx10
1 files changed, 9 insertions, 1 deletions
diff --git a/Source/cmLocalVisualStudio6Generator.cxx b/Source/cmLocalVisualStudio6Generator.cxx
index 59bf35e..dda7e60 100644
--- a/Source/cmLocalVisualStudio6Generator.cxx
+++ b/Source/cmLocalVisualStudio6Generator.cxx
@@ -427,6 +427,9 @@ void cmLocalVisualStudio6Generator
compileFlags += " /TC ";
}
}
+
+ bool excludedFromBuild =
+ (lang && (*sf)->GetPropertyAsBool("HEADER_FILE_ONLY"));
// Check for extra object-file dependencies.
const char* dependsValue = (*sf)->GetProperty("OBJECT_DEPENDS");
@@ -460,7 +463,8 @@ void cmLocalVisualStudio6Generator
const char* flags = compileFlags.size() ? compileFlags.c_str(): 0;
this->WriteCustomRule(fout, source.c_str(), *command, flags);
}
- else if(!compileFlags.empty() || !objectNameDir.empty())
+ else if(!compileFlags.empty() || !objectNameDir.empty() ||
+ excludedFromBuild)
{
for(std::vector<std::string>::iterator i
= this->Configurations.begin();
@@ -474,6 +478,10 @@ void cmLocalVisualStudio6Generator
{
fout << "!ELSEIF \"$(CFG)\" == " << i->c_str() << std::endl;
}
+ if(excludedFromBuild)
+ {
+ fout << "# PROP Exclude_From_Build 1\n";
+ }
if(!compileFlags.empty())
{
fout << "\n# ADD CPP " << compileFlags << "\n\n";