diff options
author | Erik <[email protected]> | 2010-04-23 16:24:55 +0200 |
---|---|---|
committer | dt <[email protected]> | 2010-04-26 12:30:02 +0200 |
commit | 3ae3e3f330a934a990ee40e38a151799632f83d4 (patch) | |
tree | b6f9628df9addb23f3ae0056fea8b745ba580080 /src/plugins/cmakeprojectmanager/cmakeproject.cpp | |
parent | 0b5ffee800dfd3c6783ae95cec66a9f93fbfdbf6 (diff) |
Import library target from cmake project.
Added library flag to CMakeBuildTarget struct which is set when parsing
the cbp file. This flag is then used to make sure no runconfiguration
is created for library targets.
Merge-request: 136
Reviewed-by: dt <[email protected]>
Diffstat (limited to 'src/plugins/cmakeprojectmanager/cmakeproject.cpp')
-rw-r--r-- | src/plugins/cmakeprojectmanager/cmakeproject.cpp | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/src/plugins/cmakeprojectmanager/cmakeproject.cpp b/src/plugins/cmakeprojectmanager/cmakeproject.cpp index 0f973cd71a2..7e92e0140cd 100644 --- a/src/plugins/cmakeprojectmanager/cmakeproject.cpp +++ b/src/plugins/cmakeprojectmanager/cmakeproject.cpp @@ -222,7 +222,7 @@ bool CMakeProject::parseCMakeLists() //qDebug()<<"Adding Targets"; m_buildTargets = cbpparser.buildTargets(); // qDebug()<<"Printing targets"; -// foreach(CMakeTarget ct, m_targets) { +// foreach(CMakeBuildTarget ct, m_buildTargets) { // qDebug()<<ct.title<<" with executable:"<<ct.executable; // qDebug()<<"WD:"<<ct.workingDirectory; // qDebug()<<ct.makeCommand<<ct.makeCleanCommand; @@ -754,12 +754,16 @@ void CMakeCbpParser::parseBuildTarget() void CMakeCbpParser::parseBuildTargetOption() { - if (attributes().hasAttribute("output")) + if (attributes().hasAttribute("output")) { m_buildTarget.executable = attributes().value("output").toString(); - else if (attributes().hasAttribute("type") && (attributes().value("type") == "1" || attributes().value("type") == "0")) + } else if (attributes().hasAttribute("type") && (attributes().value("type") == "1" || attributes().value("type") == "0")) { m_buildTargetType = true; - else if (attributes().hasAttribute("working_dir")) + } else if (attributes().hasAttribute("type") && (attributes().value("type") == "3" || attributes().value("type") == "2")) { + m_buildTargetType = true; + m_buildTarget.library = true; + } else if (attributes().hasAttribute("working_dir")) { m_buildTarget.workingDirectory = attributes().value("working_dir").toString(); + } while (!atEnd()) { readNext(); if (isEndElement()) { @@ -963,5 +967,6 @@ void CMakeBuildTarget::clear() makeCleanCommand.clear(); workingDirectory.clear(); title.clear(); + library = false; } |