From 947e88c43c4f6103cb186bf5a0463340a15cc454 Mon Sep 17 00:00:00 2001
From: Dmitri Naumov <dmitri.naumov@ufz.de>
Date: Tue, 19 Aug 2014 14:53:52 +0200
Subject: [PATCH] Remove OGS_BUILD_INFO, which is always generated.

---
 CMakeLists.txt                                |  5 ----
 Gui/DataExplorer.cmake                        |  4 ---
 Gui/mainwindow.cpp                            |  2 --
 SimpleTests/MatrixTests/MatMult.cpp           | 20 ++++++--------
 SimpleTests/MatrixTests/MatVecMultNDPerm.cpp  | 20 ++++++--------
 .../MatrixTests/MatVecMultNDPermOpenMP.cpp    | 20 ++++++--------
 .../MatrixTests/MatVecMultPthreads.cpp        | 26 ++++++++-----------
 7 files changed, 35 insertions(+), 62 deletions(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index ecf5bc23f08..1cb91d27654 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -81,11 +81,6 @@ IF (OGS_CMAKE_DEBUG)
 	list_all_cmake_variable_values()
 ENDIF (OGS_CMAKE_DEBUG)
 
-OPTION(OGS_BUILD_INFO "Should build information be generated" ON)
-IF (OGS_BUILD_INFO)
-	ADD_DEFINITIONS (-DOGS_BUILD_INFO)
-ENDIF (OGS_BUILD_INFO)
-
 # Code coverage
 OPTION(OGS_COVERAGE "Enables code coverage measurements with gcov/lcov." OFF)
 
diff --git a/Gui/DataExplorer.cmake b/Gui/DataExplorer.cmake
index e629f1b421e..e83745cb494 100644
--- a/Gui/DataExplorer.cmake
+++ b/Gui/DataExplorer.cmake
@@ -105,10 +105,6 @@ IF(MSVC)
 	TARGET_LINK_LIBRARIES( ogs-gui winmm)
 ENDIF(MSVC)
 
-IF(OGS_BUILD_INFO)
-	ADD_DEFINITIONS(-DOGS_BUILD_INFO)
-ENDIF() # OGS_BUILD_INFO
-
 ### OpenSG support ###
 IF (VTKOSGCONVERTER_FOUND)
 	USE_OPENSG(ogs-gui)
diff --git a/Gui/mainwindow.cpp b/Gui/mainwindow.cpp
index f917d13cb43..6f93923da37 100644
--- a/Gui/mainwindow.cpp
+++ b/Gui/mainwindow.cpp
@@ -119,9 +119,7 @@
 #include "VtkTrackedCamera.h"
 #endif // OGS_USE_VRPN
 
-#ifdef OGS_BUILD_INFO
 #include "BaseLib/BuildInfo.h"
-#endif // OGS_BUILD_INFO
 
 using namespace FileIO;
 
diff --git a/SimpleTests/MatrixTests/MatMult.cpp b/SimpleTests/MatrixTests/MatMult.cpp
index fbd318729a3..382e2a0c254 100644
--- a/SimpleTests/MatrixTests/MatMult.cpp
+++ b/SimpleTests/MatrixTests/MatMult.cpp
@@ -35,9 +35,7 @@
 #include <sys/unistd.h>
 #endif
 
-#ifdef OGS_BUILD_INFO
 #include "BaseLib/BuildInfo.h"
-#endif
 
 #ifdef _OPENMP
 #include <omp.h>
@@ -101,19 +99,17 @@ int main(int argc, char *argv[])
 	// read number of threads
 	unsigned n_threads (n_cores_arg.getValue());
 
-#ifdef OGS_BUILD_INFO
 	INFO("%s was build with compiler %s",
 		argv[0],
 		BaseLib::BuildInfo::cmake_cxx_compiler.c_str());
-	#ifdef NDEBUG
-		INFO("CXX_FLAGS: %s %s",
-			BaseLib::BuildInfo::cmake_cxx_flags.c_str(),
-			BaseLib::BuildInfo::cmake_cxx_flags_release.c_str());
-	#else
-		INFO("CXX_FLAGS: %s %s",
-			BaseLib::BuildInfo::cmake_cxx_flags.c_str(),
-			BaseLib::BuildInfo::cmake_cxx_flags_debug.c_str());
-	#endif
+#ifdef NDEBUG
+	INFO("CXX_FLAGS: %s %s",
+		BaseLib::BuildInfo::cmake_cxx_flags.c_str(),
+		BaseLib::BuildInfo::cmake_cxx_flags_release.c_str());
+#else
+	INFO("CXX_FLAGS: %s %s",
+		BaseLib::BuildInfo::cmake_cxx_flags.c_str(),
+		BaseLib::BuildInfo::cmake_cxx_flags_debug.c_str());
 #endif
 
 #ifdef UNIX
diff --git a/SimpleTests/MatrixTests/MatVecMultNDPerm.cpp b/SimpleTests/MatrixTests/MatVecMultNDPerm.cpp
index a7c834d3948..0e9d7693827 100644
--- a/SimpleTests/MatrixTests/MatVecMultNDPerm.cpp
+++ b/SimpleTests/MatrixTests/MatVecMultNDPerm.cpp
@@ -14,9 +14,7 @@
 
 #include <cstdlib>
 
-#ifdef OGS_BUILD_INFO
 #include "BaseLib/BuildInfo.h"
-#endif
 
 #ifdef UNIX
 #include <sys/unistd.h>
@@ -89,19 +87,17 @@ int main(int argc, char *argv[])
 	logog::Cout *logogCout(new logog::Cout);
 	logogCout->SetFormatter(*custom_format);
 
-#ifdef OGS_BUILD_INFO
 	INFO("%s was build with compiler %s",
 		argv[0],
 		BaseLib::BuildInfo::cmake_cxx_compiler.c_str());
-	#ifdef NDEBUG
-		INFO("CXX_FLAGS: %s %s",
-			BaseLib::BuildInfo::cmake_cxx_flags.c_str(),
-			BaseLib::BuildInfo::cmake_cxx_flags_release.c_str());
-	#else
-		INFO("CXX_FLAGS: %s %s",
-			BaseLib::BuildInfo::cmake_cxx_flags.c_str(),
-			BaseLib::BuildInfo::cmake_cxx_flags_debug.c_str());
-	#endif
+#ifdef NDEBUG
+	INFO("CXX_FLAGS: %s %s",
+		BaseLib::BuildInfo::cmake_cxx_flags.c_str(),
+		BaseLib::BuildInfo::cmake_cxx_flags_release.c_str());
+#else
+	INFO("CXX_FLAGS: %s %s",
+		BaseLib::BuildInfo::cmake_cxx_flags.c_str(),
+		BaseLib::BuildInfo::cmake_cxx_flags_debug.c_str());
 #endif
 
 #ifdef UNIX
diff --git a/SimpleTests/MatrixTests/MatVecMultNDPermOpenMP.cpp b/SimpleTests/MatrixTests/MatVecMultNDPermOpenMP.cpp
index 9bc713be379..5393f638b83 100644
--- a/SimpleTests/MatrixTests/MatVecMultNDPermOpenMP.cpp
+++ b/SimpleTests/MatrixTests/MatVecMultNDPermOpenMP.cpp
@@ -34,9 +34,7 @@
 #include <sys/unistd.h>
 #endif
 
-#ifdef OGS_BUILD_INFO
 #include "BaseLib/BuildInfo.h"
-#endif
 
 #ifdef _OPENMP
 #include <omp.h>
@@ -99,19 +97,17 @@ int main(int argc, char *argv[])
 	// read number of threads
 	unsigned n_threads (n_cores_arg.getValue());
 
-#ifdef OGS_BUILD_INFO
 	INFO("%s was build with compiler %s",
 		argv[0],
 		BaseLib::BuildInfo::cmake_cxx_compiler.c_str());
-	#ifdef NDEBUG
-		INFO("CXX_FLAGS: %s %s",
-			BaseLib::BuildInfo::cmake_cxx_flags.c_str(),
-			BaseLib::BuildInfo::cmake_cxx_flags_release.c_str());
-	#else
-		INFO("CXX_FLAGS: %s %s",
-			BaseLib::BuildInfo::cmake_cxx_flags.c_str(),
-			BaseLib::BuildInfo::cmake_cxx_flags_debug.c_str());
-	#endif
+#ifdef NDEBUG
+	INFO("CXX_FLAGS: %s %s",
+		BaseLib::BuildInfo::cmake_cxx_flags.c_str(),
+		BaseLib::BuildInfo::cmake_cxx_flags_release.c_str());
+#else
+	INFO("CXX_FLAGS: %s %s",
+		BaseLib::BuildInfo::cmake_cxx_flags.c_str(),
+		BaseLib::BuildInfo::cmake_cxx_flags_debug.c_str());
 #endif
 
 #ifdef UNIX
diff --git a/SimpleTests/MatrixTests/MatVecMultPthreads.cpp b/SimpleTests/MatrixTests/MatVecMultPthreads.cpp
index 2ef9024a775..88f8ce06751 100644
--- a/SimpleTests/MatrixTests/MatVecMultPthreads.cpp
+++ b/SimpleTests/MatrixTests/MatVecMultPthreads.cpp
@@ -32,9 +32,7 @@
 #include <sys/unistd.h>
 #endif
 
-#ifdef OGS_BUILD_INFO
 #include "BaseLib/BuildInfo.h"
-#endif
 
 #ifdef HAVE_PTHREADS
 #include <pthread.h>
@@ -93,19 +91,17 @@ int main(int argc, char *argv[])
 		logog_file->SetFormatter( *custom_format );
 	}
 
-#ifdef OGS_BUILD_INFO
-	INFO("%s was build with compiler %s",
-		argv[0],
-		BaseLib::BuildInfo::cmake_cxx_compiler.c_str());
-	#ifdef NDEBUG
-		INFO("CXX_FLAGS: %s %s",
-			BaseLib::BuildInfo::cmake_cxx_flags.c_str(),
-			BaseLib::BuildInfo::cmake_cxx_flags_release.c_str());
-	#else
-		INFO("CXX_FLAGS: %s %s",
-			BaseLib::BuildInfo::cmake_cxx_flags.c_str(),
-			BaseLib::BuildInfo::cmake_cxx_flags_debug.c_str());
-	#endif
+INFO("%s was build with compiler %s",
+	argv[0],
+	BaseLib::BuildInfo::cmake_cxx_compiler.c_str());
+#ifdef NDEBUG
+	INFO("CXX_FLAGS: %s %s",
+		BaseLib::BuildInfo::cmake_cxx_flags.c_str(),
+		BaseLib::BuildInfo::cmake_cxx_flags_release.c_str());
+#else
+	INFO("CXX_FLAGS: %s %s",
+		BaseLib::BuildInfo::cmake_cxx_flags.c_str(),
+		BaseLib::BuildInfo::cmake_cxx_flags_debug.c_str());
 #endif
 
 #ifdef UNIX
-- 
GitLab