From 4bb86be776474afcfb20589bdb459c67d335f0f3 Mon Sep 17 00:00:00 2001 From: BenDroid Date: Sun, 24 Dec 2017 21:16:28 +0100 Subject: [PATCH] Fixed MSC_VER for latest Visual Studio builds Added build type to summary to detect if debug or release build --- CMakeLists.txt | 1 + src/Summary.cpp | 5 ++--- src/version.h | 8 +++++++- 3 files changed, 10 insertions(+), 4 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 9abddaca..fa6dcfbb 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -2,6 +2,7 @@ cmake_minimum_required(VERSION 2.8) project(xmrig) #set(CMAKE_BUILD_TYPE Debug) +set(CMAKE_BUILD_TYPE Release) option(WITH_LIBCPUID "Use Libcpuid" ON) option(WITH_AEON "CryptoNight-Lite support" ON) diff --git a/src/Summary.cpp b/src/Summary.cpp index 1d259f3f..37eae376 100644 --- a/src/Summary.cpp +++ b/src/Summary.cpp @@ -51,9 +51,8 @@ static void print_versions() buf[0] = '\0'; # endif - - Log::i()->text(Options::i()->colors() ? "\x1B[01;32m * \x1B[01;37mVERSIONS: \x1B[01;36m%s/%s\x1B[01;37m libuv/%s%s" : " * VERSIONS: %s/%s libuv/%s%s", - APP_NAME, APP_VERSION, uv_version_string(), buf); + Log::i()->text(Options::i()->colors() ? "\x1B[01;32m * \x1B[01;37mVERSIONS: \x1B[01;36m%s/%s\x1B[01;37m libuv/%s%s \x1B[01;36m(%s)" : " * VERSIONS: %s/%s libuv/%s%s (%s)", + APP_NAME, APP_VERSION, uv_version_string(), buf, BUILD_TYPE); } diff --git a/src/version.h b/src/version.h index c01affcb..666d72d9 100644 --- a/src/version.h +++ b/src/version.h @@ -46,8 +46,14 @@ #define APP_VER_BUILD 2 #define APP_VER_REV 0 +#ifndef NDEBUG +#define BUILD_TYPE "DEBUG" +#else +#define BUILD_TYPE "RELEASE" +#endif + #ifdef _MSC_VER -# if (_MSC_VER == 1910 || _MSC_VER == 1911) +# if (_MSC_VER >= 1910) # define MSVC_VERSION 2017 # elif _MSC_VER == 1900 # define MSVC_VERSION 2015