summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorBill Hoffman <bill.hoffman@kitware.com>2007-01-25 20:44:52 (GMT)
committerBill Hoffman <bill.hoffman@kitware.com>2007-01-25 20:44:52 (GMT)
commitbd531d3fae559666746e4072858ab404bed6107c (patch)
tree09d4d359d6e57fee203c10f5310b7b805bc627a8 /Source
parent2f84bd17581920eb5cbfc3b41e8cf477ba6a5853 (diff)
downloadCMake-bd531d3fae559666746e4072858ab404bed6107c.zip
CMake-bd531d3fae559666746e4072858ab404bed6107c.tar.gz
CMake-bd531d3fae559666746e4072858ab404bed6107c.tar.bz2
BUG: fix for 4186, kdevelop adding file twice
Diffstat (limited to 'Source')
-rw-r--r--Source/CMakeLists.txt3
-rw-r--r--Source/cmGlobalKdevelopGenerator.cxx6
-rw-r--r--Source/cmLocalKdevelopGenerator.cxx41
-rw-r--r--Source/cmLocalKdevelopGenerator.h40
-rw-r--r--Source/cmLocalUnixMakefileGenerator3.h34
5 files changed, 14 insertions, 110 deletions
diff --git a/Source/CMakeLists.txt b/Source/CMakeLists.txt
index 46b6006..ff26382 100644
--- a/Source/CMakeLists.txt
+++ b/Source/CMakeLists.txt
@@ -175,8 +175,7 @@ SET(SRCS
# Kdevelop only works on UNIX and not windows
IF(UNIX)
SET(SRCS ${SRCS}
- cmGlobalKdevelopGenerator.cxx
- cmLocalKdevelopGenerator.cxx)
+ cmGlobalKdevelopGenerator.cxx)
ENDIF(UNIX)
# XCode only works on apple
IF(APPLE)
diff --git a/Source/cmGlobalKdevelopGenerator.cxx b/Source/cmGlobalKdevelopGenerator.cxx
index 554cc51..1bd2f22 100644
--- a/Source/cmGlobalKdevelopGenerator.cxx
+++ b/Source/cmGlobalKdevelopGenerator.cxx
@@ -17,7 +17,7 @@
=========================================================================*/
#include "cmGlobalKdevelopGenerator.h"
-#include "cmLocalKdevelopGenerator.h"
+#include "cmLocalUnixMakefileGenerator3.h"
#include "cmMakefile.h"
#include "cmake.h"
#include "cmSourceFile.h"
@@ -36,7 +36,8 @@ cmGlobalKdevelopGenerator::cmGlobalKdevelopGenerator()
///! Create a local generator appropriate to this Global Generator
cmLocalGenerator *cmGlobalKdevelopGenerator::CreateLocalGenerator()
{
- cmLocalGenerator *lg = new cmLocalKdevelopGenerator;
+ cmLocalUnixMakefileGenerator3 *lg = new cmLocalUnixMakefileGenerator3;
+ lg->SetForceVerboseMakefiles(true);
lg->SetGlobalGenerator(this);
return lg;
}
@@ -185,6 +186,7 @@ bool cmGlobalKdevelopGenerator
hname += *ext;
if(cmSystemTools::FileExists(hname.c_str()))
{
+ cmSystemTools::ReplaceString(hname, projectDir.c_str(), "");
files.insert(hname);
break;
}
diff --git a/Source/cmLocalKdevelopGenerator.cxx b/Source/cmLocalKdevelopGenerator.cxx
deleted file mode 100644
index db3fb41..0000000
--- a/Source/cmLocalKdevelopGenerator.cxx
+++ /dev/null
@@ -1,41 +0,0 @@
-/*=========================================================================
-
- Program: CMake - Cross-Platform Makefile Generator
- Module: $RCSfile$
- Language: C++
- Date: $Date$
- Version: $Revision$
-
- Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved.
- Copyright (c) 2004 Alexander Neundorf, neundorf@kde.org. All rights reserved.
- See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details.
-
- This software is distributed WITHOUT ANY WARRANTY; without even
- the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
- PURPOSE. See the above copyright notices for more information.
-
-=========================================================================*/
-#include "cmGlobalGenerator.h"
-#include "cmLocalKdevelopGenerator.h"
-#include "cmMakefile.h"
-#include "cmSystemTools.h"
-#include "cmSourceFile.h"
-#include "cmCacheManager.h"
-#include "cmGeneratedFileStream.h"
-#include "cmake.h"
-#include <cmsys/RegularExpression.hxx>
-
-
-cmLocalKdevelopGenerator::cmLocalKdevelopGenerator()
- :cmLocalUnixMakefileGenerator3()
-{
- // KDevelop can itself shorten the output, so it should
- // always get the full output, otherwise the "full output"
- // option in kdevelop doesn't make much sense, Alex
- this->ForceVerboseMakefiles=true;
-}
-
-cmLocalKdevelopGenerator::~cmLocalKdevelopGenerator()
-{
-}
-
diff --git a/Source/cmLocalKdevelopGenerator.h b/Source/cmLocalKdevelopGenerator.h
deleted file mode 100644
index a47b435..0000000
--- a/Source/cmLocalKdevelopGenerator.h
+++ /dev/null
@@ -1,40 +0,0 @@
-/*=========================================================================
-
- Program: CMake - Cross-Platform Makefile Generator
- Module: $RCSfile$
- Language: C++
- Date: $Date$
- Version: $Revision$
-
- Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved.
- Copyright (c) 2004 Alexander Neundorf, neundorf@kde.org. All rights reserved.
- See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details.
-
- This software is distributed WITHOUT ANY WARRANTY; without even
- the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
- PURPOSE. See the above copyright notices for more information.
-
-=========================================================================*/
-#ifndef cmLocalKdevelopGenerator_h
-#define cmLocalKdevelopGenerator_h
-
-#include "cmLocalUnixMakefileGenerator3.h"
-
-class cmDependInformation;
-class cmMakeDepend;
-class cmTarget;
-class cmSourceFile;
-
-/** \class cmLocalKdevelopGenerator
- */
-class cmLocalKdevelopGenerator : public cmLocalUnixMakefileGenerator3
-{
-public:
- ///! Set cache only and recurse to false by default.
- cmLocalKdevelopGenerator();
-
- virtual ~cmLocalKdevelopGenerator();
-
-};
-
-#endif
diff --git a/Source/cmLocalUnixMakefileGenerator3.h b/Source/cmLocalUnixMakefileGenerator3.h
index 5fa78f7..7747b9c 100644
--- a/Source/cmLocalUnixMakefileGenerator3.h
+++ b/Source/cmLocalUnixMakefileGenerator3.h
@@ -51,18 +51,6 @@ public:
virtual void Generate();
-
-
-
-
-
-
-
-
-
-
-
-
// this returns the relative path between the HomeOutputDirectory and this
// local generators StartOutputDirectory
const std::string &GetHomeRelativeOutputPath();
@@ -136,6 +124,15 @@ public:
void SetSilentNoColon(bool v) {this->SilentNoColon = v;}
/**
+ * If set to true, the CMake variable CMAKE_VERBOSE_MAKEFILES doesn't have
+ * anymore. Set it to true when writing a generator where short output
+ * doesn't make sense, e.g. because the full output is parsed by an
+ * IDE/editor.
+ */
+ void SetForceVerboseMakefiles(bool enable)
+ {this->ForceVerboseMakefiles=enable;}
+
+ /**
* Set the command to use for native make shell echo. The value
* should include all parts of the command up to the beginning of
* the message (including a whitespace separator).
@@ -267,19 +264,6 @@ protected:
void WriteDirectoryInformationFile();
-
-
-
-
-
-
-
-
-
-
-
-
-
// write the depend info
void WriteDependLanguageInfo(std::ostream& cmakefileStream, cmTarget &tgt);