From 83a4b37bcfb024ef0941911de3dd2c027290dd60 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miguel=20A=2E=20Col=C3=B3n=20V=C3=A9lez?= Date: Mon, 27 Jul 2015 14:00:47 -0400 Subject: [PATCH] Add an option to disable the inclusion of the build date. Debian has a goal to make reproducible builds therefore make it an option instead of distro specific. . I added an "OR openSusE" to not "break" the old openSUSE behavior but ideally they should just use -DDISABLE_BUILD_DATE=TRUE instead. . The old -DopenSUSE is not used for anything else so I removed it. --- cmake/BuildParameters.cmake | 6 ++++++ cmake/Pcsx2Utils.cmake | 1 - pcsx2/System.cpp | 4 ++-- pcsx2/gui/MainFrame.cpp | 2 +- 4 files changed, 9 insertions(+), 4 deletions(-) diff --git a/cmake/BuildParameters.cmake b/cmake/BuildParameters.cmake index 8beabcffb2..d5ddda8413 100644 --- a/cmake/BuildParameters.cmake +++ b/cmake/BuildParameters.cmake @@ -21,6 +21,12 @@ # Misc option #------------------------------------------------------------------------------- option(DISABLE_SVU "Disable superVU (don't use it)") +option(DISABLE_BUILD_DATE "Disable including the binary compile date") + +if(DISABLE_BUILD_DATE OR openSUSE) + message(STATUS "Disabling the inclusion of the binary compile date.") + add_definitions(-DDISABLE_BUILD_DATE) +endif() #------------------------------------------------------------------------------- # Graphical option diff --git a/cmake/Pcsx2Utils.cmake b/cmake/Pcsx2Utils.cmake index 6012668abc..9901329105 100644 --- a/cmake/Pcsx2Utils.cmake +++ b/cmake/Pcsx2Utils.cmake @@ -24,7 +24,6 @@ function(detectOperatingSystem) message(STATUS "Build Fedora specific") elseif("${OS_RELEASE}" MATCHES "^.*ID=.*suse.*$") set(openSUSE TRUE PARENT_SCOPE) - add_definitions(-DopenSUSE) message(STATUS "Build openSUSE specific") endif() endif() diff --git a/pcsx2/System.cpp b/pcsx2/System.cpp index 1b900fd4c6..1365b9e0d3 100644 --- a/pcsx2/System.cpp +++ b/pcsx2/System.cpp @@ -196,7 +196,7 @@ void SysLogMachineCaps() if ( !PCSX2_isReleaseVersion ) { Console.WriteLn(Color_StrongGreen, "PCSX2 %u.%u.%u-%lld %s" -#ifndef openSUSE +#ifndef DISABLE_BUILD_DATE "- compiled on " __DATE__ #endif , PCSX2_VersionHi, PCSX2_VersionMid, PCSX2_VersionLo, @@ -205,7 +205,7 @@ void SysLogMachineCaps() } else { // shorter release version string Console.WriteLn(Color_StrongGreen, "PCSX2 %u.%u.%u-%lld" -#ifndef openSUSE +#ifndef DISABLE_BUILD_DATE "- compiled on " __DATE__ #endif , PCSX2_VersionHi, PCSX2_VersionMid, PCSX2_VersionLo, diff --git a/pcsx2/gui/MainFrame.cpp b/pcsx2/gui/MainFrame.cpp index a09c4a3f4b..d1bfdbb429 100644 --- a/pcsx2/gui/MainFrame.cpp +++ b/pcsx2/gui/MainFrame.cpp @@ -359,7 +359,7 @@ MainEmuFrame::MainEmuFrame(wxWindow* parent, const wxString& title) else { // beta / development editions, which feature revision number and compile date. -#ifndef openSUSE +#ifndef DISABLE_BUILD_DATE wintitle.Printf( L"%s %d.%d.%d-%lld%s (git) %s", pxGetAppName().c_str(), PCSX2_VersionHi, PCSX2_VersionMid, PCSX2_VersionLo, SVN_REV, SVN_MODS ? L"m" : wxEmptyString, fromUTF8(__DATE__).c_str() ); #else