[Cmake-commits] CMake branch, next, updated. v3.4.0-1553-g343a2a6
Brad King
brad.king at kitware.com
Tue Dec 1 08:49:58 EST 2015
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "CMake".
The branch, next has been updated
via 343a2a6fe2bf4ddd7b661fee1f6b1315247ae01d (commit)
via fe05ad975292a2ff57a66746f1aa3870217f1ddd (commit)
via e25f294a0e0aa03da4516d0baa488ad02cece089 (commit)
from 523ccb5cf99486b8951bec2505c677310eee710a (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=343a2a6fe2bf4ddd7b661fee1f6b1315247ae01d
commit 343a2a6fe2bf4ddd7b661fee1f6b1315247ae01d
Merge: 523ccb5 fe05ad9
Author: Brad King <brad.king at kitware.com>
AuthorDate: Tue Dec 1 08:49:57 2015 -0500
Commit: CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Tue Dec 1 08:49:57 2015 -0500
Merge topic 'update-kwsys' into next
fe05ad97 Merge branch 'upstream-kwsys' into update-kwsys
e25f294a KWSys 2015-12-01 (9596e98d)
https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=fe05ad975292a2ff57a66746f1aa3870217f1ddd
commit fe05ad975292a2ff57a66746f1aa3870217f1ddd
Merge: 2218962 e25f294
Author: Brad King <brad.king at kitware.com>
AuthorDate: Tue Dec 1 08:46:55 2015 -0500
Commit: Brad King <brad.king at kitware.com>
CommitDate: Tue Dec 1 08:46:55 2015 -0500
Merge branch 'upstream-kwsys' into update-kwsys
https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=e25f294a0e0aa03da4516d0baa488ad02cece089
commit e25f294a0e0aa03da4516d0baa488ad02cece089
Author: KWSys Robot <kwrobot at kitware.com>
AuthorDate: Tue Dec 1 08:44:34 2015 -0500
Commit: Brad King <brad.king at kitware.com>
CommitDate: Tue Dec 1 08:46:40 2015 -0500
KWSys 2015-12-01 (9596e98d)
Extract upstream KWSys using the following shell commands.
$ git archive --prefix=upstream-kwsys/ 9596e98d | tar x
$ git shortlog --no-merges --abbrev=8 --format='%h %s' a7e5360f..9596e98d
Dmitry Marakasov (1):
b86a2a3e Process: Fix off-by-one when adding two times
Marek Vasut (1):
ddfa8019 CPU: Add NIOS2 support
Rolf Eike Beer (2):
0adafb51 SystemTools: use FindProgram() overload that checks for directory
9596e98d SystemTools: move some code around that is used only on Windows-like platforms
diff --git a/CPU.h.in b/CPU.h.in
index 884d71a..66ffbb1 100644
--- a/CPU.h.in
+++ b/CPU.h.in
@@ -88,6 +88,10 @@
#elif defined(__mips) || defined(__mips__) || defined(__MIPS__)
# define @KWSYS_NAMESPACE at _CPU_ENDIAN_ID @KWSYS_NAMESPACE at _CPU_ENDIAN_ID_BIG
+/* NIOS2 */
+#elif defined(__NIOS2__) || defined(__NIOS2) || defined(__nios2__)
+# define @KWSYS_NAMESPACE at _CPU_ENDIAN_ID @KWSYS_NAMESPACE at _CPU_ENDIAN_ID_LITTLE
+
/* OpenRISC 1000 */
#elif defined(__or1k__)
# define @KWSYS_NAMESPACE at _CPU_ENDIAN_ID @KWSYS_NAMESPACE at _CPU_ENDIAN_ID_BIG
diff --git a/ProcessUNIX.c b/ProcessUNIX.c
index 6d9b109..b0ddf5a 100644
--- a/ProcessUNIX.c
+++ b/ProcessUNIX.c
@@ -2241,7 +2241,7 @@ static kwsysProcessTime kwsysProcessTimeAdd(kwsysProcessTime in1, kwsysProcessTi
kwsysProcessTime out;
out.tv_sec = in1.tv_sec + in2.tv_sec;
out.tv_usec = in1.tv_usec + in2.tv_usec;
- if(out.tv_usec > 1000000)
+ if(out.tv_usec >= 1000000)
{
out.tv_usec -= 1000000;
out.tv_sec += 1;
diff --git a/SystemTools.cxx b/SystemTools.cxx
index da34eb9..37fe421 100644
--- a/SystemTools.cxx
+++ b/SystemTools.cxx
@@ -2970,6 +2970,8 @@ std::string SystemTools::FindProgram(
bool no_system_path)
{
std::vector<std::string> extensions;
+ std::string tryPath;
+
#if defined (_WIN32) || defined(__CYGWIN__) || defined(__MINGW32__)
bool hasExtension = false;
// check to see if the name already has a .xxx at
@@ -2983,22 +2985,22 @@ std::string SystemTools::FindProgram(
{
extensions.push_back(".com");
extensions.push_back(".exe");
- }
-#endif
- std::string tryPath;
- // first try with extensions if the os supports them
- for(std::vector<std::string>::iterator i =
- extensions.begin(); i != extensions.end(); ++i)
- {
- tryPath = name;
- tryPath += *i;
- if(SystemTools::FileExists(tryPath) &&
- !SystemTools::FileIsDirectory(tryPath))
+ // first try with extensions if the os supports them
+ for(std::vector<std::string>::iterator i =
+ extensions.begin(); i != extensions.end(); ++i)
{
- return SystemTools::CollapseFullPath(tryPath);
+ tryPath = name;
+ tryPath += *i;
+ if(SystemTools::FileExists(tryPath) &&
+ !SystemTools::FileIsDirectory(tryPath))
+ {
+ return SystemTools::CollapseFullPath(tryPath);
+ }
}
}
+#endif
+
// now try just the name
tryPath = name;
if(SystemTools::FileExists(tryPath) &&
@@ -3048,8 +3050,7 @@ std::string SystemTools::FindProgram(
tryPath = *p;
tryPath += name;
tryPath += *ext;
- if(SystemTools::FileExists(tryPath) &&
- !SystemTools::FileIsDirectory(tryPath))
+ if(SystemTools::FileExists(tryPath, true))
{
return SystemTools::CollapseFullPath(tryPath);
}
@@ -3057,8 +3058,7 @@ std::string SystemTools::FindProgram(
// now try it without them
tryPath = *p;
tryPath += name;
- if(SystemTools::FileExists(tryPath) &&
- !SystemTools::FileIsDirectory(tryPath))
+ if(SystemTools::FileExists(tryPath, true))
{
return SystemTools::CollapseFullPath(tryPath);
}
@@ -3097,8 +3097,7 @@ std::string SystemTools
const std::vector<std::string>& userPaths)
{
// See if the executable exists as written.
- if(SystemTools::FileExists(name) &&
- !SystemTools::FileIsDirectory(name))
+ if(SystemTools::FileExists(name, true))
{
return SystemTools::CollapseFullPath(name);
}
@@ -3144,8 +3143,7 @@ std::string SystemTools
tryPath = *p;
tryPath += name;
tryPath += ".lib";
- if(SystemTools::FileExists(tryPath)
- && !SystemTools::FileIsDirectory(tryPath))
+ if(SystemTools::FileExists(tryPath, true))
{
return SystemTools::CollapseFullPath(tryPath);
}
@@ -3154,8 +3152,7 @@ std::string SystemTools
tryPath += "lib";
tryPath += name;
tryPath += ".so";
- if(SystemTools::FileExists(tryPath)
- && !SystemTools::FileIsDirectory(tryPath))
+ if(SystemTools::FileExists(tryPath, true))
{
return SystemTools::CollapseFullPath(tryPath);
}
@@ -3163,8 +3160,7 @@ std::string SystemTools
tryPath += "lib";
tryPath += name;
tryPath += ".a";
- if(SystemTools::FileExists(tryPath)
- && !SystemTools::FileIsDirectory(tryPath))
+ if(SystemTools::FileExists(tryPath, true))
{
return SystemTools::CollapseFullPath(tryPath);
}
@@ -3172,8 +3168,7 @@ std::string SystemTools
tryPath += "lib";
tryPath += name;
tryPath += ".sl";
- if(SystemTools::FileExists(tryPath)
- && !SystemTools::FileIsDirectory(tryPath))
+ if(SystemTools::FileExists(tryPath, true))
{
return SystemTools::CollapseFullPath(tryPath);
}
@@ -3181,8 +3176,7 @@ std::string SystemTools
tryPath += "lib";
tryPath += name;
tryPath += ".dylib";
- if(SystemTools::FileExists(tryPath)
- && !SystemTools::FileIsDirectory(tryPath))
+ if(SystemTools::FileExists(tryPath, true))
{
return SystemTools::CollapseFullPath(tryPath);
}
@@ -3190,8 +3184,7 @@ std::string SystemTools
tryPath += "lib";
tryPath += name;
tryPath += ".dll";
- if(SystemTools::FileExists(tryPath)
- && !SystemTools::FileIsDirectory(tryPath))
+ if(SystemTools::FileExists(tryPath, true))
{
return SystemTools::CollapseFullPath(tryPath);
}
-----------------------------------------------------------------------
Summary of changes:
Source/kwsys/CPU.h.in | 4 ++++
Source/kwsys/ProcessUNIX.c | 2 +-
Source/kwsys/SystemTools.cxx | 53 ++++++++++++++++++------------------------
3 files changed, 28 insertions(+), 31 deletions(-)
hooks/post-receive
--
CMake
More information about the Cmake-commits
mailing list