From 97efde0fdc43503df531dac52f70ca3be080c24e Mon Sep 17 00:00:00 2001 From: cxgeorge <> Date: Wed, 11 Apr 2001 02:22:11 +0000 Subject: [PATCH] fix to mixed build types --- dtool/pptempl/Global.gmsvc.pp | 42 +------------------------------ dtool/pptempl/Global.msvc.pp | 40 +---------------------------- dtool/pptempl/compilerSettings.pp | 39 ++++++++++++++++++++++++++++ panda/src/chancfg/Sources.pp | 6 +++-- panda/src/char/Sources.pp | 6 +++-- panda/src/collide/Sources.pp | 8 +++--- panda/src/device/Sources.pp | 6 +++-- panda/src/display/Sources.pp | 6 +++-- panda/src/gui/Sources.pp | 4 +-- 9 files changed, 64 insertions(+), 93 deletions(-) create mode 100644 dtool/pptempl/compilerSettings.pp diff --git a/dtool/pptempl/Global.gmsvc.pp b/dtool/pptempl/Global.gmsvc.pp index 2346bb18b4..a8ba237187 100644 --- a/dtool/pptempl/Global.gmsvc.pp +++ b/dtool/pptempl/Global.gmsvc.pp @@ -75,47 +75,7 @@ #define dlllib dll #endif -#if $[and $[eq $[USE_COMPILER], INTEL], $[eq $[NOT_INTEL_BUILDABLE], true]] -#define USE_COMPILER MSVC -#endif - -#if $[eq $[USE_COMPILER], MSVC] - #define COMPILER cl - #define LINKER link - #define LIBBER lib - #define COMMONFLAGS /Gi- - #define OPTFLAGS /O2 /Ob1 /G6 - #defer DEBUGFLAGS /MDd /Zi $[BROWSEINFO_FLAG] /Fd"$[osfilename $[target:%.obj=%.pdb]]" - #define RELEASEFLAGS /MD - -// in case we have mixed intel/msvc build - #define EXTRA_LIBPATH /ia32/lib - #define EXTRA_INCPATH /ia32/include -#elif $[eq $[USE_COMPILER], BOUNDS] - #define COMPILER nmcl - #define LINKER nmlink - #define LIBBER lib - #define COMMONFLAGS - #define OPTFLAGS /O2 /Ogity /G6 - #defer DEBUGFLAGS /MDd /Zi $[BROWSEINFO_FLAG] /Fd"$[osfilename $[target:%.obj=%.pdb]]" - #define RELEASEFLAGS /MD - #define EXTRA_LIBPATH - #define EXTRA_INCPATH -#elif $[eq $[USE_COMPILER], INTEL] - #define COMPILER icl - #define LINKER xilink - #define LIBBER xilib - #define COMMONFLAGS /Gi- /Qwd985 -// #define OPTFLAGS /O3 /G6 /Qvc6 /Qipo /QaxW /Qvec_report1 - #define OPTFLAGS /O3 /G6 /Qvc6 /Qip - #define DEBUGFLAGS /MDd /Zi /Qinline_debug_info - #define RELEASEFLAGS /MD - // We assume the Intel compiler installation dir is mounted as /ia32. - #define EXTRA_LIBPATH /ia32/lib - #define EXTRA_INCPATH /ia32/include -#else - #error Invalid value specified for USE_COMPILER. -#endif +#include $[DTOOL]/pptempl/compilerSettings.pp #if $[CHECK_SYNTAX_ONLY] #define END_CFLAGS $[END_CFLAGS] /Zs diff --git a/dtool/pptempl/Global.msvc.pp b/dtool/pptempl/Global.msvc.pp index 373afad038..5bd03acf3a 100644 --- a/dtool/pptempl/Global.msvc.pp +++ b/dtool/pptempl/Global.msvc.pp @@ -76,45 +76,7 @@ #define CFLAGS_SHARED -#if $[and $[eq $[USE_COMPILER], INTEL], $[eq $[NOT_INTEL_BUILDABLE], true]] -#define USE_COMPILER MSVC -#endif - -#if $[eq $[USE_COMPILER], MSVC] - #define COMPILER cl - #define LINKER link - #define LIBBER lib - #define COMMONFLAGS /Gi- - #define OPTFLAGS /O2 /Ob1 /G6 - #defer DEBUGFLAGS /MDd /Zi $[BROWSEINFO_FLAG] /Fd"$[osfilename $[target:%.obj=%.pdb]]" - #define RELEASEFLAGS /MD - #define EXTRA_LIBPATH - #define EXTRA_INCPATH -#elif $[eq $[USE_COMPILER], BOUNDS] - #define COMPILER nmcl - #define LINKER nmlink - #define LIBBER lib - #define COMMONFLAGS - #define OPTFLAGS /O2 /G6 - #defer DEBUGFLAGS /MDd /Zi $[BROWSEINFO_FLAG] /Fd"$[osfilename $[target:%.obj=%.pdb]]" - #define RELEASEFLAGS /MD - #define EXTRA_LIBPATH - #define EXTRA_INCPATH -#elif $[eq $[USE_COMPILER], INTEL] - #define COMPILER icl - #define LINKER xilink - #define LIBBER xilib - #define COMMONFLAGS /Gi- -// #define OPTFLAGS /O3 /G6 /Qvc6 /Qwd985 /Qipo /QaxW /Qvec_report1 - #define OPTFLAGS /O3 /G6 /Qvc6 /Qwd985 - #define DEBUGFLAGS /MDd /Zi $[BROWSEINFO_FLAG] - #define RELEASEFLAGS /MD - // We assume the Intel compiler installation dir is mounted as /ia32. - #define EXTRA_LIBPATH /ia32/lib - #define EXTRA_INCPATH /ia32/include -#else - #error Invalid value specified for USE_COMPILER. -#endif +#include $[DTOOL]/pptempl/compilerSettings.pp #if $[CHECK_SYNTAX_ONLY] #define END_CFLAGS $[END_CFLAGS] /Zs diff --git a/dtool/pptempl/compilerSettings.pp b/dtool/pptempl/compilerSettings.pp new file mode 100644 index 0000000000..5cd4be851a --- /dev/null +++ b/dtool/pptempl/compilerSettings.pp @@ -0,0 +1,39 @@ + +#if $[eq $[USE_COMPILER], MSVC] + #define COMPILER cl + #define LINKER link + #define LIBBER lib + #define COMMONFLAGS /Gi- + #define OPTFLAGS /O2 /Ob1 /G6 + #defer DEBUGFLAGS /MDd /Zi $[BROWSEINFO_FLAG] /Fd"$[osfilename $[target:%.obj=%.pdb]]" + #define RELEASEFLAGS /MD + +// in case we have mixed intel/msvc build + #define EXTRA_LIBPATH /ia32/lib + #define EXTRA_INCPATH /ia32/include +#elif $[eq $[USE_COMPILER], BOUNDS] + #define COMPILER nmcl + #define LINKER nmlink + #define LIBBER lib + #define COMMONFLAGS + #define OPTFLAGS /O2 /Ogity /G6 + #defer DEBUGFLAGS /MDd /Zi $[BROWSEINFO_FLAG] /Fd"$[osfilename $[target:%.obj=%.pdb]]" + #define RELEASEFLAGS /MD + #define EXTRA_LIBPATH + #define EXTRA_INCPATH +#elif $[eq $[USE_COMPILER], INTEL] + #define COMPILER icl + #define LINKER xilink + #define LIBBER xilib + #define COMMONFLAGS /Gi- /Qwd985 +// #define OPTFLAGS /O3 /G6 /Qvc6 /Qipo /QaxW /Qvec_report1 + #define OPTFLAGS /O3 /G6 /Qvc6 /Qip + #define DEBUGFLAGS /MDd /Zi /Qinline_debug_info + #define RELEASEFLAGS /MD + // We assume the Intel compiler installation dir is mounted as /ia32. + #define EXTRA_LIBPATH /ia32/lib + #define EXTRA_INCPATH /ia32/include +#else + #error Invalid value specified for USE_COMPILER. +#endif + diff --git a/panda/src/chancfg/Sources.pp b/panda/src/chancfg/Sources.pp index 0ea4bba9f3..0fcafe48c0 100644 --- a/panda/src/chancfg/Sources.pp +++ b/panda/src/chancfg/Sources.pp @@ -1,8 +1,10 @@ #define OTHER_LIBS interrogatedb:c dconfig:c dtoolconfig:m \ dtoolutil:c dtoolbase:c dtool:m -// need to modify global scope -#set NOT_INTEL_BUILDABLE true +#if $[eq $[USE_COMPILER], INTEL] +#define USE_COMPILER MSVC +#include $[DTOOL]/pptempl/compilerSettings.pp +#endif #begin lib_target #define TARGET chancfg diff --git a/panda/src/char/Sources.pp b/panda/src/char/Sources.pp index 0b9ca41b9f..af55b22834 100644 --- a/panda/src/char/Sources.pp +++ b/panda/src/char/Sources.pp @@ -1,8 +1,10 @@ #define OTHER_LIBS interrogatedb:c dconfig:c dtoolconfig:m \ dtoolutil:c dtoolbase:c dtool:m -// need to modify global scope -#set NOT_INTEL_BUILDABLE true +#if $[eq $[USE_COMPILER], INTEL] +#define USE_COMPILER MSVC +#include $[DTOOL]/pptempl/compilerSettings.pp +#endif #begin lib_target #define TARGET char diff --git a/panda/src/collide/Sources.pp b/panda/src/collide/Sources.pp index 9e2e162acf..0c6ccaf21d 100644 --- a/panda/src/collide/Sources.pp +++ b/panda/src/collide/Sources.pp @@ -1,8 +1,10 @@ #define OTHER_LIBS interrogatedb:c dconfig:c dtoolconfig:m \ dtoolutil:c dtoolbase:c dtool:m - -// need to modify global scope -#set NOT_INTEL_BUILDABLE true + +#if $[eq $[USE_COMPILER], INTEL] +#define USE_COMPILER MSVC +#include $[DTOOL]/pptempl/compilerSettings.pp +#endif #begin lib_target #define TARGET collide diff --git a/panda/src/device/Sources.pp b/panda/src/device/Sources.pp index bb129ad9c1..f851586db7 100644 --- a/panda/src/device/Sources.pp +++ b/panda/src/device/Sources.pp @@ -1,8 +1,10 @@ #define OTHER_LIBS interrogatedb:c dconfig:c dtoolconfig:m \ dtoolutil:c dtoolbase:c dtool:m -// need to modify global scope -#set NOT_INTEL_BUILDABLE true +#if $[eq $[USE_COMPILER], INTEL] +#define USE_COMPILER MSVC +#include $[DTOOL]/pptempl/compilerSettings.pp +#endif #begin lib_target #define TARGET device diff --git a/panda/src/display/Sources.pp b/panda/src/display/Sources.pp index 4bdb85acb3..0d69f9c0a8 100644 --- a/panda/src/display/Sources.pp +++ b/panda/src/display/Sources.pp @@ -1,8 +1,10 @@ #define OTHER_LIBS interrogatedb:c dconfig:c dtoolconfig:m \ dtoolutil:c dtoolbase:c dtool:m -// need to modify global scope -#set NOT_INTEL_BUILDABLE true +#if $[eq $[USE_COMPILER], INTEL] +#define USE_COMPILER MSVC +#include $[DTOOL]/pptempl/compilerSettings.pp +#endif #begin lib_target #define TARGET display diff --git a/panda/src/gui/Sources.pp b/panda/src/gui/Sources.pp index 380c76e73f..8be1804e2d 100644 --- a/panda/src/gui/Sources.pp +++ b/panda/src/gui/Sources.pp @@ -1,8 +1,8 @@ #define OTHER_LIBS interrogatedb:c dconfig:c dtoolconfig:m \ dtoolutil:c dtoolbase:c dtool:m -// need to modify global scope -#set NOT_INTEL_BUILDABLE true +#define NOT_INTEL_BUILDABLE true +$[CheckCompilerCompatibility] #begin lib_target #define TARGET gui