← Back to team overview

kicad-developers team mailing list archive

Re: *** SPAM *** Re: ngspice-34

 

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