diff options
author | Brad King <brad.king@kitware.com> | 2014-01-07 14:39:22 (GMT) |
---|---|---|
committer | CMake Topic Stage <kwrobot@kitware.com> | 2014-01-07 14:39:22 (GMT) |
commit | 855e8759fdf20a209f19f02e8dc5d203f4713a6a (patch) | |
tree | db9481bddcca00eaa5f5da2b632c23f7453125ac /Source/cmSystemTools.cxx | |
parent | f74b607aa3aaf4910b824bca09b0a369dbc57ee9 (diff) | |
parent | 3917d86b261f0b88eb5cf0e8d2700c70cebdbe4b (diff) | |
download | CMake-855e8759fdf20a209f19f02e8dc5d203f4713a6a.zip CMake-855e8759fdf20a209f19f02e8dc5d203f4713a6a.tar.gz CMake-855e8759fdf20a209f19f02e8dc5d203f4713a6a.tar.bz2 |
Merge topic 'minor-cleanups'
3917d86 Genex: Add a nullary form for CONFIG
5169130 Help: Document the target properties exported to IMPORTED targets.
ee21f1c CompatibleInterface: Test debugging of not-set property.
80e9fe9 Help: Note that language-specific 'built-ins' are set by the project command.
0b5bf8a Help: Mention CMAKE_DISABLE_FIND_PACKAGE_<PackageName> in package docs.
28c865b Tests: simplify Qt4 target usage
6cfe6b8 Help: Fix typo: 'target' -> 'target property'
b7deca4 Test: Remove obsolete commented code.
9c9f69f Genex: Make EQUAL support upper case binary literals
6eb3218 Genex: Fix case of methods in the dag checker.
646c6ec Genex: Use a preprocessor loop to implement transitive DAG check.
711fb38 Genex: List transitive properties and methods as a table, not two lists.
802a28f Add cmHasLiteralSuffix API.
Diffstat (limited to 'Source/cmSystemTools.cxx')
-rw-r--r-- | Source/cmSystemTools.cxx | 13 |
1 files changed, 3 insertions, 10 deletions
diff --git a/Source/cmSystemTools.cxx b/Source/cmSystemTools.cxx index e8e2007..41c7509 100644 --- a/Source/cmSystemTools.cxx +++ b/Source/cmSystemTools.cxx @@ -360,18 +360,11 @@ bool cmSystemTools::IsOn(const char* val) bool cmSystemTools::IsNOTFOUND(const char* val) { - size_t len = strlen(val); - const char* notfound = "-NOTFOUND"; - const size_t lenNotFound = 9; - if(len < lenNotFound-1) + if(strcmp(val, "NOTFOUND") == 0) { - return false; - } - if(len == lenNotFound-1) - { - return ( strcmp(val, "NOTFOUND") == 0); + return true; } - return ((strncmp((val + (len - lenNotFound)), notfound, lenNotFound) == 0)); + return cmHasLiteralSuffix(val, "-NOTFOUND"); } |