diff options
author | Tushar Maheshwari <tushar27192@gmail.com> | 2019-01-24 17:08:52 (GMT) |
---|---|---|
committer | Tushar Maheshwari <tushar27192@gmail.com> | 2019-01-24 17:08:52 (GMT) |
commit | e50a36df488be05dfbc85005c88ec8d4c5314a76 (patch) | |
tree | 122e7bda2ab573b7d51259e7420455290c91b2a7 /Source/cmGetFilenameComponentCommand.cxx | |
parent | 378473f9f184000cb768c1b99e6242e054787f34 (diff) | |
download | CMake-e50a36df488be05dfbc85005c88ec8d4c5314a76.zip CMake-e50a36df488be05dfbc85005c88ec8d4c5314a76.tar.gz CMake-e50a36df488be05dfbc85005c88ec8d4c5314a76.tar.bz2 |
cmGetFilenameComponentCommand: Add more components
LAST_EXT: gets last extension from filename with multiple periods
NAME_WLE: gets the name without the last extension
Diffstat (limited to 'Source/cmGetFilenameComponentCommand.cxx')
-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 |