summaryrefslogtreecommitdiffstats
path: root/Source/cmSystemTools.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2016-09-03 12:10:18 (GMT)
committerCMake Topic Stage <kwrobot@kitware.com>2016-09-03 12:10:18 (GMT)
commitbfdf1322e7638687c96b323b1df20fd9c08b3044 (patch)
treec216079eb479d30f8dacd119dbdc5f487966b44e /Source/cmSystemTools.cxx
parent4da61391eec301ab564ac8e3e5ee9dc7ffd4f8de (diff)
parentefed6468eda950644014ccfada85300710e05009 (diff)
downloadCMake-bfdf1322e7638687c96b323b1df20fd9c08b3044.zip
CMake-bfdf1322e7638687c96b323b1df20fd9c08b3044.tar.gz
CMake-bfdf1322e7638687c96b323b1df20fd9c08b3044.tar.bz2
Merge topic 'include-what-you-use'
efed6468 fix a load of include-what-you-use violations bd3d0eaf cmCTest: don't redefine cout and cerr 3838a0d5 make sure to include cmConfigure.h before cmStandardIncludes.h 54140848 Tests/CMakeLib: include what you use 3f9c4cdf Tests/CMakeLib: use cmsys::ifstream
Diffstat (limited to 'Source/cmSystemTools.cxx')
-rw-r--r--Source/cmSystemTools.cxx66
1 files changed, 36 insertions, 30 deletions
diff --git a/Source/cmSystemTools.cxx b/Source/cmSystemTools.cxx
index 21a50cb..be0ee50 100644
--- a/Source/cmSystemTools.cxx
+++ b/Source/cmSystemTools.cxx
@@ -12,20 +12,7 @@
#include "cmSystemTools.h"
#include "cmAlgorithms.h"
-#include <assert.h>
-#include <ctype.h>
-#include <errno.h>
-#include <stdlib.h>
-#include <string.h>
-#include <time.h>
-#ifdef __QNX__
-#include <malloc.h> /* for malloc/free on QNX */
-#endif
-#include <cmsys/Directory.hxx>
-#include <cmsys/Encoding.hxx>
-#include <cmsys/Glob.hxx>
-#include <cmsys/RegularExpression.hxx>
-#include <cmsys/System.h>
+
#if defined(CMAKE_BUILD_WITH_CMAKE)
#include "cmArchiveWrite.h"
#include "cmLocale.h"
@@ -34,8 +21,38 @@
#define __LA_INT64_T la_int64_t
#endif
#endif
+
+#if defined(CMAKE_BUILD_WITH_CMAKE)
+#include "cmCryptoHash.h"
+#endif
+
+#if defined(CMAKE_USE_ELF_PARSER)
+#include "cmELF.h"
+#endif
+
+#if defined(CMAKE_USE_MACH_PARSER)
+#include "cmMachO.h"
+#endif
+
+#include <algorithm>
+#include <assert.h>
+#include <cmsys/Directory.hxx>
+#include <cmsys/Encoding.hxx>
#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>
+#include <iostream>
+#include <set>
+#include <sstream>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <sys/stat.h>
+#include <time.h>
#if defined(_WIN32)
#include <windows.h>
@@ -43,33 +60,21 @@
#include <wincrypt.h>
#else
#include <sys/time.h>
-#include <sys/types.h>
-#include <sys/wait.h>
#include <unistd.h>
#include <utime.h>
#endif
-#if defined(__APPLE__)
-#include <mach-o/dyld.h>
-#endif
-
-#include <sys/stat.h>
-
#if defined(_WIN32) && \
(defined(_MSC_VER) || defined(__WATCOMC__) || defined(__MINGW32__))
#include <io.h>
#endif
-#if defined(CMAKE_BUILD_WITH_CMAKE)
-#include "cmCryptoHash.h"
-#endif
-
-#if defined(CMAKE_USE_ELF_PARSER)
-#include "cmELF.h"
+#if defined(__APPLE__)
+#include <mach-o/dyld.h>
#endif
-#if defined(CMAKE_USE_MACH_PARSER)
-#include "cmMachO.h"
+#ifdef __QNX__
+#include <malloc.h> /* for malloc/free on QNX */
#endif
static bool cm_isspace(char c)
@@ -142,6 +147,7 @@ private:
};
#elif defined(__APPLE__)
#include <crt_externs.h>
+
#define environ (*_NSGetEnviron())
#endif