title: Strip filename (shortest) extension by CMake (get filename removing the last extension)
body: <p><a href="http://www.cmake.org/cmake/help/v3.2/command/get_filename_component.html?highlight=get_filename_component" rel="noreferrer">get_filename_component</a> can be used to remove/extract the longest extension.</p>
  
  <blockquote>
    <p>EXT       = File name longest extension (.b.c from d/a.b.c)</p>
    
    <p>NAME_WE   = File name without directory or longest extension</p>
  </blockquote>
  
  <p>I have a file with a dot in its name, so I need the shortest extension:</p>
  
  <pre><code>set(MYFILE "a.b.c.d")
  get_filename_component(MYFILE_WITHOUT_EXT ${MYFILE} NAME_WE)
  message(STATUS "${MYFILE_WITHOUT_EXT}") 
  </code></pre>
  
  <p>reports </p>
  
  <pre><code>-- a
  </code></pre>
  
  <p>but I want</p>
  
  <pre><code>-- a.b.c
  </code></pre>
  
  <p>What is the preferred way to find the file name without the shortest extension?</p>