[cmake-developers] Integrate API/ABI checker to the CMake

Andrey Ponomarenko aponomarenko at ispras.ru
Thu Oct 27 02:34:36 EDT 2011


On 10/09/2011 07:37 PM, Alexander Neundorf wrote:
> On Friday 07 October 2011, Andrey Ponomarenko wrote:
>> Hello,
>>
>> I have an idea to improve the CMake build system by integrating with the
>> abi-compliance-checker [1] tool. It's a tool for checking for API/ABI
>> backward compatibility of C/C++ libraries. In the Java world there is an
>> alternative tool called Clirr, which is already integrated to the Ant
>> and Maven build systems as a plug-in. But there is no such thing in the
>> C/C++ world yet. So, people have to create custom scripts (phonon/cmake
>> [2], mysql++/make [3], ...) to integrate the abi-compliance-checker tool
>> into the build system.
>>
>> It would be great if CMake users could be able to check API/ABI changes
>> using two easy built-in CMake commands: "make abidump" and "make
>> abicheck", without the need to understand how the abi-compliance-checker
>> tool works. The first command ("make abidump") should create a snapshot
>> of a "stable" library ABI, which will be compared with the next releases
>> by the second command ("make abicheck"):
>>
>> "make abidump": abi-compliance-checker --lib=name --dump=v1.xml
>> --dump-path=snapshot-v1.abi.tar.gz
>> "make abicheck": abi-compliance-checker --lib=name
>> --d1=snapshot-v1.abi.tar.gz --d2=v2.xml
>>
>> v1.xml and v2.xml are XML-descriptors of old (snapshot) and new
>> (current) versions of a library(ies):
>>
>> <version>
>>       1.0
>> </version>
>>
>> <headers>
>> /directory/with/headers/
>> </headers>
>>
>> <libs>
>> /directory/with/libraries/
>> </libs>
>>
>> I'm not familiar with the CMake internals and cannot implement this
>> feature by myself. It would be great if some experts in CMake could
>> write it. Considering the great number of C/C++ libraries using CMake,
>> this feature should make upstream development of C/C++ libraries more
>> stable.
> Maybe you don't have to be familiar with CMake internals to do this.
> It may be that this can be done simply in cmake script, but putting some
> macros or functions into a CMakeABICheck.cmake file or something like this.
>
> Did you try to use add_custom_target() to exeucte the described steps ?
>
> Alex
>

I will follow this way. Thanks!

-- 
Andrey Ponomarenko
Department for Operating Systems at ISPRAS
  web:    http://www.LinuxTesting.org
  mail:   aponomarenko at ispras.ru




More information about the cmake-developers mailing list