From 5727dc9959084090444e6abca7d2ee7fd79dc7c8 Mon Sep 17 00:00:00 2001 From: Lars Bilke <lars.bilke@ufz.de> Date: Wed, 21 Aug 2019 09:14:45 +0200 Subject: [PATCH] Removed BuildInfo from BaseLib. --- BaseLib/BuildInfo.cpp.in | 36 ------------------------------------ BaseLib/BuildInfo.h | 39 --------------------------------------- BaseLib/CMakeLists.txt | 2 -- CMakeLists.txt | 4 +--- 4 files changed, 1 insertion(+), 80 deletions(-) delete mode 100644 BaseLib/BuildInfo.cpp.in delete mode 100644 BaseLib/BuildInfo.h diff --git a/BaseLib/BuildInfo.cpp.in b/BaseLib/BuildInfo.cpp.in deleted file mode 100644 index fb8ac40d3f6..00000000000 --- a/BaseLib/BuildInfo.cpp.in +++ /dev/null @@ -1,36 +0,0 @@ -/** - * \brief Build information. - * - * \copyright - * Copyright (c) 2012-2019, OpenGeoSys Community (http://www.opengeosys.org) - * Distributed under a Modified BSD License. - * See accompanying file LICENSE.txt or - * http://www.opengeosys.org/project/license - * - */ - -#include "BaseLib/BuildInfo.h" - -namespace BaseLib -{ - -namespace BuildInfo -{ - const std::string cmake_cxx_compiler("@CMAKE_CXX_COMPILER@"); - const std::string cmake_cxx_flags("@CMAKE_CXX_FLAGS@"); - const std::string cmake_cxx_flags_release("@CMAKE_CXX_FLAGS_RELEASE@"); - const std::string cmake_cxx_flags_debug("@CMAKE_CXX_FLAGS_DEBUG@"); - - const std::string git_version_sha1("@GIT_SHA1@"); - const std::string git_version_sha1_short("@GIT_SHA1_SHORT@"); - - const std::string ogs_version("@OGS_VERSION@"); - const std::string cmake_args("@CMAKE_ARGS_ESCAPED@"); - - const std::string source_path("@CMAKE_CURRENT_SOURCE_DIR@"); - const std::string data_path("@Data_SOURCE_DIR@"); - const std::string data_binary_path("@Data_BINARY_DIR@"); - const std::string tests_tmp_path("@PROJECT_BINARY_DIR@/Tests/"); - -} -} diff --git a/BaseLib/BuildInfo.h b/BaseLib/BuildInfo.h deleted file mode 100644 index e4e16a84235..00000000000 --- a/BaseLib/BuildInfo.h +++ /dev/null @@ -1,39 +0,0 @@ -/** - * \brief Build information. - * - * \copyright - * Copyright (c) 2012-2019, OpenGeoSys Community (http://www.opengeosys.org) - * Distributed under a Modified BSD License. - * See accompanying file LICENSE.txt or - * http://www.opengeosys.org/project/license - * - */ - -#pragma once - -#include <string> - -#include "baselib_export.h" - -namespace BaseLib -{ - -namespace BuildInfo -{ - extern BASELIB_EXPORT const std::string cmake_cxx_compiler; - extern BASELIB_EXPORT const std::string cmake_cxx_flags; - extern BASELIB_EXPORT const std::string cmake_cxx_flags_release; - extern BASELIB_EXPORT const std::string cmake_cxx_flags_debug; - - extern BASELIB_EXPORT const std::string git_version_sha1; - extern BASELIB_EXPORT const std::string git_version_sha1_short; - - extern BASELIB_EXPORT const std::string ogs_version; - extern BASELIB_EXPORT const std::string cmake_args; - - extern BASELIB_EXPORT const std::string source_path; - extern BASELIB_EXPORT const std::string data_path; - extern BASELIB_EXPORT const std::string data_binary_path; - extern BASELIB_EXPORT const std::string tests_tmp_path; - } // namespace BuildInfo - } // namespace BaseLib diff --git a/BaseLib/CMakeLists.txt b/BaseLib/CMakeLists.txt index c64e2e4f39a..462833dcfdb 100644 --- a/BaseLib/CMakeLists.txt +++ b/BaseLib/CMakeLists.txt @@ -7,8 +7,6 @@ if(OGS_BUILD_GUI) append_source_files(SOURCES IO/XmlIO/Qt) endif() -list(APPEND SOURCES "${CMAKE_CURRENT_BINARY_DIR}/BuildInfo.cpp" BuildInfo.h) - # Create the library add_library(BaseLib ${SOURCES}) if(BUILD_SHARED_LIBS) diff --git a/CMakeLists.txt b/CMakeLists.txt index efbc30c5324..0f5dc0e64c1 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -341,6 +341,7 @@ include(scripts/cmake/CheckHeaderCompilation.cmake) add_subdirectory(Applications) add_subdirectory(BaseLib) add_subdirectory(GeoLib) +add_subdirectory(InfoLib) add_subdirectory(MathLib) add_subdirectory(MeshLib) add_subdirectory(MeshGeoToolsLib) @@ -358,9 +359,6 @@ endif() file(WRITE ${PROJECT_BINARY_DIR}/disabled-tests.log "${DISABLED_TESTS_LOG}") unset(DISABLED_TESTS_LOG CACHE) # Don't write to CMakeCache.txt -configure_file("${CMAKE_CURRENT_SOURCE_DIR}/BaseLib/BuildInfo.cpp.in" - "${CMAKE_CURRENT_BINARY_DIR}/BaseLib/BuildInfo.cpp" @ONLY) - check_header_compilation() include(scripts/cmake/MarkVariablesAdvanced.cmake) -- GitLab