summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2017-03-24 12:33:44 (GMT)
committerKitware Robot <kwrobot@kitware.com>2017-03-24 12:33:47 (GMT)
commit8047bd6c0d935d8c0cc303b26d75ee62973d2b7f (patch)
tree97968fcf3299d1b0b5366bb4df870b366a329b72 /Source
parent5bded841b4d66bea70c932184eac0a44b82d03fe (diff)
parent41ec352832037d316c34b3eba336eeb7f4163d86 (diff)
downloadCMake-8047bd6c0d935d8c0cc303b26d75ee62973d2b7f.zip
CMake-8047bd6c0d935d8c0cc303b26d75ee62973d2b7f.tar.gz
CMake-8047bd6c0d935d8c0cc303b26d75ee62973d2b7f.tar.bz2
Merge topic 'iwyu'
41ec3528 IWYU: use pragma export 72ea66b1 Autogen: include what you use 2a827b82 cmCPackGenerator: Move macros to bottom of file bcd08aa3 cmCTest: Move macros to bottom of file Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !619
Diffstat (limited to 'Source')
-rw-r--r--Source/CPack/cmCPackGenerator.h28
-rw-r--r--Source/cmCTest.h32
-rw-r--r--Source/cmConfigure.cmake.h.in2
-rw-r--r--Source/cmDynamicLoader.cxx1
-rw-r--r--Source/cmDynamicLoader.h2
-rw-r--r--Source/cmQtAutoGeneratorCommon.cxx1
-rw-r--r--Source/cmQtAutoGeneratorCommon.h5
-rw-r--r--Source/cmQtAutoGeneratorInitializer.cxx6
-rw-r--r--Source/cmSystemTools.cxx1
-rw-r--r--Source/cmSystemTools.h2
10 files changed, 36 insertions, 44 deletions
diff --git a/Source/CPack/cmCPackGenerator.h b/Source/CPack/cmCPackGenerator.h
index 57b8fff..39fd2cc 100644
--- a/Source/CPack/cmCPackGenerator.h
+++ b/Source/CPack/cmCPackGenerator.h
@@ -17,20 +17,6 @@ class cmCPackLog;
class cmInstalledFile;
class cmMakefile;
-#define cmCPackTypeMacro(klass, superclass) \
- typedef superclass Superclass; \
- const char* GetNameOfClass() CM_OVERRIDE { return #klass; } \
- static cmCPackGenerator* CreateGenerator() { return new klass; } \
- class cmCPackTypeMacro_UseTrailingSemicolon
-
-#define cmCPackLogger(logType, msg) \
- do { \
- std::ostringstream cmCPackLog_msg; \
- cmCPackLog_msg << msg; \
- this->Logger->Log(logType, __FILE__, __LINE__, \
- cmCPackLog_msg.str().c_str()); \
- } while (false)
-
/** \class cmCPackGenerator
* \brief A superclass of all CPack Generators
*
@@ -311,4 +297,18 @@ private:
cmMakefile* MakefileMap;
};
+#define cmCPackTypeMacro(klass, superclass) \
+ typedef superclass Superclass; \
+ const char* GetNameOfClass() CM_OVERRIDE { return #klass; } \
+ static cmCPackGenerator* CreateGenerator() { return new klass; } \
+ class cmCPackTypeMacro_UseTrailingSemicolon
+
+#define cmCPackLogger(logType, msg) \
+ do { \
+ std::ostringstream cmCPackLog_msg; \
+ cmCPackLog_msg << msg; \
+ this->Logger->Log(logType, __FILE__, __LINE__, \
+ cmCPackLog_msg.str().c_str()); \
+ } while (false)
+
#endif
diff --git a/Source/cmCTest.h b/Source/cmCTest.h
index ebdc8b0..be736da 100644
--- a/Source/cmCTest.h
+++ b/Source/cmCTest.h
@@ -20,22 +20,6 @@ class cmGeneratedFileStream;
class cmMakefile;
class cmXMLWriter;
-#define cmCTestLog(ctSelf, logType, msg) \
- do { \
- std::ostringstream cmCTestLog_msg; \
- cmCTestLog_msg << msg; \
- (ctSelf)->Log(cmCTest::logType, __FILE__, __LINE__, \
- cmCTestLog_msg.str().c_str()); \
- } while (false)
-
-#define cmCTestOptionalLog(ctSelf, logType, msg, suppress) \
- do { \
- std::ostringstream cmCTestLog_msg; \
- cmCTestLog_msg << msg; \
- (ctSelf)->Log(cmCTest::logType, __FILE__, __LINE__, \
- cmCTestLog_msg.str().c_str(), suppress); \
- } while (false)
-
/** \class cmCTest
* \brief Represents a ctest invocation.
*
@@ -647,4 +631,20 @@ inline std::ostream& operator<<(std::ostream& os, const cmCTestLogWrite& c)
return os;
}
+#define cmCTestLog(ctSelf, logType, msg) \
+ do { \
+ std::ostringstream cmCTestLog_msg; \
+ cmCTestLog_msg << msg; \
+ (ctSelf)->Log(cmCTest::logType, __FILE__, __LINE__, \
+ cmCTestLog_msg.str().c_str()); \
+ } while (false)
+
+#define cmCTestOptionalLog(ctSelf, logType, msg, suppress) \
+ do { \
+ std::ostringstream cmCTestLog_msg; \
+ cmCTestLog_msg << msg; \
+ (ctSelf)->Log(cmCTest::logType, __FILE__, __LINE__, \
+ cmCTestLog_msg.str().c_str(), suppress); \
+ } while (false)
+
#endif
diff --git a/Source/cmConfigure.cmake.h.in b/Source/cmConfigure.cmake.h.in
index 26f1df2..5f89ba1 100644
--- a/Source/cmConfigure.cmake.h.in
+++ b/Source/cmConfigure.cmake.h.in
@@ -3,7 +3,7 @@
#ifndef cmConfigure_h
#define cmConfigure_h
-#include <cmsys/Configure.hxx> // IWYU pragma: keep
+#include <cmsys/Configure.hxx> // IWYU pragma: export
#ifdef _MSC_VER
#pragma warning(disable : 4786)
diff --git a/Source/cmDynamicLoader.cxx b/Source/cmDynamicLoader.cxx
index a30b642..39a59fc 100644
--- a/Source/cmDynamicLoader.cxx
+++ b/Source/cmDynamicLoader.cxx
@@ -4,7 +4,6 @@
#include <cmConfigure.h>
-#include <cmsys/DynamicLoader.hxx>
#include <map>
#include <string>
#include <utility>
diff --git a/Source/cmDynamicLoader.h b/Source/cmDynamicLoader.h
index d14f81e..5d69400 100644
--- a/Source/cmDynamicLoader.h
+++ b/Source/cmDynamicLoader.h
@@ -10,7 +10,7 @@
#include <cmConfigure.h> // IWYU pragma: keep
-#include <cmsys/DynamicLoader.hxx>
+#include "cmsys/DynamicLoader.hxx" // IWYU pragma: export
class cmDynamicLoader
{
diff --git a/Source/cmQtAutoGeneratorCommon.cxx b/Source/cmQtAutoGeneratorCommon.cxx
index dcd61a3..2498fe8 100644
--- a/Source/cmQtAutoGeneratorCommon.cxx
+++ b/Source/cmQtAutoGeneratorCommon.cxx
@@ -8,6 +8,7 @@
#include <cmsys/RegularExpression.hxx>
#include <sstream>
+#include <stddef.h>
// - Static functions
diff --git a/Source/cmQtAutoGeneratorCommon.h b/Source/cmQtAutoGeneratorCommon.h
index b54b6fa..b004005 100644
--- a/Source/cmQtAutoGeneratorCommon.h
+++ b/Source/cmQtAutoGeneratorCommon.h
@@ -3,13 +3,10 @@
#ifndef cmQtAutoGeneratorCommon_h
#define cmQtAutoGeneratorCommon_h
-#include <cmConfigure.h> // IWYU pragma: keep
+#include <cmConfigure.h>
#include <string>
#include <vector>
-class cmGeneratorTarget;
-class cmLocalGenerator;
-
class cmQtAutoGeneratorCommon
{
// - Types and statics
diff --git a/Source/cmQtAutoGeneratorInitializer.cxx b/Source/cmQtAutoGeneratorInitializer.cxx
index 6ebc234..ead3dfc 100644
--- a/Source/cmQtAutoGeneratorInitializer.cxx
+++ b/Source/cmQtAutoGeneratorInitializer.cxx
@@ -7,12 +7,11 @@
#include "cmCustomCommandLines.h"
#include "cmFilePathChecksum.h"
#include "cmGeneratorTarget.h"
-#include "cmGlobalGenerator.h"
#include "cmLocalGenerator.h"
#include "cmMakefile.h"
#include "cmOutputConverter.h"
#include "cmSourceFile.h"
-#include "cmSourceFileLocation.h"
+#include "cmSourceGroup.h"
#include "cmState.h"
#include "cmSystemTools.h"
#include "cmTarget.h"
@@ -25,11 +24,8 @@
#include <algorithm>
#include <cmConfigure.h>
#include <cmsys/FStream.hxx>
-#include <cmsys/RegularExpression.hxx>
#include <map>
#include <set>
-#include <sstream>
-#include <string.h>
#include <string>
#include <sys/stat.h>
#include <utility>
diff --git a/Source/cmSystemTools.cxx b/Source/cmSystemTools.cxx
index b7afa10..b2e3c6a 100644
--- a/Source/cmSystemTools.cxx
+++ b/Source/cmSystemTools.cxx
@@ -33,7 +33,6 @@
#include <cmsys/FStream.hxx>
#include <cmsys/RegularExpression.hxx>
#include <cmsys/System.h>
-#include <cmsys/SystemTools.hxx>
#include <cmsys/Terminal.h>
#include <ctype.h>
#include <errno.h>
diff --git a/Source/cmSystemTools.h b/Source/cmSystemTools.h
index 10e8280..070f81f 100644
--- a/Source/cmSystemTools.h
+++ b/Source/cmSystemTools.h
@@ -5,9 +5,9 @@
#include <cmConfigure.h> // IWYU pragma: keep
+#include "cmsys/SystemTools.hxx" // IWYU pragma: export
#include <cmProcessOutput.h>
#include <cmsys/Process.h>
-#include <cmsys/SystemTools.hxx>
#include <stddef.h>
#include <string>
#include <vector>