diff options
author | Brad King <brad.king@kitware.com> | 2019-01-28 13:21:32 (GMT) |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2019-01-28 13:21:50 (GMT) |
commit | 1593e16d881bf74fd8981e1290d20f28191f1f0e (patch) | |
tree | 1b6753dc6e1a12314452b3a477453f28e55b9949 /Source | |
parent | dc752c9d2d4bc2c0ad047689bd01bb75aa8f8fb9 (diff) | |
parent | 2a9220c34d26d33b5733ba41a25c44e02c8cdb3a (diff) | |
download | CMake-1593e16d881bf74fd8981e1290d20f28191f1f0e.zip CMake-1593e16d881bf74fd8981e1290d20f28191f1f0e.tar.gz CMake-1593e16d881bf74fd8981e1290d20f28191f1f0e.tar.bz2 |
Merge topic 'get_filename_component_last_ext'
2a9220c34d Help: Add notes for topic 'get_filename_component_last_ext'
edda30d0f5 Tests: Add tests for LAST_EXT and NAME_WLE
7a25ef326b Help: Add documentation for new get_filename_component components
e50a36df48 cmGetFilenameComponentCommand: Add more components
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2853
Diffstat (limited to 'Source')
-rw-r--r-- | Source/cmGetFilenameComponentCommand.cxx | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/Source/cmGetFilenameComponentCommand.cxx b/Source/cmGetFilenameComponentCommand.cxx index ffb895e..163b4c8 100644 --- a/Source/cmGetFilenameComponentCommand.cxx +++ b/Source/cmGetFilenameComponentCommand.cxx @@ -88,6 +88,10 @@ bool cmGetFilenameComponentCommand::InitialPass( result = cmSystemTools::GetFilenameExtension(filename); } else if (args[2] == "NAME_WE") { result = cmSystemTools::GetFilenameWithoutExtension(filename); + } else if (args[2] == "LAST_EXT") { + result = cmSystemTools::GetFilenameLastExtension(filename); + } else if (args[2] == "NAME_WLE") { + result = cmSystemTools::GetFilenameWithoutLastExtension(filename); } else if (args[2] == "ABSOLUTE" || args[2] == "REALPATH") { // If the path given is relative, evaluate it relative to the // current source directory unless the user passes a different |