summaryrefslogtreecommitdiffstats
path: root/SystemTools.cxx
diff options
context:
space:
mode:
authorKWSys Upstream <kwrobot@kitware.com>2017-08-11 14:12:58 (GMT)
committerBrad King <brad.king@kitware.com>2017-08-11 14:13:22 (GMT)
commit9e0026216fb81e71ecd6918294a7ff8004132f1d (patch)
tree614e4179c83fa38835eb1b7929a48af4f627f408 /SystemTools.cxx
parenta32758782c953a333c0dd1e8553aee66a4404ee5 (diff)
downloadCMake-9e0026216fb81e71ecd6918294a7ff8004132f1d.zip
CMake-9e0026216fb81e71ecd6918294a7ff8004132f1d.tar.gz
CMake-9e0026216fb81e71ecd6918294a7ff8004132f1d.tar.bz2
KWSys 2017-08-11 (e1006189)
Code extracted from: https://gitlab.kitware.com/utils/kwsys.git at commit e100618908f7f7a41cbe623afa79ca0e4f17834a (master). Upstream Shortlog ----------------- Chuck Atkins (2): 993f0ea4 Add an option to split object and interface libs. b61faf89 Fix install rules and usage requirements for interface+object libs Justin Berger (2): 6d73752d Allow KWSYSPE_USE_SELECT macro to be overriden at compile time. da61baff Added cmake settable property to enable the macro Sean McBride (1): dfa13188 Fixed a couple of trivial clang -Wunused-macros warnings Shawn Waldon (1): da8a9e65 SystemTools: make GetFilenameName handle either kind of slash
Diffstat (limited to 'SystemTools.cxx')
-rw-r--r--SystemTools.cxx7
1 files changed, 2 insertions, 5 deletions
diff --git a/SystemTools.cxx b/SystemTools.cxx
index c5bbd41..11f3b81 100644
--- a/SystemTools.cxx
+++ b/SystemTools.cxx
@@ -847,6 +847,8 @@ void SystemTools::ReplaceString(std::string& source, const char* replace,
free(orig);
}
+#if defined(_WIN32) && !defined(__CYGWIN__)
+
#if defined(KEY_WOW64_32KEY) && defined(KEY_WOW64_64KEY)
#define KWSYS_ST_KEY_WOW64_32KEY KEY_WOW64_32KEY
#define KWSYS_ST_KEY_WOW64_64KEY KEY_WOW64_64KEY
@@ -855,7 +857,6 @@ void SystemTools::ReplaceString(std::string& source, const char* replace,
#define KWSYS_ST_KEY_WOW64_64KEY 0x0100
#endif
-#if defined(_WIN32) && !defined(__CYGWIN__)
static bool SystemToolsParseRegistryKey(const std::string& key,
HKEY& primaryKey, std::string& second,
std::string& valuename)
@@ -3796,11 +3797,7 @@ std::string SystemTools::GetFilenamePath(const std::string& filename)
*/
std::string SystemTools::GetFilenameName(const std::string& filename)
{
-#if defined(_WIN32)
std::string::size_type slash_pos = filename.find_last_of("/\\");
-#else
- std::string::size_type slash_pos = filename.rfind('/');
-#endif
if (slash_pos != std::string::npos) {
return filename.substr(slash_pos + 1);
} else {