title: Are CMake GLOB and source_group compatible?
body: <p>I'm using CMake 2.8.1 (on Windows) with the <code>"Visual Studio 10"</code> generator. <code>GLOB</code> and <code>source_group</code> don't seem to work together.  Is there a way to get this to work?</p>
  
  <p>I use <code>file( GLOB ... )</code> to create a list of <code>.cpp</code> files and then use <code>source_group</code> to create a <em>filter</em> in the generated Visual Studio project:</p>
  
  <pre><code># C:\Users\My Name\hello\CMakeLists.txt
  cmake_minimum_required( VERSION 2.8 )
  project( hello_proj )
  file( GLOB HELLO_SRCS *.cpp )
  message( "HELLO_SRCS="${HELLO_SRCS} )
  #source_group( hello_group ${HELLO_SRCS} ) #line 6: uncomment to get error
  add_executable( hello_exec ${HELLO_SRCS} )
  </code></pre>
  
  <p>with line 6 commented out, the project is generated fine:</p>
  
  <pre><code>C:\Users\My Name\hello&gt;cmake .
  HELLO_SRCS=C:/Users/My Name/hello/hello.cppC:/Users/My Name/hello/print_line.cpp
  -- Configuring done
  -- Generating done
  -- Build files have been written to: C:/Users/My Name/hello
  </code></pre>
  
  <p>with line 6 un-commented, I get an error:</p>
  
  <pre><code>C:\Users\My Name\hello&gt;cmake .
  HELLO_SRCS=C:/Users/My Name/hello/hello.cppC:/Users/My Name/hello/print_line.cpp
  CMake Error at CMakeLists.txt:6 (source_group):
    source_group Unknown argument "C:/Users/My Name/hello/hello.cpp".
    Perhaps the FILES keyword is missing.
  
  
  
  -- Configuring incomplete, errors occurred!
  </code></pre>
  
  <p>I notice that output value of <code>${HELLO_SRCS}</code> does not seem to contain any delimiters between the file names, nor does it have quotes or other delimiters wrapping the file names which contain spaces.  Does that have anything to do with my problem?  Renaming all directories to avoid spaces is not really an option.</p>