[cmake-developers] Need more information concerning the Trilinos test of CMake

Rolf Eike Beer eike at sf-mail.de
Wed Oct 25 04:46:36 EDT 2017


Am 2017-10-25 02:24, schrieb Alan W. Irwin:
> @Matthias:
> 
> I am directly addressing you in this post because git bisect says your
> recent commit is the first one that shows this issue.  More details 
> below.

> commit 49287eed2bf9860919a155af848e7cf49d45f504
> Author: Matthias Maennich <matthias at maennich.net>
> Date:   Mon Oct 9 16:25:52 2017 +0200
> 
>     CommandArgumentParser: avoid strcpy usage
> 
> as the first commit that had the bootstrap issue.

This very much looks like a change I had in a few weeks ago but removed 
from there because of exactly those compile failures. This works fine 
with newer gcc and apparently Clang versions, but older compilers do not 
like it.

Looking on that code again: I don't think it is needed to have anything 
of that in the class. Just make this file static variables:

static const char EmptyVariable[] = "";
static char DCURLYVariable[3] = "${";

and then drop those members from the class entirely. Maybe make them 
static variables in the class and initialize them in the cxx file if it 
is needed to have them in the class. But I don't see no reason to have 
them as writable, instance specific class members as those values will 
never change.

Eike


More information about the cmake-developers mailing list