diff --git a/CMakeLists_files.cmake b/CMakeLists_files.cmake index 69d5a22d..2af2c6c9 100644 --- a/CMakeLists_files.cmake +++ b/CMakeLists_files.cmake @@ -124,6 +124,7 @@ list (APPEND MAIN_SOURCE_FILES opm/core/utility/parameters/tinyxml/tinyxmlerror.cpp opm/core/utility/parameters/tinyxml/tinyxmlparser.cpp opm/core/utility/parameters/tinyxml/xmltest.cpp + opm/core/version.c opm/core/wells/InjectionSpecification.cpp opm/core/wells/ProductionSpecification.cpp opm/core/wells/WellCollection.cpp @@ -213,6 +214,7 @@ list (APPEND PUBLIC_HEADER_FILES opm/core/linalg/blas_lapack.h opm/core/linalg/call_umfpack.h opm/core/linalg/sparse_sys.h + opm/core/version.h opm/core/wells.h opm/core/pressure/CompressibleTpfa.hpp opm/core/pressure/FlowBCManager.hpp diff --git a/opm/core/version.c b/opm/core/version.c new file mode 100644 index 00000000..f5e1cdfe --- /dev/null +++ b/opm/core/version.c @@ -0,0 +1,8 @@ +/* this file is written by the build system; don't include it anywhere else */ +#include + +/* declaration of the externally visible symbol */ +#include + +/* initialization */ +const char* const opm_core_version = PROJECT_VERSION; diff --git a/opm/core/version.h b/opm/core/version.h new file mode 100644 index 00000000..b82f13b9 --- /dev/null +++ b/opm/core/version.h @@ -0,0 +1,4 @@ +/** + * This symbol is initialized with the built version of the library. + */ +extern const char* const opm_core_version;