From fd74a720750d83905596cb3ea58528b839399a28 Mon Sep 17 00:00:00 2001 From: "Mark A. Tsuchida" Date: Wed, 24 Jan 2024 16:18:32 -0600 Subject: [PATCH] MMDevice/MMCore[J]: Remove unused macro defs Remove preprocessor definitions from MMDevice/MMCore/MMCoreJ_wrap .vcxproj files This is to maintain the cleanup done in #415 (specifically, 4536cc099caa4793fadacbea3dcc694de679f014) -- to prevent the vcxproj build from going out of sync with the experimental Meson build. - `_DEBUG` - the compiler defines this when using the debug runtime; redundant - `_LIB` - added by VS by default for static libs; we don't use it - `_USRDLL` - added by VS by default for DLLs; we don't use it - `_WINDOWS` - added by VS by default; we don't use it - `WIN32` - added by VS by default; we prefer `_WIN32`, defined by the compiler Also delete the single use of `_DEBUG` in `CMMCore::getVersionInfo()`. It is better not to produce a different version string in a debug build, because applications may parse this string (for example, a pymmcore test does that). All the other macros removed here are not currently used in these projects. --- MMCore/MMCore.cpp | 3 --- MMCore/MMCore.vcxproj | 4 ++-- MMCoreJ_wrap/MMCoreJ_wrap.vcxproj | 5 ++--- MMDevice/MMDevice-SharedRuntime.vcxproj | 5 ++--- MMDevice/MMDevice-StaticRuntime.vcxproj | 5 ++--- 5 files changed, 8 insertions(+), 14 deletions(-) diff --git a/MMCore/MMCore.cpp b/MMCore/MMCore.cpp index 22c2c2ecc..4bef95471 100644 --- a/MMCore/MMCore.cpp +++ b/MMCore/MMCore.cpp @@ -362,9 +362,6 @@ std::string CMMCore::getVersionInfo() const std::ostringstream txt; std::string debug; txt << "MMCore version " << MMCore_versionMajor << "." << MMCore_versionMinor << "." << MMCore_versionPatch; - #ifdef _DEBUG - txt << " (debug)"; - #endif return txt.str(); } diff --git a/MMCore/MMCore.vcxproj b/MMCore/MMCore.vcxproj index 3fe6c5a21..ebfdcb9ba 100644 --- a/MMCore/MMCore.vcxproj +++ b/MMCore/MMCore.vcxproj @@ -50,7 +50,7 @@ Disabled - MMDEVICE_CLIENT_BUILD;NOMINMAX;WIN32;_DEBUG;_LIB;_WINDOWS;%(PreprocessorDefinitions) + MMDEVICE_CLIENT_BUILD;NOMINMAX;%(PreprocessorDefinitions) EnableFastChecks true @@ -65,7 +65,7 @@ X64 - MMDEVICE_CLIENT_BUILD;NOMINMAX;WIN32;NDEBUG;_LIB;_WINDOWS;%(PreprocessorDefinitions) + MMDEVICE_CLIENT_BUILD;NOMINMAX;NDEBUG;%(PreprocessorDefinitions) true diff --git a/MMCoreJ_wrap/MMCoreJ_wrap.vcxproj b/MMCoreJ_wrap/MMCoreJ_wrap.vcxproj index f0128901f..54e1e1902 100644 --- a/MMCoreJ_wrap/MMCoreJ_wrap.vcxproj +++ b/MMCoreJ_wrap/MMCoreJ_wrap.vcxproj @@ -53,7 +53,6 @@ Disabled $(JAVA_HOME)\include\win32;$(JAVA_HOME)\include;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_WINDOWS;_USRDLL;MMCOREJ_WRAP_EXPORTS;%(PreprocessorDefinitions) EnableFastChecks true @@ -73,7 +72,7 @@ $(JAVA_HOME)\include\win32;$(JAVA_HOME)\include;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_WINDOWS;_USRDLL;MMCOREJ_WRAP_EXPORTS;%(PreprocessorDefinitions) + NDEBUG;%(PreprocessorDefinitions) true @@ -147,4 +146,4 @@ copy %swig_out_dir%\*.java %java_src_dir%\ > NUL - \ No newline at end of file + diff --git a/MMDevice/MMDevice-SharedRuntime.vcxproj b/MMDevice/MMDevice-SharedRuntime.vcxproj index 8fc7e8ad2..8df751203 100644 --- a/MMDevice/MMDevice-SharedRuntime.vcxproj +++ b/MMDevice/MMDevice-SharedRuntime.vcxproj @@ -65,7 +65,6 @@ Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) Windows @@ -77,7 +76,7 @@ MaxSpeed true true - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) + NDEBUG;%(PreprocessorDefinitions) Windows @@ -89,4 +88,4 @@ - \ No newline at end of file + diff --git a/MMDevice/MMDevice-StaticRuntime.vcxproj b/MMDevice/MMDevice-StaticRuntime.vcxproj index bdb2fce9a..b1317341a 100644 --- a/MMDevice/MMDevice-StaticRuntime.vcxproj +++ b/MMDevice/MMDevice-StaticRuntime.vcxproj @@ -65,7 +65,6 @@ Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) MultiThreadedDebug @@ -78,7 +77,7 @@ MaxSpeed true true - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) + NDEBUG;%(PreprocessorDefinitions) MultiThreaded @@ -91,4 +90,4 @@ - \ No newline at end of file +