- Given a C++ file, e.g. a class,
it calls libclang to parse the C++, and retrieve from
its AST the necessary info to write a xxx_desc.py file.
- THIS IS WORK IN PROGRESS. There are several corner cases for which we
may want (or not) the script to do better.
- It is not designed to be used automatically, but to to 90 % of the
boring typesetting work...
- The preamble still needs manual choices
- The properties, methods, functions are automatically declared in
the _desc file, in the simplest possible way.
- An option --properties, -p : to transform some simple methods or
get_x, set_x into python properties, not methods.
Cf doc.
- requires clang (tested on 3.4).
- the script is configured by cmake and installed in
INSTALLATION_DIRECTORY/bin, with some other files.
It can only be used for applications, after the lib has been installed.
It is cmake configured, to include automatically the various include
paths configure in the triqs installation, including the triqs install dir
in order to simplify invocation.
- TODO : improve, and test more in real cases.
- a module can use the converters used by another
with the use_module('A') command.
In which case :
- the generate converter header for A will be included.
- the header, at the top, now contains a simple list of all
wrapped types, which is then included in the wrapped_types
of the module for proper code generation.
- simplify the code generation : just generate_code.
- all arguments are analyzed from sys.argv at the import of the
wrap_generator module. In any case, the xx_desc.py will be called from the corresponding
cmake command, hence with the right arguments.
- Added a dependencies in my_module_B of wrap_test to show how to make
the dependencies in the cmake file, if needed.
With this modification it should now be possible to compile
an application even if:
1) It has already been installed
2) One does not have write permissions on the installed dir
modified: cmake/TRIQSConfig.cmake.in
I added a version.hpp and updated the version.py so that
one can find the version of the library either from the
c++ or the python (if there is python support).
modified: CMakeLists.txt
modified: cmake/TRIQSConfig.cmake.in
modified: pytriqs/version.py.in
modified: triqs/CMakeLists.txt
new file: triqs/version.hpp.in
new policy : for non standard conforming compilers,
we can skip the tests using new features using recent c++ features.
I.e. compilers below gcc 4.8.1, clang 3.3.