ecos_clean.cmake 968 B

1234567891011121314151617181920212223242526
  1. #=============================================================================
  2. # Copyright 2007-2009 Kitware, Inc.
  3. #
  4. # Distributed under the OSI-approved BSD License (the "License");
  5. # see accompanying file Copyright.txt for details.
  6. #
  7. # This software is distributed WITHOUT ANY WARRANTY; without even the
  8. # implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  9. # See the License for more information.
  10. #=============================================================================
  11. # (To distribute this file outside of CMake, substitute the full
  12. # License text for the above reference.)
  13. file(GLOB _files ${ECOS_DIR}/*)
  14. # remove all directories, which consist of lower-case letters only
  15. # this skips e.g. CVS/ and .subversion/
  16. foreach(_entry ${_files})
  17. if(IS_DIRECTORY ${_entry})
  18. get_filename_component(dir ${_entry} NAME)
  19. if(${dir} MATCHES "^[a-z]+$")
  20. file(REMOVE_RECURSE ${_entry})
  21. endif()
  22. endif()
  23. endforeach()