Splitting config.h into components

18 views
Skip to first unread message

Jeffrey Walton

unread,
May 16, 2019, 7:54:26 PM5/16/19
to Crypto++ Users
Hi Everyone,

I want to split config.h into several smaller files. It should help with managing the monolithic config.h, and allow better Autotools integration. As it stands we can't use Autoconf to write its test results because we can't do things like add a block of text in the config file Autoconf is preparing (it is a limitation in Autotools).

Users will still include <config.h> as they always done. The default we provide still works as expected.

As a starting point, the new config.h is:

    #ifndef CRYPTOPP_CONFIG_H
    #define CRYPTOPP_CONFIG_H

    #include "config_align.h"
    #include "config_base.h"
    #include "config_cpu.h"
    #include "config_cxx.h"
    #include "config_dll.h"
    #include "config_int.h"
    #include "config_misc.h"
    #include "config_ns.h"
    #include "config_os.h"
    #include "config_ver.h"

    #endif // CRYPTOPP_CONFIG_H

The additional config files contain what was in the monolithic config file.

The bigger difference is, Autotools can test for, say, C++11 alignas and write the result to <config_cxx.h> and it will be used instead of the default one we provide for non-Autotools users.

It is testing OK manually on Linux and OS X. I'm testing the new configuration on AppVeyor and Travis at https://github.com/noloader/cryptopp .

Any comments are appreciated.

Jeff

Uri Blumenthal

unread,
May 16, 2019, 9:52:23 PM5/16/19
to Jeffrey Walton, Crypto++ Users
I'm for it. 

Sent from my test iPhone
--
You received this message because you are subscribed to "Crypto++ Users". More information about Crypto++ and this group is available at http://www.cryptopp.com and http://groups.google.com/forum/#!forum/cryptopp-users.
---
You received this message because you are subscribed to the Google Groups "Crypto++ Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cryptopp-user...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/cryptopp-users/cc760109-0d9e-460d-a744-73a62ecadc37%40googlegroups.com.

lulu Han

unread,
May 17, 2019, 3:26:02 AM5/17/19
to Crypto++ Users
Very good.

在 2019年5月17日星期五 UTC+8上午7:54:26,Jeffrey Walton写道:

Jeffrey Walton

unread,
May 17, 2019, 3:19:47 PM5/17/19
to Crypto++ Users


On Thursday, May 16, 2019 at 7:54:26 PM UTC-4, Jeffrey Walton wrote:
Hi Everyone,

I want to split config.h into several smaller files. It should help with managing the monolithic config.h, and allow better Autotools integration. As it stands we can't use Autoconf to write its test results because we can't do things like add a block of text in the config file Autoconf is preparing (it is a limitation in Autotools).

Users will still include <config.h> as they always done. The default we provide still works as expected.

It tested OK and was merged at https://github.com/weidai11/cryptopp/pull/836

The merge also squashes some unrelated warnings that have been sitting in my testing branch for a while.

Jeff
Reply all
Reply to author
Forward
0 new messages