From f1a017539af6037649ffd0f05b51e4dff860885c Mon Sep 17 00:00:00 2001 From: Maarten Bent Date: Thu, 26 Mar 2020 23:30:51 +0100 Subject: [PATCH] Generate an error when the CPU parameter is not specified and cannot be determined See #18640 --- build/bakefiles/common.bkl | 10 ++++++++++ include/wx/msw/chkconf.h | 7 +++++++ 2 files changed, 17 insertions(+) diff --git a/build/bakefiles/common.bkl b/build/bakefiles/common.bkl index 4d92fee78512..f4b76863d603 100644 --- a/build/bakefiles/common.bkl +++ b/build/bakefiles/common.bkl @@ -396,6 +396,15 @@ + + + + TARGET_CPU_COMPFLAG=0 + + + + + diff --git a/include/wx/msw/chkconf.h b/include/wx/msw/chkconf.h index abf12efc455a..0c9b1acf418e 100644 --- a/include/wx/msw/chkconf.h +++ b/include/wx/msw/chkconf.h @@ -13,6 +13,13 @@ #ifndef _WX_MSW_CHKCONF_H_ #define _WX_MSW_CHKCONF_H_ +/* ensure that CPU parameter is specified (only nmake .vc makefile) */ +#ifdef _MSC_VER + #if defined(_WIN64) && defined(TARGET_CPU_COMPFLAG) && (TARGET_CPU_COMPFLAG == 0) + #error CPU must be defined + #endif +#endif + /* ensure that MSW-specific settings are defined */ #ifndef wxUSE_ACTIVEX # ifdef wxABORT_ON_CONFIG_ERROR