I am trying to add most files from a directory to a variable.  I first
glob the source files, and then want to remove the unwanted files from
the resulting string.  Here is what I have:

  set( empty "" )

  file( GLOB f90_src src/*.f90 )

  string( REPLACE
    ${PROJECT_SOURCE_DIR}/src/ark_m.f90
    ${empty}
    f90_src
    ${f90_src}
  )

  message( STATUS ${f90_src} )

The problem is that the file is not removed as you would expect.  The
message still outputs a string with both files in it...

Is there a better way to achieve this?

Thanks!

James
_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake

Reply via email to