Configure: make C++ build tests optional and configurable
authorRichard Levitte <levitte@openssl.org>
Thu, 28 Feb 2019 12:28:43 +0000 (13:28 +0100)
committerRichard Levitte <levitte@openssl.org>
Mon, 27 May 2019 17:05:22 +0000 (19:05 +0200)
Disabled by default

Fixes #8360

Reviewed-by: Paul Dale <paul.dale@oracle.com>
(Merged from https://github.com/openssl/openssl/pull/8370)

(cherry picked from commit ac4033d658e4dc210ed4552b88069b57532ba3d7)

CHANGES
Configure
test/build.info

diff --git a/CHANGES b/CHANGES
index 53f856393e65a5f11625aa75519048af70a24ebc..90937e1eac0a0965b956f2181bd5950b78dc9900 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -9,6 +9,14 @@
 
  Changes between 1.1.1b and 1.1.1c [xx XXX xxxx]
 
+  *) Added build tests for C++.  These are generated files that only do one
+     thing, to include one public OpenSSL head file each.  This tests that
+     the public header files can be usefully included in a C++ application.
+
+     This test isn't enabled by default.  It can be enabled with the option
+     'enable-buildtest-c++'.
+     [Richard Levitte]
+
   *) Change the default RSA, DSA and DH size to 2048 bit instead of 1024.
      This changes the size when using the genpkey app when no size is given. It
      fixes an omission in earlier changes that changed all RSA, DSA and DH
index f0892c20c0edc37002e50676a6fb3b98e51af2a9..b220337964db0cf272d6bb1797dda333135eb37d 100755 (executable)
--- a/Configure
+++ b/Configure
@@ -332,6 +332,7 @@ my @disablables = (
     "autoload-config",
     "bf",
     "blake2",
+    "buildtest-c++",
     "camellia",
     "capieng",
     "cast",
@@ -432,6 +433,7 @@ my %deprecated_disablables = (
 
 our %disabled = ( # "what"         => "comment"
                   "asan"                => "default",
+                  "buildtest-c++"       => "default",
                   "crypto-mdebug"       => "default",
                   "crypto-mdebug-backtrace" => "default",
                   "devcryptoeng"        => "default",
@@ -1167,7 +1169,7 @@ my %disabled_info = ();         # For configdata.pm
 foreach my $what (sort keys %disabled) {
     $config{options} .= " no-$what";
 
-    if (!grep { $what eq $_ } ( 'threads', 'shared', 'pic',
+    if (!grep { $what eq $_ } ( 'buildtest-c++', 'threads', 'shared', 'pic',
                                 'dynamic-engine', 'makedepend',
                                 'zlib-dynamic', 'zlib', 'sse2' )) {
         (my $WHAT = uc $what) =~ s|-|_|g;
index 22a7d199a5b6c2dea7ccb82915103d992c29eece..a2fb0e2e1e7eae5cfe401928bfc34193bdb1920e 100644 (file)
@@ -585,7 +585,7 @@ ENDIF
   INCLUDE[buildtest_c_$name]=../include
   DEPEND[buildtest_c_$name]=../libssl ../libcrypto
 _____
-       $OUT .= <<"_____" if $config{CXX};
+       $OUT .= <<"_____" if $config{CXX} && !$disabled{"buildtest-c++"};
 
   PROGRAMS_NO_INST=buildtest_cc_$name
   SOURCE[buildtest_cc_$name]=buildtest_$name.cc