From 670880086fd70f4f4e97986af178fb535de8047f Mon Sep 17 00:00:00 2001 From: h_vogt Date: Sat, 29 Oct 2016 14:09:45 +0200 Subject: [PATCH] cpitf.c, MS Visual Studio, introduce csh variable "pg_config" reflecting .exe compilation for 32/64 bit with/without NGDEBUG --- src/frontend/cpitf.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/src/frontend/cpitf.c b/src/frontend/cpitf.c index b61ea9741..03eefaaa7 100644 --- a/src/frontend/cpitf.c +++ b/src/frontend/cpitf.c @@ -223,6 +223,23 @@ ft_cpinit(void) /* Reset this for the front end. */ cp_hash = '*'; + /* set variables to read program configuration into special spinit for VS */ +#ifdef _MSC_VER +#ifdef CONFIG64 +#ifdef NGDEBUG + cp_vset("pg_config", CP_STRING, "d64"); +#else + cp_vset("pg_config", CP_STRING, "r64"); +#endif +#else +#ifdef NGDEBUG + cp_vset("pg_config", CP_STRING, "d32"); +#else + cp_vset("pg_config", CP_STRING, "r32"); +#endif +#endif +#endif + /* NGSPICEDATADIR has been set to path "$dprefix/share/ngspice" in configure.ac, Spice_Lib_Dir has been set to NGSPICEDATADIR in conf.c, may be overridden by environmental variable SPICE_LIB_DIR in ivars().