Branch: refs/heads/smoke-me/tonyc/cpp-header-porting
  Home:   https://github.com/Perl/perl5
  Commit: ac23c4f0003367e2fd1178fc4bb2264ffdee8c39
      
https://github.com/Perl/perl5/commit/ac23c4f0003367e2fd1178fc4bb2264ffdee8c39
  Author: Tony Cook <t...@develop-help.com>
  Date:   2024-05-20 (Mon, 20 May 2024)

  Changed paths:
    M MANIFEST
    A t/porting/cpphdrcheck.t

  Log Message:
  -----------
  porting/cpphdrcheck.t: test perl's headers with C++ compilers

This searches for a C++ compiler based on the supplied C compiler, and
checks that compiler for any options controlling the C++ standard
requested, including simple checks that the compiler supports that
standard.

If a C++ compiler is found, test compilation of the same simple code
as above but with the perl headers included after any C++ headers.

Ideally we'd also test runtime, but would require more complex test
code, which I leave to later contributors (which may still be me).

Tested at various times with:

 - MSVC
 - gcc
 - clang
 - Oracle/Sun Development Workshop cc (CC is the C++ compiler), on
   Oracle Linux
 - Intel oneAPI compiler (llvm based apparently, and now free to use)
 - Intel classic compiler (discontinued)

Currently this probes the compiler for C++ sanity with the perl
ccflags, since icc (Intel classic) would successfully build the sample
without perl's ccflags, but then fail with both the headers and perl's
ccflags.  It turned out to fail with just the ccflags, and since the
primary intent is to test the headers, I probe *with* ccflags.

The Sun Workshop compiler failed to build the C++11 or 14 sample at
all in my testing, which may have been due to an installation problem.



To unsubscribe from these emails, change your notification settings at 
https://github.com/Perl/perl5/settings/notifications

Reply via email to