diff options
author | Bill Hoffman <bill.hoffman@kitware.com> | 2002-02-25 23:14:01 (GMT) |
---|---|---|
committer | Bill Hoffman <bill.hoffman@kitware.com> | 2002-02-25 23:14:01 (GMT) |
commit | 6ad590aad68434eb478ea4e0c0305fdde22bfc6b (patch) | |
tree | 6b887b8e5608372e031ab123ae115fe58d79d87f /Source/cmMSDotNETGenerator.cxx | |
parent | b253a0644d6244b84e36c82f124e4a80dbdc55ee (diff) | |
download | CMake-6ad590aad68434eb478ea4e0c0305fdde22bfc6b.zip CMake-6ad590aad68434eb478ea4e0c0305fdde22bfc6b.tar.gz CMake-6ad590aad68434eb478ea4e0c0305fdde22bfc6b.tar.bz2 |
ENH: dot net almost working
Diffstat (limited to 'Source/cmMSDotNETGenerator.cxx')
-rw-r--r-- | Source/cmMSDotNETGenerator.cxx | 42 |
1 files changed, 20 insertions, 22 deletions
diff --git a/Source/cmMSDotNETGenerator.cxx b/Source/cmMSDotNETGenerator.cxx index 27df9df..6dc5d14 100644 --- a/Source/cmMSDotNETGenerator.cxx +++ b/Source/cmMSDotNETGenerator.cxx @@ -27,7 +27,7 @@ cmMSDotNETGenerator::cmMSDotNETGenerator() { m_Configurations.push_back("Debug"); -// m_Configurations.push_back("Release"); + m_Configurations.push_back("Release"); // m_Configurations.push_back("MinSizeRel"); // m_Configurations.push_back("RelWithDebInfo"); // default to building a sln project file @@ -66,7 +66,7 @@ void cmMSDotNETGenerator::ComputeSystemInfo() } std::string fpath = m_Makefile->GetDefinition("CMAKE_ROOT"); - fpath += "/Templates/CMakeWindowsSystemConfig.cmake"; + fpath += "/Templates/CMakeDotNetSystemConfig.cmake"; m_Makefile->ReadListFile(NULL,fpath.c_str()); } @@ -742,7 +742,9 @@ void cmMSDotNETGenerator::WriteConfiguration(std::ostream& fout, fout << "\t\t\t<Tool\n\t\t\t\tName=\"VCCustomBuildTool\"/>\n"; fout << "\t\t\t<Tool\n\t\t\t\tName=\"VCMIDLTool\"/>\n"; - fout << "\t\t\t<Tool\n\t\t\t\tName=\"VCPostBuildEventTool\"/>\n"; + fout << "\t\t\t<Tool\n\t\t\t\tName=\"VCPostBuildEventTool\""; + this->OutputTargetRules(fout, target, libName); + fout << "/>\n"; fout << "\t\t\t<Tool\n\t\t\t\tName=\"VCPreBuildEventTool\"/>\n"; this->OutputBuildTool(fout, configName, libName, target); fout << "\t\t</Configuration>\n"; @@ -838,7 +840,7 @@ void cmMSDotNETGenerator::OutputLibraryDirectories(std::ostream& fout, { fout << ","; } - fout << lpath; + fout << lpath << "\\$(INTDIR)," << lpath; hasone = true; } } @@ -873,13 +875,17 @@ void cmMSDotNETGenerator::OutputDefineFlags(std::ostream& fout) std::string defs = m_Makefile->GetDefineFlags(); std::string::size_type pos = defs.find("-D"); bool done = pos == std::string::npos; + if(!done) + { + fout << ","; + } while(!done) { std::string::size_type nextpos = defs.find("-D", pos+2); std::string define; if(nextpos != std::string::npos) { - define = defs.substr(pos+2, nextpos - pos -2); + define = defs.substr(pos+2, nextpos - pos -3); } else { @@ -1113,15 +1119,14 @@ cmMSDotNETGenerator::CombineCommands(const cmSourceGroup::Commands &commands, // look for custom rules on a target and collect them together -std::string -cmMSDotNETGenerator::CreateTargetRules(const cmTarget &target, - const char *libName) -{ - std::string customRuleCode = ""; +void cmMSDotNETGenerator::OutputTargetRules(std::ostream& fout, + const cmTarget &target, + const char *libName) +{ if (target.GetType() >= cmTarget::UTILITY) { - return customRuleCode; + return; } // Find the group in which the lix exe custom rules belong @@ -1134,25 +1139,18 @@ cmMSDotNETGenerator::CreateTargetRules(const cmTarget &target, cc.ExpandVariables(*m_Makefile); if (cc.GetSourceName() == libName) { - if (!init) + if(!init) { - // header stuff - customRuleCode = "# Begin Special Build Tool\nPostBuild_Cmds="; + fout << "\nCommandLine=\""; init = true; } - else - { - customRuleCode += "\t"; - } - customRuleCode += cc.GetCommand() + " " + cc.GetArguments(); + fout << cc.GetCommand() << " " << cc.GetArguments() << "\n"; } } - if (init) { - customRuleCode += "\n# End Special Build Tool\n"; + fout << "\""; } - return customRuleCode; } void cmMSDotNETGenerator::WriteProjectStart(std::ostream& fout, const char *libName, |