Skip to content
Snippets Groups Projects
Commit 5727dc99 authored by Lars Bilke's avatar Lars Bilke
Browse files

Removed BuildInfo from BaseLib.

parent 7bc65330
No related branches found
No related tags found
No related merge requests found
/**
* \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/");
}
}
/**
* \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
...@@ -7,8 +7,6 @@ if(OGS_BUILD_GUI) ...@@ -7,8 +7,6 @@ if(OGS_BUILD_GUI)
append_source_files(SOURCES IO/XmlIO/Qt) append_source_files(SOURCES IO/XmlIO/Qt)
endif() endif()
list(APPEND SOURCES "${CMAKE_CURRENT_BINARY_DIR}/BuildInfo.cpp" BuildInfo.h)
# Create the library # Create the library
add_library(BaseLib ${SOURCES}) add_library(BaseLib ${SOURCES})
if(BUILD_SHARED_LIBS) if(BUILD_SHARED_LIBS)
......
...@@ -341,6 +341,7 @@ include(scripts/cmake/CheckHeaderCompilation.cmake) ...@@ -341,6 +341,7 @@ include(scripts/cmake/CheckHeaderCompilation.cmake)
add_subdirectory(Applications) add_subdirectory(Applications)
add_subdirectory(BaseLib) add_subdirectory(BaseLib)
add_subdirectory(GeoLib) add_subdirectory(GeoLib)
add_subdirectory(InfoLib)
add_subdirectory(MathLib) add_subdirectory(MathLib)
add_subdirectory(MeshLib) add_subdirectory(MeshLib)
add_subdirectory(MeshGeoToolsLib) add_subdirectory(MeshGeoToolsLib)
...@@ -358,9 +359,6 @@ endif() ...@@ -358,9 +359,6 @@ endif()
file(WRITE ${PROJECT_BINARY_DIR}/disabled-tests.log "${DISABLED_TESTS_LOG}") file(WRITE ${PROJECT_BINARY_DIR}/disabled-tests.log "${DISABLED_TESTS_LOG}")
unset(DISABLED_TESTS_LOG CACHE) # Don't write to CMakeCache.txt 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() check_header_compilation()
include(scripts/cmake/MarkVariablesAdvanced.cmake) include(scripts/cmake/MarkVariablesAdvanced.cmake)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment