/alps/pcitool

To get this branch, use:
bzr branch http://darksoft.org/webbzr/alps/pcitool

« back to all changes in this revision

Viewing changes to cmake/tools.cmake

  • Committer: Suren A. Chilingaryan
  • Date: 2016-03-06 01:42:09 UTC
  • Revision ID: csa@suren.me-20160306014209-749izn2rwu2w6oym
Clean-up python files during the clean and do not delete driver Makefile while packaging

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
MACRO(PYTHON_CLEAN_LIST PYPATH RESULT)
 
2
    file(GLOB_RECURSE PYTHON_FILES "${PYPATH}/*.py")
 
3
 
 
4
    set(CLEAN_LIST "")
 
5
    set(PYTHON_DIRS "")
 
6
    foreach(ITEM ${PYTHON_FILES})
 
7
        get_filename_component(DIR ${ITEM} PATH)                # Later version may require to use DIRECTORY instead of PATH
 
8
        list(APPEND PYTHON_DIRS "${DIR}/__pycache__")
 
9
        list(APPEND CLEAN_LIST "${ITEM}c")
 
10
    endforeach(ITEM ${PYTHON_FILES})
 
11
    list(REMOVE_DUPLICATES PYTHON_DIRS)
 
12
    list(APPEND CLEAN_LIST ${PYTHON_DIRS})
 
13
 
 
14
    set(${RESULT} ${CLEAN_LIST})
 
15
ENDMACRO(PYTHON_CLEAN_LIST PYPATH CLEAN_LIST)