Skip to content

Python module for parsing CMakeLists.txt files

License

Notifications You must be signed in to change notification settings

HundredBai/cmakelists_parsing

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

81 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

cmakelists_parsing

Python module for parsing CMakeLists.txt files.

Installing

python setup.py install

or

sudo pip install cmakelists_parsing

Usage

The API can be used as follows:

>>> import cmakelists_parsing.parsing as cmp
>>> cmakelists_contents = 'FIND_PACKAGE(ITK REQUIRED)  # Hello, CMake!'
>>> cmp.parse(cmakelists_contents)
File([Command([u'ITK', u'REQUIRED', u'# Hello, CMake!'])])

There is also a command line utility called cmake_pprint that pretty-prints CMake files:

$ cmake_pprint CMakeLists.txt

About

Python module for parsing CMakeLists.txt files

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 90.0%
  • CMake 10.0%