[Cmake-commits] CMake branch, master, updated. v3.13.3-1149-g1593e16

Kitware Robot kwrobot at kitware.com
Mon Jan 28 08:23:03 EST 2019


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, master has been updated
       via  1593e16d881bf74fd8981e1290d20f28191f1f0e (commit)
       via  2a9220c34d26d33b5733ba41a25c44e02c8cdb3a (commit)
       via  edda30d0f5c7230b7854d8d714159ad68a2344ef (commit)
       via  7a25ef326bc53293f2dd288a7c092b4080658821 (commit)
       via  e50a36df488be05dfbc85005c88ec8d4c5314a76 (commit)
      from  dc752c9d2d4bc2c0ad047689bd01bb75aa8f8fb9 (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=1593e16d881bf74fd8981e1290d20f28191f1f0e
commit 1593e16d881bf74fd8981e1290d20f28191f1f0e
Merge: dc752c9 2a9220c
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Mon Jan 28 13:21:32 2019 +0000
Commit:     Kitware Robot <kwrobot at kitware.com>
CommitDate: Mon Jan 28 08:21:50 2019 -0500

    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 at kitware.com>
    Merge-request: !2853


https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=2a9220c34d26d33b5733ba41a25c44e02c8cdb3a
commit 2a9220c34d26d33b5733ba41a25c44e02c8cdb3a
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Mon Jan 28 08:20:24 2019 -0500
Commit:     Brad King <brad.king at kitware.com>
CommitDate: Mon Jan 28 08:20:24 2019 -0500

    Help: Add notes for topic 'get_filename_component_last_ext'

diff --git a/Help/release/dev/get_filename_component_last_ext.rst b/Help/release/dev/get_filename_component_last_ext.rst
new file mode 100644
index 0000000..2487dbc
--- /dev/null
+++ b/Help/release/dev/get_filename_component_last_ext.rst
@@ -0,0 +1,6 @@
+get_filename_component_last_ext
+-------------------------------
+
+* The :command:`get_filename_component` command gained new
+  ``LAST_EXT`` and ``NAME_WLE`` variants to work with the
+  extension after the last ``.`` in the name.

https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=edda30d0f5c7230b7854d8d714159ad68a2344ef
commit edda30d0f5c7230b7854d8d714159ad68a2344ef
Author:     Tushar Maheshwari <tushar27192 at gmail.com>
AuthorDate: Thu Jan 24 22:42:09 2019 +0530
Commit:     Tushar Maheshwari <tushar27192 at gmail.com>
CommitDate: Thu Jan 24 22:42:42 2019 +0530

    Tests: Add tests for LAST_EXT and NAME_WLE

diff --git a/Tests/RunCMake/get_filename_component/KnownComponents.cmake b/Tests/RunCMake/get_filename_component/KnownComponents.cmake
index ac77ac3..54b858f 100644
--- a/Tests/RunCMake/get_filename_component/KnownComponents.cmake
+++ b/Tests/RunCMake/get_filename_component/KnownComponents.cmake
@@ -11,8 +11,10 @@ set(expect_DIRECTORY "/path/to")
 set(expect_NAME "filename.ext.in")
 set(expect_EXT ".ext.in")
 set(expect_NAME_WE "filename")
+set(expect_LAST_EXT ".in")
+set(expect_NAME_WLE "filename.ext")
 set(expect_PATH "/path/to")
-foreach(c DIRECTORY NAME EXT NAME_WE PATH)
+foreach(c DIRECTORY NAME EXT NAME_WE LAST_EXT NAME_WLE PATH)
   get_filename_component(actual_${c} "${filename}" ${c})
   check("${c}" "${actual_${c}}" "${expect_${c}}")
   list(APPEND non_cache_vars actual_${c})

https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=7a25ef326bc53293f2dd288a7c092b4080658821
commit 7a25ef326bc53293f2dd288a7c092b4080658821
Author:     Tushar Maheshwari <tushar27192 at gmail.com>
AuthorDate: Thu Jan 24 22:41:22 2019 +0530
Commit:     Tushar Maheshwari <tushar27192 at gmail.com>
CommitDate: Thu Jan 24 22:41:22 2019 +0530

    Help: Add documentation for new get_filename_component components

diff --git a/Help/command/get_filename_component.rst b/Help/command/get_filename_component.rst
index 3e3c9c3..f55499a 100644
--- a/Help/command/get_filename_component.rst
+++ b/Help/command/get_filename_component.rst
@@ -15,6 +15,8 @@ Sets ``<var>`` to a component of ``<FileName>``, where ``<mode>`` is one of:
  NAME      = File name without directory
  EXT       = File name longest extension (.b.c from d/a.b.c)
  NAME_WE   = File name without directory or longest extension
+ LAST_EXT  = File name last extention (.c from d/a.b.c)
+ NAME_WLE  = File name without directory or last extension
  PATH      = Legacy alias for DIRECTORY (use for CMake <= 2.8.11)
 
 Paths are returned with forward slashes and have no trailing slashes.

https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=e50a36df488be05dfbc85005c88ec8d4c5314a76
commit e50a36df488be05dfbc85005c88ec8d4c5314a76
Author:     Tushar Maheshwari <tushar27192 at gmail.com>
AuthorDate: Thu Jan 24 22:38:52 2019 +0530
Commit:     Tushar Maheshwari <tushar27192 at gmail.com>
CommitDate: Thu Jan 24 22:38:52 2019 +0530

    cmGetFilenameComponentCommand: Add more components
    
    LAST_EXT: gets last extension from filename with multiple periods
    NAME_WLE: gets the name without the last extension

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

-----------------------------------------------------------------------

Summary of changes:
 Help/command/get_filename_component.rst                     | 2 ++
 Help/release/dev/get_filename_component_last_ext.rst        | 6 ++++++
 Source/cmGetFilenameComponentCommand.cxx                    | 4 ++++
 Tests/RunCMake/get_filename_component/KnownComponents.cmake | 4 +++-
 4 files changed, 15 insertions(+), 1 deletion(-)
 create mode 100644 Help/release/dev/get_filename_component_last_ext.rst


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list