ENH: dot net almost working
This commit is contained in:
parent
b253a0644d
commit
6ad590aad6
|
@ -44,6 +44,16 @@ bool cmBuildCommand::InitialPass(std::vector<std::string> const& args)
|
|||
makecommand += m_Makefile->GetProjectName();
|
||||
makecommand += ".dsw /MAKE \"ALL_BUILD - Release\" ";
|
||||
}
|
||||
else if (makeprogram.find("devenv") != std::string::npos ||
|
||||
makeprogram.find("DEVENV") != std::string::npos )
|
||||
{
|
||||
makecommand = "\"";
|
||||
makecommand += makeprogram;
|
||||
makecommand += "\"";
|
||||
makecommand += " ";
|
||||
makecommand += m_Makefile->GetProjectName();
|
||||
makecommand += ".sln /build Release /project ALL_BUILD";
|
||||
}
|
||||
else if(m_Makefile->GetDefinition("BORLAND"))
|
||||
{
|
||||
makecommand = makeprogram;
|
||||
|
|
|
@ -42,7 +42,7 @@ public:
|
|||
/**
|
||||
* Return the number of files in the current directory.
|
||||
*/
|
||||
int GetNumberOfFiles() { return m_Files.size();}
|
||||
std::vector<std::string>::size_type GetNumberOfFiles() { return m_Files.size();}
|
||||
|
||||
/**
|
||||
* Return the file at the given index, the indexing is 0 based
|
||||
|
|
|
@ -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,
|
||||
|
||||
void cmMSDotNETGenerator::OutputTargetRules(std::ostream& fout,
|
||||
const cmTarget &target,
|
||||
const char *libName)
|
||||
{
|
||||
std::string customRuleCode = "";
|
||||
|
||||
if (target.GetType() >= cmTarget::UTILITY)
|
||||
{
|
||||
return customRuleCode;
|
||||
return;
|
||||
}
|
||||
|
||||
// Find the group in which the lix exe custom rules belong
|
||||
|
@ -1136,23 +1141,16 @@ cmMSDotNETGenerator::CreateTargetRules(const cmTarget &target,
|
|||
{
|
||||
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,
|
||||
|
|
|
@ -112,7 +112,8 @@ private:
|
|||
const std::set<std::string>& depends,
|
||||
const std::set<std::string>& outputs);
|
||||
|
||||
std::string CreateTargetRules(const cmTarget &target,
|
||||
void OutputTargetRules(std::ostream& fout,
|
||||
const cmTarget &target,
|
||||
const char *libName);
|
||||
std::string CombineCommands(const cmSourceGroup::Commands &commands,
|
||||
cmSourceGroup::CommandFiles &totalCommand,
|
||||
|
|
|
@ -220,12 +220,12 @@ public:
|
|||
/**
|
||||
* Index to start of first find.
|
||||
*/
|
||||
inline long start() const;
|
||||
inline std::string::size_type start() const;
|
||||
|
||||
/**
|
||||
* Index to end of first find.
|
||||
*/
|
||||
inline long end() const;
|
||||
inline std::string::size_type end() const;
|
||||
|
||||
/**
|
||||
* Returns true if two regular expressions have the same
|
||||
|
@ -259,8 +259,8 @@ public:
|
|||
* Destructor.
|
||||
*/
|
||||
// awf added
|
||||
int start(int n) const;
|
||||
int end(int n) const;
|
||||
std::string::size_type start(int n) const;
|
||||
std::string::size_type end(int n) const;
|
||||
std::string match(int n) const;
|
||||
|
||||
private:
|
||||
|
@ -306,7 +306,7 @@ inline cmRegularExpression::~cmRegularExpression ()
|
|||
/**
|
||||
* Set the start position for the regular expression.
|
||||
*/
|
||||
inline long cmRegularExpression::start () const
|
||||
inline std::string::size_type cmRegularExpression::start () const
|
||||
{
|
||||
return(this->startp[0] - searchstring);
|
||||
}
|
||||
|
@ -315,7 +315,7 @@ inline long cmRegularExpression::start () const
|
|||
/**
|
||||
* Returns the start/end index of the last item found.
|
||||
*/
|
||||
inline long cmRegularExpression::end () const
|
||||
inline std::string::size_type cmRegularExpression::end () const
|
||||
{
|
||||
return(this->endp[0] - searchstring);
|
||||
}
|
||||
|
@ -350,7 +350,7 @@ inline void cmRegularExpression::set_invalid ()
|
|||
/**
|
||||
* Return start index of nth submatch. start(0) is the start of the full match.
|
||||
*/
|
||||
inline int cmRegularExpression::start(int n) const
|
||||
inline std::string::size_type cmRegularExpression::start(int n) const
|
||||
{
|
||||
return this->startp[n] - searchstring;
|
||||
}
|
||||
|
@ -359,7 +359,7 @@ inline int cmRegularExpression::start(int n) const
|
|||
/**
|
||||
* Return end index of nth submatch. end(0) is the end of the full match.
|
||||
*/
|
||||
inline int cmRegularExpression::end(int n) const
|
||||
inline std::string::size_type cmRegularExpression::end(int n) const
|
||||
{
|
||||
return this->endp[n] - searchstring;
|
||||
}
|
||||
|
|
|
@ -179,9 +179,9 @@ void cmSystemTools::ReplaceString(std::string& source,
|
|||
const char* replace,
|
||||
const char* with)
|
||||
{
|
||||
int lengthReplace = strlen(replace);
|
||||
std::string::size_type lengthReplace = strlen(replace);
|
||||
std::string rest;
|
||||
size_t start = source.find(replace);
|
||||
std::string::size_type start = source.find(replace);
|
||||
while(start != std::string::npos)
|
||||
{
|
||||
rest = source.substr(start+lengthReplace);
|
||||
|
@ -393,7 +393,7 @@ std::string cmSystemTools::UpperCase(const std::string& s)
|
|||
}
|
||||
|
||||
|
||||
// convert windows slashes to unix slashes \ with /
|
||||
// convert windows slashes to unix slashes
|
||||
void cmSystemTools::ConvertToUnixSlashes(std::string& path)
|
||||
{
|
||||
std::string::size_type pos = 0;
|
||||
|
|
Loading…
Reference in New Issue