diff --git a/InfoLib/CMakeInfo.cpp.in b/InfoLib/CMakeInfo.cpp.in new file mode 100644 index 0000000000000000000000000000000000000000..8adfce5d1a778f4baa78c4ff141e25cb1c8e23cd --- /dev/null +++ b/InfoLib/CMakeInfo.cpp.in @@ -0,0 +1,21 @@ +/** + * \brief CMake 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 "InfoLib/CMakeInfo.h" + +namespace CMakeInfoLib +{ + +namespace CMakeInfo +{ + const std::string cmake_args("@CMAKE_ARGS_ESCAPED@"); +} +} diff --git a/InfoLib/CMakeInfo.h b/InfoLib/CMakeInfo.h new file mode 100644 index 0000000000000000000000000000000000000000..31de88a0acc1ea75953b4385a6a84f417a55173c --- /dev/null +++ b/InfoLib/CMakeInfo.h @@ -0,0 +1,25 @@ +/** + * \brief CMake 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 "cmakeinfolib_export.h" + +namespace CMakeInfoLib +{ + +namespace CMakeInfo +{ + extern CMAKEINFOLIB_EXPORT const std::string cmake_args; +} // namespace +} // namespace diff --git a/InfoLib/CMakeLists.txt b/InfoLib/CMakeLists.txt new file mode 100644 index 0000000000000000000000000000000000000000..977a9f2aaeaceef4b2e019a2a6cbc8db3ffdf57a --- /dev/null +++ b/InfoLib/CMakeLists.txt @@ -0,0 +1,15 @@ +foreach(lib + Compiler + Git + CMake + Test) + configure_file(${CMAKE_CURRENT_SOURCE_DIR}/${lib}Info.cpp.in + ${CMAKE_CURRENT_BINARY_DIR}/${lib}Info.cpp @ONLY) + + add_library(${lib}InfoLib ${CMAKE_CURRENT_BINARY_DIR}/${lib}Info.cpp + ${lib}Info.h) + + include(GenerateExportHeader) + generate_export_header(${lib}InfoLib) + target_include_directories(${lib}InfoLib PUBLIC ${CMAKE_CURRENT_BINARY_DIR}) +endforeach(lib) diff --git a/InfoLib/CompilerInfo.cpp.in b/InfoLib/CompilerInfo.cpp.in new file mode 100644 index 0000000000000000000000000000000000000000..c290f27543c21dc848455099643695c69792689d --- /dev/null +++ b/InfoLib/CompilerInfo.cpp.in @@ -0,0 +1,24 @@ +/** + * \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 "InfoLib/CompilerInfo.h" + +namespace CompilerInfoLib +{ + +namespace CompilerInfo +{ + 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@"); +} +} diff --git a/InfoLib/CompilerInfo.h b/InfoLib/CompilerInfo.h new file mode 100644 index 0000000000000000000000000000000000000000..96acfc0b7e83855792a8c5c4f2be4dd01eac343c --- /dev/null +++ b/InfoLib/CompilerInfo.h @@ -0,0 +1,28 @@ +/** + * \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 "compilerinfolib_export.h" + +namespace CompilerInfoLib +{ + +namespace CompilerInfo +{ + extern COMPILERINFOLIB_EXPORT const std::string cmake_cxx_compiler; // all not used + extern COMPILERINFOLIB_EXPORT const std::string cmake_cxx_flags; + extern COMPILERINFOLIB_EXPORT const std::string cmake_cxx_flags_release; + extern COMPILERINFOLIB_EXPORT const std::string cmake_cxx_flags_debug; + } // namespace BuildInfo + } // namespace BaseLib diff --git a/InfoLib/GitInfo.cpp.in b/InfoLib/GitInfo.cpp.in new file mode 100644 index 0000000000000000000000000000000000000000..2d3694384ab72de7dfa2e58d7004bf7a4812cfe7 --- /dev/null +++ b/InfoLib/GitInfo.cpp.in @@ -0,0 +1,22 @@ +/** + * \brief Git 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 "InfoLib/GitInfo.h" + +namespace GitInfoLib +{ + +namespace GitInfo +{ + const std::string git_version_sha1_short("@GIT_SHA1_SHORT@"); + const std::string ogs_version("@OGS_VERSION@"); +} +} diff --git a/InfoLib/GitInfo.h b/InfoLib/GitInfo.h new file mode 100644 index 0000000000000000000000000000000000000000..fbee43541c5027258dcf41871bd7afdf4ca25cfb --- /dev/null +++ b/InfoLib/GitInfo.h @@ -0,0 +1,26 @@ +/** + * \brief Git 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 "gitinfolib_export.h" + +namespace GitInfoLib +{ + +namespace GitInfo +{ + extern GITINFOLIB_EXPORT const std::string git_version_sha1_short; + extern GITINFOLIB_EXPORT const std::string ogs_version; +} // namespace +} // namespace diff --git a/InfoLib/TestInfo.cpp.in b/InfoLib/TestInfo.cpp.in new file mode 100644 index 0000000000000000000000000000000000000000..3d16ad2371afcee11ec43ef9aecd4502bf58ef26 --- /dev/null +++ b/InfoLib/TestInfo.cpp.in @@ -0,0 +1,24 @@ +/** + * \brief Test 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 "InfoLib/TestInfo.h" + +namespace TestInfoLib +{ + +namespace TestInfo +{ + // 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/InfoLib/TestInfo.h b/InfoLib/TestInfo.h new file mode 100644 index 0000000000000000000000000000000000000000..3461b354d001873b1d0398b5e3599a17a2ffc8c7 --- /dev/null +++ b/InfoLib/TestInfo.h @@ -0,0 +1,28 @@ +/** + * \brief Test 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 "testinfolib_export.h" + +namespace TestInfoLib +{ + +namespace TestInfo +{ + // extern INFOLIB_EXPORT const std::string source_path; // not used + extern TESTINFOLIB_EXPORT const std::string data_path; + // extern INFOLIB_EXPORT const std::string data_binary_path; // not used + extern TESTINFOLIB_EXPORT const std::string tests_tmp_path; +} // namespace +} // namespace