aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/cmakeprojectmanager/cmakeproject.cpp
diff options
context:
space:
mode:
authorErik <[email protected]>2010-04-23 16:24:55 +0200
committerdt <[email protected]>2010-04-26 12:30:02 +0200
commit3ae3e3f330a934a990ee40e38a151799632f83d4 (patch)
treeb6f9628df9addb23f3ae0056fea8b745ba580080 /src/plugins/cmakeprojectmanager/cmakeproject.cpp
parent0b5ffee800dfd3c6783ae95cec66a9f93fbfdbf6 (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.cpp13
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;
}