kicad-developers team mailing list archive
-
kicad-developers team
-
Mailing list archive
-
Message #44864
Re: *** SPAM *** Re: ngspice-34
-
To:
kicad-developers@xxxxxxxxxxxxxxxxxxx
-
From:
Holger Vogt <holger.vogt@xxxxxxxxxx>
-
Date:
Thu, 4 Feb 2021 21:38:18 +0100
-
In-reply-to:
<CAJjB1qJX0D0hsObnbzyom+WX7g+nu3aAzMNFV4oqWS=gEjo9yw@mail.gmail.com>
-
User-agent:
Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.7.0
I prefer adding
#define PACKAGE_VERSION "34+"
to sharedspice.h.
sharespice.h has been and will always be there.
In old ngspice releases PACKAGE_VERSION is not defined. But config.h is
there, containing its PACKAGE_VERSION. In ngspice-34 unfortunately
PACKAGE_VERSION will not be available. But the code snipped below
starting at line 161 in common/build_version.cpp (not tested) should
just return "unknown". No user interaction is required. In ngspice-35
PACKAGE_VERSION will be available in sharedspice.h.
#else
#include <ngspice/sharedspice.h.h>
#ifdef PACKAGE_VERSION
aMsg << indent4 << "ngspice: " << PACKAGE_VERSION << eol;
#else
aMsg << indent4 << "ngspice: " << "unknown" << eol;
#endif
#endif
The disadvantage of the compile time approach of course is that it would
not follow a user who just upgrades (or downgrades?) ngspice.
Holger
Follow ups
References
-
ngspice-34
From: Holger Vogt, 2021-01-30
-
Re: ngspice-34
From: Wayne Stambaugh, 2021-01-30
-
Re: ngspice-34
From: Nick Østergaard, 2021-02-01
-
Re: ngspice-34
From: Holger Vogt, 2021-02-02
-
Re: ngspice-34
From: Jean-Samuel Reynaud, 2021-02-02
-
Re: ngspice-34
From: Carsten Schoenert, 2021-02-03
-
Re: ngspice-34
From: Holger Vogt, 2021-02-03
-
Re: ngspice-34
From: Ian McInerney, 2021-02-03
-
Re: ngspice-34
From: Holger Vogt, 2021-02-03
-
Re: ngspice-34
From: Carsten Schoenert, 2021-02-03
-
Re: *** SPAM *** Re: ngspice-34
From: jp charras, 2021-02-03
-
Re: *** SPAM *** Re: ngspice-34
From: Mark Roszko, 2021-02-04